Просмотр файла pages/girl.php

Размер файла: 1.79Kb
<?php
include '../system/inc/connect.php';
include '../system/inc/core.php';
$title = 'Список зарегистрированых Девушек';
include '../system/inc/header.php';

if(!$user){
    header('Location: /index.php');
}

$count = mysql_result(mysql_query("SELECT COUNT(*) FROM `user` WHERE `sex` = 1"), 0);
$str = $user['str'];
$k_page = k_page($count, $str);
$page = page($k_page);
$start = $str*$page-$str;
// <span class="big"></span>
if ($count == 0) {
    echo '<div class="menu"><a href="users">Все</a>&nbsp;|&nbsp;<b>Девушки</b>&nbsp;|&nbsp;<a href="boy">Парни</a></div>';
    message('Нет пользователей');
}
else
{
    $w = mysql_query("SELECT * FROM `user` WHERE `sex` = 1 ORDER BY `uptime` DESC LIMIT $start, $str");
	echo '<div class="menu">
<a href="users">Все</a>&nbsp;|&nbsp;<b>Девушки</b>&nbsp;|&nbsp;<a href="boy">Парни</a>
</div>';
    while($ank = mysql_fetch_assoc($w)){
        $ic = mysql_fetch_assoc(mysql_query("SELECT `ico` FROM `country` WHERE `country_id` = '$ank[strana]'"));
        $sity = mysql_fetch_assoc(mysql_query("SELECT `name` FROM `city` WHERE `city_id` = '$ank[city]'"));
        echo '<table class="menu" width="100%"><tr>
<th class="left">';
        avatar($ank['id'],30);
        echo '</th><th class="left">&nbsp;';
        user($ank[id]);
        echo age($ank['d'] . '.' . $ank['m'] . '.' . $ank['g']);
        if ($ank['strana'] != 0 && $ank['city'] != 0) {
            echo '<br /> <span style="border-top: 1px #000 solid;">' . $sity['name'] . ' / <img src="/images/flag/' . $ic['ico'] . '" class="hu" alt="" /></span>';
        }
        echo '</th>
</tr></table>';
    }
    if ($k_page > 1) {
        str("?", $k_page, $page);
    }
}

include '../system/inc/footer.php';