<?php
error_reporting(0);
//----------
include ('inc/config.inc.php.php');
//----------
session_name('sid');
session_start();
//----------
connect_to_db();
include ('inc/autorize.php.php');
$rands = rand(1000, 10000);
//-----------
$partner = intval($_GET['partner']); if ($partner == 0) $partner = 1;
//----------
$arr = mysql_query("SELECT COUNT(*) FROM `love_partner`;");
$part_users = mysql_result($arr, 0);
if($partner > $part_users) $partner = 1;
//----------
$partner_arr = @mysql_query("SELECT * FROM `love_partner` WHERE `partner` = ".$partner." LIMIT 1;");
$row = @mysql_fetch_array($partner_arr);
$partner_site = $row['site'];
$partner_name = $row['name'];
//-----------
if ($autorize) {
header('Location: index.php?partner='.$partner.'&mod='.$mod.'&'.$srand.'='.$r_rand.'&'.session_name().'='.session_id());
exit();
}
//----------
$title = 'Вход';
include ('header.php');
echo $header;
if($mod == '1') echo '<p align="center"><small>';
//-----------
echo $class_d2;
echo 'Вход<br/>';
echo $class_divz;
if($mod == '1') {
echo '</small></p><p align="left"><small>';
if ($_GET['error'] == 1) echo '<u>Ошибка авторизации!</u><br/>';
if ($_GET['error'] == 2) echo '<b>Ошибка! Вы забанены!</b> Свяжитесь с <a href="feedback.php?partner='.$partner.'&amp;mod='.$mod.'&amp;'.$srand.'='.$r_rand.'&amp;'.session_name().'='.session_id().'">Администрацией</a><br/>';
echo 'Ник:</small><br/>';
echo "<input type=\"text\" name=\"nick".$rands."\" maxlength=\"20\" /><br/>";
echo '<small>Пароль:</small><br/>';
echo "<input type=\"password\" name=\"pas".$rands."\" maxlength=\"15\" /><br/>";
echo '<small><anchor>Вход<go href="auto.php?partner='.$partner.'&amp;mod='.$mod.'&amp;'.$srand.'='.$r_rand.'&amp;'.session_name().'='.session_id().'" method="post">';
echo "<postfield name='nick' value='$(nick".$rands.")' />";
echo "<postfield name='pas' value='$(pas".$rands.")' />";
echo '</go></anchor><br/>';
echo '---<br/>';
}
else
{
if ($_GET['error'] == 1) echo $class_d0.'Ошибка авторизации!<br/>'.$class_divz;
if ($_GET['error'] == 2) echo $class_d0.'<b>Ошибка! Вы забанены!</b> Свяжитесь с <a href="feedback.php?partner='.$partner.'&amp;mod='.$mod.'&amp;'.$srand.'='.$r_rand.'&amp;'.session_name().'='.session_id().'">Администрацией</a><br/>'.$class_divz;
echo '<form action="auto.php?partner='.$partner.'&amp;mod='.$mod.'&amp;'.$srand.'='.$r_rand.'&amp;'.session_name().'='.session_id().'" method="post">';
echo $class_d1;
echo 'Ник:<br/>';
echo '<input type="text" name="nick" maxlength="20" class="button" /><br/>';
echo 'Пароль:<br/>';
echo '<input type="password" name="pas" maxlength="15" class="button" /><br/>';
echo '<input type="submit" value="Вход" class="do_button" />';
echo $class_divz;
echo '</form>';
}
echo $class_d0;
echo '&#171;- <a href="index.php?partner='.$partner.'&amp;mod='.$mod.'&amp;'.$srand.'='.$r_rand.'&amp;'.session_name().'='.session_id().'">Назад</a><br/>';
if($mod == '1') echo '---<br/>';
echo $class_divz.$class_d1;
echo '[7] <a href="http://'.$_SERVER['HTTP_HOST'].'/index.php?partner='.$partner.'&amp;mod='.$mod.'&amp;'.session_name().'='.session_id().'" accesskey="7">Поиск</a> [8] <a href="http://'.$_SERVER['HTTP_HOST'].'/auth.php?partner='.$partner.'&amp;mod='.$mod.'&amp;'.session_name().'='.session_id().'" accesskey="8">Вход</a> [9] <a href="http://'.$_SERVER['HTTP_HOST'].'/reg.php?partner='.$partner.'&amp;mod='.$mod.'&amp;'.session_name().'='.session_id().'" accesskey="9">Регистрация</a><br/>';
if($mod == '1') echo '</small></p><p align="center"><small>';
echo $class_divz.$class_d2;
echo $class_divz.$class_d2.$class_version.$class_divz.$class_div;
echo $class_endpage;

?>