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

This commit is contained in:
lopar 2018-02-16 03:33:06 +02:00
parent 543a217eb6
commit 1c0191d7c1

View File

@ -6,9 +6,6 @@
</head>
<body>
</body>
</html>
<?php
/**
* Copyright (c) 2018.
@ -24,6 +21,10 @@ $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 "<h1>{$query['name']}</h1><p>{$query['descr']}</p>";
$clanlist = db::c()->query('SELECT `login`,`status` FROM `users` WHERE `klan` = ?i',$query['id']);
while ($member = $clanlist->fetch_assoc()) {
echo "<img src=i/align_",$query['align'],".gif> <img src=i/klan/",$query['short'],".gif> ",$member['login']," - ",$member['status'],"<br>";
}
} else {
echo "<h1>Список кланов</h1>";
$query = db::c()->query('SELECT `align`,`name`,`short` FROM `clans` ORDER BY `name` ASC');
@ -31,7 +32,11 @@ if ($claninf AND ($query = db::c()->query('SELECT * FROM `clans` WHERE `name` =
echo "<img src=i/align_",$clanrow['align'],".gif> <img src=i/klan/",$clanrow['short'],".gif> <a href=?",$clanrow['name'],">",$clanrow['name'],"</a><br>";
}
}
/*
?>
</body>
</html>
<?php/*
<a href=?",$clanrow['name'],"></a>
else {
$clan = $_GET[clan];