From 082ae3df0b9dd759d56684b0221df62ea171f8ec Mon Sep 17 00:00:00 2001 From: polo Date: Tue, 30 May 2023 23:19:28 +0200 Subject: bouton partager pour visiteurs --- controller/admin.php | 2 ++ controller/config.php | 5 +++-- controller/visitor.php | 2 ++ 3 files changed, 7 insertions(+), 2 deletions(-) (limited to 'controller') diff --git a/controller/admin.php b/controller/admin.php index 038d4c3..21a8f6f 100644 --- a/controller/admin.php +++ b/controller/admin.php @@ -169,6 +169,8 @@ function legalEdit($fileCode, int $suppression) function albumEdit($fileCode, int $suppression) { $page = $_GET['page']; + $lien_partage = 'index.php?page=' . $page . '&file_code=' . $fileCode; + global $host; $title = "Discographie"; // modèle diff --git a/controller/config.php b/controller/config.php index 067d89b..6fc7000 100644 --- a/controller/config.php +++ b/controller/config.php @@ -12,8 +12,9 @@ $storage = 'files'; // laisser 'files'!! // l'utilisation d'une BDD n'est pas prévue pour l'instant -// Racine du site (inutile pour l'instant) +// Racine du site //$root = getcwd(); +//$root = 'http://' . $_SERVER['DOCUMENT_ROOT']; // nom de domaine (utilisé pour créer des liens absolus) // depuis une fonction, faire un: 'global $host;' @@ -46,7 +47,7 @@ else // conversion des 2M du php.ini en 2000000 -// les kibi, mébi et gibi sont inutiles ici +// note: les kibi, mébi et gibi sont inutiles ici function returnBytes ($size_str) // chaine du style '2M' { switch (substr ($size_str, -1)) diff --git a/controller/visitor.php b/controller/visitor.php index 92f3db7..477ef77 100644 --- a/controller/visitor.php +++ b/controller/visitor.php @@ -163,6 +163,8 @@ function discoVisitor() function albumVisitor($fileCode) { $page = $_GET['page']; + $lien_partage = 'index.php?page=' . $page . '&file_code=' . $fileCode; + global $host; $Albums = new Album($page, 'discographie'); $Albums->getAllJSON(); -- cgit v1.2.3