0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
<?php
session_start();
if (empty($_SESSION['login']) or empty($_SESSION['session_id'])) {
$DATA = array('login' => $_POST['login'], 'password' => $_POST['password']);
include "classes/data_base_class.php";
$auth_result = DataBase::StartAuth($DATA['login'], $DATA['password']);
if ($auth_result == 1) {
echo '<meta http-equiv="refresh" content="0;URL=../error.php?mod=auth">';
exit();
}
else
{
$_SESSION['login'] = $auth_result['user_login'];
$_SESSION['user_name'] = $auth_result['user_name'];
$_SESSION['session_id'] = $auth_result['reg_data'];
echo '<meta http-equiv="refresh" content="0;URL=../index.php">';
exit();
}
}
else
{
echo '<meta http-equiv="refresh" content="0;URL=../index.php">';
exit();
}
?>
Вот вам авторизация, ага - ага!
Запостил:
Govnisti_Diavol ,
07.05.2013 (Updated 26.03.2018 )
А по существу?