From a97a29f87dfed4b1d4ab40e22798d7b2e2eb280c Mon Sep 17 00:00:00 2001 From: lopar Date: Thu, 1 Mar 2018 22:26:45 +0200 Subject: [PATCH] =?UTF-8?q?=D0=90=D0=BD=D0=BA=D0=B5=D1=82=D0=B0=20=D0=B8?= =?UTF-8?q?=20=D0=B8=D0=B3=D1=80=D0=BE=D0=B2=D0=B0=D1=8F=20=D1=88=D0=B0?= =?UTF-8?q?=D0=BF=D0=BA=D0=B0.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ch.php | 9 +-- functions.php | 27 +------ top_menu.php | 210 ++++++++---------------------------------------- user_anketa.php | 22 ++--- 4 files changed, 48 insertions(+), 220 deletions(-) diff --git a/ch.php b/ch.php index 65b4c87..76932cc 100644 --- a/ch.php +++ b/ch.php @@ -8,8 +8,7 @@ if (!isset($_SESSION['uid'])) { include_once 'config.php'; include_once 'functions.php'; -$user = db::c()->query('SELECT * FROM `users` WHERE `id` = ?i', $_SESSION['uid'])->fetch_assoc(); -db::c()->query('UPDATE `online` SET `real_time` = ?i WHERE `id` = ?i', time(), $user['id']); +db::c()->query('UPDATE `online` SET `real_time` = ?i WHERE `id` = ?i', time(), $u->i()['id']); //function tolink($buf) /*Штука, убивающая чужие ссылки*/ //{ @@ -29,7 +28,7 @@ if (isset($_GET['online']) && $_GET['online'] != null) { if ($_GET['room'] && (int)$_GET['room'] < 500) { $user['room'] = (int)$_GET['room']; } - if ($user['caveleader'] > 0) { + if ($u->i()['caveleader'] > 0) { $data = mysql_query(' SELECT `align`, @@ -49,8 +48,8 @@ if (isset($_GET['online']) && $_GET['online'] != null) { WHERE `o`.`id` = `u`.`id` AND (`o`.`date` >= ' . (time() - 90) . ' OR `u`.`in_tower` = 1) AND - `o`.`room` = "' . $user['room'] . '" AND - `u`.`caveleader` = "' . $user['caveleader'] . '" + `o`.`room` = "' . $u->i()['room'] . '" AND + `u`.`caveleader` = "' . $u->i()['caveleader'] . '" ORDER BY `u`.`login` '); diff --git a/functions.php b/functions.php index fcca7ab..fcd1f10 100644 --- a/functions.php +++ b/functions.php @@ -7,6 +7,7 @@ require_once 'config.php'; require_once 'classes/u.php'; +$u = new u($_SESSION['uid']); define("HPADDICTIONEFFECT", 33); @@ -1159,29 +1160,7 @@ $exptable = array( 1500000000 => array(10, 1, 5, 8000, 1, 9999999999), # Это тринадцатый уровень ); -$RefBonus = array( - "1" => array(5, 0), - "2" => array(10, 10), - "3" => array(20, 40), - "4" => array(30, 60), - "5" => array(40, 80), - "6" => array(100, 120), - "7" => array(150, 200), - "8" => array(200, 300), - "9" => array(400, 1000), - "10" => array(500, 2000), - "11" => array(1000, 4000), - "12" => array(3000, 10000), - "13" => array(10000, 30000), - "14" => array(15000, 40000), - "15" => array(20000, 50000), - "16" => array(30000, 60000), - "17" => array(40000, 70000), - "18" => array(50000, 100000) - -); - -$rooms = array( +$rooms = [ "0" => "Секретная Комната", "1" => "Комната Новичков", "2" => "Комната Новичков 2", @@ -1394,7 +1373,7 @@ $rooms = array( "2100" => "Сектор 2100" -); +]; //эффективность магии $elem_align = array( "a" => array("a" => "1", "e" => "0", "f" => "0.5", "w" => "0.5"), diff --git a/top_menu.php b/top_menu.php index 9afaf36..75c4395 100644 --- a/top_menu.php +++ b/top_menu.php @@ -1,194 +1,50 @@ - - + + - - + li img:hover { + -webkit-box-shadow: 0 0 7px rgba(255,255,255,0.9); + box-shadow: 0 0 7px rgba(255,255,255,0.9); + } + - - - - - - - -
- - - - - - - - -
- -
-
- -
+ +
+ +
+ \ No newline at end of file diff --git a/user_anketa.php b/user_anketa.php index 6b1c83f..8733aa5 100644 --- a/user_anketa.php +++ b/user_anketa.php @@ -4,25 +4,21 @@ if (!isset($_SESSION['uid'])) { header('Location: /index.php'); die(); } -include('config.php'); -include('functions.php'); - -$u = new u($_SESSION['uid']); +include_once('config.php'); +include_once('functions.php'); if ($u->i()['battle'] > 0) { header('Location: /fbattle.php'); die(); } +$name = filter_input(INPUT_POST, $_POST['name']); +$color = filter_input(INPUT_POST, $_POST['color']); +$hobbie = str_replace("\\n", "
", $_POST['hobbie']); +$hobbie = str_replace("\\r", "", $_POST['hobbie']); +$hobbie = str_replace("<br />", "
", $_POST['hobbie']); -if ($_POST['submit']) { - $name = filter_input(INPUT_POST, $_POST['name']); - $color = filter_input(INPUT_POST, $_POST['color']); -// $name = htmlspecialchars($_POST['name'], NULL, 'cp1251'); -// $color = htmlspecialchars($_POST['color'], NULL, 'cp1251'); - $hobbie = str_replace("\\n", "
", $_POST['hobbie']); - $hobbie = str_replace("\\r", "", $_POST['hobbie']); - $hobbie = str_replace("<br />", "
", $_POST['hobbie']); +if ($name || $color || $hobbie) { $simbolcount = strlen($hobbie); @@ -38,7 +34,6 @@ if ($_POST['submit']) { db::c()->query('UPDATE `users` SET `realname` = "?s", `color` = "?s", `info` = "?s" WHERE `id` = ?i', $name, $color, $hobbie, $u->i()['id']); } } - ?> @@ -46,7 +41,6 @@ if ($_POST['submit']) { Анкета - ← на главную