diff --git a/_incl_data/class/Core/Config.php b/_incl_data/class/Core/Config.php index 1ec55b53..82a60a90 100644 --- a/_incl_data/class/Core/Config.php +++ b/_incl_data/class/Core/Config.php @@ -5,17 +5,7 @@ namespace Core; class Config { private static self $instance; - private function __construct() - { -// error_reporting(E_ALL ^ E_NOTICE); - -// ini_set('display_errors', 'Off'); -// ini_set('date.timezone', 'Europe/Moscow'); - -// header('Cache-Control: no-cache, no-store, must-revalidate'); -// header('Pragma: no-cache'); -// header('Expires: 0'); - } + private function __construct() {} public static function get(?string $key = null) { @@ -36,8 +26,8 @@ class Config $c['thiscity'] = 'capitalcity'; $c['capitalcity'] = $c['host']; $c['abandonedplain'] = $c['host']; - $c['https'] = 'https://' . $c['host'] . DIRECTORY_SEPARATOR; - $c['exit'] = ''; + $c['https'] = '//' . $c['host'] . DIRECTORY_SEPARATOR; + $c['exit'] = ''; $c['support'] = 'support@' . $c['host']; diff --git a/_incl_data/crons/game_clear.php b/_incl_data/crons/game_clear.php index f774a24b..fe414758 100644 --- a/_incl_data/crons/game_clear.php +++ b/_incl_data/crons/game_clear.php @@ -20,7 +20,6 @@ function getIds($query): string Db::sql('update users set clan_zv = 0 where clan_zv > 0'); // Очистка чата, остается 30 минут. Db::sql('delete from chat where time < unix_timestamp() - 1800'); -Db::sql('delete from chat_system where time < unix_timestamp() - 1800'); // Очистка заявок в поединки Db::sql('delete from zayvki where start > 0 or cancel > 0 or time < unix_timestamp() - 43200'); // Очистка заявок в пещеры diff --git a/_incl_data/crons/undone/clear.php b/_incl_data/crons/undone/clear.php index 0b7cb705..1e81699e 100644 --- a/_incl_data/crons/undone/clear.php +++ b/_incl_data/crons/undone/clear.php @@ -44,18 +44,11 @@ if( isset($_GET['actions']) ) { // forign_keys! Никто не знает про foreign_keys! function delete_user_all( $uid , $login ) { - mysql_query('DELETE FROM `aaa_birthday` WHERE `uid` = "'.$uid.'"'); mysql_query('DELETE FROM `aaa_bonus` WHERE `uid` = "'.$uid.'"'); - mysql_query('DELETE FROM `aaa_dialog_vars` WHERE `uid` = "'.$uid.'"'); mysql_query('DELETE FROM `aaa_znahar` WHERE `uid` = "'.$uid.'"'); mysql_query('DELETE FROM `actions` WHERE `uid` = "'.$uid.'"'); mysql_query('DELETE FROM `add_smiles` WHERE `uid` = "'.$uid.'"'); - mysql_query('DELETE FROM `an_data` WHERE `uid` = "'.$uid.'"'); mysql_query('DELETE FROM `a_com_act` WHERE `uid` = "'.$uid.'"'); - mysql_query('DELETE FROM `a_noob` WHERE `uid` = "'.$uid.'"'); - mysql_query('DELETE FROM `a_system` WHERE `uid` = "'.$uid.'"'); - mysql_query('DELETE FROM `a_vaucher` WHERE `uid` = "'.$uid.'"'); - mysql_query('DELETE FROM `a_vaucher_active` WHERE `uid` = "'.$uid.'"'); mysql_query('DELETE FROM `bandit` WHERE `uid` = "'.$uid.'"'); mysql_query('DELETE FROM `bank` WHERE `uid` = "'.$uid.'"'); mysql_query('DELETE FROM `bank_alh` WHERE `uid` = "'.$uid.'"'); @@ -65,12 +58,10 @@ function delete_user_all( $uid , $login ) { mysql_query('DELETE FROM `battle_last` WHERE `uid` = "'.$uid.'"'); mysql_query('DELETE FROM `battle_stat` WHERE `uid1` = "'.$uid.'" OR `uid2` = "'.$uid.'"'); mysql_query('DELETE FROM `battle_users` WHERE `uid` = "'.$uid.'"'); - mysql_query('DELETE FROM `bid` WHERE `uid` = "'.$uid.'"'); mysql_query('DELETE FROM `bs_actions` WHERE `uid` = "'.$uid.'"'); mysql_query('DELETE FROM `bs_zv` WHERE `uid` = "'.$uid.'"'); mysql_query('DELETE FROM `building` WHERE `uid` = "'.$uid.'"'); mysql_query('DELETE FROM `buy_ekr` WHERE `uid` = "'.$uid.'"'); - mysql_query('DELETE FROM `chat_ignore` WHERE `uid` = "'.$uid.'" OR `login` = "'.$login.'"'); mysql_query('DELETE FROM `complects_priem` WHERE `uid` = "'.$uid.'"'); mysql_query('DELETE FROM `dialog_act` WHERE `uid` = "'.$uid.'"'); mysql_query('DELETE FROM `dump` WHERE `uid` = "'.$uid.'"'); diff --git a/ajax_checklogin.php b/ajax_checklogin.php index 5a182f47..eeda5e7d 100644 --- a/ajax_checklogin.php +++ b/ajax_checklogin.php @@ -1,95 +1,102 @@ 1, - 'Мироздатель' => 1 - ); - // - function en_ru($txt) { - $g = false; - $en = preg_match("/^(([0-9a-zA-Z _-])+)$/i", $txt); - $ru = preg_match("/^(([0-9а-яА-Я _-])+)$/i", $txt); - if(($ru && $en) || (!$ru && !$en)) { - $g = true; - } - return $g; - } - // - function testBad($txt) { - $white = '-_ 0123456789qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNMЁЙЦУКЕНГШЩЗХЪФЫВАПРОЛДЖЭЯЧСМИТЬБЮёйцукенгшщзхъфывапролджэячсмитьбю'; - $r = false; - $i = 0; - while( $i != -1 ) { - if( isset($txt[$i]) ) { - $g = false; - $j = 0; - while( $j != -1 ) { - if(isset($white[$j])) { - if( $white[$j] == $txt[$i] ) { - $g = true; - } - }else{ - $j = -2; - } - $j++; - } - if( $g == false ) { - $r = true; - } - }else{ - $i = -2; - } - $i++; - } - return $r; - } - // - $login = mysql_fetch_array(mysql_query('SELECT `id` FROM `users` WHERE `login` = "'.mysql_real_escape_string($_GET['login']).'" LIMIT 1')); - if( isset($login['id']) || isset($bad[$_GET['login']]) ) { - echo 'Логин занят.'; - }else{ - $true = true; - // - /* - Логин может содержать от 4 до 16 символов, и состоять только из букв русского ИЛИ английского алфавита, цифр, символов '_', '-' и пробела. - Логин не может начинаться или заканчиваться символами '_', '-' или пробелом. - */ - // - $_GET['login'] = str_replace(' ',' ',$_GET['login']); - $_GET['login'] = str_replace('%',' ',$_GET['login']); - $_GET['login'] = str_replace(' ',' ',$_GET['login']); - // - if( strlen($_GET['login']) > 16 ) { - $true = false; - }elseif( strlen($_GET['login']) < 4 ) { - $true = false; - }elseif( strripos($_GET['login'],' ') == true ) { - $true = false; - }elseif( substr($_GET['login'],1) == ' ' || substr($_GET['login'],-1) == ' ' ) { - $true = false; - }elseif( substr($_GET['login'],1) == '-' || substr($_GET['login'],-1) == '-' ) { - $true = false; - }elseif( substr($_GET['login'],1) == '_' || substr($_GET['login'],-1) == '_' ) { - $true = false; - }elseif( testBad($_GET['login']) == true ) { - $true = false; - }elseif( en_ru(str_replace('ё','е',str_replace('Ё','Е',$_GET['login']))) == true ) { - $true = false; - } - // - if( $true == false ) { - echo 'Неверный логин.'; - }else{ - echo 'Логин свободен!'; - } - } +if (!isset($_GET['login'])) { + return; +}// +$_GET['login'] = htmlspecialchars($_GET['login'], null); +// +$bad = [ + 'Мусорщик' => 1, + 'Мироздатель' => 1, +]; +// +function en_ru($txt) +{ + $g = false; + $en = preg_match("/^(([0-9a-zA-Z _-])+)$/i", $txt); + $ru = preg_match("/^(([0-9а-яА-Я _-])+)$/i", $txt); + if (($ru && $en) || (!$ru && !$en)) { + $g = true; + } + return $g; } -?> \ No newline at end of file +// +function testBad($txt): bool +{ + $white = '-_ 0123456789qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNMЁЙЦУКЕНГШЩЗХЪФЫВАПРОЛДЖЭЯЧСМИТЬБЮёйцукенгшщзхъфывапролджэячсмитьбю'; + $r = false; + $i = 0; + while ($i != -1) { + if (isset($txt[$i])) { + $g = false; + $j = 0; + while ($j != -1) { + if (isset($white[$j])) { + if ($white[$j] == $txt[$i]) { + $g = true; + } + } else { + $j = -2; + } + $j++; + } + if ($g == false) { + $r = true; + } + } else { + $i = -2; + } + $i++; + } + return $r; +} + +// +$login = mysql_fetch_array( + mysql_query( + 'SELECT `id` FROM `users` WHERE `login` = "' . mysql_real_escape_string($_GET['login']) . '" LIMIT 1' + ) +); +if (isset($login['id']) || isset($bad[$_GET['login']])) { + echo 'Логин занят.'; +} else { + $true = true; + + /* + Логин может содержать от 4 до 16 символов, и состоять только из букв русского ИЛИ английского алфавита, цифр, символов '_', '-' и пробела. + Логин не может начинаться или заканчиваться символами '_', '-' или пробелом. + */ + + $_GET['login'] = str_replace(' ', ' ', $_GET['login']); + $_GET['login'] = str_replace('%', ' ', $_GET['login']); + $_GET['login'] = str_replace(' ', ' ', $_GET['login']); + // + if (strlen($_GET['login']) > 16) { + $true = false; + } elseif (strlen($_GET['login']) < 4) { + $true = false; + } elseif (strripos($_GET['login'], ' ')) { + $true = false; + } elseif (substr($_GET['login'], 1) == ' ' || substr($_GET['login'], -1) == ' ') { + $true = false; + } elseif (substr($_GET['login'], 1) == '-' || substr($_GET['login'], -1) == '-') { + $true = false; + } elseif (substr($_GET['login'], 1) == '_' || substr($_GET['login'], -1) == '_') { + $true = false; + } elseif (testBad($_GET['login'])) { + $true = false; + } elseif (en_ru(str_replace('ё', 'е', str_replace('Ё', 'Е', $_GET['login'])))) { + $true = false; + } + // + if (!$true) { + echo 'Неверный логин.'; + } else { + echo 'Логин свободен!'; + } +} diff --git a/audio.php b/audio.php index 5748cb34..a612340d 100644 --- a/audio.php +++ b/audio.php @@ -1,22 +1,3 @@ +// js/onlineList.js +file_put_contents('audio/audio_' . time() . '.mp3', file_get_contents('php://input'), FILE_APPEND); diff --git a/buttons.php b/buttons.php index 5473831e..8959eab2 100644 --- a/buttons.php +++ b/buttons.php @@ -32,8 +32,6 @@ $u = User::start(); $filter = new Filter(); $chat = new Chat(); -var_dump($_SESSION['uid'], $_COOKIE['login']); - ini_set('max_execution_time', '120'); if (isset($_GET['showcode'])) { @@ -779,7 +777,7 @@ $u->stats = $u->getStats($u->info['id'], 0); -
diff --git a/cron/clear.php b/cron/clear.php index 68ad210e..e2205320 100644 --- a/cron/clear.php +++ b/cron/clear.php @@ -41,18 +41,11 @@ if( isset($_GET['actions']) ) { // forign_keys! Никто не знает про foreign_keys! function delete_user_all( $uid , $login ) { - mysql_query('DELETE FROM `aaa_birthday` WHERE `uid` = "'.$uid.'"'); mysql_query('DELETE FROM `aaa_bonus` WHERE `uid` = "'.$uid.'"'); - mysql_query('DELETE FROM `aaa_dialog_vars` WHERE `uid` = "'.$uid.'"'); mysql_query('DELETE FROM `aaa_znahar` WHERE `uid` = "'.$uid.'"'); mysql_query('DELETE FROM `actions` WHERE `uid` = "'.$uid.'"'); mysql_query('DELETE FROM `add_smiles` WHERE `uid` = "'.$uid.'"'); - mysql_query('DELETE FROM `an_data` WHERE `uid` = "'.$uid.'"'); mysql_query('DELETE FROM `a_com_act` WHERE `uid` = "'.$uid.'"'); - mysql_query('DELETE FROM `a_noob` WHERE `uid` = "'.$uid.'"'); - mysql_query('DELETE FROM `a_system` WHERE `uid` = "'.$uid.'"'); - mysql_query('DELETE FROM `a_vaucher` WHERE `uid` = "'.$uid.'"'); - mysql_query('DELETE FROM `a_vaucher_active` WHERE `uid` = "'.$uid.'"'); mysql_query('DELETE FROM `bandit` WHERE `uid` = "'.$uid.'"'); mysql_query('DELETE FROM `bank` WHERE `uid` = "'.$uid.'"'); mysql_query('DELETE FROM `bank_alh` WHERE `uid` = "'.$uid.'"'); @@ -62,12 +55,10 @@ function delete_user_all( $uid , $login ) { mysql_query('DELETE FROM `battle_last` WHERE `uid` = "'.$uid.'"'); mysql_query('DELETE FROM `battle_stat` WHERE `uid1` = "'.$uid.'" OR `uid2` = "'.$uid.'"'); mysql_query('DELETE FROM `battle_users` WHERE `uid` = "'.$uid.'"'); - mysql_query('DELETE FROM `bid` WHERE `uid` = "'.$uid.'"'); mysql_query('DELETE FROM `bs_actions` WHERE `uid` = "'.$uid.'"'); mysql_query('DELETE FROM `bs_zv` WHERE `uid` = "'.$uid.'"'); mysql_query('DELETE FROM `building` WHERE `uid` = "'.$uid.'"'); mysql_query('DELETE FROM `buy_ekr` WHERE `uid` = "'.$uid.'"'); - mysql_query('DELETE FROM `chat_ignore` WHERE `uid` = "'.$uid.'" OR `login` = "'.$login.'"'); mysql_query('DELETE FROM `complects_priem` WHERE `uid` = "'.$uid.'"'); mysql_query('DELETE FROM `dialog_act` WHERE `uid` = "'.$uid.'"'); mysql_query('DELETE FROM `dump` WHERE `uid` = "'.$uid.'"'); diff --git a/css/clu0b.css b/css/clu0b.css index c63ed7c0..947decd4 100644 --- a/css/clu0b.css +++ b/css/clu0b.css @@ -1,494 +1,789 @@ -html,body { - width:100%; - height:100%; - margin:0; - padding:0; - overflow:hidden; - font-size: 10pt; - font-family:Verdana, Arial, Helvetica, Tahoma, sans-serif; +html, body { + width: 100%; + height: 100%; + margin: 0; + padding: 0; + overflow: hidden; + font-size: 10pt; + font-family: Verdana, Arial, Helvetica, Tahoma, sans-serif; } -.m0c1 { display:block;margin-top:0px; } -.m0c2 { display:block;margin-top:2px; } + +.m0c1 { + display: block; + margin-top: 0px; +} + +.m0c2 { + display: block; + margin-top: 2px; +} + .text { - FONT-SIZE: 10pt; COLOR: #000000; FONT-WEIGHT: normal; - FONT-FAMILY: Verdana, Arial, Helvetica, Tahoma, sans-serif; + FONT-SIZE: 10pt; + COLOR: #000000; + FONT-WEIGHT: normal; + FONT-FAMILY: Verdana, Arial, Helvetica, Tahoma, sans-serif; } .prmimgyn { - + } .prmimgyn:hover { - filter: alpha(opacity=50); - opacity:0.5; - -moz-opacity:0.5; - -khtml-opacity:0.5; + filter: alpha(opacity=50); + opacity: 0.5; + -moz-opacity: 0.5; + -khtml-opacity: 0.5; } -.h4 { COLOR: #8f0000; FONT-FAMILY: Arial; FONT-SIZE: 11pt; FONT-WEIGHT: bold; MARGIN-BOTTOM: 5px;} -H3 { COLOR: #8f0000; FONT-FAMILY: Arial; FONT-SIZE: 12pt; FONT-WEIGHT: bold; TEXT-ALIGN: center } -H4 { COLOR: #8f0000; FONT-FAMILY: Arial; FONT-SIZE: 11pt; FONT-WEIGHT: bold; MARGIN-BOTTOM: 5px;} -H5 { COLOR: #4f0000; FONT-FAMILY: Arial; FONT-SIZE: 11pt; FONT-WEIGHT: bold; MARGIN-BOTTOM: 0px; MARGIN-TOP: 0px;} -a,a:visited { text-decoration: none; FONT-WEIGHT: bold; color: #003388; } -a:active { color: #6F0000} -a:hover { color: #0066FF} -.date { font-family: Courier; font-size: 8pt; text-decoration:none; font-weight:normal; color: #007000} -.date2 { font-family: Courier; font-size: 8pt; text-decoration:none; font-weight:normal; color: #007000; background-color: #00FFAA} -.sysdate { font-family: Courier; font-size: 8pt; text-decoration:none; font-weight:normal; color: #B00000} -.private { font-weight:bold; color: red; background-color: #FAE0E0} -.number { font-size: 11pt; font-weight: bold; color: #6F0000} -.dsc { color: #606060; font-weight:normal; } -select,textarea,input { border: solid 1pt #B0B0B0; font-family: MS Sans Serif; font-size: 10px; color: #191970; MARGIN-BOTTOM: 2px; MARGIN-TOP: 1px;} -/*button { border: solid 1pt #B0B0B0; font-family: MS Sans Serif; font-size: 11px; color: #191970; padding:2px 7px 2px 7px;} -button:active { padding:3px 6px 1px 8px; }*/ -.ahint {font-family: MS Sans Serif; font-size:8px; text-decoration:none; color:#000080;z-index: 99;} -#hint2 {position:absolute; width:140; background-color:#FFF6DD; layer-background-color:#FFF6DD; visibility:hidden} -#hint3 {position:absolute; width:240; background-color:#FFF6DD; layer-background-color:#FFF6DD; visibility:hidden} -#hint4 {position:absolute; width:240; visibility:hidden} -.ttl_css{ -position:absolute; - text-shadow: 0 0 2px #fff; - padding: 4px 8px; - border: 1px solid rgba(255,255,255,0.25); - background-color: #cfcfcf; - border-radius: 3px; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - box-shadow: 0 0 3px #000000; - -webkit-box-shadow: 0 0 3px #000000; - -moz-box-shadow: 0 0 3px #000000; +.h4 { + COLOR: #8f0000; + FONT-FAMILY: Arial; + FONT-SIZE: 11pt; + FONT-WEIGHT: bold; + MARGIN-BOTTOM: 5px; +} + +H3 { + COLOR: #8f0000; + FONT-FAMILY: Arial; + FONT-SIZE: 12pt; + FONT-WEIGHT: bold; + TEXT-ALIGN: center +} + +H4 { + COLOR: #8f0000; + FONT-FAMILY: Arial; + FONT-SIZE: 11pt; + FONT-WEIGHT: bold; + MARGIN-BOTTOM: 5px; +} + +H5 { + COLOR: #4f0000; + FONT-FAMILY: Arial; + FONT-SIZE: 11pt; + FONT-WEIGHT: bold; + MARGIN-BOTTOM: 0px; + MARGIN-TOP: 0px; +} + +a, a:visited { + text-decoration: none; + FONT-WEIGHT: bold; + color: #003388; +} + +a:active { + color: #6F0000 +} + +a:hover { + color: #0066FF +} + +.date { + font-family: Courier; + font-size: 8pt; + text-decoration: none; + font-weight: normal; + color: #007000 +} + +.date2 { + font-family: Courier; + font-size: 8pt; + text-decoration: none; + font-weight: normal; + color: #007000; + background-color: #00FFAA +} + +.sysdate { + font-family: Courier; + font-size: 8pt; + text-decoration: none; + font-weight: normal; + color: #B00000 +} + +.private { + font-weight: bold; + color: red; + background-color: #FAE0E0 +} + +.number { + font-size: 11pt; + font-weight: bold; + color: #6F0000 +} + +.dsc { + color: #606060; + font-weight: normal; +} + +select, textarea, input { + border: solid 1pt #B0B0B0; + font-family: MS Sans Serif; + font-size: 10px; + color: #191970; + MARGIN-BOTTOM: 2px; + MARGIN-TOP: 1px; +} + +.ahint { + font-family: MS Sans Serif; + font-size: 8px; + text-decoration: none; + color: #000080; + z-index: 99; +} + +#hint2 { + position: absolute; + width: 140; + background-color: #FFF6DD; + layer-background-color: #FFF6DD; + visibility: hidden +} + +#hint3 { + position: absolute; + width: 240; + background-color: #FFF6DD; + layer-background-color: #FFF6DD; + visibility: hidden +} + +#hint4 { + position: absolute; + width: 240; + visibility: hidden +} + +.ttl_css { + position: absolute; + text-shadow: 0 0 2px #fff; + padding: 4px 8px; + border: 1px solid rgba(255, 255, 255, 0.25); + background-color: #cfcfcf; + border-radius: 3px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + box-shadow: 0 0 3px #000000; + -webkit-box-shadow: 0 0 3px #000000; + -moz-box-shadow: 0 0 3px #000000; } + .foryou1 .date { - font-family: Courier; font-size: 8pt; text-decoration:none; font-weight:normal; color: #007000; background-color: #00FFAA; + font-family: Courier; + font-size: 8pt; + text-decoration: none; + font-weight: normal; + color: #007000; + background-color: #00FFAA; } -.foryou2 .date { - font-family: Courier; font-size: 8pt; text-decoration:none; font-weight:normal; color: #007000; background-color: #00FFAA; -} -.B1 { font-weight: bold; color: #6666CC} -.B2 { font-weight: bold; color: #B06A00} -.B3 { font-weight: bold; color: #269088} -.B4 { font-weight: bold; color: #A0AF20} -.B5 { font-weight: bold; color: #0F79D3} -.B6 { font-weight: bold; color: #D85E23} -.B7 { font-weight: bold; color: #5C832F} -.B8 { font-weight: bold; color: #842B61} -.B9 { font-weight: bold; color: navy} -.Bs1 { font-size: 8pt; font-weight:bold; color: #6666CC} -.Bs2 { font-weight:bold; color: #B06A00} -img,table {border:0} -*[onselectstart="return false"] { - -moz-user-select: none; - -o-user-select:none; - -khtml-user-select: none; - -webkit-user-select: none; - -ms-user-select: none; - user-select: none; +.foryou2 .date { + font-family: Courier; + font-size: 8pt; + text-decoration: none; + font-weight: normal; + color: #007000; + background-color: #00FFAA; +} + +.B1 { + font-weight: bold; + color: #6666CC +} + +.B2 { + font-weight: bold; + color: #B06A00 +} + +.B3 { + font-weight: bold; + color: #269088 +} + +.B4 { + font-weight: bold; + color: #A0AF20 +} + +.B5 { + font-weight: bold; + color: #0F79D3 +} + +.B6 { + font-weight: bold; + color: #D85E23 +} + +.B7 { + font-weight: bold; + color: #5C832F +} + +.B8 { + font-weight: bold; + color: #842B61 +} + +.B9 { + font-weight: bold; + color: navy +} + +.Bs1 { + font-size: 8pt; + font-weight: bold; + color: #6666CC +} + +.Bs2 { + font-weight: bold; + color: #B06A00 +} + +img, table { + border: 0 +} + +*[onselectstart="return false"] { + -moz-user-select: none; + -o-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -ms-user-select: none; + user-select: none; } #main { - overflow:auto; - white-space:nowrap; - height:100%; - padding:5px 0px 0px 0px; + overflow: auto; + white-space: nowrap; + height: 100%; + padding: 5px 0px 0px 0px; } #chat_list { - overflow:auto; - height:100%; - padding:2px; + overflow: auto; + height: 100%; + padding: 2px; } #online_list { - overflow:auto; - white-space:normal; - width:100%; - height:100%; - padding-left:5px; + overflow: auto; + white-space: normal; + width: 100%; + height: 100%; + padding-left: 5px; } #ttSmiles { - position:absolute; - right:16px; - bottom:16px; - width:400px; - height:235px; - border:2px solid #000; - filter: alpha(opacity=57); - opacity:0.57; - -moz-opacity:0.57; - -khtml-opacity:0.57; - background-color:#dedede; + position: absolute; + right: 16px; + bottom: 16px; + width: 400px; + height: 235px; + border: 2px solid #000; + filter: alpha(opacity=57); + opacity: 0.57; + -moz-opacity: 0.57; + -khtml-opacity: 0.57; + background-color: #dedede; } #ttSmiles:hover { - filter: alpha(opacity=90); - opacity:0.90; - -moz-opacity:0.90; - -khtml-opacity:0.90; + filter: alpha(opacity=90); + opacity: 0.90; + -moz-opacity: 0.90; + -khtml-opacity: 0.90; } #smilesDiv { - padding:3px; - height:195px; - overflow:auto; + padding: 3px; + height: 195px; + overflow: auto; } #smilesDiv2 { - padding:3px; - height:195px; - overflow:auto; + padding: 3px; + height: 195px; + overflow: auto; } #reline1 { - - position:absolute; - width:100%; - height:2px; - background-color:#CCCCCC; - border-bottom:1px solid #797779; - cursor:n-resize; - top:60%; - z-index:1001; - + + position: absolute; + width: 100%; + height: 2px; + background-color: #CCCCCC; + border-bottom: 1px solid #797779; + cursor: n-resize; + top: 60%; + z-index: 1001; + } #reline1:hover { - background-color:#a1a1a1; - cursor:n-resize; + background-color: #a1a1a1; + cursor: n-resize; } #reline1:active { - background-color:#a1a1a1; - cursor:n-resize; + background-color: #a1a1a1; + cursor: n-resize; } #reline3 { - position: absolute; - width: 100%; - height: 1px; - background-color: #758999; - /* - background-color:#CCCCCC; - border-bottom:1px solid #797779; - */ - border-top: 1px solid #aaaaaa; - border-bottom: 1px solid #010101; - cursor:default; - bottom: 34px; - z-index: 1001; + position: absolute; + width: 100%; + height: 1px; + background-color: #758999; + /* + background-color:#CCCCCC; + border-bottom:1px solid #797779; + */ + border-top: 1px solid #aaaaaa; + border-bottom: 1px solid #010101; + cursor: default; + bottom: 34px; + z-index: 1001; } #reline2 { - position:absolute; - width:2px; - background-color:#CCCCCC; - border-right:1px solid #797779; - cursor:e-resize; - top:60%; - z-index:1000; + position: absolute; + width: 2px; + background-color: #CCCCCC; + border-right: 1px solid #797779; + cursor: e-resize; + top: 60%; + z-index: 1000; } #reline2:hover { - background-color:#a1a1a1; - cursor:e-resize; + background-color: #a1a1a1; + cursor: e-resize; } #reline2:active { - background-color:#a1a1a1; - cursor:e-resize; + background-color: #a1a1a1; + cursor: e-resize; } + #upbox { - z-index:1002; - position:absolute; - width:100%; - height:100%; - display:none; - cursor:default; - top:0px; left:0px; + z-index: 1002; + position: absolute; + width: 100%; + height: 100%; + display: none; + cursor: default; + top: 0px; + left: 0px; } #wupbox { - z-index:2000; - position:absolute; - width:100%; - height:100%; - display:none; - cursor:default; - top:0px; left:0px; + z-index: 2000; + position: absolute; + width: 100%; + height: 100%; + display: none; + cursor: default; + top: 0px; + left: 0px; } #chconfig { - position:absolute; - bottom:36px; - background-color:#E1E1E1; - left:11px; - width:215px; - z-index:1005; - display:none; - border:1px solid #979797; - padding:5px; - color:#333333; + position: absolute; + bottom: 36px; + background-color: #E1E1E1; + left: 11px; + width: 215px; + z-index: 1005; + display: none; + border: 1px solid #979797; + padding: 5px; + color: #333333; } #ChatColor { - width:100%; + width: 100%; } .eLine { - background-image:url(../expicLine.gif); - background-repeat:repeat-x; - height:7px; - width:100%; + background-image: url(../expicLine.gif); + background-repeat: repeat-x; + height: 7px; + width: 100%; } #counters { - position:absolute; - bottom:52px; - right:27px; - width:88px; - height:31px; - filter: alpha(opacity=35); - opacity:0.35; - -moz-opacity:0.35; - -khtml-opacity:0.35; - z-index:1006; + position: absolute; + bottom: 52px; + right: 27px; + width: 88px; + height: 31px; + filter: alpha(opacity=35); + opacity: 0.35; + -moz-opacity: 0.35; + -khtml-opacity: 0.35; + z-index: 1006; } #globalMode { - + } #counters:hover { - filter: Glow(strength=2,color=#DDDDDD); - filter: alpha(opacity=100); - opacity:1.0; - -moz-opacity:1.0; - -khtml-opacity:1.0; + filter: Glow(strength=2, color=#DDDDDD); + filter: alpha(opacity=100); + opacity: 1.0; + -moz-opacity: 1.0; + -khtml-opacity: 1.0; } -.cp{ cursor:pointer; } +.cp { + cursor: pointer; +} -.fl{ float:left; } +.fl { + float: left; +} -.fr{ float:right; } +.fr { + float: right; +} -.db{ display:block; } +.db { + display: block; +} /* часы */ #tdDate { - text-align: center; - background: rgb(185, 185, 185, 1); - border-top: 1px solid rgb(200, 200, 200, 1); - border-bottom: 2px solid #7f7f7f; + text-align: center; + background: rgb(185, 185, 185, 1); + border-top: 1px solid rgb(200, 200, 200, 1); + border-bottom: 2px solid #7f7f7f; } + #contentDate { - color: black; - background: #e5cec8; - text-align: center; - font-weight: 600; - font-size: 17px; - padding: 1px 15px; - border: 1px solid rgb(150, 150, 150, 0.7); - border-radius: 5px; - outline: 0 !important; + color: black; + background: #e5cec8; + text-align: center; + font-weight: 600; + font-size: 17px; + padding: 1px 15px; + border: 1px solid rgb(150, 150, 150, 0.7); + border-radius: 5px; + outline: 0 !important; } + #divFullDate { - position: absolute; - width: 130px; - background: rgb(200, 200, 200, 0.6); - border: 1px solid grey; - border-radius: 5px; - text-align: center; - padding: 0 2px; - font-weight: 600; - line-height: 0.3; + position: absolute; + width: 130px; + background: rgb(200, 200, 200, 0.6); + border: 1px solid grey; + border-radius: 5px; + text-align: center; + padding: 0 2px; + font-weight: 600; + line-height: 0.3; } /* ссылки чата */ .URL-a:hover { - text-decoration: underline + text-decoration: underline } -.main_text { font-weight: bold; font-size: 10px; text-decoration: none; color:#f0f0f0; cursor:pointer; } +.main_text { + font-weight: bold; + font-size: 10px; + text-decoration: none; + color: #f0f0f0; + cursor: pointer; +} -.menutop, a.menutop:visited, a.menutop:active { font-weight: bold; font-size: 10px; text-decoration: none; color: #3B3936;} -a.menutop:hover { color: #76726b;} +.menutop, a.menutop:visited, a.menutop:active { + font-weight: bold; + font-size: 10px; + text-decoration: none; + color: #3B3936; +} -.my_clip_button { cursor:pointer; } +a.menutop:hover { + color: #76726b; +} -.chatBtn1_1 { width:30px; height:30px; background: url('//img.new-combats.tech/i/buttons/chatBtn1.gif') 0px 0px repeat-x;} -.chatBtn1_2 { width:30px; height:30px; background: url('//img.new-combats.tech/i/buttons/chatBtn1.gif') 0px -30px repeat-x;} -.chatBtn18_1 { width:30px; height:30px; background: url('//img.new-combats.tech/i/buttons/chatBtn18.gif') 0px 0px repeat-x;} -.chatBtn18_2 { width:30px; height:30px; background: url('//img.new-combats.tech/i/buttons/chatBtn18.gif') 0px -30px repeat-x;} -.chatBtn2_1 { width:30px; height:30px; background: url('//img.new-combats.tech/i/buttons/chatBtn2.gif') 0px 0px repeat-x;} -.chatBtn2_2 { width:30px; height:30px; background: url('//img.new-combats.tech/i/buttons/chatBtn2.gif') 0px -30px repeat-x;} -.chatBtn4_1 { width:30px; height:30px; background: url('//img.new-combats.tech/i/buttons/chatBtn4.gif') 0px 0px repeat-x;} -.chatBtn4_2 { width:30px; height:30px; background: url('//img.new-combats.tech/i/buttons/chatBtn4.gif') 0px -30px repeat-x;} -.chatBtn5_1 { width:30px; height:30px; background: url('//img.new-combats.tech/i/buttons/chatBtn5.gif') 0px 0px repeat-x;} -.chatBtn5_2 { width:30px; height:30px; background: url('//img.new-combats.tech/i/buttons/chatBtn5.gif') 0px -30px repeat-x;} -.chatBtn5_3 { width:30px; height:30px; background: url('//img.new-combats.tech/i/buttons/chatBtn5.gif') 0px -59px repeat-x;} -.chatBtn6_1 { width:30px; height:30px; background: url('//img.new-combats.tech/i/buttons/chatBtn6.gif') 0px 0px repeat-x;} -.chatBtn6_2 { width:30px; height:30px; background: url('//img.new-combats.tech/i/buttons/chatBtn6.gif') 0px -30px repeat-x;} -.chatBtn7_1 { width:30px; height:30px; background: url('//img.new-combats.tech/i/buttons/chatBtn7.gif') 0px 0px repeat-x;} -.chatBtn7_2 { width:30px; height:30px; background: url('//img.new-combats.tech/i/buttons/chatBtn7.gif') 0px -30px repeat-x;} -.chatBtn7_3 { width:30px; height:30px; background: url('//img.new-combats.tech/i/buttons/chatBtn7.gif') 0px -60px repeat-x;} -.chatBtn8_1 { width:30px; height:30px; background: url('//img.new-combats.tech/i/buttons/chatBtn8.gif') 0px 0px repeat-x;} -.chatBtn8_2 { width:30px; height:30px; background: url('//img.new-combats.tech/i/buttons/chatBtn8.gif') 0px -30px repeat-x;} +.my_clip_button { + cursor: pointer; +} -.chatBtn21_1 { width:30px; height:30px; background: url('//img.new-combats.tech/i/buttons/chatBtn21.gif') 0px 0px repeat-x;} -.chatBtn21_2 { width:30px; height:30px; background: url('//img.new-combats.tech/i/buttons/chatBtn21.gif') 0px -30px repeat-x;} +.chatBtn1_1 { + width: 30px; + height: 30px; + background: url('//img.new-combats.tech/i/buttons/chatBtn1.gif') 0px 0px repeat-x; +} + +.chatBtn1_2 { + width: 30px; + height: 30px; + background: url('//img.new-combats.tech/i/buttons/chatBtn1.gif') 0px -30px repeat-x; +} + +.chatBtn18_1 { + width: 30px; + height: 30px; + background: url('//img.new-combats.tech/i/buttons/chatBtn18.gif') 0px 0px repeat-x; +} + +.chatBtn18_2 { + width: 30px; + height: 30px; + background: url('//img.new-combats.tech/i/buttons/chatBtn18.gif') 0px -30px repeat-x; +} + +.chatBtn2_1 { + width: 30px; + height: 30px; + background: url('//img.new-combats.tech/i/buttons/chatBtn2.gif') 0px 0px repeat-x; +} + +.chatBtn2_2 { + width: 30px; + height: 30px; + background: url('//img.new-combats.tech/i/buttons/chatBtn2.gif') 0px -30px repeat-x; +} + +.chatBtn4_1 { + width: 30px; + height: 30px; + background: url('//img.new-combats.tech/i/buttons/chatBtn4.gif') 0px 0px repeat-x; +} + +.chatBtn4_2 { + width: 30px; + height: 30px; + background: url('//img.new-combats.tech/i/buttons/chatBtn4.gif') 0px -30px repeat-x; +} + +.chatBtn5_1 { + width: 30px; + height: 30px; + background: url('//img.new-combats.tech/i/buttons/chatBtn5.gif') 0px 0px repeat-x; +} + +.chatBtn5_2 { + width: 30px; + height: 30px; + background: url('//img.new-combats.tech/i/buttons/chatBtn5.gif') 0px -30px repeat-x; +} + +.chatBtn5_3 { + width: 30px; + height: 30px; + background: url('//img.new-combats.tech/i/buttons/chatBtn5.gif') 0px -59px repeat-x; +} + +.chatBtn6_1 { + width: 30px; + height: 30px; + background: url('//img.new-combats.tech/i/buttons/chatBtn6.gif') 0px 0px repeat-x; +} + +.chatBtn6_2 { + width: 30px; + height: 30px; + background: url('//img.new-combats.tech/i/buttons/chatBtn6.gif') 0px -30px repeat-x; +} + +.chatBtn7_1 { + width: 30px; + height: 30px; + background: url('//img.new-combats.tech/i/buttons/chatBtn7.gif') 0px 0px repeat-x; +} + +.chatBtn7_2 { + width: 30px; + height: 30px; + background: url('//img.new-combats.tech/i/buttons/chatBtn7.gif') 0px -30px repeat-x; +} + +.chatBtn7_3 { + width: 30px; + height: 30px; + background: url('//img.new-combats.tech/i/buttons/chatBtn7.gif') 0px -60px repeat-x; +} + +.chatBtn8_1 { + width: 30px; + height: 30px; + background: url('//img.new-combats.tech/i/buttons/chatBtn8.gif') 0px 0px repeat-x; +} + +.chatBtn8_2 { + width: 30px; + height: 30px; + background: url('//img.new-combats.tech/i/buttons/chatBtn8.gif') 0px -30px repeat-x; +} + +.chatBtn21_1 { + width: 30px; + height: 30px; + background: url('//img.new-combats.tech/i/buttons/chatBtn21.gif') 0px 0px repeat-x; +} + +.chatBtn21_2 { + width: 30px; + height: 30px; + background: url('//img.new-combats.tech/i/buttons/chatBtn21.gif') 0px -30px repeat-x; +} -.topusermenu{ font-family: Verdana, Helvetica, Arial, Tahoma, sans-serif; z-index:1000; position:absolute; background-color:#d2d0d0; font-size:13px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: #929090; border-right-color: #626060; border-bottom-color: #626060; border-left-color: #929090;}.inviseMen1{ filter: alpha(opacity=90); -moz-opacity: 0.90; -khtml-opacity: 0.90; opacity: 0.90; }.inviseMen2{ filter: alpha(opacity=60); -moz-opacity: 0.60; -khtml-opacity: 0.60; opacity: 0.60; }.inviseMen3{ filter: alpha(opacity=30); -moz-opacity: 0.30; -khtml-opacity: 0.30; opacity: 0.30; }.inviseMen4{ filter: alpha(opacity=10); -moz-opacity: 0.10; -khtml-opacity: 0.10; opacity: 0.10; } -.topusermenuBtn:hover{ background-color:#a2a2a2; color: #0066FF;} -.topusermenuBtn{ text-decoration: none; FONT-WEIGHT: bold; color: #003388; padding-left:7px; padding-right:7px; cursor:pointer;} +.topusermenu { + font-family: Verdana, Helvetica, Arial, Tahoma, sans-serif; + z-index: 1000; + position: absolute; + background-color: #d2d0d0; + font-size: 13px; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + border-top-style: solid; + border-right-style: solid; + border-bottom-style: solid; + border-left-style: solid; + border-top-color: #929090; + border-right-color: #626060; + border-bottom-color: #626060; + border-left-color: #929090; +} + +.inviseMen1 { + filter: alpha(opacity=90); + -moz-opacity: 0.90; + -khtml-opacity: 0.90; + opacity: 0.90; +} + +.inviseMen2 { + filter: alpha(opacity=60); + -moz-opacity: 0.60; + -khtml-opacity: 0.60; + opacity: 0.60; +} + +.inviseMen3 { + filter: alpha(opacity=30); + -moz-opacity: 0.30; + -khtml-opacity: 0.30; + opacity: 0.30; +} + +.inviseMen4 { + filter: alpha(opacity=10); + -moz-opacity: 0.10; + -khtml-opacity: 0.10; + opacity: 0.10; +} + +.topusermenuBtn:hover { + background-color: #a2a2a2; + color: #0066FF; +} + +.topusermenuBtn { + text-decoration: none; + FONT-WEIGHT: bold; + color: #003388; + padding-left: 7px; + padding-right: 7px; + cursor: pointer; +} .crop { - display:inline-block; - overflow:hidden; - height: 18px; - width: 18px; - vertical-align:text-bottom; + display: inline-block; + overflow: hidden; + height: 18px; + width: 18px; + vertical-align: text-bottom; } .crop img { - display:inline-block; - height: 18px; - vertical-align:text-bottom; + display: inline-block; + height: 18px; + vertical-align: text-bottom; } .crop2 { - display:inline-block; - overflow:hidden; - height: 16px; - width: 14px; - vertical-align:text-bottom; + display: inline-block; + overflow: hidden; + height: 16px; + width: 14px; + vertical-align: text-bottom; } .crop2 img { - display:inline-block; - height: 14px; - vertical-align:text-bottom; + display: inline-block; + height: 14px; + vertical-align: text-bottom; } .check_gloff { - margin-left:0px; + margin-left: 0px; } .check_glon { - margin-left:-19px; + margin-left: -19px; } .radio_gloff { - margin-left:0px; + margin-left: 0px; } .radio_glon { - margin-left:-18px; + margin-left: -18px; } #audioPlayerChat { - width: 300px; - height: 20px; - margin-bottom: -3px; + width: 300px; + height: 20px; + margin-bottom: -3px; } #record { - width: 116px; - height: 28px; - font-size: 16px; - background: rgba(0, 195, 255, 0.083); - border-radius: 7px; - font-weight: 600; - border: 1px solid rgba(128, 128, 128, 0.5); - cursor:pointer; + width: 116px; + height: 28px; + font-size: 16px; + background: rgba(0, 195, 255, 0.083); + border-radius: 7px; + font-weight: 600; + border: 1px solid rgba(128, 128, 128, 0.5); + cursor: pointer; } + #timerVoiceMess { - position: absolute; - width: 90px; - color: rgb(214, 0, 0); - background: rgba(200, 200, 200, 0.5); - border: 1px solid rgba(128, 128, 128, 0.507); - border-radius: 5px; - text-align: center; - padding: 0 2px; - font-weight: 600; + position: absolute; + width: 90px; + color: rgb(214, 0, 0); + background: rgba(200, 200, 200, 0.5); + border: 1px solid rgba(128, 128, 128, 0.507); + border-radius: 5px; + text-align: center; + padding: 0 2px; + font-weight: 600; } + .span_voice { - margin: 3px 0; + margin: 3px 0; } - -/*iPhone 6+ Альбом */ -/* @media only screen and (min-device-width: 414px) and (max-device-width: 736px) and (orientation : portrait) { */ - - /* #reline1, #reline2, #deleteFooter, .deleteStyles { - display: none; - } - - #chat_menus, #chat_menu { - text-align: center - } */ - - - - /* #chat_list { - width: 100px; - } */ - - /* #online { - display: none; - } */ - - /* #main_td { - height: 400px; - } - */ - - /* body { - display: flex; - flex-direction: column; - } */ - - /* #buttonHiddenChat { - width: 100%; - font-size: 17pt; - position: fixed; - } - - #deleteFooter { - display: none; - } - - #globalMain { - - } - - #main, #touchmain { - } - - #reline1, #reline2 { - display: none; - } - - #chat { - width: 400px; - } - - #chat_list { - width: 400px; - border: 1px solid black; - } */ - - /* .deleteMobile { */ - /* весь TR */ - /* td bgcolor | td bgcolor */ - /* #allChat[0] td bgcolor */ - /* #allChat[1] td valign="botton" | td heigth="30" bgcolor*/ - - /* } */ -/* } */ - diff --git a/ekr.php b/ekr.php index c3a342fb..6311aa7c 100644 --- a/ekr.php +++ b/ekr.php @@ -1,24 +1,23 @@ 0.13 ЕКР. Приятной Вам игры! -require_once('_incl_data/__config.php'); -require_once('_incl_data/class/__db_connect.php'); +Database::init(); + $u = User::start(); if (!isset($u->info['id'])) { header('location: /'); die(); } -$ball = mysql_fetch_array( - mysql_query( - 'SELECT SUM(`ekr`) FROM `pay_operation` WHERE `uid` = "' . $u->info['id'] . '" AND `good` > 0 LIMIT 1' - ) -); - -$ball = 0 + $ball[0]; +$ball = Db::getValue('select sum(ekr) from pay_operation where uid = ? and good > 0', [$u->info['id']]); $day1def = 50; //сколько екр. в день можно менять на кр. $day2def = 1000 * ($u->info['level'] - 7); //сколько кр. в день можно менять на екр. @@ -31,19 +30,8 @@ if ($day2 < 0) { } $timetoday = strtotime(date('d.m.Y')); -// -$dc1 = mysql_fetch_array( - mysql_query( - 'SELECT SUM(`money2`) FROM `user_operation` WHERE `time` >= "' . $timetoday . '" AND `uid` = "' . $u->info['id'] . '" AND `type` = "Обмен ЕКР на КР" LIMIT 1' - ) -); -$dc2 = mysql_fetch_array( - mysql_query( - 'SELECT SUM(`money`) FROM `user_operation` WHERE `time` >= "' . $timetoday . '" AND `uid` = "' . $u->info['id'] . '" AND `type` = "Обмен КР на ЕКР" LIMIT 1' - ) -); -$dc1 = $dc1[0]; -$dc2 = $dc2[0]; +$dc1 = Db::getValue('select sum(money2) from user_operation where time >= unix_timestamp() and uid = ? and type = ?', [$u->info['id'], 'Обмен ЕКР на КР']); +$dc2 = Db::getValue('select sum(money) from user_operation where time >= unix_timestamp() and uid = ? and type = ?', [$u->info['id'], 'Обмен КР на ЕКР']); $day1 = round($day1 + $dc1, 2); $day2 = round($day2 + $dc2, 2); @@ -58,7 +46,8 @@ if ($day2 < 0) { $b1 = 0; //бонус накопительный -$bt = mysql_fetch_array(mysql_query('SELECT * FROM `bank_table` ORDER BY `time` DESC LIMIT 1')); +$bt = Db::getRow('select cur, USD from bank_table order by time desc limit 1'); + $bns = [ [0, 0, 0], @@ -759,7 +748,7 @@ if (isset($_POST['do']) && $_POST['do'] == 'newShadow') { |