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/add-licence.php | 134 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 134 insertions(+) create mode 100644 Html/admin/add-licence.php (limited to 'Html/admin/add-licence.php') diff --git a/Html/admin/add-licence.php b/Html/admin/add-licence.php new file mode 100644 index 0000000..900f331 --- /dev/null +++ b/Html/admin/add-licence.php @@ -0,0 +1,134 @@ + 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 : ajouter une licence'; +require('../includes/header.php'); +?> + + + +
+ + + +
+
+ +Accueil > '); +for($i=1; $i"; + } + else $prChunks[0]=$dChunks[$i] . ' > '; + echo('">'); + echo(str_replace("_" , " " , $prChunks[0])); +} +?> +

+ + + +

Licences Index

+ +

Ajouter une licence

+ + prepare('INSERT INTO blog_licences (licenceTitle,licenceSlug) VALUES (:licenceTitle, :licenceSlug)') ; + $stmt->execute(array( + ':licenceTitle' => $licenceTitle, + ':licenceSlug' => $licenceSlug + )); + + //redirect to index page + header('Location: licences.php?action=ajoute'); + exit; + + } catch(PDOException $e) { + echo $e->getMessage(); + } + + } + + } + + //check for any errors + if(isset($error)){ + foreach($error as $error){ + echo '

'.$error.'

'; + } + } + ?> + +
+ +


+ '>

+ +

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