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

Размер файла: 1.6Kb
<?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`"), 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){
    message('Нет пользователей');
} else {
    $w = mysql_query("SELECT * FROM `user` ORDER BY `uptime` DESC LIMIT $start, $str");
	echo '<div class="menu">
<b>Все</b>&nbsp;|&nbsp;<a href="girl">Девушки</a>&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';