<?php
/*
AjaxExplorer Copyright (C) 2007-2008 Syed Mohammad Sidque Tahir Al-Habshi
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 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Head to
GNU site http://www.gnu.org/licenses/ for license copy.
*/
$access='0000';
include 'core.php';
$key=strtolower(Post('user'))."\t".Post('pass');
$tbl=file('../user/record.php');
foreach($tbl as $id=>$row)
{
if(strpos(strtolower($row), $key)!==false)
{
echo $_SESSION['userid']=$id;
}
}
if($log2)
{
if(($file=fopen('../user/log_sign.php', 'a+')))
{
fwrite($file, date('d-m-Y h:i:s')."\t".$_SERVER['REMOTE_ADDR']."\t".Post('user').($_SESSION['userid']? '':' - fail')."\r\n");
fclose($file);
}
}
?>