Commit 2b050611 authored by Nathan Peraldi's avatar Nathan Peraldi

edit: remove empty lines

parent c407af8f
......@@ -17,19 +17,15 @@ function actualMonthYear($plus = 0)
$month -= 12;
$year += 1;
}
$month = addZero($month);
$year = addZero($year);
return $month . "/01/" . $year;;
}
function addZero($number)
{
//ajoute un zéro à $number s'il le faut
//exemple : addZero("1") retourne "01"
if (strlen($number) == 1) {
......@@ -42,7 +38,6 @@ function addZero($number)
function generateDates()
{
//cette fonction génère les options pour la question "période d'adhésion"
for ($i = 1; $i < 13; $i++) {
$premiereDate = new DateTime(actualMonthYear($i));
......@@ -60,8 +55,4 @@ function generateDates()
echo $message;
}
}
?>
\ No newline at end of file
......@@ -15,37 +15,23 @@
/*
Template Name: Compteur événement
*/
function recup_nombre()
{
global $wpdb;
$search = "ag-adullact-2019";
$post = "post_name";
$link = $_SERVER["REQUEST_URI"];
$cleared_link = explode("/",$link)[2];
$search = $cleared_link;
$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 "Nombre d'inscrits à l'événement : " . $result[0]->number;
}
global $EM_Event;
/* @var $EM_Event EM_Event */
recup_nombre();
echo $EM_Event->output_single();
?>
\ No newline at end of file
echo $EM_Event->output_single(); ?>
\ 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