<?php
error_reporting(0);
//----------
session_name('sid');
session_start();
//----------
include ('inc/config.inc.php.php');
//----------
connect_to_db();
include ('inc/autorize.php.php');
include ('inc/online.php.php');
//-----------
$today = date("md");
$sql = mysql_query("select `date` from `love_count_today`;");
$sql_today = @mysql_fetch_array($sql);
$s_today = $sql_today['date'];
If ($s_today != $today)
{
@mysql_query("DELETE FROM `love_count_today`;");
@mysql_query("INSERT INTO `love_count_today` SET `date` = '".$today."';");
}

$d_mes = date("m");
$sql_m = mysql_query("select `date` from `love_count_mes`;");
$sql_mes = @mysql_fetch_array($sql_m);
$mes = $sql_mes['date'];
If ($mes != $d_mes)
{
@mysql_query("DELETE FROM `love_count_mes`;");
@mysql_query("INSERT INTO `love_count_mes` SET `date` = '".$d_mes."';");
}
//----------
$partner = intval($_GET['partner']); if ($partner == 0) $partner = 1;
//----------
$g = intval($_GET['g']); if ($g == 0) $g = false;
$ts = intval($_GET['ts']); if ($ts == 0) $ts = false;
$strana = intval($_GET['g']); if ($strana == 0) $strana = false;
$city = intval($_GET['ts']); if ($city == 0) $city = false;
include ('inc/function.php');
//-----------
$arr = mysql_query("SELECT COUNT(*) FROM `love_partner`;");
$part_users = mysql_result($arr, 0);
if($partner > $part_users) $partner = 1;
//----------
$_SESSION['partner'] = $partner;
//----------
$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'];
//----------
$new_s = mysql_query("SELECT `id` FROM `love_messages` WHERE `reed` = '1' AND `ids` = '".intval($autorize['id'])."';");
$new_mess = mysql_num_rows($new_s);
$sql = mysql_query("SELECT `id` FROM `love_messages` WHERE `ids` = '".intval($autorize['id'])."';");
$all_mess = mysql_num_rows($sql);
$new_sb = "$new_mess/$all_mess";
//----------
$title = 'Знакомства';
include ('header.php');
echo $header;
if($mod == '1') echo '<p align="center"><small>';
//-----------
if (@$b == '')
{
echo $class_d4;
echo '<img src="img/head.png" alt="Знакомства" /><br/>';
echo $class_divz.$class_d2;
echo '<b>'.$partner_site.'</b><br/>';
echo $class_divz;
if ($autorize['gladmin'] == 1)
{
echo $class_d2;
echo '<a href="/administrator/admins.php?partner='.$partner.'&amp;mod='.$mod.'&amp;'.$srand.'='.$r_rand.'&amp;'.session_name().'='.session_id().'">Админ-Панель</a><br/>';
echo $class_divz;
if($mod == '1') echo '---<br/>';
}
if ($autorize['stmoder'] == 1)
{
echo $class_d2;
echo '<a href="/moderator/moders.php?partner='.$partner.'&amp;mod='.$mod.'&amp;'.$srand.'='.$r_rand.'&amp;'.session_name().'='.session_id().'">Модер-Панель</a><br/>';
echo $class_divz;
if($mod == '1') echo '---<br/>';
}
echo $class_d0;
if($mod == '1') echo '</small></p><p align="left"><small>';
$q = mysql_query("SELECT COUNT(*) FROM `love_user`;");
$users = mysql_result($q, 0);
// Зарегистрированные юзеры онлайн
$time = time() - ONLINE_USER;
$arr_on_us = mysql_query("SELECT COUNT(*) FROM `love_user` WHERE `time` > ".$time.";");
$online_users = mysql_result($arr_on_us, 0);
// Анонимные юзеры онлайн
$arr_an_us = mysql_query("select * from `love_anonim`;");
$online_users_an = mysql_num_rows($arr_an_us);
$all_onl = $online_users + $online_users_an;
echo 'Пользователей: '.$users.'<br/>';
echo '<a href="online.php?partner='.$partner.'&amp;mod='.$mod.'&amp;'.$srand.'='.$r_rand.'&amp;'.session_name().'='.session_id().'">Сейчас на сайте ('.$all_onl.')</a><br/>';
if (!$autorize) {
echo '<a href="reg.php?partner='.$partner.'&amp;mod='.$mod.'&amp;'.$srand.'='.$r_rand.'&amp;'.session_name().'='.session_id().'">Регистрация</a> | <a href="auth.php?partner='.$partner.'&amp;mod='.$mod.'&amp;'.$srand.'='.$r_rand.'&amp;'.session_name().'='.session_id().'">Войти</a><br/>';
}
else
{
echo '<a href="menu.php?partner='.$partner.'&amp;mod='.$mod.'&amp;'.$srand.'='.$r_rand.'&amp;'.session_name().'='.session_id().'">Личное меню</a> | <a href="out.php?partner='.$partner.'&amp;mod='.$mod.'&amp;'.$srand.'='.$r_rand.'&amp;'.session_name().'='.session_id().'">Выход</a> | <a href="messages.php?partner='.$partner.'&amp;mod='.$mod.'&amp;'.$srand.'='.$r_rand.'&amp;'.session_name().'='.session_id().'">Сообщения ('.$new_sb.')</a><br/>';
//----------
$sql = @mysql_query("SELECT * FROM `love_count_today` WHERE `uid` = '".intval($autorize['id'])."';");
$sql_today = @mysql_fetch_array($sql);
$today_count = $sql_today['count'] + 0; //За сегодня
//----------
$sq = @mysql_query("SELECT * FROM `love_count_mes` WHERE `uid` = '".intval($autorize['id'])."';");
$sq_mes = @mysql_fetch_array($sq);
$mes_count = $sq_mes['count'] + 0; //За месяц
echo 'Просмотров  за сегодня: '.$today_count.', за месяц: '.$mes_count.'<br/>';
}
echo $class_divz;
echo $class_d1;
echo '<b>Поиск анкет</b><br/>';
if($mod == '1') {
echo '---<br/>';
echo '<b>Город: <a href="city.php?partner='.$partner.'&amp;mod='.$mod.'&amp;'.$srand.'='.$r_rand.'&amp;'.session_name().'='.session_id().'">';
if (!empty($ts)) echo $g.', '.$ts; else echo 'Любой';
echo '</a><br/></b>';
echo 'Я:</small>';
echo '<select name="me">';
echo '<option value="1">парень</option>';
echo '<option value="2">девушка</option>';	
echo '</select>';
echo '<br/>';
echo '<small>Ищу:</small>';
echo '<select name="lookfor">';
echo '<option value="1">парня</option>';
echo '<option value="2">девушку</option>';
echo '</select>';
echo '<br/>';
echo '<small>Возраст:</small><br/>';
echo '<small>от</small> <input name="fromage" type="text" size="2" maxlength="2" /> <small>до</small> <input name="toage" type="text" size="2" maxlength="2" /> <small>лет</small><br/>';
echo '<small>С фото?:</small>';
echo '<select name="yesfoto">';
echo '<option value="0">нет</option>';
echo '<option value="1">да</option>';
echo '</select><br/>';
echo '<small>On-line?:</small>';
echo '<select name="online">';
echo '<option value="0">нет</option>';
echo '<option value="1">да</option>';
echo '</select><br/>';
echo '<small><anchor>Найти!<go href="index.php?b=search&amp;partner='.$partner.'&amp;mod='.$mod.'&amp;'.$srand.'='.$r_rand.'&amp;'.session_name().'='.session_id().'" method="post">';
echo "<postfield name='strana' value='".$strana."' />";
echo "<postfield name='city' value='".$city."' />";
echo "<postfield name='me' value='$(me)' />";
echo "<postfield name='lookfor' value='$(lookfor)' />";
echo "<postfield name='fromage' value='$(fromage)' />";
echo "<postfield name='toage' value='$(toage)' />";
echo "<postfield name='yesfoto' value='$(yesfoto)' />";
echo "<postfield name='online' value='$(online)' />";
echo '</go></anchor><br/>';
echo '---<br/>';
}
else
{
echo $class_divz;
echo '<form method="post" action="index.php?b=search&amp;partner='.$partner.'&amp;mod='.$mod.'&amp;'.$srand.'='.$r_rand.'&amp;'.session_name().'='.session_id().'">';
echo $class_d1;
echo '<b>Город: <a href="city.php?partner='.$partner.'&amp;mod='.$mod.'&amp;'.$srand.'='.$r_rand.'&amp;'.session_name().'='.session_id().'">';
if ($ts != false) echo $g.', '.$ts; else echo 'Любой';
echo '</a><br/></b>';
echo 'Я:';
echo '<select name="me" class="button">';
echo '<option value="1">парень</option>';
echo '<option value="2">девушка</option>';
echo '</select>';
echo '<br/>';
echo 'Ищу:';
echo '<select name="lookfor" class="button">';
echo '<option value="1">парня</option>';
echo '<option value="2">девушку</option>';
echo '</select>';
echo '<br/>';
echo 'Возраст:<br/>';
echo 'от <input name="fromage" type="text" size="2" maxlength="2" class="button" /> до <input name="toage" type="text" size="2" maxlength="2" class="button" /> лет<br/>';
echo 'С фото?:';
echo '<select name="yesfoto" class="button">';
echo '<option value="0">нет</option>';
echo '<option value="1">да</option>';
echo '</select><br/>';
echo 'On-line?:';
echo '<select name="online" class="button">';
echo '<option value="0">нет</option>';
echo '<option value="1">да</option>';
echo '</select><br/>';
echo '<input type="hidden" name="strana" value="'.$strana.'" />';
echo '<input type="hidden" name="city" value="'.$city.'" />';
echo '<input type="submit" name="do" value="Найти!" class="do_button" />';
echo '<br/>';
echo $class_divz;
echo '</form>';
echo $class_d0;
}
//echo '-&#187; <a href="/help.php?partner='.$partner.'&amp;mod='.$mod.'&amp;'.$srand.'='.$r_rand.'&amp;'.session_name().'='.session_id().'">Помощь</a><br/>';
echo '-&#187; <a href="/feedback.php?partner='.$partner.'&amp;mod='.$mod.'&amp;'.$srand.'='.$r_rand.'&amp;'.session_name().'='.session_id().'">Контакты</a><br/>';
echo '-&#187; <a href="/partner/?partner='.$partner.'&amp;mod='.$mod.'&amp;'.$srand.'='.$r_rand.'&amp;'.session_name().'='.session_id().'">Партнерам</a><br/>';
echo $class_divz;
if($mod == '1') echo '---<br/>';
echo $class_d1;
if (!$autorize) {
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/>';
}
else
{
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'].'/menu.php?partner='.$partner.'&amp;mod='.$mod.'&amp;'.session_name().'='.session_id().'" accesskey="8">Личное меню</a> [9] <a href="http://'.$_SERVER['HTTP_HOST'].'/out.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;
if($mod == '1') echo '</small></p><p align="left"><small>';
echo $class_endpage;
exit();
}

if (@$b == "search") {
$strana = trim(htmlspecialchars(mysql_escape_string($_POST['strana'])));
$city = trim(htmlspecialchars(mysql_escape_string($_POST['city'])));
//----------
$me = trim(htmlspecialchars(mysql_escape_string($_POST['me'])));
$me = intval($me);
if ($me < 1 or $me > 2) $me = 1;
//----------
$lookfor = trim(htmlspecialchars(mysql_escape_string($_POST['lookfor'])));
$lookfor = intval($lookfor);
if ($lookfor < 1 or $lookfor > 2) $lookfor = 1;
//----------
$fromage = trim(htmlspecialchars(mysql_escape_string($_POST['fromage'])));
$fromage = intval($fromage);
if (empty($fromage)) $fromage = 0;
//----------
$toage = trim(htmlspecialchars(mysql_escape_string($_POST['toage'])));
$toage = intval($toage);
if (empty($toage)) $toage = 99;
//----------
$yesfoto = trim(htmlspecialchars(mysql_escape_string($_POST['yesfoto'])));
$yesfoto = intval($yesfoto);
//----------
$online = trim(htmlspecialchars(mysql_escape_string($_POST['online'])));
$online = intval($online);
//----------
if ($lookfor == 1) $lookfor1 = '`pol` = 1 '; else  $lookfor1 = '`pol` = 2 ';
if ($strana and $city) $gorod = 'AND `strana` = '.$strana.' AND `gorod` = '.$city.' ';
if ($fromage and $toage) $fromage_toage = ' AND `vozrast` >= '.$fromage.' AND `vozrast` <= '.$toage.' ';
if ($yesfoto == 1) $yesfoto1 = ' AND `foto` != 0 '; else $yesfoto1 = ' AND `foto` >= 0 ';
$time = time() - ONLINE_USER;
if ($online == 1) $online1 = ' AND `time` > '.$time.' '; else $online1 = '';
$zapros = "SELECT * FROM `love_user` WHERE ".$lookfor1."".$gorod."".$fromage_toage."".$yesfoto1."".$online1." ORDER BY `golos` DESC;";
$_SESSION['searchzapros'] = $zapros;
$result = mysql_query($zapros);
$count = mysql_num_rows($result);
$kolchel = ONPAGE_USER;
if (!@$page) $page = 0;
$pg = $page + 1;
$kolstr = ceil($count / $kolchel);
if ($count == 0) {
echo $class_d2;
echo 'Знакомства<br/>';
echo $class_divz.$class_d0;
if($mod == '1') echo '</small></p><p align="left"><small>';
echo 'По вашему запросу ничего не найдено<br/>';
echo $class_divz;
if($mod == '1') echo '---<br/>';
}
else 
{
echo $class_d2;
echo 'Найдено  <b>'.$count.'</b> анкет<br/>';
echo $class_divz;
if($mod == '1') echo '</small></p><p align="left"><small>';
$start = $page * $kolchel;
$end = $start + $kolchel;
@mysql_data_seek($result, $start);
while($arr = mysql_fetch_array($result))
{
$user_id = intval($arr['id']);
$user_name = $arr['name'];
$user_vozrast = $arr['vozrast'];
$user_gorod = $arr['gorod'];
$user_strana = $arr['strana'];
$user_ishu = $arr['ishu'];
$user_foto = $arr['foto'];
$user_sex = $arr['pol'];
//----------
$ts = $user_gorod;
$g = $user_strana;
$ts = intval($ts);
$g = intval($g);
include ('inc/function.php');
//----------
if ($user_ishu == 1) $user_ishu = 'парнeм';
else if($user_ishu == 2) $user_ishu = 'девушкой';
else if($user_ishu == 3) $user_ishu = 'парнeм, девушкой';
else if($user_ishu == 4) $user_ishu = 'парой М+Ж';
else if($user_ishu == 5) $user_ishu = 'парой М+М';
else if($user_ishu == 6) $user_ishu = 'парой Ж+Ж';
//----------
if ($user_sex == 1) $user_sex = '<img src="/img/boy.gif" alt="" />'; else $user_sex = '<img src="/img/girl.gif" alt="" />';
if($mod == '1') {
echo '<table>';
echo '<tr>';
echo '<td>';
if (!empty($user_foto)) {
//вывод фотографии
if (opendir("./foto/".$user_id)) {
echo '<img src="foto.php?id='.$user_id.'" alt="" />';
}
}
else
{
echo '<img src="/img/no-photo.gif" alt="" />';
}
echo '</td>';
echo '<td align="left">';
echo '<b><a href="/info_user.php?user_id='.$user_id.'&amp;partner='.$partner.'&amp;mod='.$mod.'&amp;'.$srand.'='.$r_rand.'&amp;'.session_name().'='.session_id().'">'.$user_name.'</a></b>, '.$user_vozrast.' '.$user_sex.'<br/>';
echo $g.', '.$ts.'<br/>';
echo 'Познакомлюсь с: '.$user_ishu.'<br/>';
//if ($user_foto !== false && $user_foto > 0) 
if (!empty($user_foto)) echo '<b>'.$user_foto.'</b> фото<br/>'; else echo '';
echo '</td>';
echo '</tr>';
echo '</table>';
}
else
{
echo $class_d1;
echo '<table class="img-container">';
echo '<tr>';
echo '<td class="img-container">';
if (!empty($user_foto)) {
//вывод фотографии
if (@opendir("./foto/".$user_id)) {
echo '<img src="foto.php?id='.$user_id.'" alt="" />';
}
}
else
{
echo '<img src="/img/no-photo.gif" alt="" />';
}
echo '</td>';
echo '<td class="txt-container">';
echo '<b><a href="/info_user.php?user_id='.$user_id.'&amp;partner='.$partner.'&amp;mod='.$mod.'&amp;'.$srand.'='.$r_rand.'&amp;'.session_name().'='.session_id().'">'.$user_name.'</a></b>, '.$user_vozrast.' '.$user_sex.'<br/>';
echo $g.', '.$ts.'<br/>';
echo 'Познакомлюсь с: '.$user_ishu.'<br/>';
if (!empty($user_foto)) echo '<b>'.$user_foto.'</b> фото<br/>'; else echo '';
echo '</td>';
echo '</tr>';
echo '</table>';
echo $class_divz;
}
$start++;
if ($start >= $end) break;
}
if($mod == '1') echo '---<br/>';
echo $class_d0;
if ($page > 0) {
$pp = $page - 1;
echo '<a href="index.php?page='.$pp.'&amp;b=go&amp;partner='.$partner.'&amp;mod='.$mod.'&amp;'.$srand.'='.$r_rand.'&amp;'.session_name().'='.session_id().'" accesskey="1">'.htmlspecialchars("<<<[1]").'</a>';
}
else echo htmlspecialchars("<<<[1]");
echo ' ';
if ($kolstr > $page + 1) {
echo '<a href="index.php?page='.$pg.'&amp;b=go&amp;partner='.$partner.'&amp;mod='.$mod.'&amp;'.$srand.'='.$r_rand.'&amp;'.session_name().'='.session_id().'" accesskey="3">'.htmlspecialchars("[3]>>>").'</a><br/>';
}
else echo htmlspecialchars("[3]>>>").'<br/>';
echo 'Стр.: <b>'.intval($pp + 1).'</b> из <b>'.intval($kolstr).'</b><br/>';
echo $class_divz;
if($mod == '1') echo '---<br/>';
}
}

if (@$b == 'go' and !empty($_SESSION['searchzapros']))
{
$zapros = $_SESSION['searchzapros'];
$result = mysql_query($zapros);
$count = mysql_num_rows($result);
$kolchel = ONPAGE_USER;
if (!@$page) $page = 0;
$pg = $page + 1;
$kolstr = ceil($count / $kolchel);
if ($count == 0) {
echo $class_d2;
echo 'Знакомства<br/>';
echo $class_divz.$class_d0;
if($mod == '1') echo '</small></p><p align="left"><small>';
echo 'По вашему запросу ничего не найдено<br/>';
echo $class_divz;
if($mod == '1') echo '---<br/>';
}
else 
{
echo $class_d2;
echo 'Найдено  <b>'.$count.'</b> анкет<br/>';
echo $class_divz;
if($mod == '1') echo '</small></p><p align="left"><small>';
$start = $page * $kolchel;
$end = $start + $kolchel;
@mysql_data_seek($result, $start);
while($arr = mysql_fetch_array($result))
{
$user_id = intval($arr['id']);
$user_name = $arr['name'];
$user_vozrast = $arr['vozrast'];
$user_gorod = $arr['gorod'];
$user_strana = $arr['strana'];
$user_ishu = $arr['ishu'];
$user_foto = $arr['foto'];
$user_sex = $arr['pol'];
//----------
$ts = $user_gorod;
$g = $user_strana;
$ts = intval($ts);
$g = intval($g);
include ('inc/function.php');
//----------
if ($user_ishu == 1) $user_ishu = 'парнeм';
else if($user_ishu == 2) $user_ishu = 'девушкой';
else if($user_ishu == 3) $user_ishu = 'парнeм, девушкой';
else if($user_ishu == 4) $user_ishu = 'парой М+Ж';
else if($user_ishu == 5) $user_ishu = 'парой М+М';
else if($user_ishu == 6) $user_ishu = 'парой Ж+Ж';
//----------
if ($user_sex == 1) $user_sex = '<img src="/img/boy.gif" alt="" />'; else $user_sex = '<img src="/img/girl.gif" alt="" />';
if($mod == '1') {
echo '<table>';
echo '<tr>';
echo '<td>';
if (!empty($user_foto)) {
//вывод фотографии
if (opendir("./foto/".$user_id)) {
echo '<img src="foto.php?id='.$user_id.'" alt="" />';
}
}
else
{
echo '<img src="/img/no-photo.gif" alt="" />';
}
echo '</td>';
echo '<td align="left">';
echo '<b><a href="/info_user.php?user_id='.$user_id.'&amp;partner='.$partner.'&amp;mod='.$mod.'&amp;'.$srand.'='.$r_rand.'&amp;'.session_name().'='.session_id().'">'.$user_name.'</a></b>, '.$user_vozrast.' '.$user_sex.'<br/>';
echo $g.', '.$ts.'<br/>';
echo 'Познакомлюсь с: '.$user_ishu.'<br/>';
if (!empty($user_foto)) echo '<b>'.$user_foto.'</b> фото<br/>'; else echo '';
echo '</td>';
echo '</tr>';
echo '</table>';
}
else
{
echo $class_d1;
echo '<table class="img-container">';
echo '<tr>';
echo '<td class="img-container">';
if (!empty($user_foto)) {
//вывод фотографии
if (opendir("./foto/".$user_id)) {
echo '<img src="foto.php?id='.$user_id.'" alt="" />';
}
}
else
{
echo '<img src="/img/no-photo.gif" alt="" />';
}
echo '</td>';
echo '<td class="txt-container">';
echo '<b><a href="/info_user.php?user_id='.$user_id.'&amp;partner='.$partner.'&amp;mod='.$mod.'&amp;'.$srand.'='.$r_rand.'&amp;'.session_name().'='.session_id().'">'.$user_name.'</a></b>, '.$user_vozrast.' '.$user_sex.'<br/>';
echo $g.', '.$ts.'<br/>';
echo 'Познакомлюсь с: '.$user_ishu.'<br/>';
if (!empty($user_foto)) echo '<b>'.$user_foto.'</b> фото<br/>'; else echo '';
echo '</td>';
echo '</tr>';
echo '</table>';
echo $class_divz;
}
$start++;
if ($start >= $end) break;
}
if($mod == '1') echo '---<br/>';
echo $class_d0;
if ($page > 0) {
$pp = $page - 1;
echo '<a href="index.php?page='.$pp.'&amp;b=go&amp;partner='.$partner.'&amp;mod='.$mod.'&amp;'.$srand.'='.$r_rand.'&amp;'.session_name().'='.session_id().'" accesskey="1">'.htmlspecialchars("<<<[1]").'</a>';
}
else echo htmlspecialchars("<<<[1]");
echo " ";
if ($kolstr > $page + 1) {
echo '<a href="index.php?page='.$pg.'&amp;b=go&amp;partner='.$partner.'&amp;mod='.$mod.'&amp;'.$srand.'='.$r_rand.'&amp;'.session_name().'='.session_id().'" accesskey="3">'.htmlspecialchars("[3]>>>").'</a><br/>';
}
else echo htmlspecialchars("[3]>>>").'<br/>';
echo 'Стр.: <b>'.intval($pg).'</b> из <b>'.intval($kolstr).'</b><br/>';
echo $class_divz;
if($mod == '1') echo '---<br/>';
}
}

echo $class_d1;
if (!$autorize) {
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/>';
}
else
{
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'].'/menu.php?partner='.$partner.'&amp;mod='.$mod.'&amp;'.session_name().'='.session_id().'" accesskey="8">Личное меню</a> [9] <a href="http://'.$_SERVER['HTTP_HOST'].'/out.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 '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;
?>