public static function generatePage(&$tpl, &$session, &$account) { if (!isset($_POST['u']) || !isset($_POST['p'])) { return fctErrorMSG('Données requises manquantes.'); } if (isset($_POST['persoId'])) { $errorNo = self::tryLogin($session, $account, $_POST['u'], $_POST['p'], $_POST['persoId']); } else { $errorNo = self::tryLogin($session, $account, $_POST['u'], $_POST['p']); } if (isset($_GET['popup'])) { echo $errorNo; die; } //Échec de l'identification if ($errorNo != 0) { $tpl->set('ERRORNO', $errorNo); return $tpl->fetch($account->getSkinRemotePhysicalPath() . 'html/Visitor/login_wrong.htm', __FILE__, __LINE__); } //Authentification réussie Remise::doRemise($account, 10); return true; }
<?php /** * Routine effectuant les remises * * @author Francois Mazerolle <*****@*****.**> * @copyright Copyright (c) 2009, Francois Mazerolle * @version 1.0 * @package CronTask */ require_once '_system.php'; Remise::doRemise($db, 100);