Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Adullact
Theme-WordPress-Adullact-org
Commits
2b050611
Commit
2b050611
authored
Jul 04, 2019
by
N. Peraldi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
edit: remove empty lines
parent
c407af8f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
24 deletions
+1
-24
periodSelection.php
periodSelection.php
+0
-9
plugins/events-manager/templates/event-single.php
plugins/events-manager/templates/event-single.php
+1
-15
No files found.
periodSelection.php
View file @
2b050611
...
...
@@ -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
plugins/events-manager/templates/event-single.php
View file @
2b050611
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment