diff --git a/1 b/1 deleted file mode 100644 index c0d64e9e..00000000 --- a/1 +++ /dev/null @@ -1,267 +0,0 @@ ----[10-Jan-2023 18:23:02 Europe/Moscow] PHP Fatal error: Uncaught Error: Call to undefined method User::onlineBonus() in /home/newcom1/public_html/online.php:30 -Stack trace: -#0 {main} - thrown in /home/newcom1/public_html/online.php on line 30 -[10-Jan-2023 18:23:34 Europe/Moscow] PHP Fatal error: Uncaught Error: Call to undefined method User::onlineBonus() in /home/newcom1/public_html/online.php:69 -Stack trace: -#0 {main} - thrown in /home/newcom1/public_html/online.php on line 69 -[10-Jan-2023 18:23:40 Europe/Moscow] PHP Fatal error: Uncaught Error: Call to undefined method User::onlineBonus() in /home/newcom1/public_html/online.php:69 -Stack trace: -#0 {main} - thrown in /home/newcom1/public_html/online.php on line 69 -[10-Jan-2023 18:23:46 Europe/Moscow] PHP Fatal error: Uncaught Error: Call to undefined method User::onlineBonus() in /home/newcom1/public_html/online.php:69 -Stack trace: -#0 {main} - thrown in /home/newcom1/public_html/online.php on line 69 -[10-Jan-2023 18:23:52 Europe/Moscow] PHP Fatal error: Uncaught Error: Call to undefined method User::onlineBonus() in /home/newcom1/public_html/online.php:69 -Stack trace: -#0 {main} - thrown in /home/newcom1/public_html/online.php on line 69 -[10-Jan-2023 18:23:52 Europe/Moscow] PHP Fatal error: Uncaught Error: Call to undefined method User::onlineBonus() in /home/newcom1/public_html/online.php:69 -Stack trace: -#0 {main} - thrown in /home/newcom1/public_html/online.php on line 69 -[10-Jan-2023 18:23:54 Europe/Moscow] PHP Fatal error: Uncaught Error: Call to undefined method User::onlineBonus() in /home/newcom1/public_html/online.php:69 -Stack trace: -#0 {main} - thrown in /home/newcom1/public_html/online.php on line 69 -[10-Jan-2023 18:23:58 Europe/Moscow] PHP Fatal error: Uncaught Error: Call to undefined method User::onlineBonus() in /home/newcom1/public_html/online.php:69 -Stack trace: -#0 {main} - thrown in /home/newcom1/public_html/online.php on line 69 -[10-Jan-2023 18:24:03 Europe/Moscow] PHP Fatal error: Uncaught Error: Call to undefined method User::onlineBonus() in /home/newcom1/public_html/online.php:69 -Stack trace: -#0 {main} - thrown in /home/newcom1/public_html/online.php on line 69 -[10-Jan-2023 18:24:04 Europe/Moscow] PHP Fatal error: Uncaught Error: Call to undefined method User::onlineBonus() in /home/newcom1/public_html/online.php:69 -Stack trace: -#0 {main} - thrown in /home/newcom1/public_html/online.php on line 69 -[10-Jan-2023 18:24:11 Europe/Moscow] PHP Fatal error: Uncaught Error: Call to undefined method User::onlineBonus() in /home/newcom1/public_html/online.php:69 -Stack trace: -#0 {main} - thrown in /home/newcom1/public_html/online.php on line 69 -[10-Jan-2023 18:24:17 Europe/Moscow] PHP Fatal error: Uncaught Error: Call to undefined method User::onlineBonus() in /home/newcom1/public_html/online.php:69 -Stack trace: -#0 {main} - thrown in /home/newcom1/public_html/online.php on line 69 -[10-Jan-2023 18:24:25 Europe/Moscow] PHP Fatal error: Uncaught Error: Call to undefined method User::onlineBonus() in /home/newcom1/public_html/online.php:69 -Stack trace: -#0 {main} - thrown in /home/newcom1/public_html/online.php on line 69 -[10-Jan-2023 18:24:33 Europe/Moscow] PHP Fatal error: Uncaught Error: Call to undefined method User::onlineBonus() in /home/newcom1/public_html/online.php:69 -Stack trace: -#0 {main} - thrown in /home/newcom1/public_html/online.php on line 69 -[10-Jan-2023 18:24:43 Europe/Moscow] PHP Fatal error: Uncaught Error: Call to undefined method User::onlineBonus() in /home/newcom1/public_html/online.php:30 -Stack trace: -#0 {main} - thrown in /home/newcom1/public_html/online.php on line 30 -[10-Jan-2023 18:24:52 Europe/Moscow] PHP Fatal error: Uncaught Error: Call to undefined method User::onlineBonus() in /home/newcom1/public_html/online.php:69 -Stack trace: -#0 {main} - thrown in /home/newcom1/public_html/online.php on line 69 -[10-Jan-2023 18:25:02 Europe/Moscow] PHP Fatal error: Uncaught Error: Call to undefined method User::onlineBonus() in /home/newcom1/public_html/online.php:69 -Stack trace: -#0 {main} - thrown in /home/newcom1/public_html/online.php on line 69 -[10-Jan-2023 18:25:13 Europe/Moscow] PHP Fatal error: Uncaught Error: Call to undefined method User::onlineBonus() in /home/newcom1/public_html/online.php:69 -Stack trace: -#0 {main} - thrown in /home/newcom1/public_html/online.php on line 69 -[10-Jan-2023 18:25:24 Europe/Moscow] PHP Fatal error: Uncaught Error: Call to undefined method User::onlineBonus() in /home/newcom1/public_html/online.php:69 -Stack trace: -#0 {main} - thrown in /home/newcom1/public_html/online.php on line 69 -[10-Jan-2023 18:25:34 Europe/Moscow] PHP Fatal error: Uncaught Error: Call to undefined method User::onlineBonus() in /home/newcom1/public_html/online.php:69 -Stack trace: -#0 {main} - thrown in /home/newcom1/public_html/online.php on line 69 -[10-Jan-2023 18:25:44 Europe/Moscow] PHP Fatal error: Uncaught Error: Call to undefined method User::onlineBonus() in /home/newcom1/public_html/online.php:30 -Stack trace: -#0 {main} - thrown in /home/newcom1/public_html/online.php on line 30 -[10-Jan-2023 18:25:54 Europe/Moscow] PHP Fatal error: Uncaught Error: Call to undefined method User::onlineBonus() in /home/newcom1/public_html/online.php:69 -Stack trace: -#0 {main} - thrown in /home/newcom1/public_html/online.php on line 69 -[10-Jan-2023 18:26:03 Europe/Moscow] PHP Fatal error: Uncaught Error: Call to undefined method User::onlineBonus() in /home/newcom1/public_html/online.php:69 -Stack trace: -#0 {main} - thrown in /home/newcom1/public_html/online.php on line 69 -[10-Jan-2023 18:26:09 Europe/Moscow] PHP Fatal error: Uncaught Error: Call to undefined method User::onlineBonus() in /home/newcom1/public_html/online.php:69 -Stack trace: -#0 {main} - thrown in /home/newcom1/public_html/online.php on line 69 -[10-Jan-2023 18:26:12 Europe/Moscow] PHP Fatal error: Uncaught Error: Call to undefined method User::onlineBonus() in /home/newcom1/public_html/online.php:69 -Stack trace: -#0 {main} - thrown in /home/newcom1/public_html/online.php on line 69 -[10-Jan-2023 18:26:16 Europe/Moscow] PHP Fatal error: Uncaught Error: Call to undefined method User::onlineBonus() in /home/newcom1/public_html/online.php:69 -Stack trace: -#0 {main} - thrown in /home/newcom1/public_html/online.php on line 69 -[10-Jan-2023 18:26:24 Europe/Moscow] PHP Fatal error: Uncaught Error: Call to undefined method User::onlineBonus() in /home/newcom1/public_html/online.php:69 -Stack trace: -#0 {main} - thrown in /home/newcom1/public_html/online.php on line 69 -[10-Jan-2023 18:27:13 Europe/Moscow] PHP Fatal error: Uncaught Error: Call to undefined method User::onlineBonus() in /home/newcom1/public_html/online.php:30 -Stack trace: -#0 {main} - thrown in /home/newcom1/public_html/online.php on line 30 -[10-Jan-2023 18:27:15 Europe/Moscow] PHP Fatal error: Uncaught PDOException: SQLSTATE[HY093]: Invalid parameter number in /home/newcom1/public_html/_incl_data/class/Core/Db.php:88 -Stack trace: -#0 /home/newcom1/public_html/_incl_data/class/Core/Db.php(142): Core\Db::run('update users se...', Array) -#1 /home/newcom1/public_html/settings.php(40): Core\Db::sql('update users se...', Array) -#2 {main} - thrown in /home/newcom1/public_html/_incl_data/class/Core/Db.php on line 88 -[10-Jan-2023 18:28:54 Europe/Moscow] PHP Fatal error: Uncaught Error: Call to undefined method User::onlineBonus() in /home/newcom1/public_html/online.php:30 -Stack trace: -#0 {main} - thrown in /home/newcom1/public_html/online.php on line 30 -[10-Jan-2023 18:29:02 Europe/Moscow] PHP Fatal error: Uncaught Error: Call to undefined method User::onlineBonus() in /home/newcom1/public_html/online.php:30 -Stack trace: -#0 {main} - thrown in /home/newcom1/public_html/online.php on line 30 -[10-Jan-2023 18:29:55 Europe/Moscow] PHP Fatal error: Uncaught Error: Call to undefined method User::onlineBonus() in /home/newcom1/public_html/online.php:30 -Stack trace: -#0 {main} - thrown in /home/newcom1/public_html/online.php on line 30 -[10-Jan-2023 18:31:00 Europe/Moscow] PHP Fatal error: Uncaught Error: Call to undefined method User::onlineBonus() in /home/newcom1/public_html/online.php:30 -Stack trace: -#0 {main} - thrown in /home/newcom1/public_html/online.php on line 30 -[10-Jan-2023 18:31:22 Europe/Moscow] PHP Fatal error: Uncaught PDOException: SQLSTATE[HY093]: Invalid parameter number in /home/newcom1/public_html/_incl_data/class/Core/Db.php:88 -Stack trace: -#0 /home/newcom1/public_html/_incl_data/class/Core/Db.php(142): Core\Db::run('update users se...', Array) -#1 /home/newcom1/public_html/settings.php(40): Core\Db::sql('update users se...', Array) -#2 {main} - thrown in /home/newcom1/public_html/_incl_data/class/Core/Db.php on line 88 -[10-Jan-2023 18:32:22 Europe/Moscow] PHP Fatal error: Uncaught Error: Call to undefined method User::onlineBonus() in /home/newcom1/public_html/online.php:30 -Stack trace: -#0 {main} - thrown in /home/newcom1/public_html/online.php on line 30 -[10-Jan-2023 18:33:24 Europe/Moscow] PHP Fatal error: Uncaught Error: Call to undefined method User::onlineBonus() in /home/newcom1/public_html/online.php:30 -Stack trace: -#0 {main} - thrown in /home/newcom1/public_html/online.php on line 30 -[10-Jan-2023 18:34:34 Europe/Moscow] PHP Fatal error: Uncaught Error: Call to undefined method User::onlineBonus() in /home/newcom1/public_html/online.php:30 -Stack trace: -#0 {main} - thrown in /home/newcom1/public_html/online.php on line 30 -[10-Jan-2023 18:35:02 Europe/Moscow] PHP Fatal error: Uncaught Error: Call to undefined method User::onlineBonus() in /home/newcom1/public_html/online.php:30 -Stack trace: -#0 {main} - thrown in /home/newcom1/public_html/online.php on line 30 -[10-Jan-2023 18:35:37 Europe/Moscow] PHP Fatal error: Uncaught Error: Call to undefined method User::onlineBonus() in /home/newcom1/public_html/online.php:30 -Stack trace: -#0 {main} - thrown in /home/newcom1/public_html/online.php on line 30 -[10-Jan-2023 18:41:02 Europe/Moscow] PHP Fatal error: Uncaught Error: Call to undefined method User::onlineBonus() in /home/newcom1/public_html/online.php:30 -Stack trace: -#0 {main} - thrown in /home/newcom1/public_html/online.php on line 30 -[10-Jan-2023 18:42:22 Europe/Moscow] PHP Fatal error: Uncaught Error: Call to undefined method User::onlineBonus() in /home/newcom1/public_html/online.php:30 -Stack trace: -#0 {main} - thrown in /home/newcom1/public_html/online.php on line 30 -[10-Jan-2023 18:43:04 Europe/Moscow] PHP Fatal error: Uncaught Error: Call to undefined method User::onlineBonus() in /home/newcom1/public_html/online.php:30 -Stack trace: -#0 {main} - thrown in /home/newcom1/public_html/online.php on line 30 -[10-Jan-2023 18:47:02 Europe/Moscow] PHP Fatal error: Uncaught Error: Call to undefined method User::onlineBonus() in /home/newcom1/public_html/online.php:30 -Stack trace: -#0 {main} - thrown in /home/newcom1/public_html/online.php on line 30 -[10-Jan-2023 18:48:21 Europe/Moscow] PHP Fatal error: Uncaught Error: Call to undefined method User::onlineBonus() in /home/newcom1/public_html/online.php:30 -Stack trace: -#0 {main} - thrown in /home/newcom1/public_html/online.php on line 30 -[10-Jan-2023 18:53:02 Europe/Moscow] PHP Fatal error: Uncaught Error: Call to undefined method User::onlineBonus() in /home/newcom1/public_html/online.php:30 -Stack trace: -#0 {main} - thrown in /home/newcom1/public_html/online.php on line 30 -[10-Jan-2023 18:54:21 Europe/Moscow] PHP Fatal error: Uncaught Error: Call to undefined method User::onlineBonus() in /home/newcom1/public_html/online.php:30 -Stack trace: -#0 {main} - thrown in /home/newcom1/public_html/online.php on line 30 -[10-Jan-2023 18:59:02 Europe/Moscow] PHP Fatal error: Uncaught Error: Call to undefined method User::onlineBonus() in /home/newcom1/public_html/online.php:30 -Stack trace: -#0 {main} - thrown in /home/newcom1/public_html/online.php on line 30 -[10-Jan-2023 18:59:14 Europe/Moscow] PHP Fatal error: Uncaught Error: Call to undefined method User::onlineBonus() in /home/newcom1/public_html/online.php:30 -Stack trace: -#0 {main} - thrown in /home/newcom1/public_html/online.php on line 30 -[10-Jan-2023 18:59:57 Europe/Moscow] PHP Warning: Use of undefined constant loto - assumed 'loto' (this will throw an Error in a future version of PHP) in /home/newcom1/public_html/lotowork.php on line 137 -[10-Jan-2023 19:00:21 Europe/Moscow] PHP Fatal error: Uncaught Error: Call to undefined method User::onlineBonus() in /home/newcom1/public_html/online.php:30 -Stack trace: -#0 {main} - thrown in /home/newcom1/public_html/online.php on line 30 -[10-Jan-2023 19:02:16 Europe/Moscow] PHP Fatal error: Uncaught Error: Call to undefined method User::onlineBonus() in /home/newcom1/public_html/online.php:30 -Stack trace: -#0 {main} - thrown in /home/newcom1/public_html/online.php on line 30 -[10-Jan-2023 19:04:02 Europe/Moscow] PHP Fatal error: Uncaught Error: Call to undefined method User::onlineBonus() in /home/newcom1/public_html/online.php:30 -Stack trace: -#0 {main} - thrown in /home/newcom1/public_html/online.php on line 30 -[10-Jan-2023 19:05:02 Europe/Moscow] PHP Fatal error: Uncaught Error: Call to undefined method User::onlineBonus() in /home/newcom1/public_html/online.php:30 -Stack trace: -#0 {main} - thrown in /home/newcom1/public_html/online.php on line 30 -[10-Jan-2023 19:05:45 Europe/Moscow] PHP Fatal error: Uncaught Error: Call to undefined method User::onlineBonus() in /home/newcom1/public_html/online.php:30 -Stack trace: -#0 {main} - thrown in /home/newcom1/public_html/online.php on line 30 -[10-Jan-2023 19:06:22 Europe/Moscow] PHP Fatal error: Uncaught Error: Call to undefined method User::onlineBonus() in /home/newcom1/public_html/online.php:30 -Stack trace: -#0 {main} - thrown in /home/newcom1/public_html/online.php on line 30 -[10-Jan-2023 19:10:40 Europe/Moscow] PHP Fatal error: Uncaught Error: Call to undefined method User::onlineBonus() in /home/newcom1/public_html/online.php:30 -Stack trace: -#0 {main} - thrown in /home/newcom1/public_html/online.php on line 30 -[10-Jan-2023 19:11:02 Europe/Moscow] PHP Fatal error: Uncaught Error: Call to undefined method User::onlineBonus() in /home/newcom1/public_html/online.php:30 -Stack trace: -#0 {main} - thrown in /home/newcom1/public_html/online.php on line 30 -[10-Jan-2023 19:11:42 Europe/Moscow] PHP Fatal error: Uncaught Error: Call to undefined method User::onlineBonus() in /home/newcom1/public_html/online.php:30 -Stack trace: -#0 {main} - thrown in /home/newcom1/public_html/online.php on line 30 -[10-Jan-2023 19:12:21 Europe/Moscow] PHP Fatal error: Uncaught Error: Call to undefined method User::onlineBonus() in /home/newcom1/public_html/online.php:30 -Stack trace: -#0 {main} - thrown in /home/newcom1/public_html/online.php on line 30 -[10-Jan-2023 19:12:45 Europe/Moscow] PHP Fatal error: Uncaught Error: Call to undefined method User::onlineBonus() in /home/newcom1/public_html/online.php:30 -Stack trace: -#0 {main} - thrown in /home/newcom1/public_html/online.php on line 30 -[10-Jan-2023 19:13:49 Europe/Moscow] PHP Fatal error: Uncaught Error: Call to undefined method User::onlineBonus() in /home/newcom1/public_html/online.php:30 -Stack trace: -#0 {main} - thrown in /home/newcom1/public_html/online.php on line 30 -[10-Jan-2023 19:14:38 Europe/Moscow] PHP Warning: user->info is empty in constructor in /home/newcom1/public_html/_incl_data/class/User.php on line 1813 -[10-Jan-2023 19:17:02 Europe/Moscow] PHP Fatal error: Uncaught Error: Call to undefined method User::onlineBonus() in /home/newcom1/public_html/online.php:30 -Stack trace: -#0 {main} - thrown in /home/newcom1/public_html/online.php on line 30 -[10-Jan-2023 19:18:21 Europe/Moscow] PHP Fatal error: Uncaught Error: Call to undefined method User::onlineBonus() in /home/newcom1/public_html/online.php:30 -Stack trace: -#0 {main} - thrown in /home/newcom1/public_html/online.php on line 30 -[10-Jan-2023 19:19:16 Europe/Moscow] PHP Fatal error: Uncaught Error: Call to undefined method User::onlineBonus() in /home/newcom1/public_html/online.php:30 -Stack trace: -#0 {main} - thrown in /home/newcom1/public_html/online.php on line 30 -[10-Jan-2023 19:19:21 Europe/Moscow] PHP Warning: user->info is empty in constructor in /home/newcom1/public_html/_incl_data/class/User.php on line 1813 -[10-Jan-2023 19:20:23 Europe/Moscow] PHP Fatal error: Uncaught Error: Call to undefined method User::onlineBonus() in /home/newcom1/public_html/online.php:30 -Stack trace: -#0 {main} - thrown in /home/newcom1/public_html/online.php on line 30 -[10-Jan-2023 19:23:02 Europe/Moscow] PHP Fatal error: Uncaught Error: Call to undefined method User::onlineBonus() in /home/newcom1/public_html/online.php:30 -Stack trace: -#0 {main} - thrown in /home/newcom1/public_html/online.php on line 30 diff --git a/AI.php b/AI.php index 69fd81d5..83ab1d3b 100644 --- a/AI.php +++ b/AI.php @@ -10,7 +10,7 @@ if (isset($_GET['m1'])) { define('GAME', true); - setlocale(LC_CTYPE, "ru_RU.CP1251"); + include_once '_incl_data/__config.php'; include_once '_incl_data/class/__db_connect.php'; @@ -22,7 +22,7 @@ if (isset($_GET['m1'])) { } elseif (isset($_GET['bk1'])) { define('GAME', true); - setlocale(LC_CTYPE, "ru_RU.CP1251"); + include('_incl_data/__config.php'); include('_incl_data/class/__db_connect.php'); @@ -149,7 +149,7 @@ if (!isset($_GET['robot']) && UserIp::get() != $_SERVER['SERVER_ADDR'] && UserIp const GAME = true; -setlocale(LC_CTYPE, "ru_RU.CP1251"); + include('_incl_data/__config.php'); include('_incl_data/class/__db_connect.php'); diff --git a/_incl_data/__config.php b/_incl_data/__config.php index d6814c39..065cadeb 100644 --- a/_incl_data/__config.php +++ b/_incl_data/__config.php @@ -5,7 +5,6 @@ use Insallah\Tournaments\Tournament; error_reporting(E_ALL ^ E_NOTICE); ini_set('display_errors', 'Off'); -//setlocale(LC_CTYPE, "ru_RU.CP1251"); date_default_timezone_set('Europe/Moscow'); header('Cache-Control: no-cache, no-store, must-revalidate'); diff --git a/_incl_data/class/ComissionShop.php b/_incl_data/class/ComissionShop.php new file mode 100644 index 00000000..ac23704c --- /dev/null +++ b/_incl_data/class/ComissionShop.php @@ -0,0 +1,575 @@ + unix_timestamp() OR `items_main`.srok = "0") AND `items_users`.`delete`="0" AND `items_users`.`inOdet`="0" AND `items_users`.`inShop`="30" and `items_main`.`type` = "' . mysql_real_escape_string( + $typeOtdel + ) . '" and `items_users`.`item_id` = "' . (int)$_GET['itemid'] . '" GROUP BY `items_users`.`inGroup`, `items_users`.`uid`,`items_users`.`1price` HAVING `items_users`.inGroup > 0 +UNION ALL SELECT `items_users`.`id`,`items_users`.`item_id`,`items_users`.`1price`,`items_users`.`2price`,`items_users`.`uid`,`items_users`.`use_text`,`items_users`.`data`,`items_users`.`inOdet`,`items_users`.`inShop`,`items_users`.`delete`,`items_users`.`iznosNOW`,`items_users`.`iznosMAX`,`items_users`.`gift`,`items_users`.`gtxt1`,`items_users`.`gtxt2`,`items_users`.`kolvo`,`items_users`.`geniration`,`items_users`.`magic_inc`,`items_users`.`maidin`,`items_users`.`lastUPD`,`items_users`.`timeOver`,`items_users`.`overType`,`items_users`.`secret_id`,`items_users`.`time_create`,`items_users`.`inGroup`,`items_users`.`dn_delete`,`items_users`.`inTransfer`,`items_users`.`post_delivery`,`items_users`.`lbtl_`,`items_users`.`bexp`,`items_users`.`so`,`items_users`.`blvl`,`items_main`.`id`,`items_main`.`name`,`items_main`.`img`,`items_main`.`type`,`items_main`.`inslot`,`items_main`.`2h`,`items_main`.`2too`,`items_main`.`iznosMAXi`,`items_main`.`inRazdel`,`items_main`.`price1`,`items_main`.`price2`,`items_main`.`magic_chance`,`items_main`.`info`,`items_main`.`massa`,`items_main`.`level`,`items_main`.`magic_inci`,`items_main`.`overTypei`,`items_main`.`group`,`items_main`.`group_max`,`items_main`.`geni`,`items_main`.`ts`,`items_main`.`srok`,`items_main`.`class`,`items_main`.`class_point`,`items_main`.`anti_class`,`items_main`.`anti_class_point`,`items_main`.`max_text`,`items_main`.`useInBattle`,`items_main`.`lbtl`,`items_main`.`lvl_itm`,`items_main`.`lvl_exp`,`items_main`.`lvl_aexp`, count(`items_users`.`id`) as inGroupCount +FROM `items_users` LEFT JOIN `items_main` ON (`items_main`.`id` = `items_users`.`item_id`) +WHERE (( `items_users`.time_create + `items_main`.srok) > unix_timestamp() OR `items_main`.srok = "0") AND `items_users`.`delete`="0" AND `items_users`.`inOdet`="0" AND `items_users`.`inShop`="30" and `items_main`.`type` = "' . mysql_real_escape_string( + $typeOtdel + ) . '" and `items_users`.`item_id` = "' . (int)$_GET['itemid'] . '" GROUP BY `items_users`.`uid`, `items_users`.`1price` HAVING `items_users`.inGroup = 0 +ORDER BY `1price`ASC , inGroupCount DESC' + ); + } else { + $cl = mysql_query( + 'SELECT `items_users`.`id`,`items_users`.`item_id`,`items_users`.`1price`,`items_users`.`2price`,`items_users`.`uid`,`items_users`.`use_text`,`items_users`.`data`,`items_users`.`inOdet`,`items_users`.`inShop`,`items_users`.`delete`,`items_users`.`iznosNOW`,`items_users`.`iznosMAX`,`items_users`.`gift`,`items_users`.`gtxt1`,`items_users`.`gtxt2`,`items_users`.`kolvo`,`items_users`.`geniration`,`items_users`.`magic_inc`,`items_users`.`maidin`,`items_users`.`lastUPD`,`items_users`.`timeOver`,`items_users`.`overType`,`items_users`.`secret_id`,`items_users`.`time_create`,`items_users`.`inGroup`,`items_users`.`dn_delete`,`items_users`.`inTransfer`,`items_users`.`post_delivery`,`items_users`.`lbtl_`,`items_users`.`bexp`,`items_users`.`so`,`items_users`.`blvl`,`items_main`.`id`,`items_main`.`name`,`items_main`.`img`,`items_main`.`type`,`items_main`.`inslot`,`items_main`.`2h`,`items_main`.`2too`,`items_main`.`iznosMAXi`,`items_main`.`inRazdel`,`items_main`.`price1`,`items_main`.`price2`,`items_main`.`magic_chance`,`items_main`.`info`,`items_main`.`massa`,`items_main`.`level`,`items_main`.`magic_inci`,`items_main`.`overTypei`,`items_main`.`group`,`items_main`.`group_max`,`items_main`.`geni`,`items_main`.`ts`,`items_main`.`srok`,`items_main`.`class`,`items_main`.`class_point`,`items_main`.`anti_class`,`items_main`.`anti_class_point`,`items_main`.`max_text`,`items_main`.`useInBattle`,`items_main`.`lbtl`,`items_main`.`lvl_itm`,`items_main`.`lvl_exp`,`items_main`.`lvl_aexp` FROM `items_users` LEFT JOIN `items_main` ON (`items_main`.`id` = `items_users`.`item_id`) WHERE (( `items_users`.time_create + `items_main`.srok) > unix_timestamp() OR `items_main`.srok = "0") AND `items_users`.`delete`="0" AND `items_users`.`inOdet`="0" AND `items_users`.`inShop`="30" and `items_main`.`type` = "' . mysql_real_escape_string( + $typeOtdel + ) . '" GROUP BY `items_users`.`item_id` ORDER BY `items_main`.`id` DESC' + ); + } + } else { + if ($preview == "full") { + $cl = mysql_query( + 'SELECT +`items_users`.`id` as id, `items_users`.`id` AS `idu`,`items_users`.`item_id` as item_id,`items_users`.`1price`,`items_users`.`2price`,`items_users`.`uid`,`items_users`.`use_text`, +`items_users`.`data`,`items_users`.`inOdet`,`items_users`.`inShop`,`items_users`.`delete`,`items_users`.`iznosNOW`,`items_users`.`iznosMAX`, +`items_users`.`gift`,`items_users`.`gtxt1`,`items_users`.`gtxt2`,`items_users`.`kolvo`,`items_users`.`geniration`,`items_users`.`magic_inc`,`items_users`.`maidin`, +`items_users`.`lastUPD`,`items_users`.`timeOver`,`items_users`.`overType`,`items_users`.`secret_id`,`items_users`.`time_create`,`items_users`.`inGroup`,`items_users`.`dn_delete`, +`items_users`.`inTransfer`,`items_users`.`post_delivery`,`items_users`.`lbtl_`,`items_users`.`bexp`,`items_users`.`so`,`items_users`.`blvl`,`items_main`.`id` as item_id,`items_main`.`name`, +`items_main`.`img`,`items_main`.`type`,`items_main`.`inslot`,`items_main`.`2h`,`items_main`.`2too`,`items_main`.`iznosMAXi`,`items_main`.`inRazdel`,`items_main`.`price1`, +`items_main`.`price2`,`items_main`.`magic_chance`,`items_main`.`info`,`items_main`.`massa`,`items_main`.`level`,`items_main`.`magic_inci`,`items_main`.`overTypei`, +`items_main`.`group`,`items_main`.`group_max`,`items_main`.`geni`,`items_main`.`ts`,`items_main`.`srok`,`items_main`.`class`,`items_main`.`class_point`,`items_main`.`anti_class`, +`items_main`.`anti_class_point`,`items_main`.`max_text`,`items_main`.`useInBattle`,`items_main`.`lbtl`,`items_main`.`lvl_itm`,`items_main`.`lvl_exp`, +`items_main`.`lvl_aexp` , count(`items_users`.`id`) as inGroupCount +FROM `items_users` LEFT JOIN `items_main` ON (`items_main`.`id` = `items_users`.`item_id`) +WHERE (( `items_users`.time_create + `items_main`.srok) > unix_timestamp() OR `items_main`.srok = "0") AND `items_users`.`delete`="0" AND `items_users`.`item_id` = "' . (int)$_GET['itemid'] . '" +AND `items_users`.`inOdet`="0" AND `items_users`.`inShop`="30" and `items_main`.`type` != "18" AND `items_main`.`type` != "19" AND `items_main`.`type` != "20" AND `items_main`.`type` != "21" AND `items_main`.`type` != "22" AND `items_main`.`type` != "15" AND `items_main`.`type` != "12" AND `items_main`.`type` != "4" AND `items_main`.`type` != "5" AND `items_main`.`type` != "6" AND `items_main`.`type` != "1" AND `items_main`.`type` != "3" AND `items_main`.`type` != "8" AND `items_main`.`type` != "14" AND `items_main`.`type` != "13" AND `items_main`.`type` != "9" AND `items_main`.`type` != "10" AND `items_main`.`type` != "11" AND `items_main`.`type` != "29" AND `items_main`.`type` != "30" +GROUP BY `items_users`.`inGroup`, `items_users`.`uid`,`items_users`.`1price` HAVING `items_users`.inGroup > 0 +UNION ALL +SELECT `items_users`.`id` as id, `items_users`.`id` AS `idu`,`items_users`.`item_id` as item_id,`items_users`.`1price`,`items_users`.`2price`,`items_users`.`uid`,`items_users`.`use_text`, +`items_users`.`data`,`items_users`.`inOdet`,`items_users`.`inShop`,`items_users`.`delete`,`items_users`.`iznosNOW`,`items_users`.`iznosMAX`, +`items_users`.`gift`,`items_users`.`gtxt1`,`items_users`.`gtxt2`,`items_users`.`kolvo`,`items_users`.`geniration`,`items_users`.`magic_inc`,`items_users`.`maidin`, +`items_users`.`lastUPD`,`items_users`.`timeOver`,`items_users`.`overType`,`items_users`.`secret_id`,`items_users`.`time_create`,`items_users`.`inGroup`,`items_users`.`dn_delete`, +`items_users`.`inTransfer`,`items_users`.`post_delivery`,`items_users`.`lbtl_`,`items_users`.`bexp`,`items_users`.`so`,`items_users`.`blvl`,`items_main`.`id` as item_id,`items_main`.`name`, +`items_main`.`img`,`items_main`.`type`,`items_main`.`inslot`,`items_main`.`2h`,`items_main`.`2too`,`items_main`.`iznosMAXi`,`items_main`.`inRazdel`,`items_main`.`price1`, +`items_main`.`price2`,`items_main`.`magic_chance`,`items_main`.`info`,`items_main`.`massa`,`items_main`.`level`,`items_main`.`magic_inci`,`items_main`.`overTypei`, +`items_main`.`group`,`items_main`.`group_max`,`items_main`.`geni`,`items_main`.`ts`,`items_main`.`srok`,`items_main`.`class`,`items_main`.`class_point`,`items_main`.`anti_class`, +`items_main`.`anti_class_point`,`items_main`.`max_text`,`items_main`.`useInBattle`,`items_main`.`lbtl`,`items_main`.`lvl_itm`,`items_main`.`lvl_exp`, +`items_main`.`lvl_aexp`, count(`items_users`.`id`) as inGroupCount +FROM `items_users` LEFT JOIN `items_main` ON (`items_main`.`id` = `items_users`.`item_id`) +WHERE (( `items_users`.time_create + `items_main`.srok) > unix_timestamp() OR `items_main`.srok = "0") AND `items_users`.`delete`="0" AND `items_users`.`item_id` = "' . (int)$_GET['itemid'] . '" +AND `items_users`.`inOdet`="0" AND `items_users`.`inShop`="30" and `items_main`.`type` != "18" AND `items_main`.`type` != "19" AND `items_main`.`type` != "20" AND `items_main`.`type` != "21" AND `items_main`.`type` != "22" AND `items_main`.`type` != "15" AND `items_main`.`type` != "12" AND `items_main`.`type` != "4" AND `items_main`.`type` != "5" AND `items_main`.`type` != "6" AND `items_main`.`type` != "1" AND `items_main`.`type` != "3" AND `items_main`.`type` != "8" AND `items_main`.`type` != "14" AND `items_main`.`type` != "13" AND `items_main`.`type` != "9" AND `items_main`.`type` != "10" AND `items_main`.`type` != "11" AND `items_main`.`type` != "29" AND `items_main`.`type` != "30" +GROUP BY `items_users`.`uid`,`items_users`.`1price` HAVING `items_users`.inGroup = 0 +ORDER BY `1price`ASC , inGroupCount DESC' + ); + } else { + $cl = mysql_query( + 'SELECT `items_users`.`id`, `items_users`.`id` AS `idu`,`items_users`.`item_id`,`items_users`.`1price`,`items_users`.`2price`,`items_users`.`uid`,`items_users`.`use_text`,`items_users`.`data`,`items_users`.`inOdet`,`items_users`.`inShop`,`items_users`.`delete`,`items_users`.`iznosNOW`,`items_users`.`iznosMAX`,`items_users`.`gift`,`items_users`.`gtxt1`,`items_users`.`gtxt2`,`items_users`.`kolvo`,`items_users`.`geniration`,`items_users`.`magic_inc`,`items_users`.`maidin`,`items_users`.`lastUPD`,`items_users`.`timeOver`,`items_users`.`overType`,`items_users`.`secret_id`,`items_users`.`time_create`,`items_users`.`inGroup`,`items_users`.`dn_delete`,`items_users`.`inTransfer`,`items_users`.`post_delivery`,`items_users`.`lbtl_`,`items_users`.`bexp`,`items_users`.`so`,`items_users`.`blvl`,`items_main`.`id`,`items_main`.`name`,`items_main`.`img`,`items_main`.`type`,`items_main`.`inslot`,`items_main`.`2h`,`items_main`.`2too`,`items_main`.`iznosMAXi`,`items_main`.`inRazdel`,`items_main`.`price1`,`items_main`.`price2`,`items_main`.`magic_chance`,`items_main`.`info`,`items_main`.`massa`,`items_main`.`level`,`items_main`.`magic_inci`,`items_main`.`overTypei`,`items_main`.`group`,`items_main`.`group_max`,`items_main`.`geni`,`items_main`.`ts`,`items_main`.`srok`,`items_main`.`class`,`items_main`.`class_point`,`items_main`.`anti_class`,`items_main`.`anti_class_point`,`items_main`.`max_text`,`items_main`.`useInBattle`,`items_main`.`lbtl`,`items_main`.`lvl_itm`,`items_main`.`lvl_exp`,`items_main`.`lvl_aexp` FROM `items_users` LEFT JOIN `items_main` ON (`items_main`.`id` = `items_users`.`item_id`) WHERE (( `items_users`.time_create + `items_main`.srok) > unix_timestamp() OR `items_main`.srok = "0") AND `items_users`.`delete`="0" AND `items_users`.`inOdet`="0" AND `items_users`.`inShop`="30" and `items_main`.`type` != "18" AND `items_main`.`type` != "19" AND `items_main`.`type` != "20" AND `items_main`.`type` != "21" AND `items_main`.`type` != "22" AND `items_main`.`type` != "15" AND `items_main`.`type` != "12" AND `items_main`.`type` != "4" AND `items_main`.`type` != "5" AND `items_main`.`type` != "6" AND `items_main`.`type` != "1" AND `items_main`.`type` != "3" AND `items_main`.`type` != "8" AND `items_main`.`type` != "14" AND `items_main`.`type` != "13" AND `items_main`.`type` != "9" AND `items_main`.`type` != "10" AND `items_main`.`type` != "11" AND `items_main`.`type` != "29" AND `items_main`.`type` != "30" GROUP BY `items_users`.`item_id` ORDER BY `items_main`.`id` DESC' + ); + } + } + $cr = 'c8c8c8'; + $i = 0; + $steckCikl = 1; + while ($pl = mysql_fetch_array($cl)) { + // количетсво одинаковых предметов в комке + if ($preview == "preview") { + $steck = ['--', '--', '--', '--']; + } + if ($cr == 'd4d4d4') { + $cr = 'c8c8c8'; + } else { + $cr = 'd4d4d4'; + } + if ($preview == "preview" && ($steck[0] > 1 && $steck[0] > $steckCikl)) { + ++$steckCikl; + } else { + $steckCikl = 1; + $d = mysql_fetch_array( + mysql_query( + 'SELECT `id`,`items_id`,`data` FROM `items_main_data` WHERE `items_id` = "' . $pl['item_id'] . '" LIMIT 1' + ) + ); + if ($steck[0] > 1 && $preview == "preview") { + $po = $this->lookStats($d['data']); + } else { + $po = $this->lookStats($pl['data']); + } + if (($pl['type'] >= 18 && $pl['type'] <= 24) || $pl['type'] == 26 || $pl['type'] == 27) { + //Зоны блока + + if ($pl['inOdet'] != 14) { + $po['zonb']++; + } + } + $is2 = ''; + $is1 = '
'; + if ($preview == "full") { + $is1 .= 'купить '; + } elseif ($preview == "preview") { + $is1 .= 'Просмотреть '; + } + //название + + $col = $this->itemsX($pl[0]); + if ($col > 1 && $pl['inGroup'] != 0 && $pl['inGroupCount'] > 1) { + $pl['kolvo'] = $col; + $pl['name'] .= ' (x' . $col . ')'; + } + $is2 .= '' . $pl['name'] . '    '; + if ($pl['massa'] > 0 && $preview == "full") { + $is2 .= '(Масса: ' . round($pl['massa'], 2) . ')'; + if ($pl['gift'] != '') { + $ttl = ''; + if ($pl['gift'] == 1) { + $ttl = 'Вы не можете передать этот предмет кому-либо'; + } else { + $ttl = 'Этот предмет подарил ' . $pl['gift'] . '. Вы не сможете передать этот предмет кому-либо еще'; + } + $is2 .= ' '; + } + if (isset($po['art'])) { + $is2 .= ' '; + } + if (isset($po['sudba'])) { + if ($po['sudba'] == '0') { + $is2 .= ' '; + } elseif ($po['sudba'] == '1') { + $is2 .= ' '; + } else { + $is2 .= ' '; + } + } + } + //цена + $is2 .= '
Цена: '; + if ($steck[0] > 1 && $preview == "preview") { + $is2 .= $steck[3] . '-' . $steck[4] . ' кр. '; + } else { + $is2 .= $pl['1price'] . ' кр. '; + } + if ($pl['pricerep'] > 0) { + $is2 .= ' (' . round($pl['pricerep'], 2) . ' Воинственности)'; + } + + //долговечность + if ($pl['iznosMAX'] > 0) { + $izcol = ''; + if (floor($pl['iznosNOW']) >= (floor($pl['iznosMAX']) - ceil($pl['iznosMAX']) / 100 * 20)) { + $izcol = 'brown'; + } + } + if ($preview == "preview") { + $is2 .= '
Долговечность: ' . floor($steck[1]) . '/' . ceil( + $steck[2] + ) . ''; + } else { + if ($pl['iznosMAXi'] == 999999999) { + $is2 .= '
Долговечность: неразрушимо'; + } else { + $is2 .= '
Долговечность: ' . floor( + $pl['iznosNOW'] + ) . '/' . ceil($pl['iznosMAX']) . ''; + } + } + //Срок годности предмета + + if ($po['srok'] > 0) { + $pl['srok'] = $po['srok']; + } + if ($pl['srok'] > 0 and $preview != "preview") { + if ($pl['time_create'] + $pl['srok'] < time()) { + $is2 .= '
Срок годности: ' . $this->timeOut($pl['srok']) . ' (испорчен)'; + } else { + $is2 .= '
Срок годности: ' . $this->timeOut($pl['srok']) . ' (до ' . date( + 'd.m.Y H:i', $pl['time_create'] + $pl['srok'] + ) . ')'; + } + } elseif ($pl['srok'] > 0) { + $is2 .= '
Срок годности: ' . $this->timeOut($pl['srok']); + } + if ($pl['magic_chance'] > 0) { + $is2 .= '
Вероятность срабатывания: ' . min([$pl['magic_chance'], 100]) . '%'; + } + + //Продолжительность действия магии: + if ((int)$pl['magic_inci'] > 0) { + $efi = mysql_fetch_array( + mysql_query( + 'SELECT `id2`,`mname`,`type1`,`img`,`mdata`,`actionTime`,`type2`,`type3`,`onlyOne`,`oneType`,`noAce`,`see`,`info`,`overch`,`bp`,`noch` FROM `eff_main` WHERE `id2` = "' . ((int)$pl['magic_inci']) . '" LIMIT 1' + ) + ); + if (isset($efi['id2']) && $efi['actionTime'] > 0) { + $is2 .= '
Продолжительность действия: ' . $this->timeOut($efi['actionTime']); + } + } + if ($preview == "full" || $preview == "preview") { + //Требуется минимальное: + $tr = ''; + $t = $this->items['tr']; + $x = 0; + while ($x < count($t)) { + $n = $t[$x]; + if (isset($po['tr_' . $n]) && $po['tr_' . $n] != 0) { + if ($po['tr_' . $n] > $this->stats[$n]) { + if ($n == 'rep') { + $temp = explode('::', $po['tr_' . $n]); + if ($this->rep['rep' . $temp[1]] < $temp[0]) { + $tr .= ''; + $notr++; + } + unset($temp); + } elseif ($n != 'align' || floor($this->info['align']) != $po['tr_' . $n]) { + $tr .= ''; + $notr++; + } + } + $tr .= '
• '; + if ($n == 'rep') { + $temp = explode('::', $po['tr_' . $n]); + $tr .= $this->is[$n] . ' ' . ucfirst( + str_replace('city', ' city', $temp[1]) + ) . ': ' . $temp[0]; + unset($temp); + } elseif ($n != 'align') { + if ($n == 'sex') { + if ($po['tr_' . $n] == 1) { + $tr .= $this->is[$n] . ': Женский'; + } else { + $tr .= $this->is[$n] . ': Мужской'; + } + } else { + $tr .= $this->is[$n] . ': ' . $po['tr_' . $n]; + } + } else { + $tr .= $this->is[$n] . ': ' . $this->align_nm[$po['tr_' . $n]]; + } + if ($po['tr_' . $n] > $this->stats[$n]) { + if ($n != 'align' || floor($this->info['align']) != $po['tr_' . $n]) { + $tr .= '
'; + } + } + } + $x++; + } + + if ($tr != '') { + $is2 .= '
Требуется минимальное:' . $tr; + } + //Действует на: + $tr = ''; + $t = $this->items['add']; + $x = 0; + while ($x < count($t)) { + $n = $t[$x]; + if (isset($po['add_' . $n], $this->is[$n])) { + $z = '+'; + if ($po['add_' . $n] < 0) { + $z = ''; + } + $tr .= '
• ' . $this->is[$n] . ': ' . $z . '' . $po['add_' . $n]; + } + $x++; + } + //действует на (броня) + $i = 1; + $bn = [1 => 'головы', 2 => 'корпуса', 3 => 'пояса', 4 => 'ног']; + while ($i <= 4) { + if (isset($po['add_mab' . $i])) { + if ($po['add_mab' . $i] == $po['add_mib' . $i] && $pl['geniration'] == 1) { + $z = '+'; + if ($po['add_mab' . $i] < 0) { + $z = ''; + } + $tr .= '
• Броня ' . $bn[$i] . ': ' . $z . '' . $po['add_mab' . $i]; + } else { + $tr .= '
• Броня ' . $bn[$i] . ': ' . $po['add_mib' . $i] . '-' . $po['add_mab' . $i] . ' (' . $this->bronFx( + [$po['add_mib' . $i], $po['add_mab' . $i]] + ) . ')'; + } + } + $i++; + } + if ($tr != '') { + $is2 .= '
Действует на:' . $tr; + } + //Свойства предмета: + $tr = ''; + $t = $this->items['sv']; + if (isset($po['sv_yron_min'], $po['sv_yron_max'])) { + $tr .= '
• Урон: ' . $po['sv_yron_min'] . ' - ' . $po['sv_yron_max']; + } + $x = 0; + while ($x < count($t)) { + $n = $t[$x]; + if (isset($po['sv_' . $n])) { + $z = '+'; + if ($po['sv_' . $n] < 0) { + $z = ''; + } + $tr .= '
• ' . $this->is[$n] . ': ' . $z . '' . $po['sv_' . $n]; + } + $x++; + } + if ($pl['2too'] == 1) { + $tr .= '
• Второе оружие'; + } + if ($pl['2h'] == 1) { + $tr .= '
• Двуручное оружие'; + } + if (isset($po['zonb'])) { + $tr .= '
• Зоны блокирования: '; + if ($po['zonb'] > 0) { + $x = 1; + while ($x <= $po['zonb']) { + $tr .= '+'; + $x++; + } + } else { + $tr .= '—'; + } + } + + if ($tr != '') { + $is2 .= '
Свойства предмета:' . $tr; + } + + $tr = ''; + + if (isset($po['imposed']) && $po['imposed'] > 0) { + if ($po['imposed_lvl'] == 0) { + $rnc = 'maroon'; + } elseif ($po['imposed_lvl'] == 1) { + $rnc = '#624542'; + } elseif ($po['imposed_lvl'] == 2) { + $rnc = '#77090b'; + } elseif ($po['imposed_lvl'] == 3) { + $rnc = '#d99800'; + } else { + $rnc = '#282828'; + } + $po['imposed_name'] = str_replace('Чары ', '', $po['imposed_name']); + $tr .= '
Наложены заклятия: ' . $po['imposed_name'] . ' '; + unset($rnc); + } + if ($tr != '') { + $is2 .= '
Улучшения предмета:'; + $is2 .= $tr; + } + + if ($notr == 0) { + $d[0] = 1; + if ($pl['magic_inc'] != '') { + $d[2] = 1; + } + } + if (isset($po['free_stats']) && $po['free_stats'] > 0) { + $is2 .= '
Распределение статов:'; + $is2 .= '• Возможных распределений: ' . $po['free_stats'] . ''; + } + if (floor($pl['iznosNOW']) >= ceil($pl['iznosMAX'])) { + $d[0] = 0; + $d[2] = 0; + } + if (isset($po['complect']) || isset($po['complect2'])) { + $is2 .= '
Дополнительная информация:'; + } + if (isset($po['complect'])) { + //не отображается + $com1 = ['name' => 'Неизвестный Комплект', 'x' => 0, 'text' => '']; + $spc = mysql_query( + 'SELECT `id`,`com`,`name`,`x`,`data` FROM `complects` WHERE `com` = "' . $po['complect'] . '" ORDER BY `x` ASC LIMIT 20' + ); + while ($plc = mysql_fetch_array($spc)) { + $com1['name'] = $plc['name']; + $com1['text'] .= '    • ' . $plc['x'] . ': '; + //действие комплекта + $i1c = 0; + $i2c = 0; + $i1e = $this->lookStats($plc['data']); + while ($i1c < count($this->items['add'])) { + if (isset($i1e[$this->items['add'][$i1c]])) { + $i3c = $i1e[$this->items['add'][$i1c]]; + if ($i3c > 0) { + $i3c = '+' . $i3c; + } + if ($i2c > 0) { + $com1['text'] .= '    ' . $this->is[$this->items['add'][$i1c]] . ': ' . $i3c; + } else { + $com1['text'] .= $this->is[$this->items['add'][$i1c]] . ': ' . $i3c; + } + $com1['text'] .= '
'; + $i2c++; + } + $i1c++; + } + unset($i1c, $i2c, $i3c); + $com1['x']++; + } + $is2 .= '
• Часть комплекта: ' . $com1['name'] . '
'; + $is2 .= $com1['text']; + $is2 .= ''; + } + if (isset($po['complect2'])) { + //не отображается + $com1 = ['name' => 'Неизвестный Комплект', 'x' => 0, 'text' => '']; + $spc = mysql_query( + 'SELECT `id`,`com`,`name`,`x`,`data` FROM `complects` WHERE `com` = "' . $po['complect2'] . '" ORDER BY `x` ASC LIMIT 20' + ); + while ($plc = mysql_fetch_array($spc)) { + $com1['name'] = $plc['name']; + $com1['text'] .= '    • ' . $plc['x'] . ': '; + //действие комплекта + $i1c = 0; + $i2c = 0; + $i1e = $this->lookStats($plc['data']); + while ($i1c < count($this->items['add'])) { + if (isset($i1e[$this->items['add'][$i1c]])) { + $i3c = $i1e[$this->items['add'][$i1c]]; + if ($i3c > 0) { + $i3c = '+' . $i3c; + } + if ($i2c > 0) { + $com1['text'] .= '    ' . $this->is[$this->items['add'][$i1c]] . ': ' . $i3c; + } else { + $com1['text'] .= $this->is[$this->items['add'][$i1c]] . ': ' . $i3c; + } + $com1['text'] .= '
'; + $i2c++; + } + $i1c++; + } + unset($i1c, $i2c, $i3c); + $com1['x']++; + } + $is2 .= '
• Часть комплекта (подгонка): ' . $com1['name'] . '
'; + $is2 .= $com1['text']; + $is2 .= ''; + } + + $is2 .= ''; + if (isset($po['gravi'])) { + $is2 .= '
На поверхности выгравирована надпись: ' . $po['gravi'] . ''; + } + if ($pl['info'] != '') { + $is2 .= '
Рекомендации:
' . $pl['info'] . '
'; + } + if ($po['info'] != '') { + $is2 .= '
' . $po['info'] . '
'; + } + if ($pl['max_text'] - $pl['use_text'] > 0) { + $is2 .= '
Количество символов: ' . ($pl['max_text'] - $pl['use_text']) . '
'; + } + if (isset($po['noremont'])) { + $is2 .= '
Предмет не подлежит ремонту
'; + } + if (isset($po['nosale'])) { + $is2 .= '
Предмет нельзя продать
'; + } + if (isset($po['nomodif'])) { + $is2 .= '
Предмет нельзя улучшать
'; + } + if (isset($po['nodelete'])) { + $is2 .= '
Предмет нельзя выбросить
'; + } + if (isset($po['frompisher']) && $po['frompisher'] > 0) { + $is2 .= '
Предмет из подземелья
'; + } + if (isset($po['sleep_moroz']) && $po['sleep_moroz'] > 0) { + $is2 .= '
Предмет не портится во время сна
'; + } + if (isset($po['fromlaba']) && $po['fromlaba'] > 0) { + $is2 .= '
Предмет из лабиринта
'; + } + if (isset($po['vip_sale']) && $po['vip_sale'] > 0) { + $is2 .= '
Предмет куплен за 10% от стоимости
'; + } + if ($pl['dn_delete'] > 0) { + $is2 .= '
Предмет будет удален при выходе из подземелья
'; + } + if ($this->pokol > $pl['geni']) { + $is2 .= '
Предмет устарел
'; + } + if (isset($po['zazuby']) && $po['zazuby'] > 0) { + $is2 .= '
Предмет куплен за зубы
'; + } + $is2 .= '
'; + } + if ($preview == "preview") { + $kolvoprint = "Количество: $steck[0] шт."; + } + echo '' . $is1 . '' . $kolvoprint . $is2 . ''; + $i++; + } + } + if ($i == 0) { + echo 'Прилавок магазина пуст'; + } + } +} \ No newline at end of file diff --git a/_incl_data/class/Core/Config.php b/_incl_data/class/Core/Config.php index d1043115..513655bb 100644 --- a/_incl_data/class/Core/Config.php +++ b/_incl_data/class/Core/Config.php @@ -8,7 +8,6 @@ class Config private function __construct() { error_reporting(E_ALL ^ E_NOTICE); - setlocale(LC_CTYPE, "ru_RU.CP1251"); ini_set('display_errors', 'Off'); ini_set('date.timezone', 'Europe/Moscow'); diff --git a/_incl_data/class/Core/Database.php b/_incl_data/class/Core/Database.php index 83336163..b40f228d 100644 --- a/_incl_data/class/Core/Database.php +++ b/_incl_data/class/Core/Database.php @@ -14,7 +14,7 @@ class Database */ private function __construct() { mysql_select_db(Config::get('db_name'), mysql_connect('localhost', Config::get('db_user'), Config::get('db_password'))); - mysql_query('SET NAMES cp1251'); + mysql_query('SET NAMES utf8mb4'); } /** @@ -42,7 +42,7 @@ class Database [ PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, - PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES cp1251", + PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8mb4", PDO::ATTR_STRINGIFY_FETCHES => false, PDO::ATTR_EMULATE_PREPARES => false, ] diff --git a/_incl_data/class/Core/Mail.php b/_incl_data/class/Core/Mail.php index 71c19e74..8688382d 100644 --- a/_incl_data/class/Core/Mail.php +++ b/_incl_data/class/Core/Mail.php @@ -9,8 +9,6 @@ class Mail public static function send($to, $message, $subject = 'Бойцовский клуб') { require dirname(__DIR__) . '/mail/class.phpmailer.php'; - $message = mb_convert_encoding($message, 'UTF-8', 'CP1251'); - $subject = mb_convert_encoding($subject, 'UTF-8', 'CP1251'); $mail = new PHPMailer; $mail->IsSMTP(); // Set mailer to use SMTP @@ -23,7 +21,7 @@ class Mail $mail->CharSet = 'UTF-8'; $mail->From = 'newcombats@yahoo.com'; - $mail->FromName = mb_convert_encoding('Бойцовский Клуб', 'UTF-8', 'CP1251'); + $mail->FromName = 'Бойцовский Клуб'; $mail->AddAddress($to); // Add a recipient $mail->IsHTML(true); // Set email format to HTML diff --git a/_incl_data/class/FightRequest.php b/_incl_data/class/FightRequest.php index 7b388af8..6e103bec 100644 --- a/_incl_data/class/FightRequest.php +++ b/_incl_data/class/FightRequest.php @@ -603,7 +603,7 @@ class FightRequest $nz['time_start'] = (int)$_POST['startime2']; $nz['comment'] = substr($_POST['cmt'], 0, 40); $nz['comment'] = str_replace('"', '"', $nz['comment']); - $nz['comment'] = htmlspecialchars($nz['comment'], null, 'cp1251'); + $nz['comment'] = htmlspecialchars($nz['comment'], null); if (!in_array($nz['time_start'], [60, 180, 300])) { $nz['time_start'] = 600; } @@ -871,7 +871,7 @@ class FightRequest } // if ($nz['razdel'] == 2 && isset($_POST['commentfiz'])) { - $nz['comment'] = htmlspecialchars($_POST['commentfiz'], null, 'cp1251'); + $nz['comment'] = htmlspecialchars($_POST['commentfiz'], null); } // if ($nz['razdel'] == 5) { diff --git a/_incl_data/class/GameDealer.php b/_incl_data/class/GameDealer.php index 5c8014eb..175284e6 100644 --- a/_incl_data/class/GameDealer.php +++ b/_incl_data/class/GameDealer.php @@ -16,15 +16,26 @@ class GameDealer ], $BACK = []; //Результат который возвращаем в конце //Кодируем из ЮТФ-8 в Кирилицу + /** + * @param $text + * @return mixed + * @deprecated + */ public function in($text) { - return iconv("UTF-8", "cp1251", $text); + return $text; } //Кодируем из Кирилицу в ЮТФ-8 + + /** + * @param $text + * @return mixed + * @deprecated + */ public function out($text) { - return iconv("cp1251", "UTF-8", $text); + return $text; } //Добавляем данные в базу данных @@ -38,7 +49,7 @@ class GameDealer { $db = mysql_connect($this->c['db_host'], $this->c['db_user'], $this->c['db_pass']) or die('Ошибка подключения к MySQL серверу!'); mysql_select_db($this->c['db_base'], $db) or die('Ошибка подключения к базе данных!'); - mysql_query('SET NAMES cp1251'); + mysql_query('SET NAMES utf8mb4'); } public function output($a, $v = null) diff --git a/_incl_data/class/Insallah/Core/Dbold.php b/_incl_data/class/Insallah/Core/Dbold.php index d127a02e..f4219d41 100644 --- a/_incl_data/class/Insallah/Core/Dbold.php +++ b/_incl_data/class/Insallah/Core/Dbold.php @@ -20,7 +20,7 @@ class DbOld const DB_USER = 'newcom1_abk'; const DB_PASSWORD = '4nWYsIM[c?}P'; const DB_NAME = 'newcom1_abk'; - const CHARSET = 'cp1251'; + const CHARSET = 'utf8mb4'; const DB_PREFIX = ''; /** diff --git a/_incl_data/class/Priems.php b/_incl_data/class/Priems.php index a30578cc..7af8851b 100644 --- a/_incl_data/class/Priems.php +++ b/_incl_data/class/Priems.php @@ -1418,7 +1418,6 @@ class Priems $notr = 0; $pl['useon_user'] = $this->u->info['enemy']; if (isset($_POST['useon']) && $_POST['useon'] != '' && $_POST['useon'] != 'none') { - $_POST['useon'] = iconv('UTF-8', 'windows-1251', $_POST['useon']); $this->ue = mysql_fetch_assoc( mysql_query( 'SELECT diff --git a/_incl_data/class/Telegram.php b/_incl_data/class/Telegram.php index d4c3bfa7..0b7d0acd 100644 --- a/_incl_data/class/Telegram.php +++ b/_incl_data/class/Telegram.php @@ -16,7 +16,7 @@ class Telegram private function send($to, $from, $text, $fromType) { mysql_query('START TRANSACTION'); - $ins = mysql_query("INSERT INTO `telegram` (`uid`,`from`,`fromType`,`text`,`time`) VALUES ('" . $to . "','" . $from . "','" . $fromType . "','" . mysql_real_escape_string(AddSlashes(HtmlSpecialChars($text, null, 'cp1251'))) . "','" . time() . "')"); + $ins = mysql_query("INSERT INTO `telegram` (`uid`,`from`,`fromType`,`text`,`time`) VALUES ('" . $to . "','" . $from . "','" . $fromType . "','" . mysql_real_escape_string(AddSlashes(HtmlSpecialChars($text, null))) . "','" . time() . "')"); mysql_query('COMMIT'); if ($ins) { return mysql_insert_id(); diff --git a/_incl_data/class/User.php b/_incl_data/class/User.php index a9ea43bd..9d796731 100644 --- a/_incl_data/class/User.php +++ b/_incl_data/class/User.php @@ -1,13 +1,14 @@ true, //Снадобье Забытых Мастеров 33 => true, //Звездная Энергия 34 => true, //Звездная Тяжесть @@ -16,16 +17,16 @@ class User 43 => true, //Неуязвимость Стихиям 296 => true, ]; - public $aves = ['now' => 0, 'max' => 0]; - public $room = []; - public $bank = []; - public $align_nm = [ + public array $aves = ['now' => 0, 'max' => 0]; + public array $room = []; + public array $bank = []; + public array $align_nm = [ 1 => 'Свет', 2 => 'Хаос', 3 => 'Тьма', 7 => 'Нейтралитет', ]; - public $mod_nm = [ + public array $mod_nm = [ 0 => [0 => ''], 1 => [ '1' => 'Свет', @@ -53,10 +54,21 @@ class User '3.99' => 'Тарман Патриарх', ], ]; - public $rgd = [0 => 0, 1 => 0]; - public $city_unid = [0, 'capitalcity', 'angelscity', 'abandonedplain', 'newcapitalcity', 'demonscity', 'fallenearth', 'emeraldscity', 'dreamscity', 'suncity', 'devilscity']; - public $city_id = ['capitalcity' => 1, 'angelscity' => 2, 'abandonedplain' => 3, 'newcapitalcity' => 4, 'demonscity' => 5, 'fallenearth' => 6, 'emeraldscity' => 6, 'suncity' => 7, 'dreamscity' => 8, 'devilscity' => 10]; - public $city_name = [ + public array $rgd = [0 => 0, 1 => 0]; + public array $city_unid = [0, 'capitalcity', 'angelscity', 'abandonedplain', 'newcapitalcity', 'demonscity', 'fallenearth', 'emeraldscity', 'dreamscity', 'suncity', 'devilscity']; + public array $city_id = [ + 'capitalcity' => 1, + 'angelscity' => 2, + 'abandonedplain' => 3, + 'newcapitalcity' => 4, + 'demonscity' => 5, + 'fallenearth' => 6, + 'emeraldscity' => 6, + 'suncity' => 7, + 'dreamscity' => 8, + 'devilscity' => 10 + ]; + public array $city_name = [ 'emeraldscity' => 'Emeralds city', 'abandonedplain' => 'Abandoned Plain', 'capitalcity' => 'Capital city', @@ -68,7 +80,7 @@ class User 'suncity' => 'Sun City', 'devilscity' => 'Devils City', ]; - public $city_name2 = [ + public array $city_name2 = [ 'emeraldscity' => 'Emeraldscity', 'abandonedplain' => 'Abandonedplain', 'capitalcity' => 'Capitalcity', @@ -80,7 +92,7 @@ class User 'suncity' => 'Sun City', 'devilscity' => 'Devils City', ]; - public $is = [ + public array $is = [ 'acestar' => 'Следующий каст будет критическим', 'spasenie' => 'Спасение после смерти', 'more_awards' => 'Повышеная награда %', @@ -89,8 +101,8 @@ class User 'nopryh' => 'Прямое поподание', 'puti' => 'Запрет перемещения', 'align' => 'Склонность', - 'hpAll' => 'Уровень жизни (HP)', - 'mpAll' => 'Уровень маны (МP)', + 'hpAll' => 'Уровень жизни (HP)', + 'mpAll' => 'Уровень маны (МP)', 'enAll' => 'Уровень энергии', 'sex' => 'Пол', 'lvl' => 'Уровень', @@ -221,13 +233,11 @@ class User 'repair_r' => 'Бесплатное извлечение рун', 'yza' => 'Уязвимость физическому урона (%)', 'yzm' => 'Уязвимость магии стихий (%)', - 'yzma' => 'Уязвимость магии (%)' - , + 'yzma' => 'Уязвимость магии (%)', 'yza1' => 'Уязвимость колющему урона (%)', 'yza2' => 'Уязвимость рубящему урона (%)', 'yza3' => 'Уязвимость дробящему урона (%)', - 'yza4' => 'Уязвимость режущему урона (%)' - , + 'yza4' => 'Уязвимость режущему урона (%)', 'yzm1' => 'Уязвимость магии огня (%)', 'yzm2' => 'Уязвимость магии воздуха (%)', 'yzm3' => 'Уязвимость магии воды (%)', @@ -235,8 +245,7 @@ class User 'yzm5' => 'Уязвимость магии (%)', 'yzm6' => 'Уязвимость магии (%)', 'yzm7' => 'Уязвимость магии (%)', - 'rep' => 'Репутация Рыцаря' - , + 'rep' => 'Репутация Рыцаря', 'repair_discount' => 'Скидка на ремонт вещей', 'hpVinos' => 'Бонус жизни', 'bronze' => 'Bronze Premium Account', @@ -245,7 +254,7 @@ class User 'speed_dungeon' => 'Скорость передвижения по подземельям', 'zona' => 'Дополнительная зона атаки', ]; - public $items = [ + public array $items = [ 'tr' => ['sex', 'align', 'lvl', 's1', 's2', 's3', 's4', 's5', 's6', 's7', 's8', 's9', 's10', 's11', 'a1', 'a2', 'a3', 'a4', 'a5', 'a6', 'a7', 'mg1', 'mg2', 'mg3', 'mg4', 'mg5', 'mg6', 'mg7', 'mall', 'm2all', 'aall', 'rep', 'align_bs'], 'add' => [ 'no_vor', @@ -561,10 +570,10 @@ class User 'speeden', ], ]; - public $error2 = ''; - public $btl_txt = ''; - public $error = ''; - public $info = []; + public string $error2 = ''; + public string $btl_txt = ''; + public string $error = ''; + public array $info = []; public $rep, $tfer, $stats, $map, $mapUsers; public function repexp_add(int $id, int $val) @@ -599,17 +608,13 @@ class User if (!$type) { if (($this->info['align'] > 0 || $this->info['clan'] > 0 || $this->info['level'] > 12) && $this->info['align'] != 2) { $r = ($this->info['level'] - 6) * 0.04; - if (date('m') >= 6 || date('m') <= 8) { - $r = round($r * 2, 2); - } elseif (date('w') == 0 || date('w') == 6) { + if (date('m') >= 6 || date('m') <= 8 || date('w') == 0 || date('w') == 6) { $r = round($r * 2, 2); } $r = $r . ' ЕКР.'; } else { $r = $this->info['level']; - if (date('m') >= 6 || date('m') <= 8) { - $r = round($r * 2, 2); - } elseif (date('w') == 0 || date('w') == 6) { + if (date('m') >= 6 || date('m') <= 8 || date('w') == 0 || date('w') == 6) { $r = round($r * 2, 2); } $r = $r . ' КР.'; @@ -617,17 +622,13 @@ class User } else { if (($this->info['align'] > 0 || $this->info['clan'] > 0 || $this->info['level'] > 12) && $this->info['align'] != 2) { $r = ($this->info['level'] - 6) * 0.04; - if (date('m') >= 6 || date('m') <= 8) { - $r = round($r * 2, 2); - } elseif (date('w') == 0 || date('w') == 6) { + if (date('m') >= 6 || date('m') <= 8 || date('w') == 0 || date('w') == 6) { $r = round($r * 2, 2); } $r = [2, $r]; } else { $r = $this->info['level']; - if (date('m') >= 6 || date('m') <= 8) { - $r = round($r * 2, 2); - } elseif (date('w') == 0 || date('w') == 6) { + if (date('m') >= 6 || date('m') <= 8 || date('w') == 0 || date('w') == 6) { $r = round($r * 2, 2); } $r = [1, $r]; @@ -785,7 +786,8 @@ class User { if ($an > 0) { mysql_query( - 'UPDATE `users_align` SET `delete` = "' . (time() + 86400 * 60) . '" WHERE `uid` = "' . mysql_real_escape_string( + 'UPDATE `users_align` SET `delete` = "' . (time( + ) + 86400 * 60) . '" WHERE `uid` = "' . mysql_real_escape_string( $uid ) . '" AND `align` = "' . mysql_real_escape_string(floor($an)) . '"' ); @@ -894,12 +896,6 @@ class User return $e; } - /**@deprecated do nothing */ - public function sys_see($type): string - { - return ''; - } - public static function start(): User { if (!isset(self::$flag_one)) { @@ -950,7 +946,8 @@ class User ); $ins = ''; while ($pli = mysql_fetch_array($spi)) { - $ins .= '("' . $di['dn_id'] . '","' . $pli['item_id'] . '","' . time() . '","' . $di['x'] . '","' . $di['y'] . '"),'; + $ins .= '("' . $di['dn_id'] . '","' . $pli['item_id'] . '","' . time( + ) . '","' . $di['x'] . '","' . $di['y'] . '"),'; } $ins = rtrim($ins, ','); @@ -960,7 +957,8 @@ class User mysql_query('DELETE FROM `items_users` WHERE `uid` = "' . $pls1['inBot'] . '" LIMIT 1'); mysql_query('DELETE FROM `eff_users` WHERE `uid` = "' . $pls1['inBot'] . '" LIMIT 1'); mysql_query( - 'UPDATE `bs_zv` SET `finish` = "' . time() . '" WHERE `id` = "' . $pls1['id'] . '" LIMIT 1' + 'UPDATE `bs_zv` SET `finish` = "' . time( + ) . '" WHERE `id` = "' . $pls1['id'] . '" LIMIT 1' ); mysql_query('UPDATE `users` SET `inUser` = 0 WHERE `id` = "' . $pls1['uid'] . '" LIMIT 1'); } @@ -1150,7 +1148,8 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.` public function info_remont(): string { $r = ''; - $sp = mysql_query('SELECT `im`.`name`,`iu`.`iznosNOW`,`iu`.`iznosMAX` + $sp = mysql_query( + 'SELECT `im`.`name`,`iu`.`iznosNOW`,`iu`.`iznosMAX` FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`item_id`) WHERE @@ -1761,7 +1760,11 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.` if ($inf['cityreg'] == '') { $inf['cityreg'] = 'capitalcity'; } - $r .= '' . $inf['login'] . ' [' . $inf['level'] . ']'; + $r .= '' . $inf['login'] . ' [' . $inf['level'] . ']'; } else { $r = 'Невидимка [??]'; } @@ -1777,7 +1780,8 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.` } /*----Быстрый(Особенность)----*/ $hgo = $this->testAction( - '`uid` = "' . $this->info['id'] . '" AND `time` >= ' . (time() - $timeforwait) . ' AND `vars` = "go_homeworld" LIMIT 1', + '`uid` = "' . $this->info['id'] . '" AND `time` >= ' . (time( + ) - $timeforwait) . ' AND `vars` = "go_homeworld" LIMIT 1', 1 ); if ($this->info['level'] == 0 || $this->info['active'] != '' || $this->info['inTurnir'] > 0 || $this->info['inTurnirnew'] > 0 || $this->info['zv'] > 0 || $this->info['dnow'] > 0) { @@ -1810,7 +1814,7 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.` private function infoTasks() { if (empty($this->info)) { - trigger_error('user->info is empty in constructor', E_USER_WARNING); + //trigger_error('user->info is empty in constructor', E_USER_WARNING); return; } @@ -1893,7 +1897,7 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.` [$_COOKIE['login']] ); - \Core\Database::init(); + Database::init(); // для всяких mysql_* $this->infoTasks(); @@ -1949,11 +1953,12 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.` mysql_query( 'UPDATE `users` SET `catch` = "' . round( $sb - ) . '",`frg` = 0 WHERE `id` = ' . $this->info['id']); + ) . '",`frg` = 0 WHERE `id` = ' . $this->info['id'] + ); $this->addAction( time(), 'frg', '[ ' . $this->info['login'] . ' ] ' . date( - 'd.m.Y H:i:s' - ) . ' [true] , balance: ' . $sb . ' / ' . $this->info['catch'] . ' / ' . $this->info['frg'] . ' ' + 'd.m.Y H:i:s' + ) . ' [true] , balance: ' . $sb . ' / ' . $this->info['catch'] . ' / ' . $this->info['frg'] . ' ' ); } else { mysql_query( @@ -1964,8 +1969,8 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.` if ($sb - 10 > $this->info['catch'] - $this->info['frg']) { $this->addAction( time(), 'frgfalse', '[ ' . $this->info['login'] . ' ] ' . date( - 'd.m.Y H:i:s' - ) . ' [false] , [' . ($sb - ($this->info['catch'] - $this->info['frg'])) . '] , balance: ' . $sb . ' | ' . $this->info['catch'] . ' | ' . $this->info['frg'] . ' ' + 'd.m.Y H:i:s' + ) . ' [false] , [' . ($sb - ($this->info['catch'] - $this->info['frg'])) . '] , balance: ' . $sb . ' | ' . $this->info['catch'] . ' | ' . $this->info['frg'] . ' ' ); } } @@ -1985,7 +1990,7 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.` `n_capitalcity`,`n_demonscity`,`n_suncity`,`nu_demonscity`,`nu_angelscity`,`nu_abandonedplain`,`nu_emeraldscity`, `nu_capitalcity`,`nu_suncity`,`nu_devilscity`,`nu_dreamscity`,`add_stats`,`add_money`,`add_skills`,`add_skills2`, `rep3`,`rep3_buy`,`repdragonscity`,`n_dragonscity`,`nu_dragonscity`, - (`repcapitalcity`+`repdemonscity`+`repangelscity`+`repsuncity`+`repdreamscity`+`repabandonedplain`+`repsandcity`+`repemeraldscity`+`repdevilscity`) as allrep, + (`repcapitalcity`+`repdemonscity`+`repangelscity`+`repsuncity`+`repdreamscity`+`repabandonedplain`+`repsandcity`+`repemeraldscity`+`repdevilscity`) as allrep, (`nu_capitalcity`+`nu_demonscity`+`nu_angelscity`+`nu_suncity`+`nu_dreamscity`+`nu_abandonedplain`+`nu_sandcity`+`nu_emeraldscity`+`nu_devilscity`) as allnurep FROM `rep` WHERE `id` = "' . $this->info['id'] . '" LIMIT 1' ) @@ -2023,7 +2028,8 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.` } unset($sp_bs, $pl_bs); mysql_query( - 'UPDATE `bs_zv` SET `finish` = "' . time() . '" WHERE `uid` = "' . $this->info['id'] . '" AND `inBot` = "0" AND `finish` = "0"' + 'UPDATE `bs_zv` SET `finish` = "' . time( + ) . '" WHERE `uid` = "' . $this->info['id'] . '" AND `inBot` = "0" AND `finish` = "0"' ); } $this->info['room'] = $rmt['id']; @@ -2068,8 +2074,9 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.` 'UPDATE `items_users` SET `use_text` = "' . $itm['use_text'] . '" WHERE `id` = "' . $itm['id'] . '" LIMIT 1' ); mysql_query( - 'INSERT INTO `items_text` (`item_id`,`time`,`login`,`text`,`city`,`x`) VALUES ("' . $itm['id'] . '","' . time() . '","' . $this->info['login'] . '","' . mysql_real_escape_string( - htmlspecialchars($txt, null, 'cp1251') + 'INSERT INTO `items_text` (`item_id`,`time`,`login`,`text`,`city`,`x`) VALUES ("' . $itm['id'] . '","' . time( + ) . '","' . $this->info['login'] . '","' . mysql_real_escape_string( + htmlspecialchars($txt, null) ) . '","' . $this->info['city'] . '","' . $sx . '")' ); $this->error = 'Запись успешно произведена'; @@ -2126,8 +2133,9 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.` $this->error = 'Персонаж уже проводит сделку'; } else { $ins = mysql_query( - 'INSERT INTO `transfers` (`uid1`,`uid2`,`city`,`room`,`time`,`text`,`start1`) VALUES ("' . $this->info['id'] . '","' . $t['id'] . '","' . $this->info['city'] . '","' . $this->info['room'] . '","' . time() . '","' . mysql_real_escape_string( - htmlspecialchars($_POST['textarea'], null, 'cp1251') + 'INSERT INTO `transfers` (`uid1`,`uid2`,`city`,`room`,`time`,`text`,`start1`) VALUES ("' . $this->info['id'] . '","' . $t['id'] . '","' . $this->info['city'] . '","' . $this->info['room'] . '","' . time( + ) . '","' . mysql_real_escape_string( + htmlspecialchars($_POST['textarea'], null) ) . '","' . time() . '")' ); if ($ins) { @@ -2167,14 +2175,16 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.` } elseif ($this->tfer['time'] < time() - 1800) { //если передача дольше 30 минут, то отмена $upd = mysql_query( - 'UPDATE `transfers` SET `cancel1` = "' . time() . '",`cancel2` = "' . time() . '" WHERE `id` = "' . $this->tfer['id'] . '" LIMIT 1' + 'UPDATE `transfers` SET `cancel1` = "' . time() . '",`cancel2` = "' . time( + ) . '" WHERE `id` = "' . $this->tfer['id'] . '" LIMIT 1' ); if ($upd) { unset($this->tfer, $upd); } } elseif ($this->info['room'] != $this->tfer['room'] || $this->info['city'] != $this->tfer['city'] || $this->info['battle'] > 0) { $upd = mysql_query( - 'UPDATE `transfers` SET `cancel1` = "' . time() . '",`cancel2` = "' . time() . '" WHERE `id` = "' . $this->tfer['id'] . '" LIMIT 1' + 'UPDATE `transfers` SET `cancel1` = "' . time() . '",`cancel2` = "' . time( + ) . '" WHERE `id` = "' . $this->tfer['id'] . '" LIMIT 1' ); if ($upd) { mysql_query( @@ -2188,7 +2198,8 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.` $upd = 2; } $upd = mysql_query( - 'UPDATE `transfers` SET `cancel' . $upd . '` = "' . time() . '" WHERE `id` = "' . $this->tfer['id'] . '" LIMIT 1' + 'UPDATE `transfers` SET `cancel' . $upd . '` = "' . time( + ) . '" WHERE `id` = "' . $this->tfer['id'] . '" LIMIT 1' ); if ($upd) { $this->error = 'Вы успешно отказались от передачи.'; @@ -2266,7 +2277,8 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.` ); if (isset($this->bank)) { mysql_query( - 'UPDATE `bank` SET `useNow` = "' . (time() + 24 * 60 * 60) . '" WHERE `id` = "' . $this->bank['id'] . '" LIMIT 1' + 'UPDATE `bank` SET `useNow` = "' . (time( + ) + 24 * 60 * 60) . '" WHERE `id` = "' . $this->bank['id'] . '" LIMIT 1' ); } else { $this->bank['error'] = 'Неверный пароль от счета'; @@ -2343,7 +2355,8 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.` if (isset($_GET['obr_sel']) || isset($_GET['obraz'])) { $sm = $this->testAction( - '`uid` = "' . $this->info['id'] . '" AND `time` > ' . (time() - 86400) . ' AND `vars` = "sel_obraz" LIMIT 1', + '`uid` = "' . $this->info['id'] . '" AND `time` > ' . (time( + ) - 86400) . ' AND `vars` = "sel_obraz" LIMIT 1', 1 ); if (!isset($sm['id'])) { @@ -2466,7 +2479,8 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.` $this->error2 = 'Собирать снег можно только на Центральной площади'; } else { $smt = $this->testAction( - '`uid` = "' . $this->info['id'] . '" AND `time`>=' . (time() - 120) . ' AND `vars` = "create_snowball_cp" LIMIT 1', + '`uid` = "' . $this->info['id'] . '" AND `time`>=' . (time( + ) - 120) . ' AND `vars` = "create_snowball_cp" LIMIT 1', 1 ); if (isset($smt['id'])) { @@ -2670,7 +2684,8 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.` } //копируем эффекты $sp = mysql_query( - 'SELECT `id`,`id_eff`,`uid`,`name`,`data`,`overType`,`timeUse`,`timeAce`,`user_use`,`delete`,`v1`,`v2`,`img2`,`x`,`hod`,`bj`,`sleeptime`,`no_Ace`,`tr_life_user` FROM `eff_users` WHERE `uid` = "' . $clon['id'] . '" AND `delete` = "0" AND `deactiveTime` < "' . time() . '" AND `v1` != "priem" LIMIT 50' + 'SELECT `id`,`id_eff`,`uid`,`name`,`data`,`overType`,`timeUse`,`timeAce`,`user_use`,`delete`,`v1`,`v2`,`img2`,`x`,`hod`,`bj`,`sleeptime`,`no_Ace`,`tr_life_user` FROM `eff_users` WHERE `uid` = "' . $clon['id'] . '" AND `delete` = "0" AND `deactiveTime` < "' . time( + ) . '" AND `v1` != "priem" LIMIT 50' ); while ($pl = mysql_fetch_array($sp)) { mysql_query( @@ -3005,7 +3020,8 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.` while ($itm = mysql_fetch_array($s4)) { //удаляем предмет mysql_query( - 'UPDATE `items_users` SET `delete` = "' . time() . '" WHERE `id` = "' . $itm['id'] . '" LIMIT 1' + 'UPDATE `items_users` SET `delete` = "' . time( + ) . '" WHERE `id` = "' . $itm['id'] . '" LIMIT 1' ); } $j++; @@ -3191,7 +3207,8 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.` while ($itm = mysql_fetch_array($s4)) { //удаляем предмет mysql_query( - 'UPDATE `items_users` SET `delete` = "' . time() . '" WHERE `id` = "' . $itm['id'] . '" LIMIT 1' + 'UPDATE `items_users` SET `delete` = "' . time( + ) . '" WHERE `id` = "' . $itm['id'] . '" LIMIT 1' ); } $j++; @@ -3673,7 +3690,8 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.` while ($itm = mysql_fetch_array($s4)) { //удаляем предмет mysql_query( - 'UPDATE `items_users` SET `delete` = "' . time() . '" WHERE `id` = "' . $itm['id'] . '" LIMIT 1' + 'UPDATE `items_users` SET `delete` = "' . time( + ) . '" WHERE `id` = "' . $itm['id'] . '" LIMIT 1' ); } $j++; @@ -3971,7 +3989,8 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.` while ($itm = mysql_fetch_array($s4)) { //удаляем предмет mysql_query( - 'UPDATE `items_users` SET `delete` = "' . time() . '" WHERE `id` = "' . $itm['id'] . '" LIMIT 1' + 'UPDATE `items_users` SET `delete` = "' . time( + ) . '" WHERE `id` = "' . $itm['id'] . '" LIMIT 1' ); } $j++; @@ -4036,7 +4055,8 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.` 'INSERT INTO `aaa_bonus` ( `uid`,`time`,`afk`,`type`,`money` ) VALUES ( - "' . $this->info['id'] . '","' . (time() + 3600) . '","' . $afk . '","' . $pensia2[0] . '","' . $pensia2[1] . '" + "' . $this->info['id'] . '","' . (time( + ) + 3600) . '","' . $afk . '","' . $pensia2[0] . '","' . $pensia2[1] . '" )' ); } @@ -4113,11 +4133,13 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.` $col = $this->itemsX($iid); if ($col > 1) { $UpItems = mysql_query( - 'UPDATE `items_users` SET `uid` = ' . $this->info['id'] . ', `inGroup` = `inGroup`+1000, `1price` = "' . $i1['price1'] . '", `lastUPD` = "' . time() . '", `inShop` = 0 WHERE `inShop` = 30 AND `inOdet` = "0"AND `item_id`="' . $i2['item_id'] . '" AND `uid`="' . $i2['uid'] . '" AND `inGroup` = "' . $i2['inGroup'] . '" LIMIT ' . $col . '' + 'UPDATE `items_users` SET `uid` = ' . $this->info['id'] . ', `inGroup` = `inGroup`+1000, `1price` = "' . $i1['price1'] . '", `lastUPD` = "' . time( + ) . '", `inShop` = 0 WHERE `inShop` = 30 AND `inOdet` = "0"AND `item_id`="' . $i2['item_id'] . '" AND `uid`="' . $i2['uid'] . '" AND `inGroup` = "' . $i2['inGroup'] . '" LIMIT ' . $col . '' ); } else { $UpItems = mysql_query( - 'UPDATE `items_users` SET `uid` = ' . $this->info['id'] . ', `1price` = "' . $i1['price1'] . '", `lastUPD` = "' . time() . '", `inShop` = 0 WHERE `id` = "' . $iid . '" AND `inOdet` = "0" AND `delete` = "0" AND `uid`="' . $i2['uid'] . '" LIMIT 1' + 'UPDATE `items_users` SET `uid` = ' . $this->info['id'] . ', `1price` = "' . $i1['price1'] . '", `lastUPD` = "' . time( + ) . '", `inShop` = 0 WHERE `id` = "' . $iid . '" AND `inOdet` = "0" AND `delete` = "0" AND `uid`="' . $i2['uid'] . '" LIMIT 1' ); } //Вставляем функцию передачи кредитов владельцу предмета @@ -4228,578 +4250,6 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.` return $r; } - public function commisionShop($sid, $preview = "full") - { - global $c, $code, $sid; - switch ((int)$_GET['otdel']) { - case 1: - $typeOtdel = 18; - break; - case 2: - $typeOtdel = 19; - break; - case 3: - $typeOtdel = 20; - break; - case 4: - $typeOtdel = 21; - break; - case 5: - $typeOtdel = 22; - break; - case 6: - $typeOtdel = 15; - break; - case 7: - $typeOtdel = 12; - break; - case 8: - $typeOtdel = 4; - break; - case 9: - $typeOtdel = 5; - break; - case 10: - $typeOtdel = 6; - break; - case 11: - $typeOtdel = 1; - break; - case 12: - $typeOtdel = 3; - break; - case 13: - $typeOtdel = 8; - break; - case 14: - $typeOtdel = 14; - break; - case 15: - $typeOtdel = 13; - break; - case 16: - $typeOtdel = 9; - break; - case 17: - $typeOtdel = 10; - break; - case 18: - $typeOtdel = 11; - break; - case 19: - $typeOtdel = 29; - break; - case 20: - $typeOtdel = 30; - break; - case 1050: - $typeOtdel = 1050; - break; - default : - $typeOtdel = 18; - } - if ($typeOtdel != 1050) { - if ($preview == "full") { - $cl = mysql_query( - 'SELECT `items_users`.`id`,`items_users`.`item_id`,`items_users`.`1price`,`items_users`.`2price`,`items_users`.`uid`,`items_users`.`use_text`,`items_users`.`data`,`items_users`.`inOdet`,`items_users`.`inShop`,`items_users`.`delete`,`items_users`.`iznosNOW`,`items_users`.`iznosMAX`,`items_users`.`gift`,`items_users`.`gtxt1`,`items_users`.`gtxt2`,`items_users`.`kolvo`,`items_users`.`geniration`,`items_users`.`magic_inc`,`items_users`.`maidin`,`items_users`.`lastUPD`,`items_users`.`timeOver`,`items_users`.`overType`,`items_users`.`secret_id`,`items_users`.`time_create`,`items_users`.`inGroup`,`items_users`.`dn_delete`,`items_users`.`inTransfer`,`items_users`.`post_delivery`,`items_users`.`lbtl_`,`items_users`.`bexp`,`items_users`.`so`,`items_users`.`blvl`,`items_main`.`id`,`items_main`.`name`,`items_main`.`img`,`items_main`.`type`,`items_main`.`inslot`,`items_main`.`2h`,`items_main`.`2too`,`items_main`.`iznosMAXi`,`items_main`.`inRazdel`,`items_main`.`price1`,`items_main`.`price2`,`items_main`.`magic_chance`,`items_main`.`info`,`items_main`.`massa`,`items_main`.`level`,`items_main`.`magic_inci`,`items_main`.`overTypei`,`items_main`.`group`,`items_main`.`group_max`,`items_main`.`geni`,`items_main`.`ts`,`items_main`.`srok`,`items_main`.`class`,`items_main`.`class_point`,`items_main`.`anti_class`,`items_main`.`anti_class_point`,`items_main`.`max_text`,`items_main`.`useInBattle`,`items_main`.`lbtl`,`items_main`.`lvl_itm`,`items_main`.`lvl_exp`,`items_main`.`lvl_aexp`, count(`items_users`.`id`) as inGroupCount -FROM `items_users` LEFT JOIN `items_main` ON (`items_main`.`id` = `items_users`.`item_id`) -WHERE (( `items_users`.time_create + `items_main`.srok) > unix_timestamp() OR `items_main`.srok = "0") AND `items_users`.`delete`="0" AND `items_users`.`inOdet`="0" AND `items_users`.`inShop`="30" and `items_main`.`type` = "' . mysql_real_escape_string( - $typeOtdel - ) . '" and `items_users`.`item_id` = "' . (int)$_GET['itemid'] . '" GROUP BY `items_users`.`inGroup`, `items_users`.`uid`,`items_users`.`1price` HAVING `items_users`.inGroup > 0 -UNION ALL SELECT `items_users`.`id`,`items_users`.`item_id`,`items_users`.`1price`,`items_users`.`2price`,`items_users`.`uid`,`items_users`.`use_text`,`items_users`.`data`,`items_users`.`inOdet`,`items_users`.`inShop`,`items_users`.`delete`,`items_users`.`iznosNOW`,`items_users`.`iznosMAX`,`items_users`.`gift`,`items_users`.`gtxt1`,`items_users`.`gtxt2`,`items_users`.`kolvo`,`items_users`.`geniration`,`items_users`.`magic_inc`,`items_users`.`maidin`,`items_users`.`lastUPD`,`items_users`.`timeOver`,`items_users`.`overType`,`items_users`.`secret_id`,`items_users`.`time_create`,`items_users`.`inGroup`,`items_users`.`dn_delete`,`items_users`.`inTransfer`,`items_users`.`post_delivery`,`items_users`.`lbtl_`,`items_users`.`bexp`,`items_users`.`so`,`items_users`.`blvl`,`items_main`.`id`,`items_main`.`name`,`items_main`.`img`,`items_main`.`type`,`items_main`.`inslot`,`items_main`.`2h`,`items_main`.`2too`,`items_main`.`iznosMAXi`,`items_main`.`inRazdel`,`items_main`.`price1`,`items_main`.`price2`,`items_main`.`magic_chance`,`items_main`.`info`,`items_main`.`massa`,`items_main`.`level`,`items_main`.`magic_inci`,`items_main`.`overTypei`,`items_main`.`group`,`items_main`.`group_max`,`items_main`.`geni`,`items_main`.`ts`,`items_main`.`srok`,`items_main`.`class`,`items_main`.`class_point`,`items_main`.`anti_class`,`items_main`.`anti_class_point`,`items_main`.`max_text`,`items_main`.`useInBattle`,`items_main`.`lbtl`,`items_main`.`lvl_itm`,`items_main`.`lvl_exp`,`items_main`.`lvl_aexp`, count(`items_users`.`id`) as inGroupCount -FROM `items_users` LEFT JOIN `items_main` ON (`items_main`.`id` = `items_users`.`item_id`) -WHERE (( `items_users`.time_create + `items_main`.srok) > unix_timestamp() OR `items_main`.srok = "0") AND `items_users`.`delete`="0" AND `items_users`.`inOdet`="0" AND `items_users`.`inShop`="30" and `items_main`.`type` = "' . mysql_real_escape_string( - $typeOtdel - ) . '" and `items_users`.`item_id` = "' . (int)$_GET['itemid'] . '" GROUP BY `items_users`.`uid`, `items_users`.`1price` HAVING `items_users`.inGroup = 0 -ORDER BY `1price`ASC , inGroupCount DESC' - ); - } else { - $cl = mysql_query( - 'SELECT `items_users`.`id`,`items_users`.`item_id`,`items_users`.`1price`,`items_users`.`2price`,`items_users`.`uid`,`items_users`.`use_text`,`items_users`.`data`,`items_users`.`inOdet`,`items_users`.`inShop`,`items_users`.`delete`,`items_users`.`iznosNOW`,`items_users`.`iznosMAX`,`items_users`.`gift`,`items_users`.`gtxt1`,`items_users`.`gtxt2`,`items_users`.`kolvo`,`items_users`.`geniration`,`items_users`.`magic_inc`,`items_users`.`maidin`,`items_users`.`lastUPD`,`items_users`.`timeOver`,`items_users`.`overType`,`items_users`.`secret_id`,`items_users`.`time_create`,`items_users`.`inGroup`,`items_users`.`dn_delete`,`items_users`.`inTransfer`,`items_users`.`post_delivery`,`items_users`.`lbtl_`,`items_users`.`bexp`,`items_users`.`so`,`items_users`.`blvl`,`items_main`.`id`,`items_main`.`name`,`items_main`.`img`,`items_main`.`type`,`items_main`.`inslot`,`items_main`.`2h`,`items_main`.`2too`,`items_main`.`iznosMAXi`,`items_main`.`inRazdel`,`items_main`.`price1`,`items_main`.`price2`,`items_main`.`magic_chance`,`items_main`.`info`,`items_main`.`massa`,`items_main`.`level`,`items_main`.`magic_inci`,`items_main`.`overTypei`,`items_main`.`group`,`items_main`.`group_max`,`items_main`.`geni`,`items_main`.`ts`,`items_main`.`srok`,`items_main`.`class`,`items_main`.`class_point`,`items_main`.`anti_class`,`items_main`.`anti_class_point`,`items_main`.`max_text`,`items_main`.`useInBattle`,`items_main`.`lbtl`,`items_main`.`lvl_itm`,`items_main`.`lvl_exp`,`items_main`.`lvl_aexp` FROM `items_users` LEFT JOIN `items_main` ON (`items_main`.`id` = `items_users`.`item_id`) WHERE (( `items_users`.time_create + `items_main`.srok) > unix_timestamp() OR `items_main`.srok = "0") AND `items_users`.`delete`="0" AND `items_users`.`inOdet`="0" AND `items_users`.`inShop`="30" and `items_main`.`type` = "' . mysql_real_escape_string( - $typeOtdel - ) . '" GROUP BY `items_users`.`item_id` ORDER BY `items_main`.`id` DESC' - ); - } - } else { - if ($preview == "full") { - $cl = mysql_query( - 'SELECT -`items_users`.`id` as id, `items_users`.`id` AS `idu`,`items_users`.`item_id` as item_id,`items_users`.`1price`,`items_users`.`2price`,`items_users`.`uid`,`items_users`.`use_text`, -`items_users`.`data`,`items_users`.`inOdet`,`items_users`.`inShop`,`items_users`.`delete`,`items_users`.`iznosNOW`,`items_users`.`iznosMAX`, -`items_users`.`gift`,`items_users`.`gtxt1`,`items_users`.`gtxt2`,`items_users`.`kolvo`,`items_users`.`geniration`,`items_users`.`magic_inc`,`items_users`.`maidin`, -`items_users`.`lastUPD`,`items_users`.`timeOver`,`items_users`.`overType`,`items_users`.`secret_id`,`items_users`.`time_create`,`items_users`.`inGroup`,`items_users`.`dn_delete`, -`items_users`.`inTransfer`,`items_users`.`post_delivery`,`items_users`.`lbtl_`,`items_users`.`bexp`,`items_users`.`so`,`items_users`.`blvl`,`items_main`.`id` as item_id,`items_main`.`name`, -`items_main`.`img`,`items_main`.`type`,`items_main`.`inslot`,`items_main`.`2h`,`items_main`.`2too`,`items_main`.`iznosMAXi`,`items_main`.`inRazdel`,`items_main`.`price1`, -`items_main`.`price2`,`items_main`.`magic_chance`,`items_main`.`info`,`items_main`.`massa`,`items_main`.`level`,`items_main`.`magic_inci`,`items_main`.`overTypei`, -`items_main`.`group`,`items_main`.`group_max`,`items_main`.`geni`,`items_main`.`ts`,`items_main`.`srok`,`items_main`.`class`,`items_main`.`class_point`,`items_main`.`anti_class`, -`items_main`.`anti_class_point`,`items_main`.`max_text`,`items_main`.`useInBattle`,`items_main`.`lbtl`,`items_main`.`lvl_itm`,`items_main`.`lvl_exp`, -`items_main`.`lvl_aexp` , count(`items_users`.`id`) as inGroupCount -FROM `items_users` LEFT JOIN `items_main` ON (`items_main`.`id` = `items_users`.`item_id`) -WHERE (( `items_users`.time_create + `items_main`.srok) > unix_timestamp() OR `items_main`.srok = "0") AND `items_users`.`delete`="0" AND `items_users`.`item_id` = "' . (int)$_GET['itemid'] . '" -AND `items_users`.`inOdet`="0" AND `items_users`.`inShop`="30" and `items_main`.`type` != "18" AND `items_main`.`type` != "19" AND `items_main`.`type` != "20" AND `items_main`.`type` != "21" AND `items_main`.`type` != "22" AND `items_main`.`type` != "15" AND `items_main`.`type` != "12" AND `items_main`.`type` != "4" AND `items_main`.`type` != "5" AND `items_main`.`type` != "6" AND `items_main`.`type` != "1" AND `items_main`.`type` != "3" AND `items_main`.`type` != "8" AND `items_main`.`type` != "14" AND `items_main`.`type` != "13" AND `items_main`.`type` != "9" AND `items_main`.`type` != "10" AND `items_main`.`type` != "11" AND `items_main`.`type` != "29" AND `items_main`.`type` != "30" -GROUP BY `items_users`.`inGroup`, `items_users`.`uid`,`items_users`.`1price` HAVING `items_users`.inGroup > 0 -UNION ALL -SELECT `items_users`.`id` as id, `items_users`.`id` AS `idu`,`items_users`.`item_id` as item_id,`items_users`.`1price`,`items_users`.`2price`,`items_users`.`uid`,`items_users`.`use_text`, -`items_users`.`data`,`items_users`.`inOdet`,`items_users`.`inShop`,`items_users`.`delete`,`items_users`.`iznosNOW`,`items_users`.`iznosMAX`, -`items_users`.`gift`,`items_users`.`gtxt1`,`items_users`.`gtxt2`,`items_users`.`kolvo`,`items_users`.`geniration`,`items_users`.`magic_inc`,`items_users`.`maidin`, -`items_users`.`lastUPD`,`items_users`.`timeOver`,`items_users`.`overType`,`items_users`.`secret_id`,`items_users`.`time_create`,`items_users`.`inGroup`,`items_users`.`dn_delete`, -`items_users`.`inTransfer`,`items_users`.`post_delivery`,`items_users`.`lbtl_`,`items_users`.`bexp`,`items_users`.`so`,`items_users`.`blvl`,`items_main`.`id` as item_id,`items_main`.`name`, -`items_main`.`img`,`items_main`.`type`,`items_main`.`inslot`,`items_main`.`2h`,`items_main`.`2too`,`items_main`.`iznosMAXi`,`items_main`.`inRazdel`,`items_main`.`price1`, -`items_main`.`price2`,`items_main`.`magic_chance`,`items_main`.`info`,`items_main`.`massa`,`items_main`.`level`,`items_main`.`magic_inci`,`items_main`.`overTypei`, -`items_main`.`group`,`items_main`.`group_max`,`items_main`.`geni`,`items_main`.`ts`,`items_main`.`srok`,`items_main`.`class`,`items_main`.`class_point`,`items_main`.`anti_class`, -`items_main`.`anti_class_point`,`items_main`.`max_text`,`items_main`.`useInBattle`,`items_main`.`lbtl`,`items_main`.`lvl_itm`,`items_main`.`lvl_exp`, -`items_main`.`lvl_aexp`, count(`items_users`.`id`) as inGroupCount -FROM `items_users` LEFT JOIN `items_main` ON (`items_main`.`id` = `items_users`.`item_id`) -WHERE (( `items_users`.time_create + `items_main`.srok) > unix_timestamp() OR `items_main`.srok = "0") AND `items_users`.`delete`="0" AND `items_users`.`item_id` = "' . (int)$_GET['itemid'] . '" -AND `items_users`.`inOdet`="0" AND `items_users`.`inShop`="30" and `items_main`.`type` != "18" AND `items_main`.`type` != "19" AND `items_main`.`type` != "20" AND `items_main`.`type` != "21" AND `items_main`.`type` != "22" AND `items_main`.`type` != "15" AND `items_main`.`type` != "12" AND `items_main`.`type` != "4" AND `items_main`.`type` != "5" AND `items_main`.`type` != "6" AND `items_main`.`type` != "1" AND `items_main`.`type` != "3" AND `items_main`.`type` != "8" AND `items_main`.`type` != "14" AND `items_main`.`type` != "13" AND `items_main`.`type` != "9" AND `items_main`.`type` != "10" AND `items_main`.`type` != "11" AND `items_main`.`type` != "29" AND `items_main`.`type` != "30" -GROUP BY `items_users`.`uid`,`items_users`.`1price` HAVING `items_users`.inGroup = 0 -ORDER BY `1price`ASC , inGroupCount DESC' - ); - } else { - $cl = mysql_query( - 'SELECT `items_users`.`id`, `items_users`.`id` AS `idu`,`items_users`.`item_id`,`items_users`.`1price`,`items_users`.`2price`,`items_users`.`uid`,`items_users`.`use_text`,`items_users`.`data`,`items_users`.`inOdet`,`items_users`.`inShop`,`items_users`.`delete`,`items_users`.`iznosNOW`,`items_users`.`iznosMAX`,`items_users`.`gift`,`items_users`.`gtxt1`,`items_users`.`gtxt2`,`items_users`.`kolvo`,`items_users`.`geniration`,`items_users`.`magic_inc`,`items_users`.`maidin`,`items_users`.`lastUPD`,`items_users`.`timeOver`,`items_users`.`overType`,`items_users`.`secret_id`,`items_users`.`time_create`,`items_users`.`inGroup`,`items_users`.`dn_delete`,`items_users`.`inTransfer`,`items_users`.`post_delivery`,`items_users`.`lbtl_`,`items_users`.`bexp`,`items_users`.`so`,`items_users`.`blvl`,`items_main`.`id`,`items_main`.`name`,`items_main`.`img`,`items_main`.`type`,`items_main`.`inslot`,`items_main`.`2h`,`items_main`.`2too`,`items_main`.`iznosMAXi`,`items_main`.`inRazdel`,`items_main`.`price1`,`items_main`.`price2`,`items_main`.`magic_chance`,`items_main`.`info`,`items_main`.`massa`,`items_main`.`level`,`items_main`.`magic_inci`,`items_main`.`overTypei`,`items_main`.`group`,`items_main`.`group_max`,`items_main`.`geni`,`items_main`.`ts`,`items_main`.`srok`,`items_main`.`class`,`items_main`.`class_point`,`items_main`.`anti_class`,`items_main`.`anti_class_point`,`items_main`.`max_text`,`items_main`.`useInBattle`,`items_main`.`lbtl`,`items_main`.`lvl_itm`,`items_main`.`lvl_exp`,`items_main`.`lvl_aexp` FROM `items_users` LEFT JOIN `items_main` ON (`items_main`.`id` = `items_users`.`item_id`) WHERE (( `items_users`.time_create + `items_main`.srok) > unix_timestamp() OR `items_main`.srok = "0") AND `items_users`.`delete`="0" AND `items_users`.`inOdet`="0" AND `items_users`.`inShop`="30" and `items_main`.`type` != "18" AND `items_main`.`type` != "19" AND `items_main`.`type` != "20" AND `items_main`.`type` != "21" AND `items_main`.`type` != "22" AND `items_main`.`type` != "15" AND `items_main`.`type` != "12" AND `items_main`.`type` != "4" AND `items_main`.`type` != "5" AND `items_main`.`type` != "6" AND `items_main`.`type` != "1" AND `items_main`.`type` != "3" AND `items_main`.`type` != "8" AND `items_main`.`type` != "14" AND `items_main`.`type` != "13" AND `items_main`.`type` != "9" AND `items_main`.`type` != "10" AND `items_main`.`type` != "11" AND `items_main`.`type` != "29" AND `items_main`.`type` != "30" GROUP BY `items_users`.`item_id` ORDER BY `items_main`.`id` DESC' - ); - } - } - $cr = 'c8c8c8'; - $i = 0; - $steckCikl = 1; - while ($pl = mysql_fetch_array($cl)) { - // количетсво одинаковых предметов в комке - if ($preview == "preview") { - $steck = ['--', '--', '--', '--']; - } - if ($cr == 'd4d4d4') { - $cr = 'c8c8c8'; - } else { - $cr = 'd4d4d4'; - } - if ($preview == "preview" && ($steck[0] > 1 && $steck[0] > $steckCikl)) { - ++$steckCikl; - continue; - } else { - $steckCikl = 1; - $d = mysql_fetch_array( - mysql_query( - 'SELECT `id`,`items_id`,`data` FROM `items_main_data` WHERE `items_id` = "' . $pl['item_id'] . '" LIMIT 1' - ) - ); - if ($steck[0] > 1 && $preview == "preview") { - $po = $this->lookStats($d['data']); - } else { - $po = $this->lookStats($pl['data']); - } - if (($pl['type'] >= 18 && $pl['type'] <= 24) || $pl['type'] == 26 || $pl['type'] == 27) { - //Зоны блока + - if ($pl['inOdet'] != 14) { - $po['zonb']++; - } - } - $is2 = ''; - $is1 = '
'; - if ($preview == "full") { - $is1 .= 'купить '; - } elseif ($preview == "preview") { - $is1 .= 'Просмотреть '; - } - //название - - $col = $this->itemsX($pl[0]); - if ($col > 1 && $pl['inGroup'] != 0 && $pl['inGroupCount'] > 1) { - $pl['kolvo'] = $col; - $pl['name'] .= ' (x' . $col . ')'; - } - $is2 .= '' . $pl['name'] . '    '; - if ($pl['massa'] > 0 && $preview == "full") { - $is2 .= '(Масса: ' . round($pl['massa'], 2) . ')'; - if ($pl['gift'] != '') { - $ttl = ''; - if ($pl['gift'] == 1) { - $ttl = 'Вы не можете передать этот предмет кому-либо'; - } else { - $ttl = 'Этот предмет подарил ' . $pl['gift'] . '. Вы не сможете передать этот предмет кому-либо еще'; - } - $is2 .= ' '; - } - if (isset($po['art'])) { - $is2 .= ' '; - } - if (isset($po['sudba'])) { - if ($po['sudba'] == '0') { - $is2 .= ' '; - } elseif ($po['sudba'] == '1') { - $is2 .= ' '; - } else { - $is2 .= ' '; - } - } - } - //цена - $is2 .= '
Цена: '; - if ($steck[0] > 1 && $preview == "preview") { - $is2 .= $steck[3] . '-' . $steck[4] . ' кр. '; - } else { - $is2 .= $pl['1price'] . ' кр. '; - } - if ($pl['pricerep'] > 0) { - $is2 .= ' (' . round($pl['pricerep'], 2) . ' Воинственности)'; - } - - //долговечность - if ($pl['iznosMAX'] > 0) { - $izcol = ''; - if (floor($pl['iznosNOW']) >= (floor($pl['iznosMAX']) - ceil($pl['iznosMAX']) / 100 * 20)) { - $izcol = 'brown'; - } - } - if ($preview == "preview") { - $is2 .= '
Долговечность: ' . floor($steck[1]) . '/' . ceil( - $steck[2] - ) . ''; - } else { - if ($pl['iznosMAXi'] == 999999999) { - $is2 .= '
Долговечность: неразрушимо'; - } else { - $is2 .= '
Долговечность: ' . floor( - $pl['iznosNOW'] - ) . '/' . ceil($pl['iznosMAX']) . ''; - } - } - //Срок годности предмета - - if ($po['srok'] > 0) { - $pl['srok'] = $po['srok']; - } - if ($pl['srok'] > 0 and $preview != "preview") { - if ($pl['time_create'] + $pl['srok'] < time()) { - $is2 .= '
Срок годности: ' . $this->timeOut($pl['srok']) . ' (испорчен)'; - } else { - $is2 .= '
Срок годности: ' . $this->timeOut($pl['srok']) . ' (до ' . date( - 'd.m.Y H:i', $pl['time_create'] + $pl['srok'] - ) . ')'; - } - } elseif ($pl['srok'] > 0) { - $is2 .= '
Срок годности: ' . $this->timeOut($pl['srok']); - } - if ($pl['magic_chance'] > 0) { - $is2 .= '
Вероятность срабатывания: ' . min([$pl['magic_chance'], 100]) . '%'; - } - - //Продолжительность действия магии: - if ((int)$pl['magic_inci'] > 0) { - $efi = mysql_fetch_array( - mysql_query( - 'SELECT `id2`,`mname`,`type1`,`img`,`mdata`,`actionTime`,`type2`,`type3`,`onlyOne`,`oneType`,`noAce`,`see`,`info`,`overch`,`bp`,`noch` FROM `eff_main` WHERE `id2` = "' . ((int)$pl['magic_inci']) . '" LIMIT 1' - ) - ); - if (isset($efi['id2']) && $efi['actionTime'] > 0) { - $is2 .= '
Продолжительность действия: ' . $this->timeOut($efi['actionTime']); - } - } - if ($preview == "full" || $preview == "preview") { - //Требуется минимальное: - $tr = ''; - $t = $this->items['tr']; - $x = 0; - while ($x < count($t)) { - $n = $t[$x]; - if (isset($po['tr_' . $n]) && $po['tr_' . $n] != 0) { - if ($po['tr_' . $n] > $this->stats[$n]) { - if ($n == 'rep') { - $temp = explode('::', $po['tr_' . $n]); - if ($this->rep['rep' . $temp[1]] < $temp[0]) { - $tr .= ''; - $notr++; - } - unset($temp); - } elseif ($n != 'align' || floor($this->info['align']) != $po['tr_' . $n]) { - $tr .= ''; - $notr++; - } - } - $tr .= '
• '; - if ($n == 'rep') { - $temp = explode('::', $po['tr_' . $n]); - $tr .= $this->is[$n] . ' ' . ucfirst( - str_replace('city', ' city', $temp[1]) - ) . ': ' . $temp[0]; - unset($temp); - } elseif ($n != 'align') { - if ($n == 'sex') { - if ($po['tr_' . $n] == 1) { - $tr .= $this->is[$n] . ': Женский'; - } else { - $tr .= $this->is[$n] . ': Мужской'; - } - } else { - $tr .= $this->is[$n] . ': ' . $po['tr_' . $n]; - } - } else { - $tr .= $this->is[$n] . ': ' . $this->align_nm[$po['tr_' . $n]]; - } - if ($po['tr_' . $n] > $this->stats[$n]) { - if ($n != 'align' || floor($this->info['align']) != $po['tr_' . $n]) { - $tr .= '
'; - } - } - } - $x++; - } - - if ($tr != '') { - $is2 .= '
Требуется минимальное:' . $tr; - } - //Действует на: - $tr = ''; - $t = $this->items['add']; - $x = 0; - while ($x < count($t)) { - $n = $t[$x]; - if (isset($po['add_' . $n], $this->is[$n])) { - $z = '+'; - if ($po['add_' . $n] < 0) { - $z = ''; - } - $tr .= '
• ' . $this->is[$n] . ': ' . $z . '' . $po['add_' . $n]; - } - $x++; - } - //действует на (броня) - $i = 1; - $bn = [1 => 'головы', 2 => 'корпуса', 3 => 'пояса', 4 => 'ног']; - while ($i <= 4) { - if (isset($po['add_mab' . $i])) { - if ($po['add_mab' . $i] == $po['add_mib' . $i] && $pl['geniration'] == 1) { - $z = '+'; - if ($po['add_mab' . $i] < 0) { - $z = ''; - } - $tr .= '
• Броня ' . $bn[$i] . ': ' . $z . '' . $po['add_mab' . $i]; - } else { - $tr .= '
• Броня ' . $bn[$i] . ': ' . $po['add_mib' . $i] . '-' . $po['add_mab' . $i] . ' (' . $this->bronFx( - [$po['add_mib' . $i], $po['add_mab' . $i]] - ) . ')'; - } - } - $i++; - } - if ($tr != '') { - $is2 .= '
Действует на:' . $tr; - } - //Свойства предмета: - $tr = ''; - $t = $this->items['sv']; - if (isset($po['sv_yron_min'], $po['sv_yron_max'])) { - $tr .= '
• Урон: ' . $po['sv_yron_min'] . ' - ' . $po['sv_yron_max']; - } - $x = 0; - while ($x < count($t)) { - $n = $t[$x]; - if (isset($po['sv_' . $n])) { - $z = '+'; - if ($po['sv_' . $n] < 0) { - $z = ''; - } - $tr .= '
• ' . $this->is[$n] . ': ' . $z . '' . $po['sv_' . $n]; - } - $x++; - } - if ($pl['2too'] == 1) { - $tr .= '
• Второе оружие'; - } - if ($pl['2h'] == 1) { - $tr .= '
• Двуручное оружие'; - } - if (isset($po['zonb'])) { - $tr .= '
• Зоны блокирования: '; - if ($po['zonb'] > 0) { - $x = 1; - while ($x <= $po['zonb']) { - $tr .= '+'; - $x++; - } - } else { - $tr .= '—'; - } - } - - if ($tr != '') { - $is2 .= '
Свойства предмета:' . $tr; - } - - $tr = ''; - - if (isset($po['imposed']) && $po['imposed'] > 0) { - if ($po['imposed_lvl'] == 0) { - $rnc = 'maroon'; - } elseif ($po['imposed_lvl'] == 1) { - $rnc = '#624542'; - } elseif ($po['imposed_lvl'] == 2) { - $rnc = '#77090b'; - } elseif ($po['imposed_lvl'] == 3) { - $rnc = '#d99800'; - } else { - $rnc = '#282828'; - } - $po['imposed_name'] = str_replace('Чары ', '', $po['imposed_name']); - $tr .= '
Наложены заклятия: ' . $po['imposed_name'] . ' '; - unset($rnc); - } - if ($tr != '') { - $is2 .= '
Улучшения предмета:'; - $is2 .= $tr; - } - - if ($notr == 0) { - $d[0] = 1; - if ($pl['magic_inc'] != '') { - $d[2] = 1; - } - } - if (isset($po['free_stats']) && $po['free_stats'] > 0) { - $is2 .= '
Распределение статов:'; - $is2 .= '• Возможных распределений: ' . $po['free_stats'] . ''; - } - if (floor($pl['iznosNOW']) >= ceil($pl['iznosMAX'])) { - $d[0] = 0; - $d[2] = 0; - } - if (isset($po['complect']) || isset($po['complect2'])) { - $is2 .= '
Дополнительная информация:'; - } - if (isset($po['complect'])) { - //не отображается - $com1 = ['name' => 'Неизвестный Комплект', 'x' => 0, 'text' => '']; - $spc = mysql_query( - 'SELECT `id`,`com`,`name`,`x`,`data` FROM `complects` WHERE `com` = "' . $po['complect'] . '" ORDER BY `x` ASC LIMIT 20' - ); - while ($plc = mysql_fetch_array($spc)) { - $com1['name'] = $plc['name']; - $com1['text'] .= '    • ' . $plc['x'] . ': '; - //действие комплекта - $i1c = 0; - $i2c = 0; - $i1e = $this->lookStats($plc['data']); - while ($i1c < count($this->items['add'])) { - if (isset($i1e[$this->items['add'][$i1c]])) { - $i3c = $i1e[$this->items['add'][$i1c]]; - if ($i3c > 0) { - $i3c = '+' . $i3c; - } - if ($i2c > 0) { - $com1['text'] .= '    ' . $this->is[$this->items['add'][$i1c]] . ': ' . $i3c; - } else { - $com1['text'] .= $this->is[$this->items['add'][$i1c]] . ': ' . $i3c; - } - $com1['text'] .= '
'; - $i2c++; - } - $i1c++; - } - unset($i1c, $i2c, $i3c); - $com1['x']++; - } - $is2 .= '
• Часть комплекта: ' . $com1['name'] . '
'; - $is2 .= $com1['text']; - $is2 .= ''; - } - if (isset($po['complect2'])) { - //не отображается - $com1 = ['name' => 'Неизвестный Комплект', 'x' => 0, 'text' => '']; - $spc = mysql_query( - 'SELECT `id`,`com`,`name`,`x`,`data` FROM `complects` WHERE `com` = "' . $po['complect2'] . '" ORDER BY `x` ASC LIMIT 20' - ); - while ($plc = mysql_fetch_array($spc)) { - $com1['name'] = $plc['name']; - $com1['text'] .= '    • ' . $plc['x'] . ': '; - //действие комплекта - $i1c = 0; - $i2c = 0; - $i1e = $this->lookStats($plc['data']); - while ($i1c < count($this->items['add'])) { - if (isset($i1e[$this->items['add'][$i1c]])) { - $i3c = $i1e[$this->items['add'][$i1c]]; - if ($i3c > 0) { - $i3c = '+' . $i3c; - } - if ($i2c > 0) { - $com1['text'] .= '    ' . $this->is[$this->items['add'][$i1c]] . ': ' . $i3c; - } else { - $com1['text'] .= $this->is[$this->items['add'][$i1c]] . ': ' . $i3c; - } - $com1['text'] .= '
'; - $i2c++; - } - $i1c++; - } - unset($i1c, $i2c, $i3c); - $com1['x']++; - } - $is2 .= '
• Часть комплекта (подгонка): ' . $com1['name'] . '
'; - $is2 .= $com1['text']; - $is2 .= ''; - } - - $is2 .= ''; - if (isset($po['gravi'])) { - $is2 .= '
На поверхности выгравирована надпись: ' . $po['gravi'] . ''; - } - if ($pl['info'] != '') { - $is2 .= '
Рекомендации:
' . $pl['info'] . '
'; - } - if ($po['info'] != '') { - $is2 .= '
' . $po['info'] . '
'; - } - if ($pl['max_text'] - $pl['use_text'] > 0) { - $is2 .= '
Количество символов: ' . ($pl['max_text'] - $pl['use_text']) . '
'; - } - if (isset($po['noremont'])) { - $is2 .= '
Предмет не подлежит ремонту
'; - } - if (isset($po['nosale'])) { - $is2 .= '
Предмет нельзя продать
'; - } - if (isset($po['nomodif'])) { - $is2 .= '
Предмет нельзя улучшать
'; - } - if (isset($po['nodelete'])) { - $is2 .= '
Предмет нельзя выбросить
'; - } - if (isset($po['frompisher']) && $po['frompisher'] > 0) { - $is2 .= '
Предмет из подземелья
'; - } - if (isset($po['sleep_moroz']) && $po['sleep_moroz'] > 0) { - $is2 .= '
Предмет не портится во время сна
'; - } - if (isset($po['fromlaba']) && $po['fromlaba'] > 0) { - $is2 .= '
Предмет из лабиринта
'; - } - if (isset($po['vip_sale']) && $po['vip_sale'] > 0) { - $is2 .= '
Предмет куплен за 10% от стоимости
'; - } - if ($pl['dn_delete'] > 0) { - $is2 .= '
Предмет будет удален при выходе из подземелья
'; - } - if ($this->pokol > $pl['geni']) { - $is2 .= '
Предмет устарел
'; - } - if (isset($po['zazuby']) && $po['zazuby'] > 0) { - $is2 .= '
Предмет куплен за зубы
'; - } - $is2 .= '
'; - } - if ($preview == "preview") { - $kolvoprint = "Количество: $steck[0] шт."; - } - echo '' . $is1 . '' . $kolvoprint . $is2 . ''; - $i++; - } - } - if ($i == 0) { - echo 'Прилавок магазина пуст'; - } - } - public $sid_zuby = [ //Кэпитал 1 => 1, //гос @@ -4910,7 +4360,9 @@ ORDER BY `1price`ASC , inGroupCount DESC' } //} - if ($pl['nozuby'] == 0 && $this->info['level'] > 0 && $this->info['level'] < 8 && $pl['level'] < 8 && $sid_zuby == 1 && Config::get('zuby')) { + if ($pl['nozuby'] == 0 && $this->info['level'] > 0 && $this->info['level'] < 8 && $pl['level'] < 8 && $sid_zuby == 1 && Config::get( + 'zuby' + )) { $is1 .= '
купить за зубы'; } } @@ -4958,7 +4410,9 @@ ORDER BY `1price`ASC , inGroupCount DESC' if ($this->info['admin'] > 0) { $is2 .= '
  ' . $pl['pos'] . '     ' . $pl['pos'] . '  
'; } @@ -5023,7 +4477,9 @@ ORDER BY `1price`ASC , inGroupCount DESC' $is2 .= '     (количество: ' . $pl['kolvo'] . ')'; } - if ($pl['nozuby'] == 0 && $sid != 609 && Config::get('zuby') && $this->info['level'] > 0 && $this->info['level'] < 8 && $pl['level'] < 8 && $sid_zuby == 1) { + if ($pl['nozuby'] == 0 && $sid != 609 && Config::get( + 'zuby' + ) && $this->info['level'] > 0 && $this->info['level'] < 8 && $pl['level'] < 8 && $sid_zuby == 1) { if ($this->stats['silver'] > 0 && $sid == 1) { $is2 .= ' (' . ltrim($this->zuby(round($pl['price_1'] * 0.95, 2)), ' ') . ')'; } else { @@ -5409,7 +4865,8 @@ ORDER BY `1price`ASC , inGroupCount DESC' $crd = ''; if ($this->info['admin'] > 0) { - $crd = 'Редактировать предмет   Редактировать предмет   обновить
'; } @@ -6004,7 +5461,8 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.` $data = $this->impStats($data); mysql_query( - 'UPDATE `items_users` SET `delete` = "' . time() . '" WHERE `id` = "' . $rune['id'] . '" AND `uid` = "' . $this->info['id'] . '" LIMIT 1' + 'UPDATE `items_users` SET `delete` = "' . time( + ) . '" WHERE `id` = "' . $rune['id'] . '" AND `uid` = "' . $this->info['id'] . '" LIMIT 1' ); mysql_query( 'UPDATE `items_users` SET `data` = "' . $data . '" WHERE `id` = "' . $id['id'] . '" AND `uid` = "' . $this->info['id'] . '" LIMIT 1' @@ -6104,7 +5562,8 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.` $data = $this->impStats($data); unset($srune, $irun, $nrune, $ntrune, $addrune, $addrunes); $tid = mysql_query( - 'UPDATE `items_users` SET `delete` = "' . time() . '" WHERE `id` = "' . $rune['id'] . '" AND `uid` = "' . $this->info['id'] . '" LIMIT 1' + 'UPDATE `items_users` SET `delete` = "' . time( + ) . '" WHERE `id` = "' . $rune['id'] . '" AND `uid` = "' . $this->info['id'] . '" LIMIT 1' ); mysql_query( 'UPDATE `items_users` SET `data` = "' . $data . '" WHERE `id` = "' . $id['id'] . '" AND `uid` = "' . $this->info['id'] . '" LIMIT 1' @@ -6178,7 +5637,8 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.` $data = $this->impStats($data); mysql_query( - 'UPDATE `items_users` SET `delete` = "' . time() . '" WHERE `id` = "' . $rune['id'] . '" AND `uid` = "' . $this->info['id'] . '" LIMIT 1' + 'UPDATE `items_users` SET `delete` = "' . time( + ) . '" WHERE `id` = "' . $rune['id'] . '" AND `uid` = "' . $this->info['id'] . '" LIMIT 1' ); mysql_query( 'UPDATE `items_users` SET `data` = "' . $data . '" WHERE `id` = "' . $id['id'] . '" AND `uid` = "' . $this->info['id'] . '" LIMIT 1' @@ -6319,7 +5779,8 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.` $data = $this->impStats($data); mysql_query( - 'UPDATE `items_users` SET `delete` = "' . time() . '" WHERE `id` = "' . $rune['id'] . '" AND `uid` = "' . $this->info['id'] . '" LIMIT 1' + 'UPDATE `items_users` SET `delete` = "' . time( + ) . '" WHERE `id` = "' . $rune['id'] . '" AND `uid` = "' . $this->info['id'] . '" LIMIT 1' ); mysql_query( 'UPDATE `items_users` SET `data` = "' . $data . '" WHERE `id` = "' . $id['id'] . '" AND `uid` = "' . $this->info['id'] . '" LIMIT 1' @@ -6379,7 +5840,8 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.` unset($this->is['mab1'], $this->is['mab2'], $this->is['mab3'], $this->is['mab4']); mysql_query( - 'UPDATE `items_users` SET `delete` = "' . time() . '" WHERE `id` = "' . $rune['id'] . '" AND `uid` = "' . $this->info['id'] . '" LIMIT 1' + 'UPDATE `items_users` SET `delete` = "' . time( + ) . '" WHERE `id` = "' . $rune['id'] . '" AND `uid` = "' . $this->info['id'] . '" LIMIT 1' ); mysql_query( 'UPDATE `items_users` SET `data` = "' . $data . '" WHERE `id` = "' . $id['id'] . '" AND `uid` = "' . $this->info['id'] . '" LIMIT 1' @@ -6409,7 +5871,8 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.` 'UPDATE `items_users` SET `iznosNOW` = "' . $id['iznosNOW'] . '" WHERE `id` = "' . $id['id'] . '" AND `uid` = "' . $this->info['id'] . '" LIMIT 1' ); mysql_query( - 'UPDATE `items_users` SET `delete` = "' . time() . '" WHERE `id` = "' . $rune['id'] . '" AND `uid` = "' . $this->info['id'] . '" LIMIT 1' + 'UPDATE `items_users` SET `delete` = "' . time( + ) . '" WHERE `id` = "' . $rune['id'] . '" AND `uid` = "' . $this->info['id'] . '" LIMIT 1' ); $this->error = 'Предмет ' . $id['name'] . ' успешно отремонтирован.'; } else { @@ -6450,7 +5913,8 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.` $data = $this->impStats($data); mysql_query( - 'UPDATE `items_users` SET `delete` = "' . time() . '" WHERE `id` = "' . $rune['id'] . '" AND `uid` = "' . $this->info['id'] . '" LIMIT 1' + 'UPDATE `items_users` SET `delete` = "' . time( + ) . '" WHERE `id` = "' . $rune['id'] . '" AND `uid` = "' . $this->info['id'] . '" LIMIT 1' ); mysql_query( 'UPDATE `items_users` SET `data` = "' . $data . '",`time_create` = `time_create` + ' . floor( @@ -6517,7 +5981,8 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.` $data = $this->impStats($data); mysql_query( - 'UPDATE `items_users` SET `delete` = "' . time() . '" WHERE `id` = "' . $rune['id'] . '" AND `uid` = "' . $this->info['id'] . '" LIMIT 1' + 'UPDATE `items_users` SET `delete` = "' . time( + ) . '" WHERE `id` = "' . $rune['id'] . '" AND `uid` = "' . $this->info['id'] . '" LIMIT 1' ); mysql_query( 'UPDATE `items_users` SET `1price` = "' . $id['1price'] . '",`2price` = "' . $id['2price'] . '",`data` = "' . $data . '" WHERE `id` = "' . $id['id'] . '" AND `uid` = "' . $this->info['id'] . '" LIMIT 1' @@ -6568,7 +6033,8 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.` $this->error = 'Заточка "' . $id['name'] . '" прошла успешно! Колка:' . $data['tya1'] . ' Руб:' . $data['tya2'] . ' Дробь:' . $data['tya3'] . ' Реж:' . $data['tya4'] . ' '; $data = $this->impStats($data); mysql_query( - 'UPDATE `items_users` SET `delete` = "' . time() . '" WHERE `id` = "' . $rune['id'] . '" AND `uid` = "' . $this->info['id'] . '" LIMIT 1' + 'UPDATE `items_users` SET `delete` = "' . time( + ) . '" WHERE `id` = "' . $rune['id'] . '" AND `uid` = "' . $this->info['id'] . '" LIMIT 1' ); mysql_query( 'UPDATE `items_users` SET `1price` = "' . $id['1price'] . '",`2price` = "' . $id['2price'] . '",`data` = "' . $data . '" WHERE `id` = "' . $id['id'] . '" AND `uid` = "' . $this->info['id'] . '" LIMIT 1' @@ -6583,7 +6049,8 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.` $id['iznosNOW'] ) . '/' . round($id['iznosMAX']) . ']'; mysql_query( - 'UPDATE `items_users` SET `delete` = "' . time() . '" WHERE `id` = "' . $rune['id'] . '" AND `uid` = "' . $this->info['id'] . '" LIMIT 1' + 'UPDATE `items_users` SET `delete` = "' . time( + ) . '" WHERE `id` = "' . $rune['id'] . '" AND `uid` = "' . $this->info['id'] . '" LIMIT 1' ); mysql_query( 'UPDATE `items_users` SET `iznosNOW` = "' . $id['iznosNOW'] . '" WHERE `id` = "' . $id['id'] . '" AND `uid` = "' . $this->info['id'] . '" LIMIT 1' @@ -6626,7 +6093,8 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.` $data = $this->impStats($data); mysql_query( - 'UPDATE `items_users` SET `delete` = "' . time() . '" WHERE `id` = "' . $rune['id'] . '" AND `uid` = "' . $this->info['id'] . '" LIMIT 1' + 'UPDATE `items_users` SET `delete` = "' . time( + ) . '" WHERE `id` = "' . $rune['id'] . '" AND `uid` = "' . $this->info['id'] . '" LIMIT 1' ); mysql_query( 'UPDATE `items_users` SET `data` = "' . $data . '" WHERE `id` = "' . $id['id'] . '" AND `uid` = "' . $this->info['id'] . '" LIMIT 1' @@ -8236,9 +7704,11 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.` $itm['data'] = $this->lookStats($itm['data']); unset($itm['data']['frompisher']); $itm['data'] = $this->impStats($itm['data']); - if ($pl['data'] == $itm['data'] && $pl['name'] == $itm['name'] && $itm['iznosMAX'] == $pl['iznosMAX'] && $pl['iznosNOW'] == 0 && ($pl['timeOver'] == 0 || $pl['timeOver'] > time()) && $pl['gift'] == $itm['gift']) { + if ($pl['data'] == $itm['data'] && $pl['name'] == $itm['name'] && $itm['iznosMAX'] == $pl['iznosMAX'] && $pl['iznosNOW'] == 0 && ($pl['timeOver'] == 0 || $pl['timeOver'] > time( + )) && $pl['gift'] == $itm['gift']) { $upd = mysql_query( - 'UPDATE `items_users` SET `lastUPD` = "' . time() . '", `inGroup` = "' . $itm['inGroup'] . '" WHERE `id` = "' . $pl['id'] . '" LIMIT 1' + 'UPDATE `items_users` SET `lastUPD` = "' . time( + ) . '", `inGroup` = "' . $itm['inGroup'] . '" WHERE `id` = "' . $pl['id'] . '" LIMIT 1' ); if ($upd) { $j++; @@ -8284,7 +7754,8 @@ LIMIT 1' $j = 0; while ($pl = mysql_fetch_array($sp)) { $upd = mysql_query( - 'UPDATE `items_users` SET `inGroup` = "' . $inGroup . '", `lastUPD` = "' . time() . '" WHERE `id` = "' . $pl['id'] . '" LIMIT 1' + 'UPDATE `items_users` SET `inGroup` = "' . $inGroup . '", `lastUPD` = "' . time( + ) . '" WHERE `id` = "' . $pl['id'] . '" LIMIT 1' ); if ($upd) { $j++; @@ -8293,12 +7764,14 @@ LIMIT 1' } if ($this->itemsX($itm['id']) == 1) { mysql_query( - 'UPDATE `items_users` SET `inGroup` = "0", `lastUPD` = "' . time() . '" WHERE `id` = "' . $itm['id'] . '" LIMIT 1' + 'UPDATE `items_users` SET `inGroup` = "0", `lastUPD` = "' . time( + ) . '" WHERE `id` = "' . $itm['id'] . '" LIMIT 1' ); } if ($this->itemsX($pl['id']) == 1) { mysql_query( - 'UPDATE `items_users` SET `inGroup` = "0", `lastUPD` = "' . time() . '" WHERE `id` = "' . $pl['id'] . '" LIMIT 1' + 'UPDATE `items_users` SET `inGroup` = "0", `lastUPD` = "' . time( + ) . '" WHERE `id` = "' . $pl['id'] . '" LIMIT 1' ); } } @@ -8357,7 +7830,8 @@ LIMIT 1' `iu`.`id` AS `iduid`, `iu`.`time_sleep`,`im`.`id`,`im`.`name`,`im`.`img`,`im`.`type`,`im`.`inslot`,`im`.`2h`,`im`.`2too`,`im`.`iznosMAXi`,`im`.`inRazdel`,`im`.`price1`,`im`.`price2`,`im`.`pricerep`,`im`.`magic_chance`,`im`.`info`,`im`.`massa`,`im`.`level`,`im`.`magic_inci`,`im`.`overTypei`,`im`.`group`,`im`.`group_max`,`im`.`geni`,`im`.`ts`,`im`.`srok`,`im`.`class`,`im`.`class_point`,`im`.`anti_class`,`im`.`anti_class_point`,`im`.`max_text`,`im`.`useInBattle`,`im`.`lbtl`,`im`.`lvl_itm`,`im`.`lvl_exp`,`im`.`lvl_aexp`, `iu`.`id`,`iu`.`item_id`,`iu`.`1price`,`iu`.`2price`,`iu`.`uid`,`iu`.`use_text`,`iu`.`data`,`iu`.`inOdet`,`iu`.`inShop`,`iu`.`delete`,`iu`.`iznosNOW`,`iu`.`iznosMAX`,`iu`.`gift`,`iu`.`gtxt1`,`iu`.`gtxt2`,`iu`.`kolvo`,`iu`.`geniration`,`iu`.`magic_inc`,`iu`.`maidin`,`iu`.`lastUPD`,`iu`.`timeOver`,`iu`.`overType`,`iu`.`secret_id`,`iu`.`time_create`,`iu`.`time_sleep`,`iu`.`inGroup`,`iu`.`dn_delete`,`iu`.`inTransfer`,`iu`.`post_delivery`,`iu`.`lbtl_`,`iu`.`bexp`,`iu`.`so`,`iu`.`blvl` - FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`item_id`) WHERE (`iu`.`inOdet`!="0" OR `iu`.`data` LIKE "%srok%" OR `iu`.`data` LIKE "%vip_sale%" OR `iu`.`data` LIKE "%sudba=1%" OR ( `iu`.`data` LIKE "%zazuby=%" AND `iu`.`data` NOT LIKE "%srok=%" ) OR `iu`.`iznosNOW` > 0 OR `im`.`srok` > 0 OR (`iu`.`timeOver`<' . time() . ' AND `iu`.`timeOver`!="0")) AND `iu`.`uid`="' . $u['id'] . '" AND (`iu`.`delete`="0" OR `iu`.`delete`="1000")' + FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`item_id`) WHERE (`iu`.`inOdet`!="0" OR `iu`.`data` LIKE "%srok%" OR `iu`.`data` LIKE "%vip_sale%" OR `iu`.`data` LIKE "%sudba=1%" OR ( `iu`.`data` LIKE "%zazuby=%" AND `iu`.`data` NOT LIKE "%srok=%" ) OR `iu`.`iznosNOW` > 0 OR `im`.`srok` > 0 OR (`iu`.`timeOver`<' . time( + ) . ' AND `iu`.`timeOver`!="0")) AND `iu`.`uid`="' . $u['id'] . '" AND (`iu`.`delete`="0" OR `iu`.`delete`="1000")' ); while ($itm = mysql_fetch_array($cl)) { $po = []; @@ -8510,11 +7984,13 @@ LIMIT 1' $uid2 = ''; } $upd = mysql_query( - 'UPDATE `items_users` SET `delete`="' . time() . '",`timeOver`="1" WHERE `id` = "' . $it . '" ' . $uid2 . ' LIMIT 1' + 'UPDATE `items_users` SET `delete`="' . time( + ) . '",`timeOver`="1" WHERE `id` = "' . $it . '" ' . $uid2 . ' LIMIT 1' ); if ($upd) { $upd = mysql_query( - 'UPDATE `items_users` SET `inGroup`="0",`timeOver`="' . time() . '" WHERE `inGroup` = "' . $it . '" ' . $uid2 . '' + 'UPDATE `items_users` SET `inGroup`="0",`timeOver`="' . time( + ) . '" WHERE `inGroup` = "' . $it . '" ' . $uid2 . '' ); $this->addDelo( 2, $uid, @@ -9053,9 +8529,13 @@ LIMIT 1' ) ); if (isset($petimg['id'])) { - $anml = ''; + $anml = ''; } else { - $anml = ''; + $anml = ''; } } } @@ -9098,7 +8578,8 @@ LIMIT 1' `em`.`id2`,`em`.`mname`,`em`.`type1`,`em`.`img`,`em`.`mdata`,`em`.`actionTime`,`em`.`type2`,`em`.`type3`,`em`.`onlyOne`,`em`.`oneType`,`em`.`noAce`,`em`.`see`,`em`.`info`,`em`.`overch`,`em`.`bp`,`em`.`noch` FROM `eff_users` AS `eu` LEFT JOIN `eff_main` AS `em` ON (`eu`.`id_eff` = `em`.`id2`) WHERE `eu`.`uid`="' . mysql_real_escape_string( $u['id'] - ) . '" AND `delete`="0" AND `deactiveTime` < "' . time() . '" ORDER BY `deactiveTime` DESC,`timeUse` ASC' + ) . '" AND `delete`="0" AND `deactiveTime` < "' . time( + ) . '" ORDER BY `deactiveTime` DESC,`timeUse` ASC' ); while ($e = mysql_fetch_array($efs)) { $esee = 1; @@ -9487,7 +8968,9 @@ LIMIT 1' if ($i1 == 0 && $u['battle'] == 0) { - $rt[0] .= ''; + $rt[0] .= ''; } if ($ivv == 0 && $i1 == 0) { $rt[0] .= $this->info_remont(); @@ -9571,7 +9054,9 @@ LIMIT 1' $id_hod++; } mysql_query( - 'INSERT INTO `battle_logs` (`time`,`battle`,`id_hod`,`text`,`vars`,`zona1`,`zonb1`,`zona2`,`zonb2`,`type`) VALUES ("' . time() . '","' . $u['battle'] . '","' . ($id_hod) . '","{tm1} ' . $text . ' у персонажа {u1}.","login1=' . $u['login'] . '||t1=' . $u['team'] . '||time1=' . time() . '","","","","","6")' + 'INSERT INTO `battle_logs` (`time`,`battle`,`id_hod`,`text`,`vars`,`zona1`,`zonb1`,`zona2`,`zonb2`,`type`) VALUES ("' . time( + ) . '","' . $u['battle'] . '","' . ($id_hod) . '","{tm1} ' . $text . ' у персонажа {u1}.","login1=' . $u['login'] . '||t1=' . $u['team'] . '||time1=' . time( + ) . '","","","","","6")' ); } } @@ -9605,7 +9090,8 @@ LIMIT 1' ); if (isset($itm['id'])) { $upd = mysql_query( - 'UPDATE `items_users` SET `lastUPD`="' . time() . '",`inOdet`="0" WHERE `id`="' . $itm['id'] . '" LIMIT 1' + 'UPDATE `items_users` SET `lastUPD`="' . time( + ) . '",`inOdet`="0" WHERE `id`="' . $itm['id'] . '" LIMIT 1' ); if ($upd) { if (isset($_GET['remitem']) || isset($_GET['sid'])) { @@ -9739,7 +9225,8 @@ LIMIT 1' $io = ''; if ($itm['inGroup'] > 0) { mysql_query( - 'UPDATE `items_users` SET `lastUPD` = "' . time() . '",`inGroup` = "0", `delete` = "0" WHERE `id` = "' . $itm['id'] . '" LIMIT 1' + 'UPDATE `items_users` SET `lastUPD` = "' . time( + ) . '",`inGroup` = "0", `delete` = "0" WHERE `id` = "' . $itm['id'] . '" LIMIT 1' ); } if (file_exists('_incl_data/class/magic/' . $tr['items_in_file'] . '.php')) { @@ -9813,7 +9300,8 @@ LIMIT 1' if (isset($a['id'])) { $this->error = 'Ваш зверь "' . $a['name'] . '" странно позеленел...'; mysql_query( - 'UPDATE `users_animal` SET `eda` = 0, `yad` = "' . (time() + 86400 * 7) . '" WHERE `id` = "' . $a['id'] . '" LIMIT 1' + 'UPDATE `users_animal` SET `eda` = 0, `yad` = "' . (time( + ) + 86400 * 7) . '" WHERE `id` = "' . $a['id'] . '" LIMIT 1' ); } else { $this->error = 'Кто-то пытался отравить вашего зверя, которого у вас нет :)'; @@ -9903,7 +9391,8 @@ LIMIT 1' ); $this->error = 'Вам нехорошо...'; } elseif (mysql_query( - 'UPDATE `items_users` SET `uid` = "' . $this->info['id'] . '",`lastUPD` = "' . time() . '",`gift` = "' . $itm['gift'] . '",`gtxt1` = "' . $itm['gtxt1'] . '",`gtxt2` = "Предмет из упаковки. Дата запаковки: ' . date( + 'UPDATE `items_users` SET `uid` = "' . $this->info['id'] . '",`lastUPD` = "' . time( + ) . '",`gift` = "' . $itm['gift'] . '",`gtxt1` = "' . $itm['gtxt1'] . '",`gtxt2` = "Предмет из упаковки. Дата запаковки: ' . date( 'd.m.Y H:i:s', $itmin['time_create'] ) . '" WHERE `id` = "' . $itmin['id'] . '" LIMIT 1' )) { @@ -9934,7 +9423,8 @@ LIMIT 1' $pid = $this->addItem($s['id'], $this->info['id']); if ($pid > 0) { mysql_query( - 'UPDATE `items_users` SET `lastUPD` = "' . time() . '",`gift` = "' . $itm['gift'] . '" WHERE `id` = "' . $pid . '" AND `uid` = "' . $this->info['id'] . '" LIMIT 1' + 'UPDATE `items_users` SET `lastUPD` = "' . time( + ) . '",`gift` = "' . $itm['gift'] . '" WHERE `id` = "' . $pid . '" AND `uid` = "' . $this->info['id'] . '" LIMIT 1' ); } $j++; @@ -9946,7 +9436,8 @@ LIMIT 1' } if ($itm['inGroup'] > 0) { mysql_query( - 'UPDATE `items_users` SET `lastUPD` = "' . time() . '",`inGroup` = "0", `delete` = "0" WHERE `id` = "' . $itm['id'] . '" LIMIT 1' + 'UPDATE `items_users` SET `lastUPD` = "' . time( + ) . '",`inGroup` = "0", `delete` = "0" WHERE `id` = "' . $itm['id'] . '" LIMIT 1' ); } $this->deleteItem($itm['id'], $this->info['id']); @@ -10027,11 +9518,13 @@ LIMIT 1' $upd = mysql_query( - 'UPDATE `items_users` SET `lastUPD` = "' . time() . '", `inOdet` = "' . $inSlot . '"' . $msb . ' WHERE `id` = "' . $itm['id'] . '" LIMIT 1' + 'UPDATE `items_users` SET `lastUPD` = "' . time( + ) . '", `inOdet` = "' . $inSlot . '"' . $msb . ' WHERE `id` = "' . $itm['id'] . '" LIMIT 1' ); if ($itm['inGroup'] > 0) { mysql_query( - 'UPDATE `items_users` SET `lastUPD` = "' . time() . '", `inGroup` = 0, `delete` = 0 WHERE `id` = "' . $itm['id'] . '" LIMIT 1' + 'UPDATE `items_users` SET `lastUPD` = "' . time( + ) . '", `inGroup` = 0, `delete` = 0 WHERE `id` = "' . $itm['id'] . '" LIMIT 1' ); } if ($upd) { @@ -10071,12 +9564,14 @@ LIMIT 1' if ($coldel == 0) { //Удаляем целиком $upd = mysql_query( - 'UPDATE `items_users` SET `lastUPD`="' . time() . '",`delete`="' . time() . '" WHERE `id`="' . $itm['id'] . '" LIMIT 1' + 'UPDATE `items_users` SET `lastUPD`="' . time() . '",`delete`="' . time( + ) . '" WHERE `id`="' . $itm['id'] . '" LIMIT 1' ); $col = $this->itemsX($itm['id']); if ($col > 0) { mysql_query( - 'UPDATE `items_users` SET `lastUPD`="' . time() . '",`delete`="' . time() . '",`inGroup` = "0" WHERE `inGroup`="' . $itm['id'] . '" LIMIT ' . $col + 'UPDATE `items_users` SET `lastUPD`="' . time() . '",`delete`="' . time( + ) . '",`inGroup` = "0" WHERE `inGroup`="' . $itm['id'] . '" LIMIT ' . $col ); } } else { @@ -10085,19 +9580,23 @@ LIMIT 1' if ($col > 1) { if ($col <= $coldel) { $upd = mysql_query( - 'UPDATE `items_users` SET `lastUPD`="' . time() . '",`delete`="' . time() . '" WHERE `id`="' . $itm['id'] . '" LIMIT 1' + 'UPDATE `items_users` SET `lastUPD`="' . time() . '",`delete`="' . time( + ) . '" WHERE `id`="' . $itm['id'] . '" LIMIT 1' ); } $upd = mysql_query( - 'UPDATE `items_users` SET `lastUPD`="' . time() . '",`delete`="' . time() . '",`inGroup` = "0" WHERE `inGroup`="' . $itm['id'] . '" AND `delete` = "1000" LIMIT ' . $coldel + 'UPDATE `items_users` SET `lastUPD`="' . time() . '",`delete`="' . time( + ) . '",`inGroup` = "0" WHERE `inGroup`="' . $itm['id'] . '" AND `delete` = "1000" LIMIT ' . $coldel ); } else { //Удаляем целиком $upd = mysql_query( - 'UPDATE `items_users` SET `lastUPD`="' . time() . '",`delete`="' . time() . '" WHERE `id`="' . $itm['id'] . '" LIMIT 1' + 'UPDATE `items_users` SET `lastUPD`="' . time() . '",`delete`="' . time( + ) . '" WHERE `id`="' . $itm['id'] . '" LIMIT 1' ); $upd = mysql_query( - 'UPDATE `items_users` SET `lastUPD`="' . time() . '",`delete`="' . time() . '",`inGroup` = "0" WHERE `inGroup`="' . $itm['id'] . '" AND `delete` = "1000" LIMIT ' . $col + 'UPDATE `items_users` SET `lastUPD`="' . time() . '",`delete`="' . time( + ) . '",`inGroup` = "0" WHERE `inGroup`="' . $itm['id'] . '" AND `delete` = "1000" LIMIT ' . $col ); } } @@ -10115,12 +9614,14 @@ LIMIT 1' ); $col = $col[0]; mysql_query( - 'UPDATE `items_users` SET `lastUPD`="' . time() . '",`delete`="' . time() . '" WHERE `item_id`="' . $itm['item_id'] . '" AND `inOdet` = 0 AND `delete` < 100000 AND `uid` = "' . $itm['uid'] . '" AND `data` NOT LIKE "%nodelete%"' . $whr + 'UPDATE `items_users` SET `lastUPD`="' . time() . '",`delete`="' . time( + ) . '" WHERE `item_id`="' . $itm['item_id'] . '" AND `inOdet` = 0 AND `delete` < 100000 AND `uid` = "' . $itm['uid'] . '" AND `data` NOT LIKE "%nodelete%"' . $whr ); $this->error = 'Предметы "' . $itm['name'] . ' (x' . ($col + 1) . ')" выброшены'; $this->addDelo( 1, $uid, - '"System.inventory": Предметы "' . $itm['name'] . ' (x' . $col . ')" [itm:' . $itm['id'] . '=' . time() . '] были выброшены.', time(), + '"System.inventory": Предметы "' . $itm['name'] . ' (x' . $col . ')" [itm:' . $itm['id'] . '=' . time( + ) . '] были выброшены.', time(), $this->info['city'], 'System.inventory', 0, 0 ); } else { @@ -10225,6 +9726,7 @@ LIMIT 1' } if ($u['admin'] > 0) { + mysql_query( 'UPDATE `stats` SET `tactic1` = 25, @@ -10642,7 +10144,8 @@ LIMIT 1' `eu`.`id`,`eu`.`id_eff`,`eu`.`tr_life_user`,`eu`.`uid`,`eu`.`name`,`eu`.`data`,`eu`.`overType`,`eu`.`timeUse`,`eu`.`timeAce`,`eu`.`user_use`,`eu`.`delete`,`eu`.`v1`,`eu`.`v2`,`eu`.`img2`,`eu`.`x`,`eu`.`hod`,`eu`.`bj`,`eu`.`sleeptime`,`eu`.`no_Ace`, `em`.`id2`,`em`.`mname`,`em`.`type1`,`em`.`img`,`em`.`mdata`,`em`.`actionTime`,`em`.`type2`,`em`.`type3`,`em`.`onlyOne`,`em`.`oneType`,`em`.`noAce`,`em`.`see`,`em`.`info`,`em`.`overch`,`em`.`bp`,`em`.`noch` FROM `eff_users` AS `eu` LEFT JOIN `eff_main` AS `em` ON (`eu`.`id_eff` = `em`.`id2`) WHERE `eu`.`uid`="' . mysql_real_escape_string( $u['id'] - ) . '" AND `eu`.`delete`="0" AND `eu`.`deactiveTime` < "' . time() . '" AND `eu`.`v1`!="priem" ORDER BY `eu`.`id` DESC LIMIT 50' + ) . '" AND `eu`.`delete`="0" AND `eu`.`deactiveTime` < "' . time( + ) . '" AND `eu`.`v1`!="priem" ORDER BY `eu`.`id` DESC LIMIT 50' ); while ($e = mysql_fetch_array($efs)) { if ($u['dnow'] == 0) { @@ -10653,7 +10156,10 @@ LIMIT 1' //Переводим в заряды if ($e['v1'] != 'priem' && $e['hod'] != -1) { mysql_query( - 'UPDATE `eff_users` SET `hod` = "-1",`timeUse` = "' . (time() + ($e['hod'] * Config::get('effz')) - $e['actionTime']) . '" WHERE `id` = "' . $e['id'] . '" LIMIT 1' + 'UPDATE `eff_users` SET `hod` = "-1",`timeUse` = "' . (time( + ) + ($e['hod'] * Config::get( + 'effz' + )) - $e['actionTime']) . '" WHERE `id` = "' . $e['id'] . '" LIMIT 1' ); } } else { @@ -10661,7 +10167,9 @@ LIMIT 1' $efzz = round(($e['timeUse'] + $e['actionTime'] + $e['timeAce']) - time()); if ($efzz > 0) { mysql_query( - 'UPDATE `eff_users` SET `hod` = "' . ($efzz / Config::get('effz')) . '" WHERE `id` = "' . $e['id'] . '" LIMIT 1' + 'UPDATE `eff_users` SET `hod` = "' . ($efzz / Config::get( + 'effz' + )) . '" WHERE `id` = "' . $e['id'] . '" LIMIT 1' ); } } @@ -10824,7 +10332,8 @@ LIMIT 1' $efs = mysql_query( 'SELECT `eu`.`id`,`eu`.`id_eff`,`eu`.`uid`,`eu`.`name`,`eu`.`data`,`eu`.`overType`,`eu`.`timeUse`,`eu`.`timeAce`,`eu`.`user_use`,`eu`.`tr_life_user`,`eu`.`delete`,`eu`.`v1`,`eu`.`v2`,`eu`.`img2`,`eu`.`x`,`eu`.`hod`,`eu`.`bj`,`eu`.`sleeptime`,`eu`.`no_Ace` FROM `eff_users` AS `eu` WHERE `eu`.`uid`="' . mysql_real_escape_string( $u['id'] - ) . '" AND `eu`.`delete`="0" AND `eu`.`deactiveTime` < "' . time() . '" AND `eu`.`v1` = "priem" ORDER BY `eu`.`id` ASC' + ) . '" AND `eu`.`delete`="0" AND `eu`.`deactiveTime` < "' . time( + ) . '" AND `eu`.`v1` = "priem" ORDER BY `eu`.`id` ASC' ); $st['set_pog'] = []; $st['set_pog2'] = []; @@ -11707,7 +11216,10 @@ LIMIT 1' } elseif (time() >= ($this->info['upexpdate'] + 400 * 60 * 60 * 24)) { $this->info['upexpdate'] = time(); $this->info['expstopu'] = $this->info['expstopu'] + 1; - Db::sql('update stats set upexpdate = unix_timestamp(), expstopu = expstopu + 1 where id = ?', [$this->info['id']]); + Db::sql( + 'update stats set upexpdate = unix_timestamp(), expstopu = expstopu + 1 where id = ?', + [$this->info['id']] + ); } if ($this->info['expstopu'] < 3) { $this->info['exp'] = Config::get('expstop'); @@ -11744,13 +11256,16 @@ LIMIT 1' mysql_query( 'UPDATE `stats` SET `exp` = "12499" WHERE `id` = "' . $this->info['id'] . '" LIMIT 1' ); - echo ''; + echo ''; } else { mysql_query( - 'UPDATE `items_users` SET `delete` = "' . time() . '" WHERE `id` = "' . $itm['id'] . '" LIMIT 1' + 'UPDATE `items_users` SET `delete` = "' . time( + ) . '" WHERE `id` = "' . $itm['id'] . '" LIMIT 1' ); $text = 'Предмет "Кристалл Вечности [6]" был успешно использован.'; - echo ''; + echo ''; } } $i = 0; @@ -12210,7 +11725,8 @@ LIMIT 1' $po['toclan'] = $user['clan'] . '#' . $user['id']; $item_['data'] = $this->impStats($po); if (mysql_query( - 'UPDATE `items_users` SET `lastUPD` = "' . time() . '", `uid` = "-21' . $user['clan'] . '", `data` = "' . $item_['data'] . '" WHERE `id` = "' . $id . '" LIMIT 1' + 'UPDATE `items_users` SET `lastUPD` = "' . time( + ) . '", `uid` = "-21' . $user['clan'] . '", `data` = "' . $item_['data'] . '" WHERE `id` = "' . $id . '" LIMIT 1' )) { $r = 'Вы успешно пожертвовали предмет "' . $item_['name'] . '" клану
'; $col = $this->itemsX(((int)$id)); @@ -12220,18 +11736,21 @@ LIMIT 1' time(), $user['city'], 'System.transfer.clan', 0, 0 ); mysql_query( - 'INSERT INTO `clan_operations` (`clan`, `time`, `type`, `text`, `val`, `uid`) VALUES ("' . $res['id'] . '", "' . time() . '", "4", "' . $user['login'] . '", "' . $item_['name'] . ' (x' . $col . ') Ид : [' . $id . ']", "' . $user['id'] . '")' + 'INSERT INTO `clan_operations` (`clan`, `time`, `type`, `text`, `val`, `uid`) VALUES ("' . $res['id'] . '", "' . time( + ) . '", "4", "' . $user['login'] . '", "' . $item_['name'] . ' (x' . $col . ') Ид : [' . $id . ']", "' . $user['id'] . '")' ); } else { $r = 'Не удалось...
'; } } else { if (mysql_query( - 'UPDATE `items_users` SET `lastUPD` = "' . time() . '", `uid` = "-21' . $user['clan'] . '" WHERE `id` = "' . $id . '" LIMIT 1' + 'UPDATE `items_users` SET `lastUPD` = "' . time( + ) . '", `uid` = "-21' . $user['clan'] . '" WHERE `id` = "' . $id . '" LIMIT 1' )) { $col = $this->itemsX(((int)$id)); mysql_query( - 'INSERT INTO `clan_operations` (`clan`, `time`, `type`, `text`, `val`, `uid`) VALUES ("' . $res['id'] . '", "' . time() . '", "3", "' . $user['login'] . '", "' . $item_['name'] . '" (x' . $col . ') Ид : [' . $id . '], "' . $user['id'] . '")' + 'INSERT INTO `clan_operations` (`clan`, `time`, `type`, `text`, `val`, `uid`) VALUES ("' . $res['id'] . '", "' . time( + ) . '", "3", "' . $user['login'] . '", "' . $item_['name'] . '" (x' . $col . ') Ид : [' . $id . '], "' . $user['id'] . '")' ); $r = 'Вы успешно вернули предмет "' . $item_['name'] . '" в хранилище клана
'; } else { @@ -12269,10 +11788,12 @@ LIMIT 1' $r = 'Вы успешно изъяли предмет "' . $itm_['name'] . '"
'; $col = $this->itemsX(((int)$id)); mysql_query( - 'INSERT INTO `clan_operations` (`clan`, `time`, `type`, `text`, `val`, `uid`) VALUES ("' . $res['id'] . '", "' . time() . '", "6", "' . $user['login'] . '", "' . $itm_['name'] . ' (x' . $col . ') Ид : [' . $id . '] | У персонажа : [' . $itm_['uid'] . ']", "' . $user['id'] . '")' + 'INSERT INTO `clan_operations` (`clan`, `time`, `type`, `text`, `val`, `uid`) VALUES ("' . $res['id'] . '", "' . time( + ) . '", "6", "' . $user['login'] . '", "' . $itm_['name'] . ' (x' . $col . ') Ид : [' . $id . '] | У персонажа : [' . $itm_['uid'] . ']", "' . $user['id'] . '")' ); mysql_query( - 'UPDATE `items_users` SET `lastUPD` = "' . time() . '", `uid` = "-21' . $res['id'] . '" ' . $o . ' WHERE `id` = "' . $id . '" LIMIT 1' + 'UPDATE `items_users` SET `lastUPD` = "' . time( + ) . '", `uid` = "-21' . $res['id'] . '" ' . $o . ' WHERE `id` = "' . $id . '" LIMIT 1' ); } else { $r = 'Во время участия в турнире запрещено использовать клановое хранилище.
'; @@ -12300,10 +11821,12 @@ LIMIT 1' if ($user['inTurnir'] == 0 && $user['inTurnirnew'] == 0) { $col = $this->itemsX(((int)$id)); mysql_query( - 'INSERT INTO `clan_operations` (`clan`, `time`, `type`, `text`, `val`, `uid`) VALUES ("' . $res['id'] . '", "' . time() . '", "5", "' . $user['login'] . '", "' . $itm_['name'] . ' (x' . $col . ') Ид : [' . $id . '] Хозяин : [' . $cls . ']", "' . $user['id'] . '")' + 'INSERT INTO `clan_operations` (`clan`, `time`, `type`, `text`, `val`, `uid`) VALUES ("' . $res['id'] . '", "' . time( + ) . '", "5", "' . $user['login'] . '", "' . $itm_['name'] . ' (x' . $col . ') Ид : [' . $id . '] Хозяин : [' . $cls . ']", "' . $user['id'] . '")' ); mysql_query( - 'UPDATE `items_users` SET `lastUPD` = "' . time() . '", `uid` = "' . $user['id'] . '" WHERE `id` = "' . $id . '" LIMIT 1' + 'UPDATE `items_users` SET `lastUPD` = "' . time( + ) . '", `uid` = "' . $user['id'] . '" WHERE `id` = "' . $id . '" LIMIT 1' ); $r = 'Вы успешно взяли предмет "' . $itm_['name'] . '" из хранилища
'; } else { @@ -12339,10 +11862,12 @@ LIMIT 1' mysql_query('SELECT `name` FROM `items_main` WHERE `id` = "' . $pl['item_id'] . '"') ); mysql_query( - 'UPDATE `items_users` SET `lastUPD` = "' . time() . '", `uid` = "' . $user['id'] . '", `data` = "' . $pl['data'] . '" WHERE `id` = "' . $pl['id'] . '"' + 'UPDATE `items_users` SET `lastUPD` = "' . time( + ) . '", `uid` = "' . $user['id'] . '", `data` = "' . $pl['data'] . '" WHERE `id` = "' . $pl['id'] . '"' ); mysql_query( - 'INSERT INTO `clan_operations` (`clan`, `time`, `type`, `text`, `val`, `uid`) VALUES ("' . $res['id'] . '", "' . time() . '", "' . $type . '", "' . $user['login'] . '", "' . $it_n['name'] . ' (x' . $col . ') Ид : [' . $pl['id'] . ']", "' . $user['id'] . '")' + 'INSERT INTO `clan_operations` (`clan`, `time`, `type`, `text`, `val`, `uid`) VALUES ("' . $res['id'] . '", "' . time( + ) . '", "' . $type . '", "' . $user['login'] . '", "' . $it_n['name'] . ' (x' . $col . ') Ид : [' . $pl['id'] . ']", "' . $user['id'] . '")' ); } elseif ($pl['uid'] == $user['id']) { $col = $this->itemsX(((int)$pl['id'])); @@ -12350,10 +11875,12 @@ LIMIT 1' mysql_query('SELECT `name` FROM `items_main` WHERE `id` = "' . $pl['item_id'] . '"') ); mysql_query( - 'UPDATE `items_users` SET `lastUPD` = "' . time() . '", `uid` = "-21' . $user['clan'] . '" WHERE `id` = "' . $pl['id'] . '"' + 'UPDATE `items_users` SET `lastUPD` = "' . time( + ) . '", `uid` = "-21' . $user['clan'] . '" WHERE `id` = "' . $pl['id'] . '"' ); mysql_query( - 'INSERT INTO `clan_operations` (`clan`, `time`, `type`, `text`, `val`, `uid`) VALUES ("' . $res['id'] . '", "' . time() . '", "9", "' . $user['login'] . '", "' . $it_n['name'] . ' (x' . $col . ') Ид : [' . $pl['id'] . ']", "' . $user['id'] . '")' + 'INSERT INTO `clan_operations` (`clan`, `time`, `type`, `text`, `val`, `uid`) VALUES ("' . $res['id'] . '", "' . time( + ) . '", "9", "' . $user['login'] . '", "' . $it_n['name'] . ' (x' . $col . ') Ид : [' . $pl['id'] . ']", "' . $user['id'] . '")' ); } } diff --git a/_incl_data/class/UserRegister.php b/_incl_data/class/UserRegister.php index b5505237..7ca3975e 100644 --- a/_incl_data/class/UserRegister.php +++ b/_incl_data/class/UserRegister.php @@ -97,11 +97,8 @@ class UserRegister if ($isRegistered || $wasRegistered || $isRestricted) { $this->error = 'Логин ' . $login . ' уже занят, выберите другой.'; } - if (!$this->error) { - $this->login = $login; - return true; - } - return false; + + return !$this->error; } public function hasGoodEmail(string $email): bool @@ -118,11 +115,7 @@ class UserRegister if (!in_array(explode('@', $email)[1], $allowedDomains)) { $this->error = 'Данный почтовый сервис использовать нельзя.'; } - if (!$this->error) { - $this->email = $email; - return true; - } - return false; + return !$this->error; } public function hasGoodEmailCode(string $email, int $code): bool @@ -144,25 +137,17 @@ class UserRegister if (strlen($password1) < 8) { $this->error = 'Пароль должен быть больше 8 символов'; } - if (!$this->error) { - $this->password = password_hash($password1, PASSWORD_DEFAULT); - return true; - } - return false; + return !$this->error; } - public function new($ref, $birthday, int $sex, int $class): string + public function new(string $login, string $password, string $email, $ref, $birthday, int $sex, int $class): string { - if (!$this->login || - !$this->password || - !$this->email || - !in_array($sex, [10, 11]) || - !in_array($class, range(1, 9))) { + if (!$this->hasGoodLogin($login)) { //fixme: грязный хак, но лучше не придумывается с этой пошаговостью. return 0; } $this->class = $class; $ip = UserIp::get(); - $sex = (int)$sex - 10; //На входе 10\11, а передать надо 0\1. + $sex -= 10; //На входе 10\11, а передать надо 0\1. Db::sql( 'insert into users (`real`,login,host_reg,pass,ip,ipreg,room,timereg,mail,bithday,sex,fnq,molch2,level,clan_zv,money,online) @@ -179,6 +164,7 @@ class UserRegister ] ); $uid = Db::lastInsertId(); + $this->login = $login; $this->setCookies(); $this->setStatsItemsEffects(); User::setOnline($uid); @@ -190,7 +176,7 @@ class UserRegister { setcookie('login', 1, 1, '/', Config::get('host'), true); setcookie('registrationModal', 1, 1, '/', Config::get('host'), true); - setrawcookie('login', $this->login, strtotime('+7 days'), '/', Config::get('host'), true); + setcookie('login', $this->login, strtotime('+7 days'), '/', Config::get('host'), true); setcookie('registrationModal', 'true', strtotime('+7 days'), '/', Config::get('host'), true); } diff --git a/_incl_data/class/__db_connect.php b/_incl_data/class/__db_connect.php index c225cab3..eba7dba9 100644 --- a/_incl_data/class/__db_connect.php +++ b/_incl_data/class/__db_connect.php @@ -15,4 +15,4 @@ include_once dirname(__DIR__) . DIRECTORY_SEPARATOR . 'mysql_override.php'; $dbgo = mysql_connect($db['s'], $db['u'], $db['p']); mysql_select_db($db['d'], $dbgo); -mysql_query('SET NAMES cp1251'); +mysql_query('set names utf8mb4'); diff --git a/_incl_data/class/dnaction/_dungeon_replace.php b/_incl_data/class/dnaction/_dungeon_replace.php index 97bb1c55..39dc3452 100644 --- a/_incl_data/class/dnaction/_dungeon_replace.php +++ b/_incl_data/class/dnaction/_dungeon_replace.php @@ -302,7 +302,6 @@ function getImg($id, $num) { - diff --git a/_incl_data/mails.php b/_incl_data/mails.php index 79f521e1..62a5d713 100644 --- a/_incl_data/mails.php +++ b/_incl_data/mails.php @@ -4,8 +4,6 @@ function mails($to, $message, $subject = 'Бойцовский клуб') { require '_incl_data/class/mail/class.phpmailer.php'; - $message = mb_convert_encoding($message, 'UTF-8', 'CP1251'); - $subject = mb_convert_encoding($subject, 'UTF-8', 'CP1251'); $mail = new PHPMailer; $mail->IsSMTP(); // Set mailer to use SMTP @@ -18,8 +16,8 @@ function mails($to, $message, $subject = 'Бойцовский клуб') $mail->CharSet = 'UTF-8'; $mail->From = 'newcombats@yahoo.com'; - $mail->FromName = mb_convert_encoding('Бойцовский Клуб', 'UTF-8', 'CP1251'); - $mail->AddAddress($to); // Add a recipient + $mail->FromName = 'Бойцовский Клуб'; + $mail->AddAddress($to); // Add a recipient $mail->IsHTML(true); // Set email format to HTML diff --git a/_incl_data/mysql_override.php b/_incl_data/mysql_override.php index 8bb9f344..752c8904 100644 --- a/_incl_data/mysql_override.php +++ b/_incl_data/mysql_override.php @@ -6,9 +6,6 @@ * @version 0.1 */ -//ini_set('default_charset', 'windows-1251'); -//ini_set('date.timezone', 'Europe/Moscow'); - // Make sure the MySQL extension is not loaded and there is no other drop in replacement active if (!extension_loaded('mysql') && !function_exists('mysql_connect')) { // Validate if the MySQLi extension is present diff --git a/adminion/balance.php b/adminion/balance.php index 42f78e65..516d6fc9 100644 --- a/adminion/balance.php +++ b/adminion/balance.php @@ -161,7 +161,7 @@ $plus = $plus[0]; - + Отчетность проекта - -
- - - - - -
-
-

Банк

-
-
-
- - - - - -
  - - - -
- - - - - - -
- - - - -
Страшилкина улица
-
- - - - - - - - - - -
-
- '.$re2.'
'; } - if(!isset($u->bank['id'])) - { - ?> - Мы предоставляем следующие услуги: -
    -
  1. Открытие счета
  2. Возможность положить/снять кредиты/еврокредиты со счета -
  3. Перевести кредиты/еврокредиты с одного счета на другой -
  4. Обменный пункт. Обмен еврокредитов на кредиты -
- - -
- Хотите открыть свой счет? Услуга платная: - -
-
-
-
Управление счетом - - -
- - - - - -
Номер счета
Пароль
-
-
-
-
- > -
-
- Забыли пароль? Можно его выслать на email, номер счета:
-
-
- - - - -
- - - - - - - -

Управление счетом

  -Счёт №: bank['id']); ?> [x]
-
-
-
У вас на счете - - - - - - - - - -
Кредитов:round2($u->bank['money1']); ?>
Еврокредитов:round2($u->bank['money2']); ?>

При себе наличных:round2($u->info['money']); ?> кр.
При себе наличных:round2($u->info['money2']); ?> Екр.
-
-
-
Внимание! Некоторые услуги банка платные, о размере взымаемой комиссии написано в соответствующем разделе.
- - - - - - -
- - - - - - - - - - info['align']!=2 && $u->info['haos'] < time() && $u->info['haos'] != 1 && $c['crtoecr'] > 0) { ?> - - - - info['admin']>1000) - { - ?> - - - - - - - - - - -
- Пополнить счет - Сумма - - кр. - -
- Сумма - - Екр. - -
-
- Перевести кредиты на другой счет - Сумма - - кр.
- Номер счета куда перевести кредиты - -
- -
- Комиссия составляет 3.00 % от суммы, но не менее 1.00 кр. -
- Обменный пункт - Обменять еврокредиты на кредиты.
- Курс 1 екр. = .00 кр.
- Сумма - - екр. - /> -
- Обменный пункт - Обменять кредиты на еврокредиты.
- Курс кр. = 1.00 екр.
- Сумма - - кр. -
- Комиссия составляет 3.00 % от суммы, а так-же 5.00 кр. - -
- Перевести еврокредиты на другой счет - Сумма - - екр.
- Номер счета куда перевести кредиты - -
- -
- Комиссия составляет 0.00 % от суммы, но не менее 0.01 екр. -
- Настройки - У вас разрешена высылка номера счета и пароля на email. Если вы не уверены в своем email, или убеждены, что не забудете свой номер счета и пароль к нему, то можете запретить высылку пароля на email. Это убережет вас от кражи кредитов с вашего счета в случае взлома вашего email. Но если вы сами забудете свой номер счета и/или пароль, вам уже никто не поможет!
- -
- Сменить пароль
- - - - - - - - - -
Новый пароль
Введите новый пароль повторно
- -
- -
 
-
- - - - - - - - - - - - -
- Снять со счета - Сумма - - кр. - -
- Сумма - - Eкр. - -
-
- Курс еврокредита к мировой валюте - - - - - - - - - - - - - - - - - - - - - - - -
Данные на без учета комиссий
1 екр. =
10UAH = 1 Еврокредит
0.35USD = 1 Еврокредит
20RUB = 1 Еврокредит
0.29EUR = 1 Еврокредит
-
- Последние операции - - info['id'].'" AND `dop` = "'.$u->bank['id'].'" AND `type` = "3" ORDER BY `time` DESC LIMIT 21'); - while($pl = mysql_fetch_array($sp)) - { - ?> - - - - -
'.date('d.m.Y H:i',$pl['time']).' '; echo $pl['text']; ?>
-
-
-Сумма указанная в окне оповещения и суммы взымаемая\начисляемая могут различаться. - \ No newline at end of file diff --git a/modules_data/location/bank.php b/modules_data/location/bank.php index a49baa10..5d3524be 100644 --- a/modules_data/location/bank.php +++ b/modules_data/location/bank.php @@ -148,7 +148,7 @@ if ($u->room['file'] == 'bank') { $re2 = 'У вас недостаточно кр.'; } elseif ($u->info['align'] != 2) { $pass = rand(10000, 91191); - $pass = htmlspecialchars($_POST['pass1'], null, 'cp1251'); + $pass = htmlspecialchars($_POST['pass1'], null); $ins = mysql_query( 'INSERT INTO `bank` (`uid`,`create`,`pass`) VALUES ("' . $u->info['id'] . '","' . time( ) . '","' . mysql_real_escape_string($pass) . '")' diff --git a/modules_data/location/btl_.php b/modules_data/location/btl_.php index 695ebc30..5d9d6352 100644 --- a/modules_data/location/btl_.php +++ b/modules_data/location/btl_.php @@ -260,14 +260,10 @@ echo ''; function ($m) {return chr(hexdec($m[1]) - 1072 + 224);}, $str ); -// $str = preg_replace_callback( -// '/\\\u([a-f0-9]{4})/i', create_function('$m', 'return chr(hexdec($m[1])-1072+224);'), $str -// ); -// return $str; } ?> - var log_text = ; + var log_text = ; var youlogin = "info['login']?>"; function looklogrep(text, vars) { diff --git a/modules_data/location/commision2.php b/modules_data/location/commision2.php index d64879da..f0b2cd0f 100644 --- a/modules_data/location/commision2.php +++ b/modules_data/location/commision2.php @@ -1,278 +1,334 @@ room['file'] == 'commision2') { + if (isset($u->stats['shopSale'], $_GET['sale'])) { + $bns = 0 + $u->stats['shopSale']; + if ($bns != 0) { + if ($bns > 0) { + $bns = '+' . $bns; + } + $shopProcent -= $bns; + if ($shopProcent > 99) { + $shopProcent = 99; + } + if ($shopProcent < 1) { + $shopProcent = 1; + } + echo '
У Вас действует бонус при продаже: ' . $bns . '%
Вы сможете продавать предметы за ' . (100 - $shopProcent) . '% от их стоимости
'; + } + } + + if (!isset($_GET['otdel'])) { + $_GET['otdel'] = 1; + } + $sid = 1; + $error = ''; + + # Выполнение функции покупки предмета + if (isset($_GET['buy'])) { + if ($u->info['allLock'] > time()) { + $re = '
Вам запрещается пользоваться данным магазином до ' . date( + 'd.m.y H:i', $u->info['allLock'] + ) . '
'; + } elseif ($u->info['align'] == 2 || $u->info['haos'] > time()) { + $re = '
Хаосникам запрещается пользоваться данным магазином
'; + /* }elseif($u->info['palpro'] < time()) { //Проверка + $re = '
Для покупки в комиссионном нужно пройти проверку на чистоту
';*/ + } elseif ($u->newAct($_GET['sd4']) == true) { + $re = $u->buyItemCommison($sid, (int)$_GET['itemid'], (int)$_GET['buy']); + } else { + $re = 'Вы уверены что хотите купить этот предмет?'; + } + } + + /* + *Выполнение функции "положить предмет в комисионку" + *Или забрать предме из коммисионки. + */ + //ТУТ комок здача + + if ($u->info['align'] == 2 || $u->info['haos'] > time()) { + $re = '
Хаосникам запрещается пользоваться данным магазином
'; + } elseif (isset($_POST['PresTR'])) { + $itemid = mysql_fetch_array( + mysql_query( + 'SELECT `inGroup`, `item_id` , `uid` FROM `items_users` WHERE `id` = "' . $_POST['iid'] . '" LIMIT 1' + ) + ); + $itemcount = mysql_fetch_array( + mysql_query( + 'SELECT COUNT(*) AS `total` FROM `items_users` WHERE `item_id` = "' . $itemid['item_id'] . '" AND `inGroup` = "' . $itemid['inGroup'] . '" AND `uid`="' . $itemid['uid'] . '" LIMIT 1' + ) + ); + $itemkt = mysql_fetch_array( + mysql_query('SELECT * FROM `kom_price` WHERE `id` = "' . $itemid['item_id'] . '" LIMIT 1') + ); //id min max + if (isset($_POST['summTR'])) { + if ($itemcount['total'] == 0 || $itemid['inGroup'] == 0) { + $itemcount['total'] = 1; + } + $itemkt['min'] = $itemkt['min'] * $itemcount['total']; + $itemkt['max'] = $itemkt['max'] * $itemcount['total']; + if ($_POST['summTR'] >= $itemkt['min'] && $_POST['summTR'] <= $itemkt['max']) { + $u->commisonRent(mysql_real_escape_string($_POST['PresTR']), (int)$_POST['iid'], (int)$_POST['summTR']); + } else { + $re = '
Не удалось сдать предмет его цена может быть мин: ' . $itemkt['min'] . 'кр. макс: ' . $itemkt['max'] . 'кр. кол-во: ' . $itemcount['total'] . '
'; + } + } else { + $u->commisonRent(mysql_real_escape_string($_POST['PresTR']), (int)$_POST['iid'], (int)$_POST['summTR']); + } + + } + + if ($re != '') { + echo '
' . $re . '
'; + } ?> + + + + + + +
' . $error . ''; + ?> +
+ + + + + + +
+ + + + + + + + +
+ 'Отдел "Прочие предметы"', 1 => 'Отдел "Оружие: кастеты,ножи"', 2 => 'Отдел "Оружие: топоры"', 3 => 'Отдел "Оружие: дубины,булавы"', 4 => 'Отдел "Оружие: мечи"', 5 => 'Отдел "Оружие: магические посохи"', 6 => 'Отдел "Одежда: сапоги"', 7 => 'Отдел "Одежда: перчатки"', 8 => 'Отдел "Одежда: рубахи"', 9 => 'Отдел "Одежда: легкая броня"', 10 => 'Отдел "Одежда: тяжелая броня"', 11 => 'Отдел "Одежда: шлемы"', 12 => 'Отдел "Одежда: наручи"', 13 => 'Отдел "Одежда: пояса"', 14 => 'Отдел "Одежда: поножи"', 15 => 'Отдел "Щиты"', 16 => 'Отдел "Ювелирные товары: серьги"', 17 => 'Отдел "Ювелирные товары: ожерелья"', 18 => 'Отдел "Ювелирные товары: кольца"', 19 => 'Отдел "Заклинания: нейтральные"', 20 => 'Отдел "Заклинания: боевые и защитные"', 21 => 'Отдел "Амуниция"', 22 => 'Отдел "Эликсиры"', 23 => 'Отдел "Подарки"', 24 => 'Отдел "Подарки: недобрые"', 25 => 'Отдел "Подарки: упаковка"', 26 => 'Отдел "Подарки: открытки"', 27 => 'Отдел "Подарки: фейерверки"']; + if (isset($otdels_small_array[$_GET['otdel']])) { + echo $otdels_small_array[$_GET['otdel']]; + } + } + ?> +
+ + + commisionShop($sid, "preview"); + + } elseif ($_GET['toRent'] == 1) { + /* + * Выводим вещи из инвентарая + * которые хотим сдать в комок + */ + if ($u->info['allLock'] < time()) { + $itmAll = $u->genInv( + 30, + '`iu`.`uid`="' . $u->info['id'] . '" AND `iu`.`delete`="0" AND `iu`.`inOdet`="0" AND `iu`.`inShop`="0" AND `iu`.`gift` = "" ORDER BY `lastUPD` DESC' + ); + } else { + $itmAll[0] = 0; + } + if ($itmAll[0] == 0) { + $itmAllSee = ''; + } else { + $itmAllSee = $itmAll[2]; + } + echo $itmAllSee; + } elseif ($_GET['toRent'] == 2) { + /* + * Выводим вещи которые мы сдали в комок + */ + $itmAll = $u->genInv( + 31, + '`iu`.`uid`="' . $u->info['id'] . '" AND `iu`.`delete`="0" AND `iu`.`inOdet`="0" AND `iu`.`inShop`="30" AND `iu`.`gift` = "" ORDER BY `lastUPD` DESC' + ); + if ($itmAll[0] == 0) { + $itmAllSee = ''; + } else { + $itmAllSee = $itmAll[2]; + } + echo $itmAllSee; + } elseif ($_GET['toRent'] == 3) { + /* + * Выводим полный перечень вещей + * продоваемых в комке по определенному + * выбранному айтему + */ + $comshop->commisionShop($sid); + } + ?> +
ПУСТО
ПУСТО
+
+
+
+ + + +
  + + + +
