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/edit-licence.php | 125 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 125 insertions(+) create mode 100644 Html/admin/edit-licence.php (limited to 'Html/admin/edit-licence.php') diff --git a/Html/admin/edit-licence.php b/Html/admin/edit-licence.php new file mode 100644 index 0000000..bbdb466 --- /dev/null +++ b/Html/admin/edit-licence.php @@ -0,0 +1,125 @@ + 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); + } +} + +// titre de la page +$pagetitle= 'Admin : Edition des licences'; +require('../includes/header.php'); +?> + + +
+ + + +
+
+ + +

Licences Index

+ +

Edition de la licence

+ + prepare('UPDATE blog_licences SET licenceTitle = :licenceTitle, licenceSlug = :licenceSlug WHERE licenceID = :licenceID') ; + $stmt->execute(array( + ':licenceTitle' => $licenceTitle, + ':licenceSlug' => $licenceSlug, + ':licenceID' => $licenceID + )); + + //redirect to index page + header('Location: licences.php?action=updated'); + exit; + + } catch(PDOException $e) { + echo $e->getMessage(); + } + + } + + } + ?> + + '; + } + } + + try { + + $stmt = $db->prepare('SELECT licenceID, licenceTitle FROM blog_licences WHERE licenceID = :licenceID') ; + $stmt->execute(array(':licenceID' => $_GET['id'])); + $row = $stmt->fetch(); + + } catch(PDOException $e) { + echo $e->getMessage(); + } + + ?> + +
+ '> + +


+ '>

+ +

+ +
+
+ + + +
+
+
+ + + + + -- cgit v1.2.1