Вход Регистрация
Файл: aut.php
Строк: 31
<?php

require 'sid.php';
require 
'config.php';
$link = connect_db();

include 
'head.php';

$ref = mt_rand(10000, 1000000);

// Если попытка повторной авторизиции
if (!empty($_SESSION['us']) && !empty($_SESSION['ps'])) {
    
header('Location: index.php?' . $ref);
    die();
}

// Проверка авторизации
if (isset($_GET['enter'])) {
    
$link = connect_db();
    list(
$user, $id, $ps) = check_login($link);
    
whorm(0, 'aut');
    if (!empty(
$_SESSION['us']) && !empty($_SESSION['ps'])) header('Location: index.php?good');
}

echo 
$div_title . 'Вход' . $div_end;

echo 
$div_left . $div_razdel . '
      <a href="faq.php?'
.$ref.'">Что такое ' . $site . '?</a>
      ' 
. $div_end . '
      <form method="POST" action="aut.php?enter">
      ID или Ник:<br/>
      <input type="text" name="us" value="' 
. htmlspecialchars($_GET['us']) . '"/>
      <br/>
      Пароль: (<a href="retpass.php?'
.$ref.'">Забыли пароль?</a>)<br/>
      <input type="password" name="ps" value="' 
. htmlspecialchars($_GET['ps']) . '"/>
      <br/>
      <input type="submit" name="enter" value="Войти"/>
      </form>
      * - Чувствителен к регистру(sobaka и sObAKA - разные пароли<br/>
      ' 
. $block . '
      Нет аккаунта? Пройди <a href="reg.php?'
.$ref.'">регистрацию</a>.
      ' 
. $block . '
      <a href="index.php?">Назад</a>' 
. $block . $div_end;

include 
'foot.php';
?>
Онлайн: 2
Реклама