+ + + + + + + +
+ + + + + +
Центральная Площадь +
+
+
+
+
+
+
+ + Масса: aves['now'] ?>/aves['max'] ?>  
+ У вас в наличии: info['money'], 2); ?>кр. +   +
+
+
+    '; + ?> +
+
+
Отделы магазина
+
+
+ 'Оружие: кастеты,ножи', 2 => '     топоры', 3 => '     дубины,булавы', 4 => '     мечи', 5 => '     магические посохи', 6 => 'Одежда: сапоги', 7 => '     перчатки', 8 => '     рубахи', 9 => '     легкая броня', 10 => '     тяжелая броня', 11 => '     шлемы', 12 => '     наручи', 13 => '     пояса', 14 => '     поножи', 15 => 'Щиты', 16 => 'Ювелирные товары: серьги', 17 => '     ожерелья', 18 => '     кольца', 19 => 'Заклинания', 20 => 'Эликсиры']; + $i = 1; + while ($i != -1) { + if (isset($otdels_array[$i])) { + if (isset($_GET['otdel']) && $_GET['otdel'] == $i) { + $color = 'C7C7C7'; + } else { + $color = 'e2e0e0'; + } + echo ''; + } else { + $i = -2; + } + $i++; + } + if (isset($_GET['otdel']) && $_GET['otdel'] == 1050) { + $color = 'C7C7C7'; + } else { + $color = 'e2e0e0'; + } + echo ''; + ?> +
+
+
+ + -if($u->room['file']=='commision2'){ - if(isset($u->stats['shopSale'],$_GET['sale'])){ - $bns = 0+$u->stats['shopSale']; - if($bns!=0){ - if($bns>0){ - $bns = '+'.$bns; - } - $shopProcent -= $bns; - if($shopProcent>99){ $shopProcent = 99; } - if($shopProcent<1){ $shopProcent = 1; } - echo '
У Вас действует бонус при продаже: '.$bns.'%
Вы сможете продавать предметы за '.(100-$shopProcent).'% от их стоимости
'; - } - } - - if(!isset($_GET['otdel'])) $_GET['otdel'] = 1; - $sid = 1; - $error = ''; - - # Выполнение функции покупки предмета - if(isset($_GET['buy'])){ - if($u->info['allLock'] > time()) { - $re = '
Вам запрещается пользоваться данным магазином до '.date('d.m.y H:i',$u->info['allLock']).'
'; - }elseif($u->info['align'] == 2 || $u->info['haos'] > time()) { - $re = '
Хаосникам запрещается пользоваться данным магазином
'; - /* }elseif($u->info['palpro'] < time()) { //Проверка - $re = '
Для покупки в комиссионном нужно пройти проверку на чистоту
';*/ - }elseif($u->newAct($_GET['sd4'])==true){ - $re = $u->buyItemCommison($sid,(int)$_GET['itemid'],(int)$_GET['buy']); - }else{ - $re = 'Вы уверены что хотите купить этот предмет?'; - } - } - - /* - *Выполнение функции "положить предмет в комисионку" - *Или забрать предме из коммисионки. - */ - //ТУТ комок здача - - if($u->info['align'] == 2 || $u->info['haos'] > time()) { - $re = '
Хаосникам запрещается пользоваться данным магазином
'; - }elseif(isset($_POST['PresTR'])){ - $itemid = mysql_fetch_array(mysql_query('SELECT `inGroup`, `item_id` , `uid` FROM `items_users` WHERE `id` = "'.$_POST['iid'].'" LIMIT 1')); - $itemcount = mysql_fetch_array(mysql_query('SELECT COUNT(*) AS `total` FROM `items_users` WHERE `item_id` = "'.$itemid['item_id'].'" AND `inGroup` = "'.$itemid['inGroup'].'" AND `uid`="'.$itemid['uid'].'" LIMIT 1')); - $itemkt = mysql_fetch_array(mysql_query('SELECT * FROM `kom_price` WHERE `id` = "'.$itemid['item_id'].'" LIMIT 1')); //id min max - if (isset($_POST['summTR'])) - { - if ($itemcount['total']==0 || $itemid['inGroup']==0){$itemcount['total']=1;} - $itemkt['min'] = $itemkt['min']*$itemcount['total']; - $itemkt['max'] = $itemkt['max']*$itemcount['total']; - if ( $_POST['summTR']>=$itemkt['min'] && $_POST['summTR']<=$itemkt['max'] ) - { - $u->commisonRent(mysql_real_escape_string($_POST['PresTR']),(int)$_POST['iid'],(int)$_POST['summTR']); - } - else - { - $re = '
Не удалось сдать предмет его цена может быть мин: '.$itemkt['min'].'кр. макс: '.$itemkt['max'].'кр. кол-во: '.$itemcount['total'].'
'; - } - } - else - { - $u->commisonRent(mysql_real_escape_string($_POST['PresTR']),(int)$_POST['iid'],(int)$_POST['summTR']); - } - - } - - if($re!=''){ echo '
'.$re.'
'; } ?> - - - - - -
'.$error.''; - ?> -
- - - - - - -
- - - - - - -
- 'Отдел "Прочие предметы"',1=>'Отдел "Оружие: кастеты,ножи"',2=>'Отдел "Оружие: топоры"',3=>'Отдел "Оружие: дубины,булавы"',4=>'Отдел "Оружие: мечи"',5=>'Отдел "Оружие: магические посохи"',6=>'Отдел "Одежда: сапоги"',7=>'Отдел "Одежда: перчатки"',8=>'Отдел "Одежда: рубахи"',9=>'Отдел "Одежда: легкая броня"',10=>'Отдел "Одежда: тяжелая броня"',11=>'Отдел "Одежда: шлемы"',12=>'Отдел "Одежда: наручи"',13=>'Отдел "Одежда: пояса"',14=>'Отдел "Одежда: поножи"',15=>'Отдел "Щиты"',16=>'Отдел "Ювелирные товары: серьги"',17=>'Отдел "Ювелирные товары: ожерелья"',18=>'Отдел "Ювелирные товары: кольца"',19=>'Отдел "Заклинания: нейтральные"',20=>'Отдел "Заклинания: боевые и защитные"',21=>'Отдел "Амуниция"',22=>'Отдел "Эликсиры"',23=>'Отдел "Подарки"',24=>'Отдел "Подарки: недобрые"',25=>'Отдел "Подарки: упаковка"',26=>'Отдел "Подарки: открытки"',27=>'Отдел "Подарки: фейерверки"'); - if(isset($otdels_small_array[$_GET['otdel']])){ - echo $otdels_small_array[$_GET['otdel']]; - } - } - ?> -
- - - commisionShop($sid,"preview"); - //$u->commisionShop($sid,"full"); - }elseif($_GET['toRent'] == 1){ - /* - * Выводим вещи из инвентарая - * которые хотим сдать в комок - */ - if($u->info['allLock'] < time()) { - $itmAll = $u->genInv(30,'`iu`.`uid`="'.$u->info['id'].'" AND `iu`.`delete`="0" AND `iu`.`inOdet`="0" AND `iu`.`inShop`="0" AND `iu`.`gift` = "" ORDER BY `lastUPD` DESC'); - } else { - $itmAll[0] = 0; - } - if($itmAll[0]==0){ - $itmAllSee = ''; - }else{ - $itmAllSee = $itmAll[2]; - } - echo $itmAllSee; - }elseif($_GET['toRent'] == 2){ - /* - * Выводим вещи которые мы сдали в комок - */ - $itmAll = $u->genInv(31,'`iu`.`uid`="'.$u->info['id'].'" AND `iu`.`delete`="0" AND `iu`.`inOdet`="0" AND `iu`.`inShop`="30" AND `iu`.`gift` = "" ORDER BY `lastUPD` DESC'); - if($itmAll[0]==0){ - $itmAllSee = ''; - }else{ - $itmAllSee = $itmAll[2]; - } - echo $itmAllSee; - }elseif($_GET['toRent'] == 3){ - /* - * Выводим полный перечень вещей - * продоваемых в комке по определенному - * выбранному айтему - */ - $u->commisionShop($sid,"full"); - } - ?> -
ПУСТО
ПУСТО
-
-
-
-
  - - -
- - - - - - - -
- - - - - -
Центральная Площадь
-
-
-
-
-
-
- - Масса: aves['now']?>/aves['max']?>  
- У вас в наличии: info['money'],2); ?> кр.   -
-
-
-    '; - // echo '   '; - // "if(confirm(\'Предупреждаем если вы сдадите "Гос вещи " они обесценятся\')) location.href=\'?toRent=1\';" - ?> -
-
Отделы магазина
-
- 'Оружие: кастеты,ножи',2=>'     топоры',3=>'     дубины,булавы',4=>'     мечи',5=>'     магические посохи',6=>'Одежда: сапоги',7=>'     перчатки',8=>'     рубахи',9=>'     легкая броня',10=>'     тяжелая броня',11=>'     шлемы',12=>'     наручи',13=>'     пояса',14=>'     поножи',15=>'Щиты',16=>'Ювелирные товары: серьги',17=>'     ожерелья',18=>'     кольца',19=>'Заклинания',20=>'Эликсиры'); - $i=1; - while ($i!=-1){ - if(isset($otdels_array[$i])){ - if(isset($_GET['otdel']) && $_GET['otdel']==$i) { - $color = 'C7C7C7'; - } else { - $color = 'e2e0e0'; - } - echo ''; - } else { - $i = -2; - } - $i++; - } - if(isset($_GET['otdel']) && $_GET['otdel']==1050) { - $color = 'C7C7C7'; - } else { - $color = 'e2e0e0'; - } - echo ''; - ?> -
-
-
- - \ No newline at end of file diff --git a/modules_data/location/dungeon_enter.php b/modules_data/location/dungeon_enter.php index 57b7ace7..8980eb7e 100644 --- a/modules_data/location/dungeon_enter.php +++ b/modules_data/location/dungeon_enter.php @@ -462,7 +462,7 @@ while( $pl = mysql_fetch_array( $sp ) ){ $pl['dcom'] = $u->info['id']; } } - $pl['com'] = htmlspecialchars($pl['com'],NULL,'cp1251'); + $pl['com'] = htmlspecialchars($pl['com'],NULL); if( $pl['dcom'] > 0 ) { $dl = ' комментарий удален модератором'; } diff --git a/modules_data/location/dungeon_enter_all.php b/modules_data/location/dungeon_enter_all.php index 56340781..c7522b39 100644 --- a/modules_data/location/dungeon_enter_all.php +++ b/modules_data/location/dungeon_enter_all.php @@ -531,7 +531,7 @@ while( $pl = mysql_fetch_array( $sp ) ){ $pl['dcom'] = $u->info['id']; } } - $pl['com'] = htmlspecialchars($pl['com'],NULL,'cp1251'); + $pl['com'] = htmlspecialchars($pl['com'],NULL); if( $pl['dcom'] > 0 ) { $dl = ' комментарий удален модератором'; } diff --git a/modules_data/location/elka.php b/modules_data/location/elka.php index a3a9c0c1..b6307216 100644 --- a/modules_data/location/elka.php +++ b/modules_data/location/elka.php @@ -109,7 +109,7 @@ if($u->room['file']=='elka') } }elseif(isset($_POST['message'])) { - $_POST['message'] = htmlspecialchars($_POST['message'],NULL,'cp1251'); + $_POST['message'] = htmlspecialchars($_POST['message'],NULL); if($_POST['message']!='') { $dy = 1; diff --git a/modules_data/location/enterbezdna.php b/modules_data/location/enterbezdna.php index acc1f374..71cb50f5 100644 --- a/modules_data/location/enterbezdna.php +++ b/modules_data/location/enterbezdna.php @@ -303,7 +303,7 @@ while($pl = mysql_fetch_array($sp)) } } - $pl['com'] = htmlspecialchars($pl['com'],NULL,'cp1251'); + $pl['com'] = htmlspecialchars($pl['com'],NULL); if($pl['dcom']>0) { diff --git a/modules_data/location/entercat.php b/modules_data/location/entercat.php index 28a7a268..aeb824b6 100644 --- a/modules_data/location/entercat.php +++ b/modules_data/location/entercat.php @@ -229,7 +229,7 @@ while($pl = mysql_fetch_array($sp)) } } - $pl['com'] = htmlspecialchars($pl['com'],NULL,'cp1251'); + $pl['com'] = htmlspecialchars($pl['com'],NULL); if($pl['dcom']>0) { diff --git a/modules_data/location/enterdrago.php b/modules_data/location/enterdrago.php index fdfdd8bc..94d38d1c 100644 --- a/modules_data/location/enterdrago.php +++ b/modules_data/location/enterdrago.php @@ -447,7 +447,7 @@ while( $pl = mysql_fetch_array( $sp ) ) { $pl['dcom'] = $u->info['id']; } } - $pl['com'] = htmlspecialchars($pl['com'],NULL,'cp1251'); + $pl['com'] = htmlspecialchars($pl['com'],NULL); if( $pl['dcom'] > 0 ) { $dl = ' комментарий удален модератором'; } diff --git a/modules_data/location/entergrib.php b/modules_data/location/entergrib.php index cfb3aeb3..03a621a2 100644 --- a/modules_data/location/entergrib.php +++ b/modules_data/location/entergrib.php @@ -230,7 +230,7 @@ while($pl = mysql_fetch_array($sp)) } } - $pl['com'] = htmlspecialchars($pl['com'],NULL,'cp1251'); + $pl['com'] = htmlspecialchars($pl['com'],NULL); if($pl['dcom']>0) { diff --git a/modules_data/location/enternekro.php b/modules_data/location/enternekro.php index f18acd2d..93e99642 100644 --- a/modules_data/location/enternekro.php +++ b/modules_data/location/enternekro.php @@ -230,7 +230,7 @@ while($pl = mysql_fetch_array($sp)) } } - $pl['com'] = htmlspecialchars($pl['com'],NULL,'cp1251'); + $pl['com'] = htmlspecialchars($pl['com'],NULL); if($pl['dcom']>0) { diff --git a/modules_data/location/enternizin.php b/modules_data/location/enternizin.php index a57ba37a..e18f50d9 100644 --- a/modules_data/location/enternizin.php +++ b/modules_data/location/enternizin.php @@ -303,7 +303,7 @@ while($pl = mysql_fetch_array($sp)) } } - $pl['com'] = htmlspecialchars($pl['com'],NULL,'cp1251'); + $pl['com'] = htmlspecialchars($pl['com'],NULL); if($pl['dcom']>0) { diff --git a/modules_data/location/enterptp.php b/modules_data/location/enterptp.php index d650ced3..00c21ec4 100644 --- a/modules_data/location/enterptp.php +++ b/modules_data/location/enterptp.php @@ -288,7 +288,7 @@ while($pl = mysql_fetch_array($sp)){ } } - $pl['com'] = htmlspecialchars($pl['com'],NULL,'cp1251'); + $pl['com'] = htmlspecialchars($pl['com'],NULL); if($pl['dcom']>0) { diff --git a/modules_data/location/entersnow.php b/modules_data/location/entersnow.php index e81bec6b..4a083946 100644 --- a/modules_data/location/entersnow.php +++ b/modules_data/location/entersnow.php @@ -231,7 +231,7 @@ while($pl = mysql_fetch_array($sp)) } } - $pl['com'] = htmlspecialchars($pl['com'],NULL,'cp1251'); + $pl['com'] = htmlspecialchars($pl['com'],NULL); if($pl['dcom']>0) { diff --git a/modules_data/location/fe/shop_.php b/modules_data/location/fe/shop_.php index 4498ad48..e996b40f 100644 --- a/modules_data/location/fe/shop_.php +++ b/modules_data/location/fe/shop_.php @@ -32,10 +32,10 @@ if($u->room['file']=='fe/shop_') $itm['gtxt1'] = str_replace('\x3C','<',$itm['gtxt1']); $itm['gtxt1'] = str_replace('\x3','>',$itm['gtxt1']); - $itm['gtxt1'] = htmlspecialchars($itm['gtxt1'],NULL,'cp1251'); + $itm['gtxt1'] = htmlspecialchars($itm['gtxt1'],NULL); $itm['gtxt2'] = str_replace('\x3C','<',$itm['gtxt2']); $itm['gtxt2'] = str_replace('\x3','>',$itm['gtxt2']); - $itm['gtxt2'] = htmlspecialchars($itm['gtxt2'],NULL,'cp1251'); + $itm['gtxt2'] = htmlspecialchars($itm['gtxt2'],NULL); $upd = mysql_query('UPDATE `items_users` SET `data` = "'.$itm['data'].'",`gtxt1` = "'.mysql_real_escape_string($itm['gtxt1']).'",`gtxt2` = "'.mysql_real_escape_string($itm['gtxt2']).'",`uid` = "'.$to['id'].'",`gift` = "'.$u->info['login'].'",`time_create` = "'.time().'" WHERE `id` = "'.$itm['id'].'" LIMIT 1'); if($upd) diff --git a/modules_data/location/fight-club.database.php b/modules_data/location/fight-club.database.php index c608773e..08211168 100644 --- a/modules_data/location/fight-club.database.php +++ b/modules_data/location/fight-club.database.php @@ -3,13 +3,13 @@ if(!defined('GAME')){ die(); } $StaticMSG = array( - 'your-position'=>iconv("WINDOWS-1251", "UTF-8", 'Ваше местоположение'), - 'move-bk'=>iconv("WINDOWS-1251", "UTF-8", 'Проход через "Бойцовский клуб"'), - 'move-zalu4'=>iconv("WINDOWS-1251", "UTF-8", 'Проход через "Зал паладинов"'), - 'move-map_halls'=>iconv("WINDOWS-1251", "UTF-8", 'Проход через "Залы"'), - 'move-to-sek4'=>iconv("WINDOWS-1251", "UTF-8", 'Проход через "Рыцарский" или "Торговый" зал'), - 'move-sek5'=>iconv("WINDOWS-1251", "UTF-8", 'Проход через "Торговый зал"'), - 'move-sek6'=>iconv("WINDOWS-1251", "UTF-8", 'Проход через "Рыцарский зал"'), + 'your-position'=>'Ваше местоположение', + 'move-bk'=>'Проход через "Бойцовский клуб"', + 'move-zalu4'=>'Проход через "Зал паладинов"', + 'move-map_halls'=>'Проход через "Залы"', + 'move-to-sek4'=>'Проход через "Рыцарский" или "Торговый" зал', + 'move-sek5'=>'Проход через "Торговый зал"', + 'move-sek6'=>'Проход через "Рыцарский зал"', ); $Response = array('status'=>'update'); switch($u->room['file']){ @@ -20,7 +20,7 @@ switch($u->room['file']){ 'bg'=>'navig', 'left'=>'241', 'top'=>'128', - 'name'=>iconv("WINDOWS-1251", "UTF-8", $u->room['name']), + 'name'=>$u->room['name'], 'tgo'=>($tmGo*10), 'tgo1'=>($tmGol*10) ), @@ -35,11 +35,11 @@ switch($u->room['file']){ array('id'=>'map_klub7','params'=>thisInfRm('1.180.0.9', NULL, true)) ), 'buttons'=>array( - array(iconv("WINDOWS-1251", "UTF-8", 'Возврат'),'main.php?homeworld=true'), - array(iconv("WINDOWS-1251", "UTF-8", 'Казино'),'main.php?loc=1.180.0.225'), - array(iconv("WINDOWS-1251", "UTF-8", 'Карта клуба'),'main.php?clubmap=true'), - array(iconv("WINDOWS-1251", "UTF-8", 'Форум'),"window.open('https://" . $c['forum'] . "/', 'forum', 'location=yes,menubar=yes,status=yes,resizable=yes,toolbar=yes,scrollbars=yes,scrollbars=yes')"), - array(iconv("WINDOWS-1251", "UTF-8", 'Подсказка'),"window.open('/encicl/help/top1.html', 'help', 'height=300,width=500,location=no,menubar=no,status=no,toolbar=no,scrollbars=yes')") + array('Возврат','main.php?homeworld=true'), + array('Казино','main.php?loc=1.180.0.225'), + array('Карта клуба','main.php?clubmap=true'), + array('Форум',"window.open('https://" . $c['forum'] . "/', 'forum', 'location=yes,menubar=yes,status=yes,resizable=yes,toolbar=yes,scrollbars=yes,scrollbars=yes')"), + array('Подсказка',"window.open('/encicl/help/top1.html', 'help', 'height=300,width=500,location=no,menubar=no,status=no,toolbar=no,scrollbars=yes')") ) ); break; @@ -50,7 +50,7 @@ switch($u->room['file']){ 'bg'=>'navig', 'left'=>'154', 'top'=>'148', - 'name'=>iconv("WINDOWS-1251", "UTF-8", $u->room['name']), + 'name'=>$u->room['name'], 'tgo'=>($tmGo*10), 'tgo1'=>($tmGol*10) ), @@ -73,7 +73,7 @@ switch($u->room['file']){ 'bg'=>'navig', 'left'=>'395', 'top'=>'142', - 'name'=>iconv("WINDOWS-1251", "UTF-8", $u->room['name']), + 'name'=>$u->room['name'], 'tgo'=>($tmGo*10), 'tgo1'=>($tmGol*10) ), @@ -96,7 +96,7 @@ switch($u->room['file']){ 'bg'=>'navig', 'left'=>'337', 'top'=>'79', - 'name'=>iconv("WINDOWS-1251", "UTF-8", $u->room['name']), + 'name'=>$u->room['name'], 'tgo'=>($tmGo*10), 'tgo1'=>($tmGol*10) ), @@ -119,7 +119,7 @@ switch($u->room['file']){ 'bg'=>'navig', 'left'=>'139', 'top'=>'79', - 'name'=>iconv("WINDOWS-1251", "UTF-8", $u->room['name']), + 'name'=>$u->room['name'], 'tgo'=>($tmGo*10), 'tgo1'=>($tmGol*10) ), @@ -142,7 +142,7 @@ switch($u->room['file']){ 'bg'=>'navig1', 'left'=>'337', 'top'=>'117', - 'name'=>iconv("WINDOWS-1251", "UTF-8", $u->room['name']), + 'name'=>$u->room['name'], 'tgo'=>($tmGo*10), 'tgo1'=>($tmGol*10) ), @@ -163,7 +163,7 @@ switch($u->room['file']){ 'bg'=>'navig1', 'left'=>'163', 'top'=>'28', - 'name'=>iconv("WINDOWS-1251", "UTF-8", $u->room['name']), + 'name'=>$u->room['name'], 'tgo'=>($tmGo*10), 'tgo1'=>($tmGol*10) ), @@ -183,7 +183,7 @@ switch($u->room['file']){ 'bg'=>'navig3', 'left'=>'162', 'top'=>'125', - 'name'=>iconv("WINDOWS-1251", "UTF-8", $u->room['name']), + 'name'=>$u->room['name'], 'tgo'=>($tmGo*10), 'tgo1'=>($tmGol*10) ), diff --git a/modules_data/location/house_belaun.php b/modules_data/location/house_belaun.php index 6bfba8dd..f5efbb76 100644 --- a/modules_data/location/house_belaun.php +++ b/modules_data/location/house_belaun.php @@ -299,7 +299,7 @@ if( $u->room['file'] == 'house_belaun' ) { $pl['dcom'] = $u->info['id']; } } - $pl['com'] = htmlspecialchars($pl['com'],NULL,'cp1251'); + $pl['com'] = htmlspecialchars($pl['com'],NULL); if( $pl['dcom'] > 0 ) { $dl = ' комментарий удален модератором'; } @@ -835,7 +835,7 @@ while( $pl = mysql_fetch_array( $sp ) ){ $pl['dcom'] = $u->info['id']; } } - $pl['com'] = htmlspecialchars($pl['com'],NULL,'cp1251'); + $pl['com'] = htmlspecialchars($pl['com'],NULL); if( $pl['dcom'] > 0 ) { $dl = ' комментарий удален модератором'; } diff --git a/modules_data/location/miloserdie.php b/modules_data/location/miloserdie.php index 42b03d1a..300fe64b 100644 --- a/modules_data/location/miloserdie.php +++ b/modules_data/location/miloserdie.php @@ -65,7 +65,6 @@ elseif($_GET['get']=='10' && $is_eff[0]>0){ ?> - diff --git a/modules_data/location/nc/shop_.php b/modules_data/location/nc/shop_.php index 2337f35b..6b3d9a60 100644 --- a/modules_data/location/nc/shop_.php +++ b/modules_data/location/nc/shop_.php @@ -32,10 +32,10 @@ if($u->room['file']=='nc/shop_') $itm['gtxt1'] = str_replace('\x3C','<',$itm['gtxt1']); $itm['gtxt1'] = str_replace('\x3','>',$itm['gtxt1']); - $itm['gtxt1'] = htmlspecialchars($itm['gtxt1'],NULL,'cp1251'); + $itm['gtxt1'] = htmlspecialchars($itm['gtxt1'],NULL); $itm['gtxt2'] = str_replace('\x3C','<',$itm['gtxt2']); $itm['gtxt2'] = str_replace('\x3','>',$itm['gtxt2']); - $itm['gtxt2'] = htmlspecialchars($itm['gtxt2'],NULL,'cp1251'); + $itm['gtxt2'] = htmlspecialchars($itm['gtxt2'],NULL); $upd = mysql_query('UPDATE `items_users` SET `data` = "'.$itm['data'].'",`gtxt1` = "'.mysql_real_escape_string($itm['gtxt1']).'",`gtxt2` = "'.mysql_real_escape_string($itm['gtxt2']).'",`uid` = "'.$to['id'].'",`gift` = "'.$u->info['login'].'",`time_create` = "'.time().'" WHERE `id` = "'.$itm['id'].'" LIMIT 1'); if($upd) diff --git a/modules_data/location/objaga.php b/modules_data/location/objaga.php index 57474a87..498121a6 100644 --- a/modules_data/location/objaga.php +++ b/modules_data/location/objaga.php @@ -164,7 +164,7 @@ if($_POST['payarenda']) { if($u->info['money']>0 && (int)$_POST['payarenda']>0 && ((int)$_POST['payarenda']<=$u->info['money'])) { $paytime = ($_POST['payarenda']/$objaga['weekcost'])*604800; mysql_query("UPDATE `house`,`users` SET `house`.`endtime` = `house`.`endtime`+'".$paytime."', `house`.`balance` = `house`.`balance`+'".mysql_real_escape_string($_POST['payarenda'])."',`users`.`money`=`users`.`money`-'".mysql_real_escape_string($_POST['payarenda'])."' WHERE `house`.`owner` = `users`.`id` AND `house`.`owner` = '".mysql_real_escape_string($u->info['id'])."';"); - $err = 'Вы положили на счет '.htmlspecialchars($_POST['payarenda'],NULL,'cp1251').'.00 кр.

'; + $err = 'Вы положили на счет '.htmlspecialchars($_POST['payarenda'],NULL).'.00 кр.

'; $u->info['money'] -=$_POST['payarenda']; $objaga['balance'] +=$_POST['payarenda']; $objaga['endtime'] += $paytime; diff --git a/modules_data/location/penter.php b/modules_data/location/penter.php index ab197fc9..3af0e6ec 100644 --- a/modules_data/location/penter.php +++ b/modules_data/location/penter.php @@ -240,7 +240,7 @@ while($pl = mysql_fetch_array($sp)) } } - $pl['com'] = htmlspecialchars($pl['com'],NULL,'cp1251'); + $pl['com'] = htmlspecialchars($pl['com'],NULL); if($pl['dcom']>0) { diff --git a/modules_data/location/post.php b/modules_data/location/post.php index 0509eeef..a5538255 100644 --- a/modules_data/location/post.php +++ b/modules_data/location/post.php @@ -330,7 +330,7 @@ if(isset($pu['id'])) { $ttest['time'] = -$ttest['time']; } if( !isset($ttest['id']) || ( $ttest['time']-$tmgo*60-time()+10 ) <= 0 ) { - $_POST['snd_telegraf'] = htmlspecialchars($_POST['snd_telegraf'],NULL,'cp1251'); + $_POST['snd_telegraf'] = htmlspecialchars($_POST['snd_telegraf'],NULL); $_POST['snd_telegraf'] = substr($_POST['snd_telegraf'],0,100); $_POST['snd_telegraf'] = str_replace('<','<',$_POST['snd_telegraf']); $_POST['snd_telegraf'] = str_replace('\x3e','<',$_POST['snd_telegraf']); @@ -360,7 +360,7 @@ if(isset($pu['id'])) { if($u->info['money'] >= 1 && $u->info['palpro'] > time()) { //max_text - $_POST['snd_post'] = htmlspecialchars($_POST['snd_post'],NULL,'cp1251'); + $_POST['snd_post'] = htmlspecialchars($_POST['snd_post'],NULL); $_POST['snd_post'] = substr($_POST['snd_post'],0,500); $_POST['snd_post'] = str_replace('<','<',$_POST['snd_post']); $_POST['snd_post'] = str_replace('\x3e','<',$_POST['snd_post']); diff --git a/modules_data/location/room_hostel.php b/modules_data/location/room_hostel.php index 58dede04..4e9d1011 100644 --- a/modules_data/location/room_hostel.php +++ b/modules_data/location/room_hostel.php @@ -449,7 +449,7 @@ if( $hostel['balance'] <= 0 && $u->room['id'] != 214 && $sleep['vars'] != 'sleep if($u->info['money']>0 && (int)$_POST['payarenda']>0 && ((int)$_POST['payarenda']<=$u->info['money'])) { $paytime = ($_POST['payarenda']/$hostel['weekcost'])*604800; mysql_query("UPDATE `house`,`users` SET `house`.`endtime` = `house`.`endtime`+'".$paytime."', `house`.`balance` = `house`.`balance`+'".mysql_real_escape_string($_POST['payarenda'])."' WHERE `house`.`owner` = `users`.`id` AND `house`.`owner` = '".mysql_real_escape_string($u->info['id'])."';"); - $err = 'Вы положили на счет '.htmlspecialchars($_POST['payarenda'],NULL,'cp1251').'.00 кр. '; + $err = 'Вы положили на счет '.htmlspecialchars($_POST['payarenda'],NULL).'.00 кр. '; $u->info['money'] -= round((int)$_POST['payarenda']); mysql_query('UPDATE `users` SET `money` = "'.mysql_real_escape_string($u->info['money']).'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1'); $hostel['balance'] +=$_POST['payarenda']; diff --git a/modules_data/location/shop_.php b/modules_data/location/shop_.php index ea2fa088..1b674f1f 100644 --- a/modules_data/location/shop_.php +++ b/modules_data/location/shop_.php @@ -38,10 +38,10 @@ if($u->room['file']=='shop_') $itm['gtxt1'] = str_replace('\x3C','<',$itm['gtxt1']); $itm['gtxt1'] = str_replace('\x3','>',$itm['gtxt1']); - $itm['gtxt1'] = htmlspecialchars($itm['gtxt1'],NULL,'cp1251'); + $itm['gtxt1'] = htmlspecialchars($itm['gtxt1'],NULL); $itm['gtxt2'] = str_replace('\x3C','<',$itm['gtxt2']); $itm['gtxt2'] = str_replace('\x3','>',$itm['gtxt2']); - $itm['gtxt2'] = htmlspecialchars($itm['gtxt2'],NULL,'cp1251'); + $itm['gtxt2'] = htmlspecialchars($itm['gtxt2'],NULL); $giftlogin = $u->info['login']; @@ -103,10 +103,10 @@ if($u->room['file']=='shop_') $itm['gtxt1'] = str_replace('\x3C','<',$itm['gtxt1']); $itm['gtxt1'] = str_replace('\x3','>',$itm['gtxt1']); - $itm['gtxt1'] = htmlspecialchars($itm['gtxt1'],NULL,'cp1251'); + $itm['gtxt1'] = htmlspecialchars($itm['gtxt1'],NULL); $itm['gtxt2'] = str_replace('\x3C','<',$itm['gtxt2']); $itm['gtxt2'] = str_replace('\x3','>',$itm['gtxt2']); - $itm['gtxt2'] = htmlspecialchars($itm['gtxt2'],NULL,'cp1251'); + $itm['gtxt2'] = htmlspecialchars($itm['gtxt2'],NULL); $fspam = $filter->spamFiltr(str_replace('точка','.',str_replace('ру','ru',$itm['gtxt1']))); if( $fspam != '0' ) { diff --git a/modules_data/location/spavedlivost.php b/modules_data/location/spavedlivost.php index 7a92efd2..4410ecba 100644 --- a/modules_data/location/spavedlivost.php +++ b/modules_data/location/spavedlivost.php @@ -66,7 +66,6 @@ elseif($_GET['get']=='10' && $is_eff[0]>0){ ?> - diff --git a/modules_data/stats_inv.php b/modules_data/stats_inv.php index 9c2440ae..dc2ccb9b 100644 --- a/modules_data/stats_inv.php +++ b/modules_data/stats_inv.php @@ -539,7 +539,7 @@ if (!isset($u->info['noreal']) && $c['bonussocial'] == true) { $msgtxt .= '
Если вы не имеете отношения к нашей игре и не хотите получать письма, тогда перейдите по этой ссылке: Нажмите тут (https://new-combats.com/mail/key=' . $md5mail . '&mail=' . $mail . '&cancel)

- - - - - - -

С уважением,
Администрация Легендарного Бойцовского Клуба'; // $headers = "MIME-Version: 1.0\r\n"; - $headers .= "Content-type: text/html; charset=windows-1251\r\n"; + $headers .= "Content-type: text/html; charset=utf-8\r\n"; $headers .= "From: Старый Бойцовский Клуб \r\n"; $to = $mail; // diff --git a/news_script/css/style1.css b/news_script/css/style1.css index aa0051ac..0bcb5dfd 100644 --- a/news_script/css/style1.css +++ b/news_script/css/style1.css @@ -1,5 +1,4 @@ /*=Reset default browser CSS. Based on work by Eric Meyer: https://meyerweb.com/eric/tools/css/reset/index.html=*/ -@charset "windows-1251"; body, html { height: 100%; } diff --git a/news_script/index.php b/news_script/index.php index 60179940..400eee8a 100644 --- a/news_script/index.php +++ b/news_script/index.php @@ -155,7 +155,7 @@ if ($u['admin'] > 0 || in_array($u['align'], $pal_al) || in_array($u['align'], $ - + Новости браузерной онлайн игры Новый «Бойцовский клуб» 0) { if (isset($u['id']) && $add[0] == 1 && isset($_POST['text_com']) && str_replace( ' ', '', str_replace(' ', '', $_POST['text_com']) ) != '') { - $_POST['text_com'] = htmlspecialchars($_POST['text_com'], null, 'cp1251'); + $_POST['text_com'] = htmlspecialchars($_POST['text_com'], null); if ($u['admin'] == 0) { $_POST['text_com'] = substr($_POST['text_com'], 0, 2048); } diff --git a/news_script/style.css b/news_script/style.css index e98c2542..838e7863 100644 --- a/news_script/style.css +++ b/news_script/style.css @@ -1,5 +1,4 @@ /*=Reset default browser CSS. Based on work by Eric Meyer: https://meyerweb.com/eric/tools/css/reset/index.html=*/ -@charset "windows-1251"; body, html { height: 99%; } diff --git a/ni/index.css b/ni/index.css index ec0ee681..7c65d87e 100644 --- a/ni/index.css +++ b/ni/index.css @@ -1,4 +1,3 @@ -@charset "windows-1251"; @font-face { font-family: GothicRus; src:url("https://new-combats.com/fonts/GothicRus.ttf"); diff --git a/notgoodpay.html b/notgoodpay.html index 5b519295..8ea72fe3 100644 --- a/notgoodpay.html +++ b/notgoodpay.html @@ -1,7 +1,7 @@ - + Браузерная игра - Новый Бойцовский Клуб diff --git a/obraz.php b/obraz.php index a88c3251..19502fe9 100644 --- a/obraz.php +++ b/obraz.php @@ -58,7 +58,7 @@ HTML; - + Новый Бойцовский клуб | Библиотека образов diff --git a/online.php b/online.php index 2da4f12c..e9a7546a 100644 --- a/online.php +++ b/online.php @@ -2,7 +2,7 @@ use Core\Db; -//header('Content-Type: text/html; charset=windows-1251'); +// const GAME = true; require_once '_incl_data/__config.php'; require_once '_incl_data/class/__db_connect.php'; @@ -27,7 +27,6 @@ if ($u->info['bithday'] == '01.01.1800') { if ($u->info['online'] < time() - 60) { mysql_query('UPDATE users SET online = unix_timestamp() WHERE id = ' . $u->info['id']); $filter->setOnline($u->info['online'], $u->info['id']); - $u->onlineBonus(); } function isModerOrAdmin($uinfo) @@ -81,7 +80,6 @@ if (isset($_POST['msg']) && str_replace(' ', '', $_POST['msg']) != '') { $msg = []; $_POST['msg'] = str_replace('\x3C', '<', $_POST['msg']); $_POST['msg'] = str_replace('\x3', '>', $_POST['msg']); - $_POST['msg'] = iconv('UTF-8', 'windows-1251', $_POST['msg']); function tolink($buf) { @@ -102,7 +100,7 @@ if (isset($_POST['msg']) && str_replace(' ', '', $_POST['msg']) != '') { ); if (isset($ulogin['login'])) { $ulogin = htmlspecialchars($ulogin['login']); - $uname = '<?нформация о "' . $ulogin . '">'; + $uname = '<Информация о "' . $ulogin . '">'; } } elseif (strripos($x[$j], 'audio_1610649509.mp3')) { //ТУТ аудио $uname = '<Голосовое сообщение>'; @@ -221,7 +219,7 @@ if (isset($_POST['msg']) && str_replace(' ', '', $_POST['msg']) != '') { $_POST['msg'] = str_replace(" ", '[s3;]TAB[s4;]', $_POST['msg']); $_POST['msg'] = str_replace("", '[s3;]TAB[s4;]', $_POST['msg']); - $_POST['msg'] = htmlspecialchars($_POST['msg'], null, 'cp1251'); + $_POST['msg'] = htmlspecialchars($_POST['msg'], null); $_POST['msg'] = str_replace('%usersmile%', '', $_POST['msg']); $_POST['msg'] = tolink($_POST['msg']); @@ -515,7 +513,7 @@ if (isset($_POST['msg']) && str_replace(' ', '', $_POST['msg']) != '') { if ($nosend == 0) { - //?менные смайлики + //Именные смайлики $_POST['msg'] = str_replace('%usersmile%-', '%usеrsmilе%-', $_POST['msg']); $usml = explode(',', $u->info['add_smiles']); $i = 0; @@ -574,7 +572,7 @@ if (isset($_POST['msg']) && str_replace(' ', '', $_POST['msg']) != '') { if ($sp_all[0] > 0) { if (rand(0, 100) < 75) { $text_com = [ - 'Отстань попрошайка! ... ?щу анекдоты, интернет не маленький!', + 'Отстань попрошайка! ... Ищу анекдоты, интернет не маленький!', 'Подожди... Сейчас что-нибудь найду', 'Почти нашел...', 'Вот один есть, но он не интересный...', @@ -743,7 +741,6 @@ if ($_GET['r1'] != 0) { $r['list'] .= '"' . $r['xu'] . '":["' . $pl['id'] . '","' . $pl['login'] . '","' . $pl['level'] . '","' . $pl['align'] . '","' . $pl['clan'] . '","' . $pl['cityreg'] . '","' . $pl['city'] . '","' . $pl['room'] . '","' . $pl['afk'] . '","' . $pl['dnd'] . '","' . $pl['banned'] . '","' . $pl['molch1'] . '","' . $pl['battle'] . '","' . $pl['atack'] . '","' . $trvm . '","' . ($pl['sex'] * 0) . '","' . $pl['align2'] . '"],'; $ar_id += $pl['id']; $ar_lvl += $pl['level']; - //trigger_error('align:' . $pl['align'] . ' clan:' . $pl['clan'] . ' molch1:' . $pl['molch1'] . ' banned:' . $pl['banned'] . ' battle:' . $pl['battle']); $ar_all .= $pl['align'] . $pl['clan'] . $pl['molch1'] . $pl['banned'] . $pl['battle'] . 1; } @@ -1126,8 +1123,7 @@ if ($r['key'] == $_GET['key']) { //Список онлайн остается неизменным unset($r['rn'], $r['list'], $r['key'], $r['xu']); } elseif ($_GET['r1'] != 0) { - $r['rn'] = iconv('cp1251', 'utf-8', $u->room['name']); - $r['list'] = iconv('cp1251', 'utf-8', $r['list']); + $r['rn'] = $u->room['name']; } $posts = mysql_fetch_array( @@ -1172,16 +1168,5 @@ if (isset($trf['id'])) { } } -//Перекодируем строки -if ($r['js'] != null) { - $r['js'] = iconv('cp1251', 'utf-8', $r['js']); -} else { - unset($r['js']); -} -if ($r['msg'] != null) { - $r['msg'] = iconv('cp1251', 'utf-8', $r['msg']); -} else { - unset($r['msg']); -} unset($c, $u, $db); -echo json_encode($r); \ No newline at end of file +echo json_encode($r); diff --git a/page/lib.php b/page/lib.php index 2d16266b..29b3d26d 100644 --- a/page/lib.php +++ b/page/lib.php @@ -79,7 +79,7 @@ if( !isset($url[2]) || $url[2] == '' ) { } $usrs[$pl['uid']] = $usrs[$pl['uid']]['login']; } - $html .= ''; + $html .= ''; } $i++; } @@ -183,7 +183,7 @@ if( !isset($url[2]) || $url[2] == '' ) {
info['id'])) { - $_POST['lib_title'] = htmlspecialchars($_POST['lib_title'],NULL,'cp1251'); + $_POST['lib_title'] = htmlspecialchars($_POST['lib_title'],NULL); $mbpage_last = mysql_fetch_array(mysql_query('SELECT `time` FROM `library_content` WHERE `uid` = "'.$u->info['id'].'" ORDER BY `id` DESC LIMIT 1')); if( $u->info['molch1'] > time() ) { @@ -268,7 +268,7 @@ if( !isset($url[2]) || $url[2] == '' ) { $red500 = false; if( isset($_POST['lib_urlname']) && $_POST['lib_urlname'] != '' && $_POST['lib_urlname'] != $mbpage['url_name'] ) { mysql_query('UPDATE `library_content` SET `delete` = "'.time().'" WHERE `url_name` = "'.$mbpage['url_name'].'" AND `id` != "'.$mbpage['id'].'"'); - $mbpage['url_name'] = htmlspecialchars($_POST['lib_urlname'],NULL,'cp1251'); + $mbpage['url_name'] = htmlspecialchars($_POST['lib_urlname'],NULL); mysql_query('UPDATE `library_content` SET `url_name` = "'.mysql_real_escape_string($mbpage['url_name']).'" WHERE `id` = "'.$mbpage['id'].'" LIMIT 1'); $red500 = true; } @@ -291,7 +291,7 @@ if( !isset($url[2]) || $url[2] == '' ) { $mbpage['title'] = $_POST['lib_title']; $mbpage['text'] = $_POST['con_text']; $mbpage['time'] = time(); - mysql_query('UPDATE `library_content` SET `time` = "'.time().'",`title` = "'.mysql_real_escape_string(htmlspecialchars($mbpage['title'],NULL,'cp1251')).'",`text` = "'.mysql_real_escape_string($mbpage['text']).'" WHERE `id` = "'.$mbpage['id'].'" LIMIT 1'); + mysql_query('UPDATE `library_content` SET `time` = "'.time().'",`title` = "'.mysql_real_escape_string(htmlspecialchars($mbpage['title'],NULL)).'",`text` = "'.mysql_real_escape_string($mbpage['text']).'" WHERE `id` = "'.$mbpage['id'].'" LIMIT 1'); } } } diff --git a/rating_script/index.php b/rating_script/index.php index 5b047b2e..8fce9bd5 100644 --- a/rating_script/index.php +++ b/rating_script/index.php @@ -40,7 +40,6 @@ function microLogin($id,$t,$nnz = 1) { Бойцовский клуб - diff --git a/register.php b/register.php index 56eebe5c..af0406d9 100644 --- a/register.php +++ b/register.php @@ -90,6 +90,9 @@ if ($_SESSION['step'] === 8) { // Всех их соберём, вместе с //Создаем персонажа $uid = $newUser->new( + $_SESSION['login'], + $_SESSION['password'], + $_SESSION['email'], $_SESSION['ref'], $_SESSION['birthday'], $_SESSION['sex'], @@ -135,7 +138,7 @@ $errorMessage = $newUser->getError() ? "

{$newUser->getError()}

" : ''; - + <?= Config::get('name') ?>: Регистрация - создай персонажа в игре. diff --git a/repass.php b/repass.php index b4f09e5d..be043766 100644 --- a/repass.php +++ b/repass.php @@ -16,13 +16,13 @@ if (isset($_GET['login'])) { } if (isset($_POST['relogin'])) { - $_POST['relogin'] = htmlspecialchars($_POST['relogin'], null, 'cp1251'); + $_POST['relogin'] = htmlspecialchars($_POST['relogin'], null); $u = User::start(); $usr = Db::getRow('select * from users where login =?', [$_POST['relogin']]); if (!isset($usr['id'])) { - $error = 'Логин "' . htmlspecialchars($_POST['relogin'], null, 'cp1251') . '" не найден в базе.'; + $error = 'Логин "' . htmlspecialchars($_POST['relogin'], null) . '" не найден в базе.'; } else { if ($usr['admin'] != 0 || $usr['banned'] != 0) { $error = 'Персонаж "' . $_POST['relogin'] . '" заблокирован!'; diff --git a/reting_clans.php b/reting_clans.php index 4af0109d..12556cf8 100644 --- a/reting_clans.php +++ b/reting_clans.php @@ -15,7 +15,7 @@ $url = explode('/', $url[0]); - + Рейтинг кланов браузерной онлайн игры Новый «Бойцовский клуб» diff --git a/reting_pers.php b/reting_pers.php index b670949b..db7c3dd9 100644 --- a/reting_pers.php +++ b/reting_pers.php @@ -16,7 +16,7 @@ $url = explode('/', $url[0]); - + Рейтинг персонажей браузерной онлайн игры Новый «Бойцовский клуб» diff --git a/ruin_characteristics.php b/ruin_characteristics.php index 9020ab46..0dd63afd 100644 --- a/ruin_characteristics.php +++ b/ruin_characteristics.php @@ -120,7 +120,7 @@ if (isset($_POST['set_name'])) { - + Старый Бойцовский Клуб - Профили характеристик diff --git a/ruins.php b/ruins.php index 45538bcb..249cb92d 100644 --- a/ruins.php +++ b/ruins.php @@ -12,7 +12,7 @@ $ru = mysql_fetch_array(mysql_query('SELECT * FROM `ruine_now` WHERE `id` = "'.m - + diff --git a/settings.php b/settings.php index 9a8b4215..66dbd785 100644 --- a/settings.php +++ b/settings.php @@ -50,7 +50,7 @@ if (isset($_POST['name'], $_POST['hobby'], $_POST['ChatColor'], $_POST['saveanke - + Бойцовский Клуб - Настройки diff --git a/spam.php b/spam.php index 2f85fc61..3973c120 100644 --- a/spam.php +++ b/spam.php @@ -29,7 +29,7 @@ if (!$u->info['admin']) { Редактирование фильтра от спама - + @@ -49,7 +49,7 @@ if (isset($_GET['del'])) { Db::sql('replace into spam_word set id = 1, data = ?', [$spam]); $spam = explode('|', $spam); } elseif (isset($_POST['add'])) { - $_POST['add'] = htmlspecialchars($_POST['add'], null, 'cp1251'); + $_POST['add'] = htmlspecialchars($_POST['add'], null); echo '
Слово "' . $_POST['add'] . '" добавлено.

'; $spam = implode('|', $spam); $spam .= '|' . $_POST['add']; diff --git a/stats_bonus.php b/stats_bonus.php index ecd40071..268ede40 100644 --- a/stats_bonus.php +++ b/stats_bonus.php @@ -1,7 +1,7 @@ - + Таблица Бонусов - Браузерная игра Новый Бойцовский Клуб diff --git a/styles/register.css b/styles/register.css index ab8c2d46..c4225283 100644 --- a/styles/register.css +++ b/styles/register.css @@ -1,4 +1,3 @@ -@charset "windows-1251"; /* CSS Document */ html, body { diff --git a/telegraf.php b/telegraf.php index d252ab38..6a0a7d7a 100644 --- a/telegraf.php +++ b/telegraf.php @@ -1,5 +1,5 @@ ', '[s4;]', $v); $v = str_replace(' ', ' ', $v); - $v = htmlspecialchars($v, null, 'cp1251'); + $v = htmlspecialchars($v, null); return $v; } @@ -82,9 +82,6 @@ if (isset($_POST['see_msg'])) { $html = '







Персонажи с молчанкой не могут пользоваться телеграфом.
'; } else { if (isset($_POST['to'])) { - $_POST['to'] = go_text(iconv('UTF-8', 'windows-1251', $_POST['to'])); - $_POST['text'] = go_text(iconv('UTF-8', 'windows-1251', $_POST['text'])); - $_POST['tema'] = go_text(iconv('UTF-8', 'windows-1251', $_POST['tema'])); if (test_line($_POST['to']) == false) { $error = 'Пустое поле "Кому".'; diff --git a/towerlog.php b/towerlog.php index aaaaa9b8..0ab066d7 100644 --- a/towerlog.php +++ b/towerlog.php @@ -41,7 +41,7 @@ if (!isset($log['id'])) { - + Архив: Турнир в Башне Смерти diff --git a/transfer.php b/transfer.php index d4cfa904..e018d3af 100644 --- a/transfer.php +++ b/transfer.php @@ -4,7 +4,7 @@ header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); header('Cache-Control: no-store, no-cache, must-revalidate'); header('Cache-Control: post-check=0, pre-check=0', false); header('Pragma: no-cache'); -header('Content-Type: text/html; charset=windows-1251'); + if ($_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest') { define('GAME', true); include('_incl_data/__config.php');