<?php
/**
 * 
 * @file login.php
 * @copyright (c) 2005 - 2007 eifr.com
 * @license http://www.gnu.org/copyleft/gpl.html gnu/gpl
 * eifr is free software
 */
require_once(dirname(__FILE__) . '/includes/inc_general.php');
// ---start---
$errormsg = '';
$cburl = '';
$uid = getCookie(COOKIE_UID);

if (isset($_SERVER["HTTP_REFERER"])) {
    $cburl = $_SERVER["HTTP_REFERER"];
} 

if (!isset($act)) {
    $act = '';
} else if ($act == 'error') {
    $errormsg = $lang['checkLogin'];
} else if ($act == 'login') {
    $username = kPost('username');
    $password = md5($password);
    if (Common::checkLogin($username, $password)) {
        header("Location:login.php");
    } else {
        $errormsg = $lang['checkLogin'];
    } 
} 

$tpl_file = 'login';
require_once(getTemplatePath($tpl_file));

?>

 