Список кланов
This commit is contained in:
parent
864d5d482b
commit
774fca40eb
34
clan.php
34
clan.php
@ -1,3 +1,14 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="css/main.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<?php
|
||||
/**
|
||||
* Copyright (c) 2018.
|
||||
@ -11,32 +22,17 @@ include_once "config.php";
|
||||
|
||||
$claninf = urldecode(filter_input(INPUT_SERVER,'QUERY_STRING'));
|
||||
|
||||
if ($claninf) {
|
||||
$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())) {
|
||||
echo "<h1>{$query['name']}</h1><p>{$query['descr']}</p>";
|
||||
} else {
|
||||
echo "<h1>Список кланов</h1>";
|
||||
$query = db::c()->query('SELECT `name`,`short` FROM `clans`');
|
||||
$query = db::c()->query('SELECT `name`,`short` FROM `clans` ORDER BY `name` ASC');
|
||||
while ($clanrow = $query->fetch_assoc()) {
|
||||
echo "<img src=i/klan/",$query['short'],".gif>",$query['name'],"<br>";
|
||||
echo "<img src=i/klan/",$clanrow['short'],".gif>",$clanrow['name'],"<br>";
|
||||
}
|
||||
}
|
||||
/*
|
||||
if(!$_GET[clan]) {
|
||||
?>
|
||||
<dl>
|
||||
<ul type="disc">
|
||||
<?php
|
||||
$query=mysql_query("SELECT * FROM clans ORDER BY rating desc, short asc", $db);
|
||||
while($row = mysql_fetch_array($query))
|
||||
{
|
||||
echo "<li><strong><img src='http://capitalcity.old-dark.ru/i/align_$row[align].gif' border='0'><img src='http://capitalcity.old-dark.ru/i/klan/$row[short].gif' border='0'><a href='index.php?section=99&page=clans1&clan=$row[short]'>$row[short]</a></strong> (<font color=gray size=-2>Очки рейтинга: <b>$row[rating])</b></font> </li>";
|
||||
}
|
||||
?>
|
||||
</ul></dl>
|
||||
<?php
|
||||
mysql_close($db);
|
||||
}
|
||||
|
||||
else {
|
||||
$clan = $_GET[clan];
|
||||
$query=mysql_query("SELECT * FROM clans WHERE short = '$_GET[clan]' LIMIT 1");
|
||||
|
Loading…
Reference in New Issue
Block a user