From 5fd9fa480f302902328b81f912dd67ce378284f8 Mon Sep 17 00:00:00 2001 From: citizenz7 Date: Thu, 20 Apr 2017 18:50:55 +0200 Subject: V.1.4.6 --- Html/admin/licences.php | 110 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 Html/admin/licences.php (limited to 'Html/admin/licences.php') diff --git a/Html/admin/licences.php b/Html/admin/licences.php new file mode 100644 index 0000000..73cab4e --- /dev/null +++ b/Html/admin/licences.php @@ -0,0 +1,110 @@ + retour sur la page login +if(!$user->is_logged_in()) { + header('Location: login.php'); +} + +if(isset($_SESSION['userid'])) { + if($_SESSION['userid'] != 1) { + header('Location: '.SITEURL); + } +} + +//show message from add / edit page +if(isset($_GET['dellicence'])){ + + $stmt = $db->prepare('DELETE FROM blog_licences WHERE licenceID = :licenceID') ; + $stmt->execute(array(':licenceID' => $_GET['dellicence'])); + + header('Location: licences.php?action=supprime'); + exit; +} + +// titre de la page +$pagetitle= 'Admin : gestion des licences'; +require('../includes/header.php'); +?> + + + +
+ + + + +
+
+ + + + La licence a été supprimée avec succès.'; + } + if(isset($_GET['action']) && $_GET['action'] == 'ajoute'){ + echo '

La licence a été ajoutée avec succès.

'; + } + ?> + + + + + + + query('SELECT licenceID FROM blog_licences'); + //pass number of records to + $pages->set_total($stmt->rowCount()); + + $stmt = $db->query('SELECT licenceID, licenceTitle, licenceSlug FROM blog_licences ORDER BY licenceTitle ASC '.$pages->get_limit()); + + while($row = $stmt->fetch()){ + + echo ''; + echo ''; + ?> + + + + '; + } + + } catch(PDOException $e) { + echo $e->getMessage(); + } + ?> +
TitreAction
'.html($row['licenceTitle']).' + | + +
+ +
+

+ + page_links(); + ?> +
+ + + +
+
+
+ + + + + -- cgit v1.2.1