function main() { global $lang, $smarty; if (user_loggedin()) { if (isset($_GET['do']) && $_GET['do'] == 'logout') { user_logout(); function myredirect() { login_redirect('index.php'); } add_filter('wp_head', 'myredirect'); $content = SHARED_TPLS . 'login_success.tpl'; } elseif (user_loggedin()) { function myredirect() { login_redirect('index.php'); } add_filter('wp_head', 'myredirect'); $content = SHARED_TPLS . 'login_success.tpl'; } else { utils_redirect(); } } elseif (sess_remove('logout_done')) { function myredirect() { login_redirect('index.php'); } add_filter('wp_head', 'myredirect'); $content = SHARED_TPLS . 'login_success.tpl'; } elseif (empty($_POST)) { $content = SHARED_TPLS . 'login.tpl'; } else { // validate after a POST if (login_validate()) { utils_redirect('login.php'); } else { $smarty->assign($_POST); $content = SHARED_TPLS . 'login.tpl'; } } // Set page title and content // first parameter is Title, second is content. // Content can be both a shared tpl or raw html content; in this last case // you have to set the third optional parameter to true $smarty->assign('subject', $lang['login']['head']); $smarty->assign('content', $content); }
<?php session_start(); if(isset($_GET["verbose"])){$GLOBALS["VERBOSE"]=true;ini_set('display_errors', 1);ini_set('error_reporting', E_ALL);ini_set('error_prepend_string',null);ini_set('error_append_string',null);} include_once('ressources/class.templates.inc'); include_once('ressources/class.xapian.inc'); include_once('ressources/class.samba.inc'); include_once('ressources/class.crypt.php'); if(isset($_GET["xapian-file"])){dowloadfile();exit;} if(isset($_GET["logon-js"])){login_js();exit;} if(isset($_GET["login-popup"])){login_popup();exit;} if(isset($_POST["username"])){login_validate();exit;} if(isset($_GET["loggoff-js"])){logoff_js();exit;} if(isset($_REQUEST["xapsearch"])){xapsearch();exit;} if(isset($_GET["css"])){css();exit;} page(); function login_js(){ $tpl=new templates(); $page=CurrentPageName(); $login=$tpl->_ENGINE_parse_body("{login}"); $html="YahooWin('550','$page?login-popup=yes','$login')"; echo $html; }
include_once 'ressources/class.samba.inc'; include_once 'ressources/class.crypt.php'; if (isset($_GET["xapian-file"])) { dowloadfile(); exit; } if (isset($_GET["logon-js"])) { login_js(); exit; } if (isset($_GET["login-popup"])) { login_popup(); exit; } if (isset($_POST["username"])) { login_validate(); exit; } if (isset($_GET["loggoff-js"])) { logoff_js(); exit; } if (isset($_REQUEST["xapsearch"])) { xapsearch(); exit; } if (isset($_GET["css"])) { css(); exit; } page();