url->register('xorgAuth', 'Xorg', '^auth/(.*)$', array('xorgAuthentifier', 'doAuth')); $core->url->register('xorgLogin', 'XorgLogin', '^admin/(xorg\.php)$', array('xorgLoginPage', 'page')); class xorgAuthWidget { static public function widget(&$w) { global $core; if ($core->auth->xorg_infos['forlife']) { return '

Tu es ' . $core->auth->xorg_infos['prenom'] . ' ' . $core->auth->xorg_infos['nom'] . '
' . 'déconnexion

'; } else { return '

M\'authentifier via Polytechnique.org

'; } } } class xorgLoginPage extends dcUrlHandlers { static public function page($args) { switch ($args) { case 'xorg.php': self::dispatchForm(); default: self::p404(); } } static protected function dispatchForm() { # If we have a session cookie, go to index.php if (isset($_SESSION['sess_user_id'])) { header('Location: http://murphy.m4x.org/~x2003bruneau/dotclear/admin/index.php'); } # Loading locales for detected language $dlang = http::getAcceptLanguage(); if ($dlang) { l10n::set(dirname(__FILE__).'/../locales/'.$dlang.'/main'); } global $core; $msg = $err = null; header('Content-Type: text/html; charset=UTF-8'); ?> <?php echo html::escapeHTML(DC_VENDOR_NAME); ?> callBehavior('loginPageHTMLHead'); ?>

'.$err.''; } if ($msg) { echo '

'.$msg.'

'; } { echo '
'. '

Via Polytechnique.org

' . '

Via le formulaire

' . '
'. '

'.__('You must accept cookies in order to use the private area.').'

'; if ($core->auth->allowPassChange()) { echo '

'.__('I forgot my password').'

'; } } ?>
auth->killSession(); break; case 'Xorg': if ($core->auth->callXorg($_GET['path'])) { header('Location: http://murphy.m4x.org' . $_GET['path']); exit; } break; case 'XorgReturn': $core->auth->returnXorg(); break; default: self::p404(); } return; } } ?>