From 864d5d482b8a1c7302b008f873c44e7fc2169b20 Mon Sep 17 00:00:00 2001 From: lopar Date: Fri, 16 Feb 2018 02:52:13 +0200 Subject: [PATCH] =?UTF-8?q?=D0=A1=D0=BF=D0=B8=D1=81=D0=BE=D0=BA=20=D0=BA?= =?UTF-8?q?=D0=BB=D0=B0=D0=BD=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- clan.php | 90 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 clan.php diff --git a/clan.php b/clan.php new file mode 100644 index 0000000..164c261 --- /dev/null +++ b/clan.php @@ -0,0 +1,90 @@ + + * Project name: Battles-Game + */ + +include_once "config.php"; +#include_once "functions.php"; +#$db = $mysql; + +$claninf = urldecode(filter_input(INPUT_SERVER,'QUERY_STRING')); + +if ($claninf) { + $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`'); + while ($clanrow = $query->fetch_assoc()) { + echo "",$query['name'],"
"; + } +} +/* +if(!$_GET[clan]) { + ?> +
+
+ $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); */