Commit 7a2ed17a authored by Nathan Peraldi's avatar Nathan Peraldi

delete files for events-manager

parent 1fb581cd
<?php
/*
* This file generates the default booking form fields. Events Manager Pro does not use this file.
*/
/* @var $EM_Event EM_Event */
//Here we have extra information required for the booking.
?>
<?php if( !is_user_logged_in() && apply_filters('em_booking_form_show_register_form',true) ): ?>
<?php //User can book an event without registering, a username will be created for them based on their email and a random password will be created. ?>
<input type="hidden" name="register_user" value="1" />
<p>
<label for='user_name'>
<abbr class="adullact-required" title="Champ obligatoire">*</abbr>
Nom
</label>
<input required type="text" name="user_name" id="user_name" class="input" value="<?php if(!empty($_REQUEST['user_name'])) echo esc_attr($_REQUEST['user_name']); ?>" />
</p>
<p>
<label for='dbem_collectivity'>Collectivité</label>
<input type="text" name="dbem_collectivity" id="dbem_collectivity" class="input" value="<?php if(!empty($_REQUEST['dbem_collectivity'])) echo esc_attr($_REQUEST['dbem_collectivity']); ?>" />
</p>
<p>
<label for='user_email'>
<abbr class="adullact-required" title="Champ obligatoire">*</abbr>
Email
</label>
<input required type="text" name="user_email" id="user_email" class="input" value="<?php if(!empty($_REQUEST['user_email'])) echo esc_attr($_REQUEST['user_email']); ?>" />
</p>
<?php do_action('em_register_form'); //careful if making an add-on, this will only be used if you're not using custom booking forms ?>
<?php endif; ?>
<p>
<label for='booking_comment'><?php _e('Comment', 'events-manager') ?></label>
<textarea name='booking_comment' rows="2" cols="20"><?php echo !empty($_REQUEST['booking_comment']) ? esc_attr($_REQUEST['booking_comment']):'' ?></textarea>
</p>
\ No newline at end of file
<?php
/*
* Remember that this file is only used if you have chosen to override event pages with formats in your event settings!
* You can also override the single event page completely in any case (e.g. at a level where you can control sidebars etc.), as described here - http://codex.wordpress.org/Post_Types#Template_Files
* Your file would be named single-event.php
*/
/*
* This page displays a single event, called during the the_content filter if this is an event page.
* You can override the default display settings pages by copying this file to yourthemefolder/plugins/events-manager/templates/ and modifying it however you need.
* You can display events however you wish, there are a few variables made available to you:
*
* $args - the args passed onto EM_Events::output()
*/
//initialisation des variables
$sinscrire = "S'inscrire à l'évènement >";
$inscriptions_closes = "Inscription closes";
function recup_nombre()
{
global $wpdb;
$search = "ag-adullact-2019";
$post = "post_name";
$link = $_SERVER["REQUEST_URI"];
$search = explode("/", $link)[2];
$query = "SELECT count(meta_value) as number FROM wp5304_postmeta WHERE meta_value LIKE '%" . $search . "%' && meta_value LIKE '%" . $post . "%'";
$result = $wpdb->get_results($query);
echo "<div id='adullact-nombre-inscrits'>Nombre d'inscrits : " . $result[0]->number . "</div>";
}
global $EM_Event;
/* @var $EM_Event EM_Event */
$the_event = $EM_Event->output_single();
//on enlève ce texte inutile de cette manière car aucun moyen de faire autrement !
$the_event = str_replace("Carte non disponible", "", $the_event);
//on affiche simplement l'évènement.
echo $the_event;
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment