<?php require $_SERVER["DOCUMENT_ROOT"] . "/inc/inc.config.php"; require $_SERVER["DOCUMENT_ROOT"] . "/admin/classes/Authentication.php"; require $_SERVER["DOCUMENT_ROOT"] . "/admin/classes/Goldbook.php"; session_start(); $authentication = new Authentication(); if (!isset($_SESSION['accessGranted']) || !$_SESSION['accessGranted']) { $result = $authentication->grantAccess($_POST['login'], $_POST['mdp']); if (!$result) { header('Location: /admin/?action=error'); } else { $_SESSION['accessGranted'] = true; } } $goldbook = new Goldbook(); $result = $goldbook->goldbookUnvalidateGet(); if (empty($result)) { $message = 'Tous les messages sont validés'; } else { $message = 'Vous avez ' . $result[0]['nb'] . ' message(s) à valider'; } ?> <!doctype html> <html class="no-js" lang="en"> <head> <?php include_once 'inc-meta.php'; ?> </head>
$news = new News(); if ($_GET['action'] == 'delete') { try { $result = $news->newsDelete($_GET['id']); $news = null; header('Location: /admin/actualite/liste.php'); } catch (Exception $e) { echo 'Erreur contactez votre administrateur <br> :', $e->getMessage(), "\n"; $news = null; exit; } } } if ($_GET['reference'] == 'goldbook') { //supprimer $goldbook = new Goldbook(); if ($_GET['action'] == 'delete') { try { $result = $goldbook->goldbookDelete($_GET['id']); $goldbook = null; header('Location: /admin/livre_dor/liste.php'); } catch (Exception $e) { echo 'Erreur contactez votre administrateur <br> :', $e->getMessage(), "\n"; $goldbook = null; exit; } } } if ($_GET['reference'] == 'categorie') { //supprimer $catproduct = new Catproduct();
$news = new News(); if ($_GET["action"] == 'delete') { try { $result = $news->newsDelete($_GET["id"]); $news = null; header('Location: /admin/actualite/liste.php'); } catch (Exception $e) { echo 'Erreur contactez votre administrateur <br> :', $e->getMessage(), "\n"; $news = null; exit; } } } if ($_GET["reference"] == 'goldbook') { //supprimer $goldbook = new Goldbook(); if ($_GET["action"] == 'delete') { try { $result = $goldbook->goldbookDelete($_GET["id"]); $goldbook = null; header('Location: /admin/livre_dor/liste.php'); } catch (Exception $e) { echo 'Erreur contactez votre administrateur <br> :', $e->getMessage(), "\n"; $goldbook = null; exit; } } } if ($_GET["reference"] == 'categorie') { //supprimer $catproduct = new Catproduct();
<? include_once ( $_SERVER['DOCUMENT_ROOT'] . "/admin/inc-auth-granted.php" );?> <? include_once ( $_SERVER['DOCUMENT_ROOT'] . "/admin/classes/utils.php" );?> <? require $_SERVER['DOCUMENT_ROOT'] . "/admin/classes/Goldbook.php"; if (!empty($_GET)){ //Modif $action = 'modif'; $goldbook = new Goldbook(); $result = $goldbook->goldbookGet($_GET['id']); //print_r($result); if (empty($result)) { $message = 'Aucun enregistrements'; } else { $labelTitle= 'Livre d\' or N°: '. $_GET['id']; $date_goldbook= traitement_datetime_affiche($result[0]['date']); $id= $_GET['id']; $nom= $result[0]['nom']; $email= $result[0]['email']; $message= $result[0]['message']; if($result[0]['online']=='1') { $online = 'checked'; } else { $online = ''; } } } else { //ajout goldbook $action = 'add'; $labelTitle = 'Edition Livre Or '; $id= null; $nom= null;
<? include_once ( $_SERVER['DOCUMENT_ROOT'] . "/admin/inc-auth-granted.php" );?> <? include_once ( $_SERVER['DOCUMENT_ROOT'] . "/admin/classes/utils.php" );?> <? require $_SERVER['DOCUMENT_ROOT'] . "/admin/classes/Goldbook.php"; $goldbook = new Goldbook(); $result = $goldbook->goldbookGet(null); //print_r($result); if (empty($result)) { $message = 'Aucun enregistrements'; } else { $message = ''; } ?> <!doctype html> <html class="no-js" lang="en"> <head> <? include_once $_SERVER['DOCUMENT_ROOT'] . "/admin/inc-meta.php";?> </head> <body> <? require_once $_SERVER['DOCUMENT_ROOT'] . "/admin/inc-menu.php";?> <div class="container"> <div class="row"> <div class="col-xs-12 col-sm-12 col-md-12"> <table class="table table-hover table-bordered table-condensed table-striped" > <thead>
<?php include_once $_SERVER["DOCUMENT_ROOT"] . "/admin/classes/utils.php"; require $_SERVER["DOCUMENT_ROOT"] . "/inc/inc.config.php"; require $_SERVER["DOCUMENT_ROOT"] . "/admin/classes/Goldbook.php"; require $_SERVER["DOCUMENT_ROOT"] . "/admin/classes/Contact.php"; $debug = false; $goldbook = new Goldbook(); $contact = new Contact(); $mon_action = $_POST["mon_action"]; $anti_spam = $_POST["as"]; //print_pre( $_POST ); // ---- Post du commentaire ---------------------------- // if ($mon_action == "poster" && $anti_spam == '') { if ($debug) { echo "On poste...<br>"; } // ---- Enregistrement dans "goldbook" ------- // if (1 == 1) { unset($val); $val["datepicker"] = date("d/m/Y"); $val["name"] = $_POST["nom"]; $val["email"] = $_POST["email"]; $val["message"] = $_POST["message"]; $goldbook->goldbookAdd($val, $debug); } // ------------------------------------------- // // ---- Enregistrement dans "contact" -------- // if (1 == 1) { $num_contact = $contact->isContact($_POST["email"], $debug); unset($val);
<? require 'admin/classes/Goldbook.php'; require 'admin/classes/Contact.php'; require 'admin/classes/utils.php'; session_start(); $debug = false; $goldbook = new Goldbook(); $contact = new Contact(); $mon_action = $_POST[ "mon_action" ]; $anti_spam = $_POST[ "as" ]; //print_pre( $_POST ); // ---- Post du commentaire ---------------------------- // if ( $mon_action == "poster" && $anti_spam == '' ) { if ( $debug ) echo "On poste...<br>"; // ---- Enregistrement dans "goldbook" ------- // if ( 1 == 1 ) { unset( $val ); $val[ "datepicker"] = date( "d/m/Y" ); $val[ "name"] = $_POST[ "nom" ]; $val[ "email"] = $_POST[ "email" ]; $val[ "message"] = $_POST[ "message" ]; $goldbook->goldbookAdd( $val, $debug ); } // ------------------------------------------- // // ---- Enregistrement dans "contact" -------- //