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[short] (Очки рейтинга: $row[rating]) ";
+ }
+ ?>
+
+ $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); */