Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ALGLAVE Ivan
Drinkpedia
Commits
1621ad92
Commit
1621ad92
authored
Dec 03, 2020
by
SCHNEIDER Remi
Browse files
Merge branch 'master' of
https://gitlab.univ-lorraine.fr/alglave2u/drinkpedia
parents
e9b6956d
2ddf1325
Changes
1
Hide whitespace changes
Inline
Side-by-side
Hierarchy.php
View file @
1621ad92
...
...
@@ -45,6 +45,7 @@
return
null
;
// A FAIRE
}
if
(
!
isset
(
$_GET
[
'element'
]))
{
// Si on ouvre la Hiérachie pour la première fois, on part de 'Aliment'
$aliment
=
'Vin effervescent'
;
...
...
@@ -52,6 +53,8 @@
// Sinon on récupère l'aliment en cours
$aliment
=
$_GET
[
'element'
];
}
echo
'<script>alert('
.
"'"
.
$aliment
.
"'"
.
');</script>'
;
$sup_cat
=
get_super_categories
(
$aliment
);
$sous_cat
=
get_sous_categories
(
$aliment
);
...
...
@@ -64,7 +67,7 @@
echo
'<div class="category-view">'
;
echo
'<h1> Super-catégories de '
.
$aliment
.
' </h1>'
;
foreach
(
$sup_cat
as
$cat
)
{
echo
'<li><button onclick="notifyParent('
.
$cat
.
');">'
.
$cat
.
'</button></li>'
;
echo
'<li><button onclick="notifyParent('
.
"'"
.
$cat
.
"'"
.
');">'
.
$cat
.
'</button></li>'
;
}
echo
'</div>'
;
}
...
...
@@ -74,7 +77,7 @@
echo
'<h1> Sous-catégories de '
.
$aliment
.
' </h1>'
;
foreach
(
$sous_cat
as
$cat
)
{
//echo '<li><button onclick="notifyParent('.$cat.');">'.$cat.'</button></li>';
echo
'<li><button onclick="
alert('
.
$cat
.
');">'
.
$cat
.
'</button></li>'
;
echo
'<li><button onclick="
notifyParent('
.
"'"
.
$cat
.
"'"
.
');">'
.
$cat
.
'</button></li>'
;
}
echo
'</div>'
;
}
...
...
Write
Preview
Supports
Markdown
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