Файл: user/love/index.php
Строк: 146
<?
include_once '../../sys/inc/start.php';
include_once '../../sys/inc/compress.php';
include_once '../../sys/inc/sess.php';
include_once '../../sys/inc/home.php';
include_once '../../sys/inc/settings.php';
include_once '../../sys/inc/db_connect.php';
include_once '../../sys/inc/ipua.php';
include_once '../../sys/inc/fnc.php';
include_once '../../sys/inc/user.php';
$set['title'] = 'Знакомства'; // заголовок страницы
include_once '../../sys/inc/thead.php';
title();
aut();
?>
<style>
.avatar{
border-radius:5px;
width:60px;
}
</style>
<?
if (isset($_GET['orders']) && $_GET['orders']=='man')
{
$_SESSION['orders'] = " AND `pol` = '1'";
$_SESSION['nav1'] = 'activ';
$_SESSION['nav2'] = NULL;
$_SESSION['nav3'] = NULL;
}
elseif (isset($_GET['orders']) && $_GET['orders']=='woman')
{
$_SESSION['orders'] = " AND `pol` = '0'";
$_SESSION['nav1'] = NULL;
$_SESSION['nav2'] = 'activ';
$_SESSION['nav3'] = NULL;
}
elseif (isset($_GET['orders']) && $_GET['orders']=='all')
{
$_SESSION['orders'] = NULL;
$_SESSION['nav1'] = NULL;
$_SESSION['nav2'] = NULL;
$_SESSION['nav3'] = 'activ';
}
elseif (!isset($_SESSION['orders']))
{
$_SESSION['orders'] = NULL;
$_SESSION['nav1'] = NULL;
$_SESSION['nav2'] = NULL;
$_SESSION['nav3'] = 'activ';
}
$cel = "(
`ank_lov_1` = '1' OR
`ank_lov_2` = '1' OR
`ank_lov_3` = '1' OR
`ank_lov_4` = '1' OR
`ank_lov_5` = '1' OR
`ank_lov_6` = '1' OR
`ank_lov_7` = '1' OR
`ank_lov_8` = '1' OR
`ank_lov_9` = '1' OR
`ank_lov_10` = '1' OR
`ank_lov_11` = '1' OR
`ank_lov_12` = '1' OR
`ank_lov_13` = '1' OR
`ank_lov_14` = '1'
)";
$orien = "(
`ank_orien` = '1' OR
`ank_orien` = '2' OR
`ank_orien` = '3'
)";
$opar = "(
`ank_o_par` IS NOT NULL
)";
$osebe = "(
`ank_o_sebe` IS NOT NULL
)";
echo '<table style="text-align:center;" class="mess" cellspacing="0" cellpadding="0">';
echo '<td><a style="border-right:none;" class="panel" href="?orders=all">Все анкеты</a>';
echo '<td><a style="border-right:none;" class="panel" href="?orders=man">Парни</a>';
echo '<td><a style="border-right:none;" class="panel" href="?orders=woman">Девушки</a>';
echo '<td><a class="panel" href="search.php">Поиск</a>';
echo '</td></table>';
$k_post=mysql_result(mysql_query("SELECT COUNT(*) FROM `user` WHERE $cel AND $orien AND $opar AND $osebe $_SESSION[orders] AND `date_last` > '".(time()-259200)."'"), 0);
$k_page=k_page($k_post,$set['p_str']);
$page=page($k_page);
$start=$set['p_str']*$page-$set['p_str'];
$q = mysql_query("SELECT ank_o_sebe,nick,id FROM `user` WHERE $cel AND $orien AND $opar AND $osebe $_SESSION[orders] AND `date_last` > '".(time()-259200)."' order BY `date_last` DESC LIMIT $start, $set[p_str]");
echo '<table class="post">';
if ($k_post == 0)
{
echo '<div class="mess">';
echo 'Список анкет пуст';
echo '</div>';
}
while ($ank = mysql_fetch_assoc($q))
{
$ank=get_user($ank['id']);
echo '<table class="mess">';
echo '<td width="13%">';
echo avatar($ank['id']);
echo '</td><td style="font-size:12px;">';
echo group($ank['id']) . ' ' . user::nick($ank['id']) . '';
echo medal($ank['id']) . online($ank['id']);
echo '<br>';
if ($ank['ank_d_r']!=NULL && $ank['ank_m_r']!=NULL && $ank['ank_g_r']!=NULL){
$ank['ank_age']=date("Y")-$ank['ank_g_r'];
if (date("n")<$ank['ank_m_r'])$ank['ank_age']=$ank['ank_age']-1;
elseif (date("n")==$ank['ank_m_r']&& date("j")<$ank['ank_d_r'])$ank['ank_age']=$ank['ank_age']-1;
if ($ank['pol']==1)
echo "(Муж/";
else
echo " (Жен/";
echo "$ank[ank_age] лет)n";
}
if ($ank['ank_city']!=NULL)echo " $ank[ank_city]</br>";
echo 'О себе: ';
echo output_text($ank['ank_o_sebe']);
echo "</br>Посл. посещение: ".vremja($ank['date_last'])."";
echo '</td></table>';
}
echo '</table>';
if ($k_page>1)str("?",$k_page,$page); // Вывод страниц
echo '<div class="gmenu">Для отображения вашей анкеты в знакомствах заполните поля для знакомств в <a href="/user/info/edit.php"><b>анкете</b></a></div>';
include_once '../../sys/inc/tfoot.php';
?>