Размер файла: 1.09Kb
<?php
#######################################################
# [Автор скрипта: ] #
# [Роман Гринько aka Nominal] #
# [ICQ: 405-623-516] [E-Mail: [email protected]] #
#######################################################
session_start();
$dir='../';
$title = 'Вход';
if($_GET['login']!=='' and $_GET['pass']!==''){
if(file_exists($dir.'system/users/'.$_GET['login'].'.txt')) {
$arr = explode('||', file_get_contents($dir.'system/users/'.$_GET['login'].'.txt'));
if(md5($_GET['pass'])==$arr[1]) {
$_SESSION['autorize'] = 'yes';
$_SESSION['login'] = $_GET['login'];
$_SESSION['mail'] = $arr[0];
$_SESSION['dostup'] = $arr[2];
$_SESSION['reg_date'] = $arr[3];
header("Location: ../index.php?hello");
} else {
header("Location: autoriz.php?auth_err=yes&str_err=pass_incorrect");
//echo 'Pass incorrect';
}
} else {
header("Location: autoriz.php?auth_err=yes&str_err=no_user");
//echo 'Таких на сайте нет(';
}
} else {
header("Location: autoriz.php?auth_err=yes&str_err=no_db");
}
?>