<?php
error_reporting(0);
require( "../inc/conf.inc.php" );
require( "../inc/connect.php" );
echo "<title>Регистрация</title>";
echo "<style type=\"text/css\">";
echo "body { font-size: x-small; color: {$tcol}; background-color: {$bcol} }";
echo "a:link,a:visited { text-decoration: underline; color: {$lcol} }";
echo "div { text-align: center; background-color: {$rcol} }";
echo "</style>";
echo "</head>";
echo "<body>";
session_name('sid');
session_start();
//----------
$rands = rand(1000, 10000);
//-----------
$partner = intval($_GET['partner']); if ($partner == 0) $partner = 1;
//----------
$arr = mysql_query("SELECT COUNT(*) FROM `partner`;");
$part_users = mysql_result($arr, 0);
if($partner > $part_users) $partner = 1;
//----------
$partner_arr = @mysql_query("SELECT * FROM `partner` WHERE `partner` = ".$partner." LIMIT 1;");
$row = @mysql_fetch_array($partner_arr);
$partner_site = $row['site'];
$partner_name = $row['name'];
//-----------
if ($autorize_partner) {
header('Location: menu.php?partner='.$partner.'&mod='.$mod.'&'.$srand.'='.$r_rand.'&'.session_name().'='.session_id());
exit();
}
//----------
$title = 'Вход для партнеров';
include ('inc/header.php');
echo $header;
if($mod == '1') echo '<p align="center"><small>';
//-----------
echo $class_d2;
echo 'Вход для партнеров<br/>';
echo $class_divz;
if($mod == '1') {
echo '</p><p align="left">';
if ($_GET['error'] == '1') echo 'Ошибка авторизации!<br/>';
echo 'Логин:</small><br/>';
echo '<input type="text" name="log'.$rands.'" maxlength="20" /><br/>';
echo '<small>Пароль:</small><br/>';
echo '<input type="password" name="pass'.$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='log' value='$(log".$rands.")' />";
echo "<postfield name='pass' value='$(pass".$rands.")' />";
echo '</go></anchor><br/>';
}
else
{
if ($_GET['error'] == '1') echo $class_d0.'Ошибка авторизации!<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="log" maxlength="20" class="button" /><br/>';
echo 'Пароль:<br/>';
echo '<input type="password" name="pass" maxlength="15" class="button" /><br/>';
echo '<input type="submit" value="Вход" class="do_button" />';
echo $class_divz;
echo '</form>';
}
echo $class_d0;
if($mod == '1') echo '---<br/>';
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'].'/love/index.php?partner='.$partner.'&amp;mod='.$mod.'&amp;'.session_name().'='.session_id().'" accesskey="7">Поиск</a> [8] <a href="http://'.$_SERVER['HTTP_HOST'].'/love/auth.php?partner='.$partner.'&amp;mod='.$mod.'&amp;'.session_name().'='.session_id().'" accesskey="8">Вход</a> [9] <a href="http://'.$_SERVER['HTTP_HOST'].'/love/reg.php?partner='.$partner.'&amp;mod='.$mod.'&amp;'.session_name().'='.session_id().'" accesskey="9">Регистрация</a><br/>';
if($mod == '1') echo '</p><p align="center">';
echo $class_divz.$class_d2;
echo 'Copyright &#169; 2008 «<a href="http://'.$partner_site.'">'.$partner_name.'</a>»<br/>';
echo $class_divz.$class_d2.$class_version.$class_divz.$class_div;
echo $class_endpage;
?>