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((strpos($page, 'index.php')!==false || $page==basename(ROOT_URL) || $page=='') && !isset($_['module']) && !empty($conf->get('home_page')) && (!isset($_['admin_login']) || empty($_['admin_login']))) 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(empty($cssModule) && ($page=='index.php' || $page==basename(ROOT_URL) || $page=='' || preg_match("/index\.php\?admin_login=[0|1]/i", $page))) $cssModule[] = 'module-index'; if(isset($_['embedded'])) $cssModule[]='embedded'; if(!isset($_['admin_login']) && file_exists(File::dir().SLASH.'enabled.maintenance') && !$myUser->connected()){ isset($_['error']) && !empty($_['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'];}); $userMenu = array(); if($myUser->connected()){ Plugin::callHook("menu_user", array(&$userMenu)); uasort($userMenu , function($a,$b){return $a['sort']-$b['sort'];}); } ?>
get('core_public_seo'))): ?> connected() ? 'Accueil':'Connexion'; foreach($mainMenu as $item) $title = (!empty($item['url']) && strpos($page, $item['url']) !== false) ? $item['label'] : $title; foreach($userMenu as $item) $title = (isset($item['url']) && strpos($page, $item['url']) !== false) ? $item['label'] : $title; ?>