<?php
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();
if(isset($_GET['ok'])){
if($_GET['city']==null){
echo "<div class='nav2'>Не указан город в параметре city </div>";
include_once '../../sys/inc/tfoot.php';
exit;
}
$k_post=mysql_result(mysql_query("SELECT COUNT(*) FROM `user` where `ank_city` like '%".mysql_real_escape_string($_GET['city'])."%'"),0);
$k_page=k_page($k_post,$set['p_str']);
$page=page($k_page);
$start=$set['p_str']*$page-$set['p_str'];
if($k_post>0){
$q=mysql_query("SELECT * FROM `user` WHERE `ank_city` like '%".mysql_real_escape_string($_GET['city'])."%' ORDER BY `date_last` DESC LIMIT $start,$set[p_str]");
while($ank=mysql_fetch_assoc($q)){
echo "<div class='nav2'>";
echo avatar($ank['id'])." ";
echo user::avatar($ank['id'],2)." ";
echo user::nick($ank['id'],1,1,1)."<br/>";
echo substr(output_text($ank['ank_o_sebe']),0,60)." [...]</div>";
}}
if ($k_page > 1)str('search.php?ok&city='.htmlspecialchars($_GET['city']).'&', $k_page, $page); // Вывод страниц
}
include_once '../../sys/inc/tfoot.php';
?>