* Project name: Battles-Game */ include_once "config.php"; #include_once "functions.php"; #$db = $mysql; $claninf = urldecode(filter_input(INPUT_SERVER,'QUERY_STRING')); if ($claninf AND ($query = db::c()->query('SELECT * FROM `clans` WHERE `name` = "?s"', $claninf)->fetch_assoc())) { echo "

{$query['name']}

{$query['descr']}

"; } else { echo "

Список кланов

"; $query = db::c()->query('SELECT `name`,`short` FROM `clans` ORDER BY `name` ASC'); while ($clanrow = $query->fetch_assoc()) { echo "",$clanrow['name'],"
"; } } /* else { $clan = $_GET[clan]; $query=mysql_query("SELECT * FROM clans WHERE short = '$_GET[clan]' LIMIT 1"); while($row = mysql_fetch_array($query)) { echo "

$row[name]


"; echo "$row[descr]

"; echo "$row[homepage]

"; } $clan = $_GET['clan']; $glid=mysql_fetch_array(mysql_query("SELECT `glava` FROM `clans` WHERE `short` = '".$clan."' LIMIT 1")); $glid=$glid['glava']; $gl=mysql_fetch_array(mysql_query("SELECT `login` FROM `users` WHERE `id` = '".$glid."' LIMIT 1")); $gl=$gl['login']; $gl2=mysql_fetch_array(mysql_query("SELECT `id` FROM `users` WHERE `id` = '".$glid."' LIMIT 1")); $gl2=$gl2['id']; $gl3=mysql_fetch_array(mysql_query("SELECT `level` FROM `users` WHERE `id` = '".$glid."' LIMIT 1")); $gl3=$gl3['level']; $gl4=mysql_fetch_array(mysql_query("SELECT `status` FROM `users` WHERE `id` = '".$glid."' LIMIT 1")); $gl4=$gl4['status']; echo "
{$gl4}: {$gl}[{$gl3}]\"Инф.
" ; echo "
Состав клана:
" ; $clanss=mysql_fetch_array(mysql_query("SELECT `id` FROM `clans` WHERE `short` = '".$clan."' LIMIT 1")); $clanss=$clanss['id']; $clansss=mysql_query("SELECT `id`,`level`,`align`,`login` FROM `users` WHERE `klan` = '".$clanss."' ORDER BY level desc, login asc;"); while ($row3 = mysql_fetch_array($clansss)) { echo(""); echo(""); echo ($row3['login']); echo(""); echo("["); echo ($row3['level']); echo("]"); echo("\"Инф."); echo("
"); } $total = mysql_num_rows($clansss); echo "
Всего: ".$total."" ; $clanrait=mysql_query("SELECT `rating` FROM `clans` WHERE short = '".$clan."' LIMIT 1"); while ($row4 = mysql_fetch_array($clanrait)) { echo "
Очки рейтинга: $row4[rating]

" ; } } mysql_close($db); */