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-category.php | 125 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 125 insertions(+) create mode 100644 Html/admin/edit-category.php (limited to 'Html/admin/edit-category.php') diff --git a/Html/admin/edit-category.php b/Html/admin/edit-category.php new file mode 100644 index 0000000..82d2249 --- /dev/null +++ b/Html/admin/edit-category.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 catégories'; +require('../includes/header.php'); +?> + + +
+ + + +
+
+ + +

Catégories Index

+ +

Edition de la catégorie

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


+ '>

+ +

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