Файл: DARK WARS/dark_war/refs/exc.php
Строк: 24
<?php
include_once '../start.php';
$doc = new document();
$doc->title('Обмен');
$pages = new pages;
$pages->posts = mysql_result(mysql_query("SELECT COUNT(*) FROM `dark_war_refs`
INNER JOIN `dark_war_users`
ON dark_war_users.id = dark_war_refs.id_player
WHERE `dark_war_refs.id_player` = '{$player->id}'
AND dark_war_users.level >= '4'"), 0);
$pages->this_page(); // получаем текущую страницу
$q=mysql_query("SELECT * FROM `dark_war_users`
INNER JOIN `dark_war_refs`
ON dark_war_users.id = dark_war_refs.id_who
WHERE dark_war_refs.id_player = '{$player->id}'
AND dark_war_users.level >= '4'
LIMIT {$pages->my_start()}, {$pages->items_per_page}");
while ($post = mysql_fetch_assoc($q)) {
$action = array();
$ank = new player($post['id_who']);
$list = $ank->name;
$link = "/dark_war/profil.php?id=" . $ank->id . "";
$descrip = 'level: ' . $ank->level;
$action[] = array('link' => 'exchange.php?id='.$post['id'], 'name' => 'Обменять');
$dispatch[] = array ('title' => $list, 'link' => $link, 'descrip' => $descrip, 'action' => $action);
}
if (!$dispatch) {
$dispatch[] = array ('title' => 'У вас нет рефералов для обмена');
}
$doc->assign('post', $dispatch);
$doc->display('view_list_plus_img.tpl');
$pages->listing('?'); // вывод страниц
$doc->ret('/dark_war/refs/', 'Обратно');
?>