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']) {
Анкета
-
← на главную