preference('passwordTime')!='' && !$myUser->superadmin){ $basepage = explode('?',$page); $basepage = $basepage[0]; if(is_numeric($conf->get('password_delay')) && $basepage!="account.php" && ( (time() - ($conf->get('password_delay') * 86400) > $myUser->preference('passwordTime')) ) ) header('location: account.php?error=Votre mot de passe est trop vieux, veuillez le renouveller ci dessous.'); } //Redirige la home si définie dans les settings if(($page=='index.php' || $page==basename(ROOT_URL) || $page=='') && !isset($_['module']) && !empty($conf->get('home_page'))) header('location:'.$conf->get('home_page')); $cssModule = array(); foreach(array('module','page','section') as $term){ if(isset($_[$term])) $cssModule[]= preg_replace('/([^a-z])/i', '-',$term.'-'.$_[$term]); } if(!isset($_['admin_login']) && file_exists('enabled.maintenance') && !$myUser->connected()){ $_['error'] ? header('Location: maintenance.php?error='.$_['error']) : header('Location: maintenance.php'); exit(); } else { $mainMenu = array(); Plugin::callHook("menu_main", array(&$mainMenu)); uasort ($mainMenu , function($a,$b){return $a['sort']>$b['sort']?1:-1;}); $userMenu = array(); if ($myUser->connected()){ Plugin::callHook("menu_user", array(&$userMenu)); uasort ($userMenu , function($a,$b){return $a['sort']>$b['sort']?1:-1;}); } ?>
connected() ? 'Accueil':'Connexion'; foreach($mainMenu as $item): $title = (!empty($item['url']) && strpos($page, $item['url']) !== false) ? $item['label'] : $title; endforeach; foreach($userMenu as $item): $title = (isset($item['url']) && strpos($page, $item['url']) !== false) ? $item['label'] : $title; endforeach; ?>