code clean

This commit is contained in:
lopar 2018-02-16 03:34:51 +02:00
parent 1c0191d7c1
commit d0ea805929

View File

@ -14,9 +14,6 @@
*/ */
include_once "config.php"; include_once "config.php";
#include_once "functions.php";
#$db = $mysql;
$claninf = urldecode(filter_input(INPUT_SERVER,'QUERY_STRING')); $claninf = urldecode(filter_input(INPUT_SERVER,'QUERY_STRING'));
if ($claninf AND ($query = db::c()->query('SELECT * FROM `clans` WHERE `name` = "?s"', $claninf)->fetch_assoc())) { if ($claninf AND ($query = db::c()->query('SELECT * FROM `clans` WHERE `name` = "?s"', $claninf)->fetch_assoc())) {
@ -34,58 +31,4 @@ if ($claninf AND ($query = db::c()->query('SELECT * FROM `clans` WHERE `name` =
} }
?> ?>
</body> </body>
</html> </html>
<?php/*
<a href=?",$clanrow['name'],"></a>
else {
$clan = $_GET[clan];
$query=mysql_query("SELECT * FROM clans WHERE short = '$_GET[clan]' LIMIT 1");
while($row = mysql_fetch_array($query))
{
echo "<h2>$row[name]</h2><br>";
echo "$row[descr]<br><br>";
echo "<a href='http://$row[homepage]'>$row[homepage]<br /><hr /></a>";
}
$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 "<br />{$gl4}: <b>{$gl}</b>[{$gl3}]<a href=http://capitalcity.old-dark.ru/inf.php?{$gl2} target=_blank><IMG SRC=../i/inf.gif WIDTH=12 HEIGHT=11 border=0 ALT=\"Инф. о {$gl2}\"></a><br />" ;
echo "<br /><em>Состав клана:</em><br />" ;
$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("<IMG width=12 SRC=../i/align_".$row3['align'].".gif height=15 />");
echo("<b>");
echo ($row3['login']);
echo("</b>");
echo("[");
echo ($row3['level']);
echo("]");
echo("<a href=http://capitalcity.old-dark.ru/inf.php?".$row3['id']." target=_blank><IMG SRC=../i/inf.gif WIDTH=12 HEIGHT=11 border=0 ALT=\"Инф. о ".$row3['id']."\"></a>");
echo("<br/>");
}
$total = mysql_num_rows($clansss);
echo "<br />Всего: <b>".$total."</b>" ;
$clanrait=mysql_query("SELECT `rating` FROM `clans` WHERE short = '".$clan."' LIMIT 1");
while ($row4 = mysql_fetch_array($clanrait))
{
echo "<br />Очки рейтинга: <b>$row4[rating]</b><br /><br />" ;
}
}
mysql_close($db); */