require 'classes/AdminArchiveAccess.class.php'; require 'classes/httpQueryStr.class.php'; require 'classes/locale.class.php'; session_start(); if (isset($_GET['sessionDestroy'])) { session_destroy(); $_SESSION = array(); header('Location: connexion.php'); exit; } if (!isset($_SESSION['user']) || $_SESSION['user'] != USER_KEY) { header('Location: connexion.php'); exit; } try { $db = new salerDb(DSN, USER, PASSW); $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $db->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, true); } catch (PDOException $e) { die("Erreur PDO : <br />" . $e->getMessage() . "<br />Trace : " . $e->getTraceAsString()); } $httpQuery = new httpQueryStr(); $httpQuery->setIndexDefVal('p', 'indexSelection'); try { // Récupération des produits pour la construction de la navigation $allSoftwares = $db->getAllSoftwares(); $allSoftwareCategories = $db->getAllSoftwareCategories(); // Contrôleur if (file_exists('userCtrl/' . $httpQuery->p . '.php')) { require_once 'userCtrl/' . $httpQuery->p . '.php'; }
require 'classes/AdminArchiveAccess.class.php'; require 'classes/httpQueryStr.class.php'; require 'classes/locale.class.php'; session_start(); if (isset($_GET['sessionDestroy'])) { session_destroy(); $_SESSION = array(); header('Location: connexion.php'); exit; } if (!isset($_SESSION['user']) || $_SESSION['user'] != USER_KEY) { header('Location: connexion.php'); exit; } try { $db = new salerDb(DSN, USER, PASSW); $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $db->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, true); } catch (PDOException $e) { die("Erreur PDO : <br />" . $e->getMessage() . "<br />Trace : " . $e->getTraceAsString()); } $httpQuery = new httpQueryStr(); $httpQuery->setIndexDefVal('p', 'archives'); $httpQuery->setIndexDefVal('productID', '0'); try { // Récupération des produits pour la construction de la navigation $allProducts = $db->getAllProducts(); // Contrôleur if (file_exists('userCtrl/' . $httpQuery->p . '.php')) { require_once 'userCtrl/' . $httpQuery->p . '.php'; }