Файл: DARK WARS/dark_war/clans/index.php
Строк: 56
<?php
include_once '../start.php';
$doc = new document();
$doc->title('Кланы');
$pages = new pages;
$pages->posts = mysql_result(mysql_query("SELECT COUNT(*) FROM `dark_war_clans`"), 0);
$pages->this_page();
echo "<center><img src='/dark_war/all_img/
clan.jpg' alt='!' /></center>";
$q = mysql_fetch_array(mysql_query("SELECT id,name,description FROM `dark_war_clans` LIMIT {$pages->my_start()}, {$pages->items_per_page}"));
$getclanus = mysql_fetch_array(mysql_query("SELECT * FROM `dark_war_clans_us` WHERE id_player='$player->id' LIMIT 1"));
if($getclanus['id_player'] != $player->id){
$d = mysql_query("SELECT id,name,description FROM `dark_war_clans` LIMIT {$pages->my_start()}, {$pages->items_per_page}");
while($f = mysql_fetch_assoc($d)){
$list = text::length($f['name'], 30);
if(is_file(H.'/dark_war/files/clans/littel_logo/'.$f['id'].'.jpg')){
$img = '/dark_war/files/clans/littel_logo/'.$f['id'].'.jpg';
}else{
$img = '/dark_war/files/clans/littel_logo/0.png';
}
$link = "clan.php?id=$f[id]";
$descrip = text::length($f['description'], 40);
$dispatch[] = array ('title' => $list, 'img' => $img, 'link' => $link, 'descrip' => $descrip);
}
$doc->act("new_clan.php", 'Создать клан');
}else{
header('Location: ./clan.php?id='.$getclanus['id_clan']);
/* $q = mysql_fetch_array(mysql_query("SELECT id,name,description FROM `dark_war_clans` WHERE id='$getclanus[id_clan]'"));
if(is_file(H.'/dark_war/files/clans/littel_logo/'.$q['id'].'.jpg')){
$img = '/dark_war/files/clans/littel_logo/'.$q['id'].'.jpg';
}else{
$img = '/dark_war/files/clans/littel_logo/0.png';
}
$link = "clan.php?id=$q[id]";
$list = text::length($q['name'], 30);
$descrip = text::length($q['description'], 40);
$dispatch[] = array ('title' => $list, 'img' => $img, 'link' => $link, 'descrip' => $descrip); */
}
$doc->assign('post', $dispatch);
$doc->display('view_list_plus_img.tpl');
$pages->listing("?"); // вывод страниц
?>