* Project name: Battles-Game */ \Battles\Template::header('Список кланов'); include_once "config.php"; $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']}

"; $clanlist = db::c()->query('SELECT `login`,`status` FROM `users` WHERE `klan` = ?i',$query['id']); while ($member = $clanlist->fetch_assoc()) { echo " ",$member['login']," - ",$member['status'],"
"; } } else { echo "

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

"; $query = db::c()->query('SELECT `align`,`name`,`short` FROM `clans` ORDER BY `name` ASC'); while ($clanrow = $query->fetch_assoc()) { $frm = " %s
"; echo sprintf($frm,$clanrow['align'],$clanrow['short'],$clanrow['name'],$clanrow['name']); } }