Location: PHPKode > projects > lowbatCMS > lowbatcms/login.php
<?php
/**************************************************************************\
* lowbatCMS															                                   *
* Written and (c) 2006 by Samuel Talleux<hide@address.com>					 *
* --------------------------------------------                             *
*  This program is free software; you can redistribute it and/or modify it *
*  under the terms of the GNU General Public License as published by the   *
*  Free Software Foundation; either version 2 of the License, or (at your  *
*  option) any later version.                                              *
***************************************************************************/
 
 require_once ('siteconfig.inc.php');
 
	DEBUG('GET: <br />'.print_r($_GET, true), 2);	
	DEBUG('POST: <br />'.print_r($_POST, true), 2);	
	DEBUG('COOKIE: <br />'.print_r($_COOKIE, true), 2);	
	DEBUG('SESSION: <br />'.print_r($_SESSION, true), 2);	
 	DEBUG('edit mode: '.$editmode, 2);
 	DEBUG('edit type: '.$lowbatcms_mode, 2);

 	DEBUG('smarty: '.print_r($smarty, 1), 3);
	$smarty->assign('back', $_GET['back']);
	// logoff by GET
	if ( isset($_GET['logoff']) && ( $_GET['logoff'] )) {
	 	$login->logout();
		$smarty->display('book_logoff.tpl');
	}
	// logoff by POST
	elseif ( isset($_POST['logoff']) && ( $_POST['logoff'] )) {
	 	$login->logout();
		$smarty->display('book_logoff.tpl');
	}
	else{ // ToDo: make some passwd check hier?
	 	DEBUG($login->login(), 2);
		$smarty->display('login.tpl');
	}
?>
Return current item: lowbatCMS