<?php require_once _PATH_ . "modele/groupe.class.php"; require_once _PATH_ . "modele/magasin.class.php"; require_once _PATH_ . "modele/utilisateur.class.php"; if ($_SESSION['utilisateur']->getGroupe() == "administrateur" && $_SESSION['utilisateur']->getstatut() == "actif") { if (!empty($post)) { $nom = $post['nom']; $prenom = $post['prenom']; $login = $post['login']; $lib_profil = $post['profil']; $lib_mag = $post['entite']; try { $listeUtil = Utilisateurs::getUtilisateursBy($nom, $prenom, $login, $lib_mag, $lib_profil); $parameters['listeUtil'] = $listeUtil; } catch (Exception $e) { $parameters['error'] = $e->getMessage(); } } $parameters['groupes'] = Groupe::getGroupes(); $parameters['magasins'] = Magasin::getMagasins(); $smarty->assign('parameters', $parameters); } else { $smarty->display(_TPL_ . 'error.tpl'); die; }
<?php require_once __DIR__ . "/autoload/session.autoload.php"; require_once __DIR__ . "/autoload/checkconnected.autoload.php"; require_once __DIR__ . "/class/Network.class.php"; require_once __DIR__ . "/class/Stats.class.php"; require_once __DIR__ . "/class/Magasin.class.php"; require_once __DIR__ . "/class/Access.class.php"; require_once __DIR__ . "/class/User.class.php"; $Magasin = new Magasin(); $magasins = $Magasin->getMagasins(); $User = new User(); $User->checkConnected(); $Access = new Access(); $Access->setUsername($_SESSION['username']); $Access->setModule('Statistiques'); $Access->isAllowedRedirect(); ?> <!DOCTYPE html> <html> <head> <?php require_once __DIR__ . "/template/headcode.template.php"; ?> </head> <body> <?php include __DIR__ . "/template/header.template.php"; ?>
<?php require_once __DIR__ . "/autoload/session.autoload.php"; require_once __DIR__ . "/autoload/checkconnected.autoload.php"; require_once __DIR__ . "/class/Network.class.php"; require_once __DIR__ . "/class/User.class.php"; require_once __DIR__ . "/class/Magasin.class.php"; $Magasin = new Magasin(); $magasins = $Magasin->getMagasins(); ?> <!DOCTYPE html> <html> <head> <?php require_once __DIR__ . "/template/headcode.template.php"; ?> </head> <body> <?php include __DIR__ . "/template/header.template.php"; ?> <div class="container sub-body"> <div class="controls text-align-center margin-top-1"> <div class="row-fluid"> <div class="span9 well"> <legend>Etat du réseau</legend>
public function alertMostExpensiveProducts() { $Magasin = new Magasin(); $magasins = $Magasin->getMagasins(); $message = '<br><br>'; foreach ($magasins as $key => $value) { $this->Transaction->setMagasin($value['localisation']); $message .= ' <br><br> <h3>Voici les produits les plus chers vendus sur : <strong>' . $value['localisation'] . '</strong></h3>'; $products = $this->Transaction->getMostExpensiveProducts(); $message .= '<table>'; $message .= '<thead> <tr> <td style="border:1px solid black">PRIX</td> <td style="border:1px solid black">TYPE</td> <td style="border:1px solid black">TITRE</td> <td style="border:1px solid black">AUTEUR</td> <td style="border:1px solid black">EDITEUR</td> <td style="border:1px solid black">EDITION</td> </tr> </thead>'; foreach ($products as $key => $product) { $message .= '<tr> <td style="border:1px solid black">' . $product['prix'] . ' EUROS</td> <td style="border:1px solid black">' . $product['type'] . '</td> <td style="border:1px solid black">' . $product['titre'] . '</td> <td style="border:1px solid black">' . $product['auteur'] . '</td> <td style="border:1px solid black">' . $product['editeur'] . '</td> <td style="border:1px solid black">' . $product['edition'] . '</td> </tr>'; } $message .= '</table>'; } return $message; }