<?php
/*[_X3T4_N!CK_] Muellifdir Silenin Anasin Sikim*/
define('MKTOP', 1);
require_once ('system/connect.php');
require_once ('system/core.php');
require_once ('system/function.php');
unreg();
$user_isset = mysql_query("SELECT * FROM `users` WHERE `login` = '".filter($_POST['login'])."' AND `password` = '".filter($_POST['password'])."'");
if(mysql_num_rows($user_isset) > 0){
SetCookie('login',filter($_POST['login']),time()+3600*24*365, '/');
SetCookie('password',filter($_POST['password']),time()+3600*24*365, '/');
}
$title = 'Daxil Ol';
require_once ('head.php');
$avtoriz = '<form action="auth.php" method="POST">
<div class="text">Login:<br/><input type="text" class="input" name="login" maxlength="30" value="" size="20" maxlength="50" /></div>
<div class="text">Parol:<br/><input type="password" class="input" name="password" maxlength="30" value="" size="20" maxlength="50" /></div>
<div class="text"><label><input style="padding-left: 25px;" value="1" type="checkbox" name="user_isset" checked="checked"><b>Yadda Saxla</b></label><br/><input name="ok" type="submit" value="Daxil Ol" /></div></form>
<a class="link" href="/password.php">Parolu Unutdun?</a>
<a class="link" href="/reg.php">Qeydiyyat</a>';
if($_POST['ok'] != null){
if(empty($_POST['login']) OR empty($_POST['password']))
$error = '<div class="error">Login ve ya Parol Sehfdir !</div>';
if(isset($error)){
echo $error;
echo $avtoriz;
}
else{
$login = filter($_POST['login']);
$password = filter($_POST['password']);
$user_isset = mysql_query("SELECT * FROM `users` WHERE `login` = '".$login."' AND `password` = '".$password."'");
if(mysql_num_rows($user_isset) > 0){
$row = mysql_fetch_array($user_isset);
echo '<div class="text">Siz Uğurla Daxil Oldunuz !</div>
<div class="text">Salam, <strong>'.$row['login'].'</strong><br>
Sizin IP: <font color="green"><strong>'.$ip.'</strong></font><br>
Sizin Browser: <font color="green"><strong>'.$ua.'</strong></font></div>
<a class="link" href="/office.php">Kabinetim</a>';
}else{
echo '<div class="error">Sehf !!!</div>';
echo $avtoriz;
}
}
}
else echo $avtoriz;
require_once ('foot.php');
?>