From a0efddefc5bd464498503baf5f32900e8060f14c Mon Sep 17 00:00:00 2001 From: Ivor Barhansky Date: Mon, 19 Dec 2022 23:15:56 +0200 Subject: [PATCH] =?UTF-8?q?=D0=92=D1=8B=D1=87=D0=B8=D1=81=D1=82=D0=BA?= =?UTF-8?q?=D0=B0=20=D0=BE=D0=B3=D1=80=D1=8B=D0=B7=D0=BA=D0=BE=D0=B2=20get?= =?UTF-8?q?IP()=20=D0=B8=20=D0=BF=D0=B5=D1=80=D0=B5=D0=BD=D0=BE=D1=81=20?= =?UTF-8?q?=D1=84=D1=83=D0=BD=D0=BA=D1=86=D0=B8=D0=B8=20mail()=20=D0=B2=20?= =?UTF-8?q?=D0=BA=D0=BB=D0=B0=D1=81=D1=81.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AI.php | 11 +- aunitpay.php | 354 ++- cron_GAMECORE.php | 107 +- cron_prizhaot.php | 20 +- cron_tower.php | 31 +- cron_trupojor.php | 366 +-- cron_turnir.php | 17 +- modules_data/location/an/bank.php | 380 ++- modules_data/location/bank.php | 29 +- register.php | 298 ++- registergmail.php | 3666 +++++++++++++++++------------ repass.php | 13 +- reting_clans_cron.php | 251 +- reting_pers_cron.php | 275 +-- 14 files changed, 3388 insertions(+), 2430 deletions(-) diff --git a/AI.php b/AI.php index 0fa85209..9916b50b 100644 --- a/AI.php +++ b/AI.php @@ -141,14 +141,9 @@ if (isset($_GET['test'])) { die(); } -function getIP() -{ - return isset($_SERVER['HTTP_X_REAL_IP']) ? $_SERVER['HTTP_X_REAL_IP'] : $_SERVER['REMOTE_ADDR']; -} - -if (!isset($_GET['robot']) && getIP() != $_SERVER['SERVER_ADDR'] && getIP() != '127.0.0.1' && getIP() != '' && getIP( - ) != '31.131.116.166' && !isset($_GET['test'])) { - die(getIP() . '
' . $_SERVER['SERVER_ADDR']); +if (!isset($_GET['robot']) && UserIp::get() != $_SERVER['SERVER_ADDR'] && UserIp::get() != '127.0.0.1' && UserIp::get( + ) != '' && UserIp::get() != '31.131.116.166') { + die(UserIp::get() . '
' . $_SERVER['SERVER_ADDR']); } diff --git a/aunitpay.php b/aunitpay.php index 8aadfcbd..aab24e57 100644 --- a/aunitpay.php +++ b/aunitpay.php @@ -1,196 +1,168 @@ - array( - 'message' => $message - ) - ) - ); - } - - function getResponseSuccess($message) - { - return json_encode( - array( - 'result' => array( - 'message' => $message - ) - ) - ); - } -date_default_timezone_set('Europe/Moscow'); - $c = array( - /* MySQL База данных */ - 'db_name' => 'pay_operations', //Таблица в которую заносятся данные - 'db_host' => 'localhost', - 'db_user' => 'newcom1_abk', - 'db_pass' => '4nWYsIM[c?}P', - 'db_base' => 'newcom1_abk', - /* Настройки платежей - 'ip_list' => array('127,0,0,1,188.166.34.68,136.243.38.147,136.243.38.149,136.243.38.150,136.243.38.151,136.243.38.189,88.198.88.98'), //Указывать через запятую (Разрешенные IP) - 'key' => 'qtzl0igb', //gamedealer key - 'id' => '65643' //ID проекта*/ + return json_encode( + [ + 'error' => [ + 'message' => $message, + ], + ] ); - - - function connect_db($c) { - $db = mysql_connect($c['db_host'],$c['db_user'],$c['db_pass']) or die('Ошибка подключения к MySQL серверу!'); - mysql_select_db($c['db_base'],$db) or die('Ошибка подключения к базе данных!'); - mysql_query('SET NAMES cp1251'); - } - - function getFormSignature($account, $currency, $sum, $secretKey) - { - $hashStr = $account.'{up}'.$currency.'{up}'.$sum.'{up}'.$secretKey; - return hash('sha256', $hashStr); - } - - - - - - $request=$_GET; - if (empty($request['method']) - || empty($request['params']) - || !is_array($request['params']) - ) - { - echo getResponseError('Invalid request'); - die(); - } - $method = $request['method']; - $params = $request['params']; - if ($_GET['method']=="check") - { - - echo getResponseSuccess('CHECK is successful'); - die(); - //echo "Запрос успешно обработан".$pays['account']; - //echo getFormSignature($_GET['params[account]'],"RUB",$_GET['params[payerSum]'],"392bb04608af9aa823a277173c83f633");; - } - //MERCHANT_ORDER_ID=142&P_PHONE=380688028300&P_EMAIL=evhenii_kula%40mail.ru&CUR_ID=94&AMOUNT=90&MERCHANT_ID=65643&SIGN=c0fc70d5446614597d44ff13f2c7a6a5&intid=29728441 - /* - MERCHANT_ORDER_ID - P_PHONE - P_EMAIL - CUR_ID - AMOUNT - MERCHANT_ID - SIGN - intid - - https://адрес_вашего_обработчика? - method=check - params[account]=userId - params[date]=2012-10-01 12:32:00 - params[operator]=beeline - params[paymentType]=mc - params[projectId]=1 - params[phone]=9XXXXXXXXX - params[payerSum]=10.00 - params[payerCurrency]=RUB - params[signature]=9bdf52a4830779a1383ac24f1b3ed054 - params[orderSum]=10.00 - params[orderCurrency]=RUB - params[unitpayId]=1234567 - params[test]=0 - */ -if ($_GET['method']=="pay") - { - connect_db($c); - $nick = mysql_fetch_array(mysql_query('SELECT * FROM `pay_operation` WHERE `id` = "'.$params['account'].'" LIMIT 1')); - if (!isset($nick['good'])) - { - echo getResponseError('Bad order'); - die(); - } - $user = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `id` = "'.$nick['uid'].'" LIMIT 1')); - if (isset ($params['account'])) - { - if ($nick['good']!=0) - { - echo getResponseError('Already Used'); - die(); - } - else - { - - mysql_query('UPDATE `users` SET `money2` = `money2` + '.$nick['ekr'].' WHERE `id` = "'.$nick['uid'].'" LIMIT 1'); - mysql_query('UPDATE `pay_operation` SET `good` = "'.time().'" WHERE `id` = "'.$params['account'].'" LIMIT 1'); - mysql_query('UPDATE `users` SET `catch` = `catch` + '.$nick['ekr'].' WHERE `id` = "'.$nick['uid'].'" LIMIT 1'); - - //mysql_query('INSERT INTO `'.$c['db_name'].'` (`time`,`type`,`ip`,`value`,`money`,`project`) VALUES ("'.time().'","'.mysql_real_escape_string($type).'","'.$_SERVER['HTTP_X_REAL_IP'].'","'.mysql_real_escape_string($value).'","'.mysql_real_escape_string($money).'","'.mysql_real_escape_string($this->id).'")'); - - $r = ''.date('d.m.Y H:i').' Алхимик Администратор / Автоматическая оплата сообщает: '; - if($user['sex'] == 1) - { - $r .= 'Уважаемая'; - } - else - { - $r .= 'Уважаемый'; - } - $r .= ' '.$user['login'].', на Ваш игровой счет зачислено '.$nick['ekr'].' Еврокредитов. Благодарим Вас за покупку!'; - //$str1 = iconv("cp1251","UTF-8",$r); - mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','".$user['city']."','".$user['room']."','','".$user['login']."','".$r."','-1','5','0')"); - //echo $r."r
"; - - - if ($nick['ref'] !=0) - { - $refecr=round(($nick['ekr']/10)); - mysql_query('UPDATE `users` SET `money2` = `money2` + '.$refecr.' WHERE `id` = "'.$nick['ref'].'" LIMIT 1'); - $referal = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `id` = "'.$nick['ref'].'" LIMIT 1')); - $r = ''.date('d.m.Y H:i').' Алхимик Администратор / Реферальный заработок сообщает: '; - if($referal['sex'] == 1) - { - $r .= 'Уважаемая'; - } - else - { - $r .= 'Уважаемый'; - } - $r .= ' '.$referal['login'].', на Ваш игровой счет зачислено '.$refecr.' Еврокредитов. Благодоря вашему рефералу!'.$user['login'].''; - //$str1 = iconv("cp1251","UTF-8",$r); - mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','".$referal['city']."','".$referal['room']."','','".$referal['login']."','".$r."','-1','5','0')"); - - - } - - //echo "Покупател: ".$user['login']." | ID: ".$nick['uid']." | Сумма: ".$nick['ekr']." | ID операции: ".$params['account']."
"; - if (isset ($referal['id'])) - { - //echo "Реферал(тот кто привел): ".$referal['login']." | ID: ".$referal['id']." | Сумма: ".$refecr."
"; - } - else - { - //echo "Пользователь реферал не найден!!"; - } - - echo getResponseSuccess('PAY is successful'); - die(); - } - - } - else - { - echo getResponseError('No order'); - die(); - } } -?> + +function getResponseSuccess($message) +{ + return json_encode( + [ + 'result' => [ + 'message' => $message, + ], + ] + ); +} + +date_default_timezone_set('Europe/Moscow'); +$c = [ + /* MySQL База данных */ + 'db_name' => 'pay_operations', //Таблица в которую заносятся данные + 'db_host' => 'localhost', + 'db_user' => 'newcom1_abk', + 'db_pass' => '4nWYsIM[c?}P', + 'db_base' => 'newcom1_abk', + /* Настройки платежей + 'ip_list' => array('127,0,0,1,188.166.34.68,136.243.38.147,136.243.38.149,136.243.38.150,136.243.38.151,136.243.38.189,88.198.88.98'), //Указывать через запятую (Разрешенные IP) + 'key' => 'qtzl0igb', //gamedealer key + 'id' => '65643' //ID проекта*/ +]; + + +function connect_db($c) +{ + $db = mysql_connect($c['db_host'], $c['db_user'], $c['db_pass']) or die('Ошибка подключения к MySQL серверу!'); + mysql_select_db($c['db_base'], $db) or die('Ошибка подключения к базе данных!'); + mysql_query('SET NAMES cp1251'); +} + +function getFormSignature($account, $currency, $sum, $secretKey) +{ + $hashStr = $account . '{up}' . $currency . '{up}' . $sum . '{up}' . $secretKey; + return hash('sha256', $hashStr); +} + + +$request = $_GET; +if (empty($request['method']) + || empty($request['params']) + || !is_array($request['params']) +) { + echo getResponseError('Invalid request'); + die(); +} +$method = $request['method']; +$params = $request['params']; +if ($_GET['method'] == "check") { + + echo getResponseSuccess('CHECK is successful'); + die(); + +} +//MERCHANT_ORDER_ID=142&P_PHONE=380688028300&P_EMAIL=evhenii_kula%40mail.ru&CUR_ID=94&AMOUNT=90&MERCHANT_ID=65643&SIGN=c0fc70d5446614597d44ff13f2c7a6a5&intid=29728441 +/* +MERCHANT_ORDER_ID +P_PHONE +P_EMAIL +CUR_ID +AMOUNT +MERCHANT_ID +SIGN +intid + +https://адрес_вашего_обработчика? + method=check + params[account]=userId + params[date]=2012-10-01 12:32:00 + params[operator]=beeline + params[paymentType]=mc + params[projectId]=1 + params[phone]=9XXXXXXXXX + params[payerSum]=10.00 + params[payerCurrency]=RUB + params[signature]=9bdf52a4830779a1383ac24f1b3ed054 + params[orderSum]=10.00 + params[orderCurrency]=RUB + params[unitpayId]=1234567 + params[test]=0 +*/ +if ($_GET['method'] == "pay") { + connect_db($c); + $nick = mysql_fetch_array( + mysql_query('SELECT * FROM `pay_operation` WHERE `id` = "' . $params['account'] . '" LIMIT 1') + ); + if (!isset($nick['good'])) { + echo getResponseError('Bad order'); + die(); + } + $user = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `id` = "' . $nick['uid'] . '" LIMIT 1')); + if (isset ($params['account'])) { + if ($nick['good'] != 0) { + echo getResponseError('Already Used'); + die(); + } else { + + mysql_query( + 'UPDATE `users` SET `money2` = `money2` + ' . $nick['ekr'] . ' WHERE `id` = "' . $nick['uid'] . '" LIMIT 1' + ); + mysql_query( + 'UPDATE `pay_operation` SET `good` = "' . time() . '" WHERE `id` = "' . $params['account'] . '" LIMIT 1' + ); + mysql_query( + 'UPDATE `users` SET `catch` = `catch` + ' . $nick['ekr'] . ' WHERE `id` = "' . $nick['uid'] . '" LIMIT 1' + ); + + $r = '' . date( + 'd.m.Y H:i' + ) . ' Алхимик Администратор / Автоматическая оплата сообщает: '; + if ($user['sex'] == 1) { + $r .= 'Уважаемая'; + } else { + $r .= 'Уважаемый'; + } + $r .= ' ' . $user['login'] . ', на Ваш игровой счет зачислено ' . $nick['ekr'] . ' Еврокредитов. Благодарим Вас за покупку!'; + + mysql_query( + "INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','" . $user['city'] . "','" . $user['room'] . "','','" . $user['login'] . "','" . $r . "','-1','5','0')" + ); + + if ($nick['ref'] != 0) { + $refecr = round(($nick['ekr'] / 10)); + mysql_query( + 'UPDATE `users` SET `money2` = `money2` + ' . $refecr . ' WHERE `id` = "' . $nick['ref'] . '" LIMIT 1' + ); + $referal = mysql_fetch_array( + mysql_query('SELECT * FROM `users` WHERE `id` = "' . $nick['ref'] . '" LIMIT 1') + ); + $r = '' . date( + 'd.m.Y H:i' + ) . ' Алхимик Администратор / Реферальный заработок сообщает: '; + if ($referal['sex'] == 1) { + $r .= 'Уважаемая'; + } else { + $r .= 'Уважаемый'; + } + $r .= ' ' . $referal['login'] . ', на Ваш игровой счет зачислено ' . $refecr . ' Еврокредитов. Благодоря вашему рефералу!' . $user['login'] . ''; + //$str1 = iconv("cp1251","UTF-8",$r); + mysql_query( + "INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','" . $referal['city'] . "','" . $referal['room'] . "','','" . $referal['login'] . "','" . $r . "','-1','5','0')" + ); + } + + echo getResponseSuccess('PAY is successful'); + die(); + } + + } else { + echo getResponseError('No order'); + die(); + } +} diff --git a/cron_GAMECORE.php b/cron_GAMECORE.php index efc5239f..94e776be 100644 --- a/cron_GAMECORE.php +++ b/cron_GAMECORE.php @@ -6,82 +6,61 @@ */ - - -//if( $_SERVER['HTTP_CF_CONNECTING_IP'] != $_SERVER['SERVER_ADDR'] && $_SERVER['HTTP_CF_CONNECTING_IP'] != '127.0.0.1' ) { die('Hello pussy!'); } - -function getIP() { - if(isset($_SERVER['HTTP_X_REAL_IP'])) return $_SERVER['HTTP_X_REAL_IP']; - return $_SERVER['REMOTE_ADDR']; -} - -if(getIP() != $_SERVER['SERVER_ADDR'] && getIP() != '127.0.0.1' && getIP() != '' && getIP() != '5.187.7.71') { - if(!isset($_GET['test'])) { - die(getIP().'
'.$_SERVER['SERVER_ADDR']); - } -} - - -define('GAME',true); - +const GAME = true; require_once('_incl_data/__config.php'); require_once('_incl_data/class/__db_connect.php'); -function e($t) { - mysql_query('INSERT INTO `chat` (`text`,`city`,`to`,`type`,`new`,`time`) VALUES ("core #'.date('d.m.Y').' %'.date('H:i:s').' (Критическая ошибка): '.mysql_real_escape_string($t).'","capitalcity","LEL","6","1","-1")'); +if (UserIp::get() != $_SERVER['SERVER_ADDR'] && UserIp::get() != '127.0.0.1' && UserIp::get() != '' && UserIp::get( + ) != '5.187.7.71' && !isset($_GET['test'])) { + die(UserIp::get() . '
' . $_SERVER['SERVER_ADDR']); } -$count = array( - 0, //завершенных поединков - 0, - 0, - 0, - 0, - 0 -); -function clear_user($plid) { - mysql_query('UPDATE `users` SET `login` = "delete",`login2` = `login` WHERE `id` = "'.$plid.'" LIMIT 1'); - /* mysql_query('DELETE FROM `users` WHERE `id` = "'.$plid.'" LIMIT 1'); - mysql_query('DELETE FROM `items_users` WHERE `uid` = "'.$plid.'"'); - mysql_query('DELETE FROM `eff_users` WHERE `uid` = "'.$plid.'"'); - mysql_query('DELETE FROM `bank` WHERE `uid` = "'.$plid.'"');*/ +function e($t) +{ + mysql_query( + 'INSERT INTO `chat` (`text`,`city`,`to`,`type`,`new`,`time`) VALUES ("core #' . date('d.m.Y') . ' %' . date( + 'H:i:s' + ) . ' (Критическая ошибка): ' . mysql_real_escape_string($t) . '","capitalcity","LEL","6","1","-1")' + ); } -/*$sp = mysql_query('SELECT `id` FROM `users` WHERE `cityreg` = "" && `timereg` = "0" LIMIT 100'); -while($pl = mysql_fetch_array($sp)) { - $n_st = mysql_fetch_array(mysql_query('SELECT `id` FROM `stats` WHERE `id` = "'.$pl['id'].'" LIMIT 1')); - if(!isset($n_st['id'])) { - clear_user($pl['id']); - } -}*/ +$count = [ + 0, //завершенных поединков + 0, + 0, + 0, + 0, + 0, +]; -function inuser_go_btl($id) { - if(isset($id['id'])) { - echo file_get_contents('https://new-combats.com/jx/battle/refresh.php?uid='.$id['id'].'&cron_core='.md5($id['id'].'_brfCOreW@!_'.$id['pass']).'&pass='.$id['pass']); - echo '
'; - } +function clear_user($plid) +{ + mysql_query('UPDATE `users` SET `login` = "delete",`login2` = `login` WHERE `id` = ' . $plid); +} + +function inuser_go_btl($id) +{ + if (isset($id['id'])) { + echo file_get_contents( + 'https://new-combats.com/jx/battle/refresh.php?uid=' . $id['id'] . '&cron_core=' . md5( + $id['id'] . '_brfCOreW@!_' . $id['pass'] + ) . '&pass=' . $id['pass'] + ); + echo '
'; + } } /* считаем поединки */ //e('обработка отменена.'); $i = 0; -while( $i < 3 ) { - $sp = mysql_query('SELECT `id`,`time_start` FROM `battle` WHERE `team_win` = "-1" AND `time_over` = "0" AND `type` = 329 LIMIT 100'); - while($pl = mysql_fetch_array($sp)) { - $user1 = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `battle` = "'.$pl['id'].'" LIMIT 1')); - inuser_go_btl($user1); - } - $i++; +while ($i < 3) { + $sp = mysql_query( + 'SELECT `id`,`time_start` FROM `battle` WHERE `team_win` = "-1" AND `time_over` = "0" AND `type` = 329 LIMIT 100' + ); + while ($pl = mysql_fetch_array($sp)) { + $user1 = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `battle` = "' . $pl['id'] . '" LIMIT 1')); + inuser_go_btl($user1); + } + $i++; } - -//$i = 0; -//while( $i < 3 ) { -/* $sp = mysql_query('SELECT `id`,`time_start` FROM `battle` WHERE `team_win` = "-1" AND `time_over` = "0" AND `time_start` < "'.(time()-3600).'" LIMIT 100'); - while($pl = mysql_fetch_array($sp)) { - $user1 = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `battle` = "'.$pl['id'].'" LIMIT 1')); - inuser_go_btl($user1); - }*/ - //$i++; -//} -?> \ No newline at end of file diff --git a/cron_prizhaot.php b/cron_prizhaot.php index 1403ae40..10f0f410 100644 --- a/cron_prizhaot.php +++ b/cron_prizhaot.php @@ -1,19 +1,15 @@ ' . $_SERVER['SERVER_ADDR']); -} - const GAME = true; setlocale(LC_CTYPE, "ru_RU.CP1251"); -include('_incl_data/class/__db_connect.php'); +require_once '_incl_data/__config.php'; +require_once '_incl_data/class/__db_connect.php'; + +if (!isset($_GET['tests']) && UserIp::get() != $_SERVER['SERVER_ADDR'] && UserIp::get() != '127.0.0.1' && UserIp::get() != '51.89.6.100') { + exit(UserIp::get() . '
' . $_SERVER['SERVER_ADDR']); +} + //Подаем турнир (хаот) для 8-11 уровней +$pdo = \Core\Database::pdoinit(); $inc = $pdo->prepare( 'insert into zayvki (`comment`,`arand`,`noatack`,`city`,`creator`,`type`,`time_start`,`timeout`,`min_lvl_1`,`min_lvl_2`,`max_lvl_1`,`max_lvl_2`,`noinc`,`razdel`,`time`,`fastfight`,`priz`,`maxplayers`,`tm1max`,`tm2max`) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,unix_timestamp(),?,?,?,?,?)' )->execute( diff --git a/cron_tower.php b/cron_tower.php index 7703a15e..50958901 100644 --- a/cron_tower.php +++ b/cron_tower.php @@ -1,22 +1,19 @@ ' . $_SERVER['SERVER_ADDR']); } -if (!isset($_GET['test']) && getIP() != $_SERVER['SERVER_ADDR'] && getIP() != '127.0.0.1' && getIP() != '' && getIP( - ) != '31.131.106.205') { - exit(getIP() . '
' . $_SERVER['SERVER_ADDR']); - } - function changeSleep($uid, $sleep_action) { $u = User::start(); if ($sleep_action == 1) { - // mysql_query('INSERT INTO `sleep` (`uid`,`time`,`sleep`) VALUES ("' . $uid . '","' . time() . '","1")'); - // mysql_query( "UPDATE `eff_users` SET `sleeptime`=" . time() . ",`deactiveLast` = ( `deactiveTime` - " . time( ) . " ) WHERE `uid`='" . mysql_real_escape_string($uid) . "' AND `no_Ace` = 0 AND `delete` = 0" @@ -26,11 +23,8 @@ function changeSleep($uid, $sleep_action) ) . '" WHERE `uid` = "' . $uid . '" AND `delete` < 1001 AND `data` LIKE "%|sleep_moroz=1%"' ); $u->addAction(time(), 'sleep', $u->info['city']); - // } elseif ($sleep_action == 2) { - // mysql_query('INSERT INTO `sleep` (`uid`,`time`,`sleep`) VALUES ("' . $uid . '","' . time() . '","2")'); - // $sp = mysql_query( 'SELECT * FROM `items_users` WHERE `time_sleep` > 0 AND `uid` = "' . $uid . '" AND `delete` < 1001 AND `data` LIKE "%|sleep_moroz=1%"' ); @@ -75,10 +69,6 @@ $cnfg = [ echo '#start#'; -define('GAME', true); -setlocale(LC_CTYPE, "ru_RU.CP1251"); -include('_incl_data/__config.php'); -include('_incl_data/class/__db_connect.php'); $magic = new Magic(); $itbs = [ @@ -804,10 +794,6 @@ while ($pl = mysql_fetch_array($sp)) { unset($stor, $stgo); } } - - } else { - //Сражаемся - } } } @@ -816,7 +802,7 @@ while ($pl = mysql_fetch_array($sp)) { } } elseif ($pl['status'] == 0 && $pl['time_start'] < time()) { //Начинаем турнир - if (nostart($pl) == false) { + if (!nostart($pl)) { //Начинаем турнир! $spm = mysql_query('SELECT `x`,`y` FROM `bs_map` WHERE `mid` = "' . $pl['type_map'] . '"'); @@ -1062,7 +1048,6 @@ while ($pl = mysql_fetch_array($sp)) { if ($pl['status'] == 0) { if ($pl['ch1'] == 0 && $pl['time_start'] - 60 * 60 < time()) { mysql_query('UPDATE `bs_turnirs` SET `ch1` = `ch1` + 1 WHERE `id` = "' . $pl['id'] . '" LIMIT 1'); - //e('Начало турнира вечных «5» уровней, для '.$pl['to_lvl'].' уровней в Башне Смерти через '.timeOut($pl['time_start']-time()).' ('.date('d.m.Y H:i',$pl['time_start']).'), текущий призовой фонд: '.round($pl['money']*0.85,2).' кр., заявок: '.$pl['users'].''); } elseif ($pl['ch1'] == 1 && $pl['time_start'] - 10 * 60 < time()) { mysql_query('UPDATE `bs_turnirs` SET `ch1` = `ch1` + 1 WHERE `id` = "' . $pl['id'] . '" LIMIT 1'); e( diff --git a/cron_trupojor.php b/cron_trupojor.php index 711edbdb..36af09e8 100644 --- a/cron_trupojor.php +++ b/cron_trupojor.php @@ -1,190 +1,198 @@

Ѕроди ;)

'); - }*/ - if(getIP() != $_SERVER['SERVER_ADDR'] && getIP() != '127.0.0.1' && getIP() != '' && getIP() != '31.131.97.206') - { - die(getIP().'
'.$_SERVER['SERVER_ADDR']); - } -} -/* - if( $_SERVER['HTTP_CF_CONNECTING_IP'] != $_SERVER['SERVER_ADDR'] && $_SERVER['HTTP_CF_CONNECTING_IP'] != '127.0.0.1' ) { die('

Ѕроди ;)

'); } -}*/ - - - -define('GAME',true); +const GAME = true; require_once('_incl_data/__config.php'); require_once('_incl_data/class/__db_connect.php'); -function e($t) { - mysql_query('INSERT INTO `chat` (`text`,`city`,`to`,`type`,`new`,`time`) VALUES ("core #'.date('d.m.Y').' %'.date('H:i:s').' ( ритическа¤ ошибка): '.mysql_real_escape_string($t).'","capitalcity","LEL","6","1","-1")'); +if (!isset($_GET['test']) && UserIp::get() != $_SERVER['SERVER_ADDR'] && UserIp::get() != '127.0.0.1' && UserIp::get() != '' && UserIp::get() != '31.131.97.206') { + die(UserIp::get() . '
' . $_SERVER['SERVER_ADDR']); } -function testMonster( $mon , $type , $mbk ) { - $r = true; - $mbk2 = ''; - if(isset($mon['id'])) { - // - if($type == 'start') { - //?ень недели - if( $mon['start_day'] != -1 ) { - if( ($mon['start_day'] < 7 && $mon['start_day'] != (int)date('w')) || $mon['start_day'] != 7 ) { - $r = false; - $mbk2 .= '(неделя)'; - } - } - //?исло - if( $mon['start_dd'] != -1 ) { - if( $mon['start_dd'] != date('j') ) { - $r = false; - $mbk2 .= '(число)'; - } - } - //месІц - if( $mon['start_mm'] != -1 ) { - if( $mon['start_mm'] != date('n') ) { - $r = false; - $mbk2 .= '(месяц)'; - } - } - //час - if( $mon['start_hh'] != -1 ) { - if( $mon['start_hh'] != (int)date('H') ) { - $r = false; - $mbk2 .= '('.$mon['start_hh'].'|'.((int)date('H')).' час)'; - } - if( $mon['start_min'] != -1 ) { - if( $mon['start_min'] < (int)date('i') ) { - $r = false; - $mbk2 .= '('.$mon['start_min'].'|'.((int)date('i')).' минуты)'; - } - } - } - }elseif($type == 'back') { - //?ень недели - if( $mon['back_day'] != -1 ) { - if( ($mon['back_day'] < 7 && $mon['back_day'] != date('w')) || $mon['back_day'] != 7 ) { - $r = false; - $mbk2 .= '(день недели)'; - } - } - //?исло - if( $mon['back_dd'] != -1 ) { - if( $mon['back_dd'] != date('j') ) { - $r = false; - $mbk2 .= '(число)'; - } - } - //месІц - if( $mon['back_mm'] != -1 ) { - if( $mon['back_mm'] != date('n') ) { - $r = false; - $mbk2 .= '(месяц)'; - } - } - //час - if( $mon['back_hh'] != -1 ) { - if( $mon['back_hh'] != (int)date('H') ) { - $r = false; - $mbk2 .= '(час)'; - } - if( $mon['back_min'] != -1 ) { - if( $mon['back_min'] < (int)date('i') ) { - $r = false; - $mbk2 .= '(минуты)'; - } - } - } - }else{ - //что-то другое - $r = false; - $mbk2 .= '(что-то другое)'; - } - // - } - if( $mbk == true ) { - return $mbk2; - }else{ - return $r; - } + +function e($t) +{ + mysql_query( + 'INSERT INTO `chat` (`text`,`city`,`to`,`type`,`new`,`time`) VALUES ("core #' . date('d.m.Y') . ' %' . date( + 'H:i:s' + ) . ' ( ритическа¤ ошибка): ' . mysql_real_escape_string($t) . '","capitalcity","LEL","6","1","-1")' + ); } -$sp = mysql_query('SELECT `u`.*,`st`.* FROM `users` AS `u` LEFT JOIN `stats` AS `st` ON `st`.`id` = `u`.`id` WHERE `u`.`no_ip` = "trupojor" LIMIT 100'); -while($pl = mysql_fetch_array($sp)) { - /*echo "ID:".$pl['id']."
"; - echo "online:".$pl['online']."
"; - $testtime=time()-60; - echo "time:".$testtime."
";*/ - $act = 0; - if($pl['online'] < time()-60) { - $pl['online'] = time(); - mysql_query('UPDATE `users` SET `online` = "'.$pl['online'].'" WHERE `id` = "'.$pl['id'].'" LIMIT 1'); - } - - //$testb=mysql_fetch_array(mysql_query('SELECT * FROM `battle` WHERE `type` = 500 AND `team_win` = -1 LIMIT 1')); - if($pl['res_x'] < time() /*&& !isset($testb['id'])*/) { - //ёожно действовать! - $mon = mysql_fetch_array(mysql_query('SELECT * FROM `aaa_monsters` WHERE `uid` = "'.$pl['id'].'" LIMIT 1')); - if( isset($mon['id']) ) { - if( testMonster($mon,'start',false) == true && $pl['room'] == 303 ) { - $pl['room'] = $mon['start_room']; - mysql_query('UPDATE `users` SET `room` = "'.$pl['room'].'" WHERE `id` = "'.$pl['id'].'" LIMIT 1'); - mysql_query('UPDATE `stats` SET `hpNow` = "1000000000000",`mpNow` = "1000000000000" WHERE `id` = "'.$pl['id'].'" LIMIT 1'); - if( $mon['start_text'] != '' /*&& $pl['level'] <10*/) { - mysql_query('INSERT INTO `chat` (`text`,`city`,`to`,`type`,`new`,`time`) VALUES ("Внимание! '.mysql_real_escape_string(str_replace('{b}',''.$pl['login'].' ['.$pl['level'].']',$mon['start_text'])).'","'.$pl['city'].'","","6","1","'.time().'")'); - //mysql_query('INSERT INTO `chat` (`text`,`city`,`to`,`type`,`new`,`time`) VALUES ("Внимание! '.mysql_real_escape_string(str_replace('{b}',''.$pl['login'].' ['.$pl['level'].']',$mon['start_text'])).'","'.$pl['city'].'","","1","1","'.time().'")'); - } - $act = 1; - } - }else{ - mysql_query('UPDATE `stats` SET `res_x` = "'.(time()+3600).'" WHERE `id` = "'.$pl['id'].'" LIMIT 1'); - } - } - - //e('['.date('d.m.Y H:i:s').'] TRUPOJOR -> '.$pl['login'].' -> [room: '.$pl['room'].' , test: '.testMonster($mon,'start',true).' , res_x: '.$pl['res_x'].' , battle: '.$pl['battle'].' , act: '.$act.' ]'); - - if( $act == 0 && $pl['room'] != 303 && $pl['battle'] == 0 ) { - if(!isset($mon['id'])) { - $mon = mysql_fetch_array(mysql_query('SELECT * FROM `aaa_monsters` WHERE `uid` = "'.$pl['id'].'" LIMIT 1')); - } - if( isset($mon['id']) ) { - if( testMonster($mon,'back',false) == true ) { - $pl['room'] = 303; - mysql_query('UPDATE `users` SET `room` = "'.$pl['room'].'" WHERE `id` = "'.$pl['id'].'" LIMIT 1'); - mysql_query('UPDATE `stats` SET `hpNow` = "1000000000000",`mpNow` = "1000000000000" WHERE `id` = "'.$pl['id'].'" LIMIT 1'); - if( $mon['back_text'] != '' ) { - mysql_query('INSERT INTO `chat` (`text`,`city`,`to`,`type`,`new`,`time`) VALUES ("Внимание! '.mysql_real_escape_string(str_replace('{b}',''.$pl['login'].' ['.$pl['level'].']',$mon['back_text'])).'","'.$pl['city'].'","","6","1","'.time().'")'); - mysql_query('INSERT INTO `chat` (`text`,`city`,`to`,`type`,`new`,`time`) VALUES ("Внимание! '.mysql_real_escape_string(str_replace('{b}',''.$pl['login'].' ['.$pl['level'].']',$mon['back_text'])).'","'.$pl['city'].'","","1","1","'.time().'")'); - } - $act = 2; - }else{ - echo '[Ожидание: '.$mon['id'].' -> '.$mon['login'].' | '.testMonster($mon,'back',true).']
'; - } - } - } - /*if($pl['battle'] > 0) { - //inuser_go_atack($pl); - }else{ - if($pl['room'] == 303 && $pl['timeGo'] < time()) { - if($pl['res_x'] < time()) { - $pl['room'] = $pl['invBlock']; - mysql_query('UPDATE `users` SET `room` = "'.$pl['room'].'" WHERE `id` = "'.$pl['id'].'" LIMIT 1'); - mysql_query('UPDATE `stats` SET `hpNow` = "1000000000000",`mpNow` = "1000000000000" WHERE `id` = "'.$pl['id'].'" LIMIT 1'); - mysql_query('INSERT INTO `chat` (`text`,`city`,`to`,`type`,`new`,`time`) VALUES ("Рнимание! '.$pl['login'].' ['.$pl['level'].'] выбралсІ на охоту, будьте осторожны!","'.$pl['city'].'","","6","1","'.time().'")'); - } - } - }*/ - usleep(300000); +function testMonster($mon, $type, $mbk) +{ + $r = true; + $mbk2 = ''; + if (isset($mon['id'])) { + // + if ($type == 'start') { + //?ень недели + if ($mon['start_day'] != -1) { + if (($mon['start_day'] < 7 && $mon['start_day'] != (int)date('w')) || $mon['start_day'] != 7) { + $r = false; + $mbk2 .= '(неделя)'; + } + } + //?исло + if ($mon['start_dd'] != -1) { + if ($mon['start_dd'] != date('j')) { + $r = false; + $mbk2 .= '(число)'; + } + } + //месІц + if ($mon['start_mm'] != -1) { + if ($mon['start_mm'] != date('n')) { + $r = false; + $mbk2 .= '(месяц)'; + } + } + //час + if ($mon['start_hh'] != -1) { + if ($mon['start_hh'] != (int)date('H')) { + $r = false; + $mbk2 .= '(' . $mon['start_hh'] . '|' . ((int)date('H')) . ' час)'; + } + if ($mon['start_min'] != -1) { + if ($mon['start_min'] < (int)date('i')) { + $r = false; + $mbk2 .= '(' . $mon['start_min'] . '|' . ((int)date('i')) . ' минуты)'; + } + } + } + } elseif ($type == 'back') { + //?ень недели + if ($mon['back_day'] != -1) { + if (($mon['back_day'] < 7 && $mon['back_day'] != date('w')) || $mon['back_day'] != 7) { + $r = false; + $mbk2 .= '(день недели)'; + } + } + //?исло + if ($mon['back_dd'] != -1) { + if ($mon['back_dd'] != date('j')) { + $r = false; + $mbk2 .= '(число)'; + } + } + //месІц + if ($mon['back_mm'] != -1) { + if ($mon['back_mm'] != date('n')) { + $r = false; + $mbk2 .= '(месяц)'; + } + } + //час + if ($mon['back_hh'] != -1) { + if ($mon['back_hh'] != (int)date('H')) { + $r = false; + $mbk2 .= '(час)'; + } + if ($mon['back_min'] != -1) { + if ($mon['back_min'] < (int)date('i')) { + $r = false; + $mbk2 .= '(минуты)'; + } + } + } + } else { + //что-то другое + $r = false; + $mbk2 .= '(что-то другое)'; + } + // + } + if ($mbk == true) { + return $mbk2; + } else { + return $r; + } +} + +$sp = mysql_query( + 'SELECT `u`.*,`st`.* FROM `users` AS `u` LEFT JOIN `stats` AS `st` ON `st`.`id` = `u`.`id` WHERE `u`.`no_ip` = "trupojor" LIMIT 100' +); +while ($pl = mysql_fetch_array($sp)) { + $act = 0; + if ($pl['online'] < time() - 60) { + $pl['online'] = time(); + mysql_query('UPDATE `users` SET `online` = "' . $pl['online'] . '" WHERE `id` = "' . $pl['id'] . '" LIMIT 1'); + } + + if ($pl['res_x'] < time() /*&& !isset($testb['id'])*/) { + //ёожно действовать! + $mon = mysql_fetch_array(mysql_query('SELECT * FROM `aaa_monsters` WHERE `uid` = "' . $pl['id'] . '" LIMIT 1')); + if (isset($mon['id'])) { + if (testMonster($mon, 'start', false) == true && $pl['room'] == 303) { + $pl['room'] = $mon['start_room']; + mysql_query( + 'UPDATE `users` SET `room` = "' . $pl['room'] . '" WHERE `id` = "' . $pl['id'] . '" LIMIT 1' + ); + mysql_query( + 'UPDATE `stats` SET `hpNow` = "1000000000000",`mpNow` = "1000000000000" WHERE `id` = "' . $pl['id'] . '" LIMIT 1' + ); + if ($mon['start_text'] != '' /*&& $pl['level'] <10*/) { + mysql_query( + 'INSERT INTO `chat` (`text`,`city`,`to`,`type`,`new`,`time`) VALUES ("Внимание! ' . mysql_real_escape_string( + str_replace( + '{b}', + '' . $pl['login'] . ' [' . $pl['level'] . ']', + $mon['start_text'] + ) + ) . '","' . $pl['city'] . '","","6","1","' . time() . '")' + ); + } + $act = 1; + } + } else { + mysql_query( + 'UPDATE `stats` SET `res_x` = "' . (time() + 3600) . '" WHERE `id` = "' . $pl['id'] . '" LIMIT 1' + ); + } + } + + if ($act == 0 && $pl['room'] != 303 && $pl['battle'] == 0) { + if (!isset($mon['id'])) { + $mon = mysql_fetch_array( + mysql_query('SELECT * FROM `aaa_monsters` WHERE `uid` = "' . $pl['id'] . '" LIMIT 1') + ); + } + if (isset($mon['id'])) { + if (testMonster($mon, 'back', false) == true) { + $pl['room'] = 303; + mysql_query( + 'UPDATE `users` SET `room` = "' . $pl['room'] . '" WHERE `id` = "' . $pl['id'] . '" LIMIT 1' + ); + mysql_query( + 'UPDATE `stats` SET `hpNow` = "1000000000000",`mpNow` = "1000000000000" WHERE `id` = "' . $pl['id'] . '" LIMIT 1' + ); + if ($mon['back_text'] != '') { + mysql_query( + 'INSERT INTO `chat` (`text`,`city`,`to`,`type`,`new`,`time`) VALUES ("Внимание! ' . mysql_real_escape_string( + str_replace( + '{b}', + '' . $pl['login'] . ' [' . $pl['level'] . ']', + $mon['back_text'] + ) + ) . '","' . $pl['city'] . '","","6","1","' . time() . '")' + ); + mysql_query( + 'INSERT INTO `chat` (`text`,`city`,`to`,`type`,`new`,`time`) VALUES ("Внимание! ' . mysql_real_escape_string( + str_replace( + '{b}', + '' . $pl['login'] . ' [' . $pl['level'] . ']', + $mon['back_text'] + ) + ) . '","' . $pl['city'] . '","","1","1","' . time() . '")' + ); + } + $act = 2; + } else { + echo '[Ожидание: ' . $mon['id'] . ' -> ' . $mon['login'] . ' | ' . testMonster( + $mon, 'back', true + ) . ']
'; + } + } + } + usleep(300000); } -?> \ No newline at end of file diff --git a/cron_turnir.php b/cron_turnir.php index c613ce4e..d8dc638e 100644 --- a/cron_turnir.php +++ b/cron_turnir.php @@ -1,20 +1,15 @@ ' . $_SERVER['SERVER_ADDR']); - } - const GAME = true; setlocale(LC_CTYPE, "ru_RU.CP1251"); include('_incl_data/__config.php'); include('_incl_data/class/__db_connect.php'); $u = User::start(); + +if (!isset($_GET['test']) && UserIp::get() != $_SERVER['SERVER_ADDR'] && UserIp::get() != '127.0.0.1' && UserIp::get( + ) != '' && UserIp::get() != '31.131.97.206') { + die(UserIp::get() . '
' . $_SERVER['SERVER_ADDR']); +} + // $sp = mysql_query('SELECT * FROM `battle` WHERE `otmorozok` = 1 AND `team_win` = -1 AND `otmorozok_use` = 0'); while ($pl = mysql_fetch_array($sp)) { diff --git a/modules_data/location/an/bank.php b/modules_data/location/an/bank.php index 6e335989..35d99121 100644 --- a/modules_data/location/an/bank.php +++ b/modules_data/location/an/bank.php @@ -1,4 +1,7 @@ room['file'] == 'an/bank') { $re2 = ''; if (isset($_GET['enter']) && !isset($u->bank['id'])) { - $bank = mysql_fetch_array(mysql_query('SELECT * FROM `bank` WHERE `uid` = "' . $u->info['id'] . '" AND `id` = "' . mysql_real_escape_string((int)$_POST['bank']) . '" LIMIT 1')); + $bank = mysql_fetch_array( + mysql_query( + 'SELECT * FROM `bank` WHERE `uid` = "' . $u->info['id'] . '" AND `id` = "' . mysql_real_escape_string( + (int)$_POST['bank'] + ) . '" LIMIT 1' + ) + ); if (!isset($bank['id'])) { $re2 = 'Неверный номер счета.'; } elseif ($bank['pass'] != $_POST['pass']) { - $pl = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `actions` WHERE `uid` = "' . $u->info['id'] . '" AND `time` > "' . (time() - 60 * 60) . '" AND `vars` = "bank_bad_pass_' . mysql_real_escape_string($bank['id']) . '" LIMIT 5')); + $pl = mysql_fetch_array( + mysql_query( + 'SELECT COUNT(*) FROM `actions` WHERE `uid` = "' . $u->info['id'] . '" AND `time` > "' . (time( + ) - 60 * 60) . '" AND `vars` = "bank_bad_pass_' . mysql_real_escape_string( + $bank['id'] + ) . '" LIMIT 5' + ) + ); if ($pl[0] >= 3) { $re2 = 'Ваш счет был заблокирован на 1 час'; } else { @@ -58,34 +74,65 @@ if ($u->room['file'] == 'an/bank') { $pp = [0 => 'ок', 1 => 'ка', 2 => 'ки', 3 => 'ки']; $re2 = 'Неверный номер счета или пароль. У вас осталось ' . (3 - $pl[0]) . ' попыт' . $pp[3 - $pl[0]] . ', в противном случаи счет будет заблокирован на час'; } - mysql_query('INSERT INTO `actions` (`uid`,`time`,`city`,`room`,`vars`,`ip`) VALUES ("' . $u->info['id'] . '","' . time() . '","' . $u->info['city'] . '","' . $u->info['room'] . '","bank_bad_pass_' . mysql_real_escape_string($bank['id']) . '","' . mysql_real_escape_string($_SERVER['HTTP_X_REAL_IP']) . '")'); + mysql_query( + 'INSERT INTO `actions` (`uid`,`time`,`city`,`room`,`vars`,`ip`) VALUES ("' . $u->info['id'] . '","' . time( + ) . '","' . $u->info['city'] . '","' . $u->info['room'] . '","bank_bad_pass_' . mysql_real_escape_string( + $bank['id'] + ) . '","' . mysql_real_escape_string($_SERVER['HTTP_X_REAL_IP']) . '")' + ); } } else { if ($u->info['allLock'] > time()) { - echo ''; + echo ''; } else { //вошли! $bank['useNow'] = time() + 12 * 60 * 60; - mysql_query('UPDATE `bank` SET `useNow` = "0" WHERE `id` != "' . $bank['id'] . '" AND `uid` = "' . $u->info['id'] . '" AND `useNow`!="0" LIMIT 1'); - mysql_query('UPDATE `bank` SET `useNow` = "' . $bank['useNow'] . '" WHERE `id` = "' . $bank['id'] . '" AND `uid` = "' . $u->info['id'] . '" LIMIT 1'); - mysql_query('INSERT INTO `actions` (`uid`,`time`,`city`,`room`,`vars`,`ip`) VALUES ("' . $u->info['id'] . '","' . time() . '","' . $u->info['city'] . '","' . $u->info['room'] . '","bank_good_pass_' . mysql_real_escape_string($bank['id']) . '","' . mysql_real_escape_string($_SERVER['HTTP_X_REAL_IP']) . '")'); + mysql_query( + 'UPDATE `bank` SET `useNow` = "0" WHERE `id` != "' . $bank['id'] . '" AND `uid` = "' . $u->info['id'] . '" AND `useNow`!="0" LIMIT 1' + ); + mysql_query( + 'UPDATE `bank` SET `useNow` = "' . $bank['useNow'] . '" WHERE `id` = "' . $bank['id'] . '" AND `uid` = "' . $u->info['id'] . '" LIMIT 1' + ); + mysql_query( + 'INSERT INTO `actions` (`uid`,`time`,`city`,`room`,`vars`,`ip`) VALUES ("' . $u->info['id'] . '","' . time( + ) . '","' . $u->info['city'] . '","' . $u->info['room'] . '","bank_good_pass_' . mysql_real_escape_string( + $bank['id'] + ) . '","' . mysql_real_escape_string($_SERVER['HTTP_X_REAL_IP']) . '")' + ); $u->bank = $bank; } } } elseif (isset($_GET['res'])) { //echo $_GET['schet'].'
'; - $b_pass = mysql_fetch_array(mysql_query('SELECT * FROM `bank` WHERE `uid` = "' . $u->info['id'] . '" AND `id` = "' . mysql_real_escape_string(getNumId($_GET['schet'])) . '" ORDER BY `id` DESC LIMIT 1')); + $b_pass = mysql_fetch_array( + mysql_query( + 'SELECT * FROM `bank` WHERE `uid` = "' . $u->info['id'] . '" AND `id` = "' . mysql_real_escape_string( + getNumId($_GET['schet']) + ) . '" ORDER BY `id` DESC LIMIT 1' + ) + ); if ($b_pass['repass'] >= time()) { $re2 = 'Номера счетов и пароли к ним можно выслать только один раз в сутки'; } else { - mysql_query('INSERT INTO `actions` (`uid`,`time`,`city`,`room`,`vars`,`ip`) VALUES ("' . $u->info['id'] . '","' . time() . '","' . $u->info['city'] . '","' . $u->info['room'] . '","bank_res","' . mysql_real_escape_string($_SERVER['HTTP_X_REAL_IP']) . '")'); + mysql_query( + 'INSERT INTO `actions` (`uid`,`time`,`city`,`room`,`vars`,`ip`) VALUES ("' . $u->info['id'] . '","' . time( + ) . '","' . $u->info['city'] . '","' . $u->info['room'] . '","bank_res","' . mysql_real_escape_string( + $_SERVER['HTTP_X_REAL_IP'] + ) . '")' + ); $re2 = 'Выслан номер счета и пароль на email, указанный в анкете'; - mysql_query('UPDATE `bank` SET `repass` = "' . (time() + 24 * 3600) . '" WHERE `id` = "' . $b_pass['id'] . '" LIMIT 1'); + mysql_query( + 'UPDATE `bank` SET `repass` = "' . (time( + ) + 24 * 3600) . '" WHERE `id` = "' . $b_pass['id'] . '" LIMIT 1' + ); $subject = 'Восстановление пароля от счета в банке персонажа ' . $u->info['login']; $message = 'Номер счета: ' . getNum($b_pass['id']) . '
Пароль: ' . $b_pass['pass'] . '

С уважением,
Администрация Бойцовского Клуба'; - mails($u->info['mail'], $message, $subject); + \Core\Mail::send($u->info['mail'], $message, $subject); + //mails($u->info['mail'], $message, $subject); unset($subject, $message); } } elseif (isset($_GET['open']) && !isset($u->bank['id'])) { @@ -101,7 +148,10 @@ if ($u->room['file'] == 'an/bank') { } elseif ($u->info['align'] != 2) { $pass = rand(10000, 91191); $pass = htmlspecialchars($_POST['pass1'], null, 'cp1251'); - $ins = mysql_query('INSERT INTO `bank` (`uid`,`create`,`pass`) VALUES ("' . $u->info['id'] . '","' . time() . '","' . $pass . '")'); + $ins = mysql_query( + 'INSERT INTO `bank` (`uid`,`create`,`pass`) VALUES ("' . $u->info['id'] . '","' . time( + ) . '","' . $pass . '")' + ); if ($ins) { $bank = mysql_insert_id(); if ($u->info['level'] < 8 && $_POST['rdn01'] == 2) { @@ -109,9 +159,16 @@ if ($u->room['file'] == 'an/bank') { } else { $u->info['money'] -= 3; } - $upd = mysql_query('UPDATE `users` SET `money` = "' . $u->info['money'] . '",`money4` = "' . $u->info['money4'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1'); - $re2 = 'Счет №' . getNum($bank) . ' был успешно открыт.
Пароль от счета: ' . $pass . '

(Сменить пароль можно в разделе "Управление счетом" после авторизации)'; - $u->addDelo(3, $u->info['id'], 'Вы успешно открыли счет №' . getNum($bank) . '', time(), $u->info['city'], 'Bank.System', 3, 0, ''); + $upd = mysql_query( + 'UPDATE `users` SET `money` = "' . $u->info['money'] . '",`money4` = "' . $u->info['money4'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1' + ); + $re2 = 'Счет №' . getNum( + $bank + ) . ' был успешно открыт.
Пароль от счета: ' . $pass . '

(Сменить пароль можно в разделе "Управление счетом" после авторизации)'; + $u->addDelo( + 3, $u->info['id'], 'Вы успешно открыли счет №' . getNum($bank) . '', time(), $u->info['city'], + 'Bank.System', 3, 0, '' + ); } else { $re2 = 'Банк отказал в получении банковского счета.'; } @@ -127,7 +184,9 @@ if ($u->room['file'] == 'an/bank') { } } elseif (isset($_GET['exit']) && isset($u->bank['id'])) { $u->bank = false; - mysql_query('UPDATE `bank` SET `useNow` = "0" WHERE `uid` = "' . $u->info['id'] . '" AND `useNow`!="0" LIMIT 1'); + mysql_query( + 'UPDATE `bank` SET `useNow` = "0" WHERE `uid` = "' . $u->info['id'] . '" AND `useNow`!="0" LIMIT 1' + ); } if ($u->info['allLock'] > time()) { @@ -138,9 +197,21 @@ if ($u->room['file'] == 'an/bank') { if (isset($_POST['sd4']) && $u->newAct($_POST['sd4'])) { if (isset($_POST['transfer_kredit2']) && $u->info['admin'] > 0) { //перевод екредитов с одного счета на другой - $ub = mysql_fetch_array(mysql_query('SELECT * FROM `bank` WHERE `id` = "' . mysql_real_escape_string((int)$_POST['num2']) . '" LIMIT 1')); + $ub = mysql_fetch_array( + mysql_query( + 'SELECT * FROM `bank` WHERE `id` = "' . mysql_real_escape_string( + (int)$_POST['num2'] + ) . '" LIMIT 1' + ) + ); if (isset($ub['id']) && $ub['id'] != $u->bank['id']) { - $ut = mysql_fetch_array(mysql_query('SELECT `id`,`level`,`city`,`room`,`login` FROM `users` WHERE `id` = "' . mysql_real_escape_string($ub['uid']) . '" LIMIT 1')); + $ut = mysql_fetch_array( + mysql_query( + 'SELECT `id`,`level`,`city`,`room`,`login` FROM `users` WHERE `id` = "' . mysql_real_escape_string( + $ub['uid'] + ) . '" LIMIT 1' + ) + ); if ($ut['level'] >= 0 || $ut['id'] == $u->info['id'] || $u->info['admin'] > 0) { $mn = floor((int)($_POST['tansfer_sum2'] * 100)); $mn = round(($mn / 100), 2); @@ -150,29 +221,67 @@ if ($u->room['file'] == 'an/bank') { if ($mn < 0.01 || $mn > 1000000000) { $re2 = 'Неверно указана сумма'; } else { - $upd = mysql_query('UPDATE `bank` SET `money2` = "' . mysql_real_escape_string($u->bank['money2'] - $mn) . '" WHERE `id` = "' . $u->bank['id'] . '" LIMIT 1'); + $upd = mysql_query( + 'UPDATE `bank` SET `money2` = "' . mysql_real_escape_string( + $u->bank['money2'] - $mn + ) . '" WHERE `id` = "' . $u->bank['id'] . '" LIMIT 1' + ); if ($upd) { $u->bank['money2'] -= $mn; $ub['money2'] += $mn - $prc; - mysql_query('UPDATE `users` SET `catch` = `catch` + "' . floor($mn - $prc) . '" WHERE `id` = "' . $ut['id'] . '" LIMIT 1'); - mysql_query('UPDATE `users` SET `frg` = `frg` + ' . floor($mn) . ' WHERE `id` = "' . $u->info['id'] . '" LIMIT 1'); + mysql_query( + 'UPDATE `users` SET `catch` = `catch` + "' . floor( + $mn - $prc + ) . '" WHERE `id` = "' . $ut['id'] . '" LIMIT 1' + ); + mysql_query( + 'UPDATE `users` SET `frg` = `frg` + ' . floor( + $mn + ) . ' WHERE `id` = "' . $u->info['id'] . '" LIMIT 1' + ); - mysql_query('UPDATE `bank` SET `money2` = "' . mysql_real_escape_string($ub['money2']) . '" WHERE `id` = "' . $ub['id'] . '" LIMIT 1'); - $re2 = 'Вы удачно перевели ' . ($mn - $prc) . ' екр. (комиссия ' . $prc . ' екр.) на счет №' . getNum($ub['id']) . ' персонажу "' . $ut['login'] . '"'; - $u->addDelo(3, $ut['id'], 'Получено ' . ($mn - $prc) . ' екр. со счета №' . getNum($u->bank['id']) . ' от персонажа "' . $u->info['login'] . '", комиссия ' . $prc . ' екр. (Итого: ' . $ub['money1'] . ' кр., ' . $ub['money2'] . ' екр.)', time(), $ut['city'], 'Bank.System', mysql_real_escape_string($mn - $prc), 0, $ub['id']); - $u->addDelo(3, $u->info['id'], 'Передано ' . ($mn - $prc) . ' екр. на счет №' . getNum($ub['id']) . ' персонажу "' . $ut['login'] . '", комиссия ' . $prc . ' екр. (Итого: ' . $u->bank['money1'] . ' кр., ' . $u->bank['money2'] . ' екр.)', time(), $u->info['city'], 'Bank.System', 0, mysql_real_escape_string($mn), $u->bank['id']); + mysql_query( + 'UPDATE `bank` SET `money2` = "' . mysql_real_escape_string( + $ub['money2'] + ) . '" WHERE `id` = "' . $ub['id'] . '" LIMIT 1' + ); + $re2 = 'Вы удачно перевели ' . ($mn - $prc) . ' екр. (комиссия ' . $prc . ' екр.) на счет №' . getNum( + $ub['id'] + ) . ' персонажу "' . $ut['login'] . '"'; + $u->addDelo( + 3, $ut['id'], 'Получено ' . ($mn - $prc) . ' екр. со счета №' . getNum( + $u->bank['id'] + ) . ' от персонажа "' . $u->info['login'] . '", комиссия ' . $prc . ' екр. (Итого: ' . $ub['money1'] . ' кр., ' . $ub['money2'] . ' екр.)', + time(), $ut['city'], 'Bank.System', mysql_real_escape_string($mn - $prc), 0, + $ub['id'] + ); + $u->addDelo( + 3, $u->info['id'], + 'Передано ' . ($mn - $prc) . ' екр. на счет №' . getNum( + $ub['id'] + ) . ' персонажу "' . $ut['login'] . '", комиссия ' . $prc . ' екр. (Итого: ' . $u->bank['money1'] . ' кр., ' . $u->bank['money2'] . ' екр.)', + time(), $u->info['city'], 'Bank.System', 0, mysql_real_escape_string($mn), + $u->bank['id'] + ); $log = '"' . $u->info['login'] . '" [' . $u->info['level'] . '] перевел со своего банковского счета №' . $u->bank['id'] . ' на счет №' . $ub['id'] . ' к персонажу "' . $ut['login'] . '" [' . $ut['level'] . '] ' . ($mn - $prc) . ' екр.'; - $u->addDelo(1, $u->info['id'], $log, time(), $u->info['city'], 'Bank.System', 0, 0, ''); + $u->addDelo( + 1, $u->info['id'], $log, time(), $u->info['city'], 'Bank.System', 0, 0, '' + ); $u->addDelo(1, $ut['id'], $log, time(), $ut['city'], 'Bank.System', 0, 0, ''); if ($ut['id'] != $u->info['id']) { $alg = ''; if ($u->info['align'] == 50) { $alg = ''; } - $text = '"' . $alg . '[login:' . $u->info['login'] . ']" перевел' . ($u->info['sex'] == 0 ? "" : "а") . ' вам ' . ($mn - $prc) . ' екр. со своего банковского счета №' . getNum($u->bank['id']) . ' на ваш банковский счет №' . getNum($ub['id']) . '.'; + $text = '"' . $alg . '[login:' . $u->info['login'] . ']" перевел' . ($u->info['sex'] == 0 ? "" : "а") . ' вам ' . ($mn - $prc) . ' екр. со своего банковского счета №' . getNum( + $u->bank['id'] + ) . ' на ваш банковский счет №' . getNum($ub['id']) . '.'; - mysql_query("INSERT INTO `chat` (`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`) VALUES ('" . $ut['city'] . "','" . $ut['room'] . "','','" . $ut['login'] . "','" . $text . "','" . time() . "','12','0','1')"); + mysql_query( + "INSERT INTO `chat` (`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`) VALUES ('" . $ut['city'] . "','" . $ut['room'] . "','','" . $ut['login'] . "','" . $text . "','" . time( + ) . "','12','0','1')" + ); } } else { $re2 = 'Не удалось выполнить операцию'; @@ -190,9 +299,21 @@ if ($u->room['file'] == 'an/bank') { } elseif (isset($_POST['transfer_kredit']) && $u->info['align'] != 2) { //перевод кредитов с одного счета на другой if ($u->info['level'] >= 4 || $u->info['admin'] > 0) { - $ub = mysql_fetch_array(mysql_query('SELECT * FROM `bank` WHERE `id` = "' . mysql_real_escape_string((int)$_POST['num']) . '" LIMIT 1')); + $ub = mysql_fetch_array( + mysql_query( + 'SELECT * FROM `bank` WHERE `id` = "' . mysql_real_escape_string( + (int)$_POST['num'] + ) . '" LIMIT 1' + ) + ); if (isset($ub['id']) && $ub['id'] != $u->bank['id']) { - $ut = mysql_fetch_array(mysql_query('SELECT `id`,`level`,`city`,`room`,`login` FROM `users` WHERE `id` = "' . mysql_real_escape_string($ub['uid']) . '" LIMIT 1')); + $ut = mysql_fetch_array( + mysql_query( + 'SELECT `id`,`level`,`city`,`room`,`login` FROM `users` WHERE `id` = "' . mysql_real_escape_string( + $ub['uid'] + ) . '" LIMIT 1' + ) + ); if ($ut['level'] >= 4 || $ut['id'] == $u->info['id'] || $u->info['admin'] > 0) { $mn = floor((int)($_POST['tansfer_sum'] * 100)); $mn = round(($mn / 100), 2); @@ -202,20 +323,51 @@ if ($u->room['file'] == 'an/bank') { if ($mn < 0.01 || $mn > 1000000000) { $re2 = 'Неверно указана сумма'; } else { - $upd = mysql_query('UPDATE `bank` SET `money1` = "' . mysql_real_escape_string($u->bank['money1'] - $mn) . '" WHERE `id` = "' . $u->bank['id'] . '" LIMIT 1'); + $upd = mysql_query( + 'UPDATE `bank` SET `money1` = "' . mysql_real_escape_string( + $u->bank['money1'] - $mn + ) . '" WHERE `id` = "' . $u->bank['id'] . '" LIMIT 1' + ); if ($upd) { $u->bank['money1'] -= $mn; $ub['money1'] += $mn - $prc; - mysql_query('UPDATE `bank` SET `money1` = "' . mysql_real_escape_string($ub['money1']) . '" WHERE `id` = "' . $ub['id'] . '" LIMIT 1'); - $re2 = 'Вы удачно перевели ' . ($mn - $prc) . ' кр. (комиссия ' . $prc . ' кр.) на счет №' . getNum($ub['id']) . ' персонажу "' . $ut['login'] . '"'; - $u->addDelo(3, $ut['id'], 'Получено ' . ($mn - $prc) . ' кр. со счета №' . getNum($u->bank['id']) . ' от персонажа "' . $u->info['login'] . '", комиссия ' . $prc . ' кр. (Итого: ' . $ub['money1'] . ' кр., ' . $ub['money2'] . ' екр.)', time(), $ut['city'], 'Bank.System', mysql_real_escape_string($mn - $prc), 0, $ub['id']); - $u->addDelo(3, $u->info['id'], 'Передано ' . ($mn - $prc) . ' кр. на счет №' . getNum($ub['id']) . ' персонажу "' . $ut['login'] . '", комиссия ' . $prc . ' кр. (Итого: ' . $u->bank['money1'] . ' кр., ' . $u->bank['money2'] . ' екр.)', time(), $u->info['city'], 'Bank.System', 0, mysql_real_escape_string($mn), $u->bank['id']); + mysql_query( + 'UPDATE `bank` SET `money1` = "' . mysql_real_escape_string( + $ub['money1'] + ) . '" WHERE `id` = "' . $ub['id'] . '" LIMIT 1' + ); + $re2 = 'Вы удачно перевели ' . ($mn - $prc) . ' кр. (комиссия ' . $prc . ' кр.) на счет №' . getNum( + $ub['id'] + ) . ' персонажу "' . $ut['login'] . '"'; + $u->addDelo( + 3, $ut['id'], + 'Получено ' . ($mn - $prc) . ' кр. со счета №' . getNum( + $u->bank['id'] + ) . ' от персонажа "' . $u->info['login'] . '", комиссия ' . $prc . ' кр. (Итого: ' . $ub['money1'] . ' кр., ' . $ub['money2'] . ' екр.)', + time(), $ut['city'], 'Bank.System', mysql_real_escape_string($mn - $prc), 0, + $ub['id'] + ); + $u->addDelo( + 3, $u->info['id'], + 'Передано ' . ($mn - $prc) . ' кр. на счет №' . getNum( + $ub['id'] + ) . ' персонажу "' . $ut['login'] . '", комиссия ' . $prc . ' кр. (Итого: ' . $u->bank['money1'] . ' кр., ' . $u->bank['money2'] . ' екр.)', + time(), $u->info['city'], 'Bank.System', 0, mysql_real_escape_string($mn), + $u->bank['id'] + ); $log = '"' . $u->info['login'] . '" [' . $u->info['level'] . '] перевел со своего банковского счета №' . $u->bank['id'] . ' на счет №' . $ub['id'] . ' к персонажу "' . $ut['login'] . '" [' . $ut['level'] . '] ' . ($mn - $prc) . ' кр. Дополнительно снято ' . $prc . ' кр. за услуги банка.'; - $u->addDelo(1, $u->info['id'], $log, time(), $u->info['city'], 'Bank.System', 0, 0, ''); + $u->addDelo( + 1, $u->info['id'], $log, time(), $u->info['city'], 'Bank.System', 0, 0, '' + ); $u->addDelo(1, $ut['id'], $log, time(), $ut['city'], 'Bank.System', 0, 0, ''); if ($ut['id'] != $u->info['id']) { - $text = '"[login:' . $u->info['login'] . ']" перевел' . ($u->info['sex'] == 0 ? "" : "а") . ' вам ' . ($mn - $prc) . ' кр. со своего банковского счета №' . getNum($u->bank['id']) . ' на ваш банковский счет №' . getNum($ub['id']) . '.'; - mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`) VALUES (1,'" . $ut['city'] . "','" . $ut['room'] . "','','" . $ut['login'] . "','" . $text . "','" . time() . "','6','0','1')"); + $text = '"[login:' . $u->info['login'] . ']" перевел' . ($u->info['sex'] == 0 ? "" : "а") . ' вам ' . ($mn - $prc) . ' кр. со своего банковского счета №' . getNum( + $u->bank['id'] + ) . ' на ваш банковский счет №' . getNum($ub['id']) . '.'; + mysql_query( + "INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`) VALUES (1,'" . $ut['city'] . "','" . $ut['room'] . "','','" . $ut['login'] . "','" . $text . "','" . time( + ) . "','6','0','1')" + ); } } else { $re2 = 'Не удалось выполнить операцию'; @@ -233,18 +385,25 @@ if ($u->room['file'] == 'an/bank') { } else { $re2 = 'Передача кредитов возможна только с 4-го уровня'; } - } elseif ($u->info['align'] != 2 && $u->info['haos'] < time() && $u->info['haos'] != 1 && $u->info['align'] != 50 && isset($_POST['convert_kredit']) && 1 == 2) { + } elseif ($u->info['align'] != 2 && $u->info['haos'] < time( + ) && $u->info['haos'] != 1 && $u->info['align'] != 50 && isset($_POST['convert_kredit']) && 1 == 2) { //обменять кр. на екр. if ($u->info['palpro'] > time()) { $mn = ceil((int)($_POST['convert_sum2'] * 100)); $mn = round(($mn / 100), 2); $mne = round($mn / $noc, 2); $mn = round(($mn / 100 * 103 + 5), 2); - $sm = $u->testAction('`uid` = "' . $u->info['id'] . '" AND `vars` = "bank_kr_to_ekr_[' . date('d.m.Y', time()) . ']" ORDER BY `id` DESC LIMIT 1', 1); + $sm = $u->testAction( + '`uid` = "' . $u->info['id'] . '" AND `vars` = "bank_kr_to_ekr_[' . date( + 'd.m.Y', time() + ) . ']" ORDER BY `id` DESC LIMIT 1', 1 + ); $sm_lim = 50; if (isset($sm['id']) && $sm['vals'] + $mne > $sm_lim) { if ($sm['vals'] < $sm_lim) { - $re2 = 'На сегодня Вы можете обменять еще на ' . ($sm_lim - $sm['vals']) . ' екр.. (Примерно ' . round((($sm_lim - $sm['vals']) * $noc), 2) . ' кр.), текущий обмен на ' . $mne . ' екр..'; + $re2 = 'На сегодня Вы можете обменять еще на ' . ($sm_lim - $sm['vals']) . ' екр.. (Примерно ' . round( + (($sm_lim - $sm['vals']) * $noc), 2 + ) . ' кр.), текущий обмен на ' . $mne . ' екр..'; } else { $re2 = 'На сегодня Вы исчерпали свой лимит обмена кр. на екр. (' . $sm_lim . ' екр.)'; } @@ -253,23 +412,44 @@ if ($u->room['file'] == 'an/bank') { if (!isset($sm['id'])) { $u->addAction(time(), 'bank_kr_to_ekr_[' . date('d.m.Y') . ']', $mne); } else { - mysql_query('UPDATE `actions` SET `vals` = "' . ($sm['vals'] + $mne) . '" WHERE `id` = "' . $sm['id'] . '" LIMIT 1'); + mysql_query( + 'UPDATE `actions` SET `vals` = "' . ($sm['vals'] + $mne) . '" WHERE `id` = "' . $sm['id'] . '" LIMIT 1' + ); } $re2 = 'Вы успешно обменяли ' . $mn . ' кр. на ' . $mne . ' екр.'; $u->bank['money1'] -= $mn; $u->bank['money2'] += $mne; - mysql_query('UPDATE `users` SET `catch` = `catch` + "' . round($mne, 2) . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1'); + mysql_query( + 'UPDATE `users` SET `catch` = `catch` + "' . round( + $mne, 2 + ) . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1' + ); - mysql_query('UPDATE `bank` SET `money1` = "' . mysql_real_escape_string($u->bank['money1']) . '", `money2` = "' . mysql_real_escape_string($u->bank['money2']) . '" WHERE `id` = "' . mysql_real_escape_string($u->bank['id']) . '" LIMIT 1'); + mysql_query( + 'UPDATE `bank` SET `money1` = "' . mysql_real_escape_string( + $u->bank['money1'] + ) . '", `money2` = "' . mysql_real_escape_string( + $u->bank['money2'] + ) . '" WHERE `id` = "' . mysql_real_escape_string($u->bank['id']) . '" LIMIT 1' + ); $log = '"' . $u->info['login'] . '" [' . $u->info['level'] . '] обменял ' . $mn . ' кр. на ' . $mne . ' екр., Банковский счет №' . $u->bank['id'] . '.'; $u->addDelo(1, $u->info['id'], $log, time(), $u->info['city'], 'Bank.System', 0, 0, ''); - $u->addDelo(3, $u->info['id'], 'Вы успешно обменяли ' . ceil((int)($_POST['convert_sum2'] * 100 / 100)) . ' кр. на ' . $mne . ' екр., комиссия ' . round((ceil((int)($_POST['convert_sum2'] * 100 / 100)) / 100 * 3 + 5), 2) . ' кр. (Итого: ' . $u->bank['money1'] . ' кр., ' . $u->bank['money2'] . ' екр.)', time(), $u->info['city'], 'Bank.System', 0, 0, $u->bank['id']); + $u->addDelo( + 3, $u->info['id'], 'Вы успешно обменяли ' . ceil( + (int)($_POST['convert_sum2'] * 100 / 100) + ) . ' кр. на ' . $mne . ' екр., комиссия ' . round( + (ceil((int)($_POST['convert_sum2'] * 100 / 100)) / 100 * 3 + 5), 2 + ) . ' кр. (Итого: ' . $u->bank['money1'] . ' кр., ' . $u->bank['money2'] . ' екр.)', + time(), $u->info['city'], 'Bank.System', 0, 0, $u->bank['id'] + ); } else { $re2 = 'У вас нет ' . $mn . ' кр. на счете'; } } else { - $re2 = 'Минимальная сумма для обмена составляет ' . round((0.01 * ($noc * 1.03) + 5), 2) . ' кр.'; + $re2 = 'Минимальная сумма для обмена составляет ' . round( + (0.01 * ($noc * 1.03) + 5), 2 + ) . ' кр.'; } } else { $re2 = 'Вы должны пройти проверку на чистоту у Паладинов или Тарманов.'; @@ -282,11 +462,22 @@ if ($u->room['file'] == 'an/bank') { if ($mn < 0.01 || $mn > 1000000000) { $re2 = 'Неверно указана сумма'; } else { - $upd = mysql_query('UPDATE `bank` SET `money1` = "' . mysql_real_escape_string($u->bank['money1'] + ($mn * $con)) . '",`money2` = "' . mysql_real_escape_string($u->bank['money2'] - $mn) . '" WHERE `id` = "' . $u->bank['id'] . '" LIMIT 1'); + $upd = mysql_query( + 'UPDATE `bank` SET `money1` = "' . mysql_real_escape_string( + $u->bank['money1'] + ($mn * $con) + ) . '",`money2` = "' . mysql_real_escape_string( + $u->bank['money2'] - $mn + ) . '" WHERE `id` = "' . $u->bank['id'] . '" LIMIT 1' + ); if ($upd) { $u->bank['money1'] += $mn * $con; $u->bank['money2'] -= $mn; - $u->addDelo(3, $u->info['id'], 'Вы обменяли ' . $mn . ' екр. на ' . ($mn * $con) . ' кр., комиссия 0 кр. (Итого: ' . $u->bank['money1'] . ' кр., ' . $u->bank['money2'] . ' екр.)', time(), $u->info['city'], 'Bank.System', 0, mysql_real_escape_string($mn * $con), $u->bank['id']); + $u->addDelo( + 3, $u->info['id'], + 'Вы обменяли ' . $mn . ' екр. на ' . ($mn * $con) . ' кр., комиссия 0 кр. (Итого: ' . $u->bank['money1'] . ' кр., ' . $u->bank['money2'] . ' екр.)', + time(), $u->info['city'], 'Bank.System', 0, mysql_real_escape_string($mn * $con), + $u->bank['id'] + ); $re2 = 'Вы удачно обменяли ' . $mn . ' екр. на ' . ($mn * $con) . ' кр.'; } else { $re2 = 'Не удалось выполнить операцию'; @@ -303,12 +494,24 @@ if ($u->room['file'] == 'an/bank') { if ($mn < 0.01 || $mn > 1000000000) { $re2 = 'Неверно указана сумма'; } else { - $upd = mysql_query('UPDATE `users` SET `money` = "' . mysql_real_escape_string($u->info['money'] + $mn) . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1'); + $upd = mysql_query( + 'UPDATE `users` SET `money` = "' . mysql_real_escape_string( + $u->info['money'] + $mn + ) . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1' + ); if ($upd) { $u->bank['money1'] -= $mn; $u->info['money'] += $mn; - mysql_query('UPDATE `bank` SET `money1` = "' . mysql_real_escape_string($u->bank['money1']) . '" WHERE `id` = "' . $u->bank['id'] . '" LIMIT 1'); - $u->addDelo(3, $u->info['id'], 'Вы сняли со счета ' . $mn . ' кр., комиссия 0 кр. (Итого: ' . $u->bank['money1'] . ' кр., ' . $u->bank['money2'] . ' екр.)', time(), $u->info['city'], 'Bank.System', 0, 0, $u->bank['id']); + mysql_query( + 'UPDATE `bank` SET `money1` = "' . mysql_real_escape_string( + $u->bank['money1'] + ) . '" WHERE `id` = "' . $u->bank['id'] . '" LIMIT 1' + ); + $u->addDelo( + 3, $u->info['id'], + 'Вы сняли со счета ' . $mn . ' кр., комиссия 0 кр. (Итого: ' . $u->bank['money1'] . ' кр., ' . $u->bank['money2'] . ' екр.)', + time(), $u->info['city'], 'Bank.System', 0, 0, $u->bank['id'] + ); $re2 = 'Вы удачно сняли со счета ' . $mn . ' кр.'; } else { $re2 = 'Не удалось выполнить операцию'; @@ -325,12 +528,24 @@ if ($u->room['file'] == 'an/bank') { if ($mn < 0.01 || $mn > 1000000000) { $re2 = 'Неверно указана сумма'; } else { - $upd = mysql_query('UPDATE `users` SET `money` = "' . mysql_real_escape_string($u->info['money'] - $mn) . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1'); + $upd = mysql_query( + 'UPDATE `users` SET `money` = "' . mysql_real_escape_string( + $u->info['money'] - $mn + ) . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1' + ); if ($upd) { $u->bank['money1'] += $mn; $u->info['money'] -= $mn; - mysql_query('UPDATE `bank` SET `money1` = "' . mysql_real_escape_string($u->bank['money1']) . '" WHERE `id` = "' . $u->bank['id'] . '" LIMIT 1'); - $u->addDelo(3, $u->info['id'], 'Вы положили на счет ' . $mn . ' кр., комиссия 0 кр. (Итого: ' . $u->bank['money1'] . ' кр., ' . $u->bank['money2'] . ' екр.)', time(), $u->info['city'], 'Bank.System', 0, 0, $u->bank['id']); + mysql_query( + 'UPDATE `bank` SET `money1` = "' . mysql_real_escape_string( + $u->bank['money1'] + ) . '" WHERE `id` = "' . $u->bank['id'] . '" LIMIT 1' + ); + $u->addDelo( + 3, $u->info['id'], + 'Вы положили на счет ' . $mn . ' кр., комиссия 0 кр. (Итого: ' . $u->bank['money1'] . ' кр., ' . $u->bank['money2'] . ' екр.)', + time(), $u->info['city'], 'Bank.System', 0, 0, $u->bank['id'] + ); $re2 = 'Вы удачно положили на свой счет ' . $mn . ' кр.'; } else { $re2 = 'Не удалось выполнить операцию'; @@ -341,7 +556,10 @@ if ($u->room['file'] == 'an/bank') { } } elseif (isset($_POST['change_psw2'])) { //смена пароля счета - $sm = $u->testAction('`uid` = "' . $u->info['id'] . '" AND `vals` = "id=' . $u->bank['id'] . '&new_pass=' . $u->bank['pass'] . '" AND `vars` = "bank_new_pass" AND `time` > "' . (time() - 24 * 60 * 60) . '" LIMIT 1', 1); + $sm = $u->testAction( + '`uid` = "' . $u->info['id'] . '" AND `vals` = "id=' . $u->bank['id'] . '&new_pass=' . $u->bank['pass'] . '" AND `vars` = "bank_new_pass" AND `time` > "' . (time( + ) - 24 * 60 * 60) . '" LIMIT 1', 1 + ); if ($_POST['new_psw1'] != $_POST['new_psw2']) { $re2 = 'Пароли не совпадают'; } elseif (iconv_strlen($_POST['new_psw1']) < 6 || iconv_strlen($_POST['new_psw1']) > 32) { @@ -350,12 +568,23 @@ if ($u->room['file'] == 'an/bank') { $re2 = 'Нельзя менять пароль чаще одного раза в день'; } else { //меняем - $upd = mysql_query('UPDATE `bank` SET `pass` = "' . mysql_real_escape_string($_POST['new_psw1']) . '" WHERE `id` = "' . $u->bank['id'] . '" LIMIT 1'); + $upd = mysql_query( + 'UPDATE `bank` SET `pass` = "' . mysql_real_escape_string( + $_POST['new_psw1'] + ) . '" WHERE `id` = "' . $u->bank['id'] . '" LIMIT 1' + ); if ($upd) { - $u->addAction(time(), 'bank_new_pass', 'id=' . $u->bank['id'] . '&new_pass=' . $_POST['new_psw1'] . ''); + $u->addAction( + time(), 'bank_new_pass', 'id=' . $u->bank['id'] . '&new_pass=' . $_POST['new_psw1'] . '' + ); $u->bank['pass'] = $_POST['new_psw1']; - $re2 = 'Пароль от счета №' . getNum($u->bank['id']) . ' был успешно изменен
Новый пароль: ' . $u->bank['pass'] . ''; - $u->addDelo(3, $u->info['id'], 'Был изменен пароль от счета.', time(), $u->info['city'], 'Bank.System', 0, 0, $u->bank['id']); + $re2 = 'Пароль от счета №' . getNum( + $u->bank['id'] + ) . ' был успешно изменен
Новый пароль: ' . $u->bank['pass'] . ''; + $u->addDelo( + 3, $u->info['id'], 'Был изменен пароль от счета.', time(), $u->info['city'], 'Bank.System', + 0, 0, $u->bank['id'] + ); } else { $re2 = 'Вам отказали в смене пароля'; } @@ -453,7 +682,10 @@ if ($u->room['file'] == 'an/bank') { id="greyText" class="menutop" onclick="location='main.php?loc=2.180.0.236&rnd=';" - title="">Страшилкина + title="">Страшилкина улица @@ -562,7 +794,9 @@ if ($u->room['file'] == 'an/bank') { Номер счета 3.00 кр.     zuby(15) ?>       @@ -1038,7 +1044,7 @@ if ($u->room['file'] == 'bank') { info['align'] != 2 && $u->info['haos'] < time( - ) && $u->info['haos'] != 1 && $c['crtoecr'] > 0) { ?> + ) && $u->info['haos'] != 1 && \Core\Config::get('crtoecr') > 0) { ?>
@@ -1164,7 +1170,8 @@ if ($u->room['file'] == 'bank') {
- Данные на без + Данные на + без учета комиссий
diff --git a/register.php b/register.php index 3bd06691..b80b583d 100644 --- a/register.php +++ b/register.php @@ -1,31 +1,19 @@ 50) { $error = 'E-mail не может быть короче 6-х символов и длинее 50-ти.'; } else { - $testEREm = mysql_fetch_array(mysql_query('SELECT `mail` FROM `users` WHERE `mail` LIKE "' . $str_u . '" LIMIT 1')); - $emails = mysql_fetch_array(mysql_query('SELECT * FROM `ban_email` WHERE `email` LIKE "' . $str_u . '" LIMIT 1')); + $testEREm = mysql_fetch_array( + mysql_query('SELECT `mail` FROM `users` WHERE `mail` LIKE "' . $str_u . '" LIMIT 1') + ); + $emails = mysql_fetch_array( + mysql_query('SELECT * FROM `ban_email` WHERE `email` LIKE "' . $str_u . '" LIMIT 1') + ); if (isset($testEREm['mail'])) { $error = 'E-mail уже занят.'; } @@ -179,13 +176,19 @@ function error_check($id, $str_u, $name = 0) if ($id == 3 && !empty($str_u) && !empty($name)) //отсылка емаила при удачном емаиле str_u -> mail name -> nickname { $code = rand(10000000, 99999999); - mysql_query('INSERT INTO `secure_code`(`email`, `code`, `time`) VALUES ("' . $str_u . '","' . $code . '","' . time() . '");'); - mails($str_u, 'Секретный Код: ' . $code, 'Секретный Код - Новый Бойцовский Клуб ' . $name); + mysql_query( + 'INSERT INTO `secure_code`(`email`, `code`, `time`) VALUES ("' . $str_u . '","' . $code . '","' . time( + ) . '");' + ); + Mail::send($str_u, 'Секретный Код: ' . $code, 'Секретный Код - Новый Бойцовский Клуб ' . $name); + //mails($str_u, 'Секретный Код: ' . $code, 'Секретный Код - Новый Бойцовский Клуб ' . $name); } if ($id == 4 && !empty($str_u) && !empty($name)) //проверка кода безопасности str_u -> введенный код name -> email { - $testcode = mysql_fetch_array(mysql_query('SELECT code FROM `secure_code` WHERE `email` = "' . $name . '" ORDER BY id DESC LIMIT 1')); + $testcode = mysql_fetch_array( + mysql_query('SELECT code FROM `secure_code` WHERE `email` = "' . $name . '" ORDER BY id DESC LIMIT 1') + ); if ($testcode['code'] != $str_u) { $error = 'Неверный код безопасности (Проверте пробелы и сам код в последнем емеиле)'; } @@ -436,7 +439,7 @@ if ($_SERVER['HTTP_USER_AGENT'] != '' && left: 100%; } - +
@@ -516,7 +519,9 @@ if ($_SERVER['HTTP_USER_AGENT'] != '' &&

@@ -549,7 +554,9 @@ if ($_SERVER['HTTP_USER_AGENT'] != '' && } ?>

@@ -563,7 +570,9 @@ if ($_SERVER['HTTP_USER_AGENT'] != '' && цифры для надёжности.

@@ -592,7 +601,9 @@ if ($_SERVER['HTTP_USER_AGENT'] != '' && } ?>

@@ -676,7 +687,8 @@ if ($_SERVER['HTTP_USER_AGENT'] != '' &&

-

+

@@ -685,16 +697,24 @@ if ($_SERVER['HTTP_USER_AGENT'] != '' && href='https://new-combats.com/encicl/law2.html'>правилами и законами игрового мира


- + 0) { - $ref = mysql_fetch_array(mysql_query('SELECT `id`,`login` FROM `users` WHERE `id` = "' . mysql_real_escape_string($_POST['ref']) . '" LIMIT 1')); + $ref = mysql_fetch_array( + mysql_query( + 'SELECT `id`,`login` FROM `users` WHERE `id` = "' . mysql_real_escape_string( + $_POST['ref'] + ) . '" LIMIT 1' + ) + ); if (isset($ref['id'])) { $_POST['ref'] = $ref['id']; } else { @@ -703,7 +723,8 @@ if ($_SERVER['HTTP_USER_AGENT'] != '' && unset($ref); } - mysql_query('INSERT INTO `users` (`name`,`align`,`real`,`login`,`host_reg`,`pass`,`ip`,`ipreg`,`city`,`cityreg`,`room`,`timereg`, + mysql_query( + 'INSERT INTO `users` (`name`,`align`,`real`,`login`,`host_reg`,`pass`,`ip`,`ipreg`,`city`,`cityreg`,`room`,`timereg`, `activ`,`mail`,`bithday`,`sex`,`fnq`,`battle`,`design`,`molch2`,`level`, `hobby`, `clan_zv` ) VALUES ( "", @@ -712,8 +733,8 @@ if ($_SERVER['HTTP_USER_AGENT'] != '' && "' . mysql_real_escape_string($_POST['nick_u']) . '", "' . (int)$_POST['ref'] . '", "' . mysql_real_escape_string(md5($_POST['pass1_u'])) . '", - "' . getIp() . '", - "' . getIp() . '", + "' . UserIp::get() . '", + "' . UserIp::get() . '", "capitalcity", "capitalcity", 9, @@ -729,26 +750,46 @@ if ($_SERVER['HTTP_USER_AGENT'] != '' && 8, "", 0 - )'); + )' + ); $uid = mysql_insert_id(); if ($uid > 0) { if (isset($_COOKIE['from'])) { - mysql_query('INSERT INTO `from` (`type`,`ip`,`uid`,`time`,`val`) VALUES ( "0", "' . getIp() . '","' . $uid . '", "' . time() . '", "' . mysql_real_escape_string($_COOKIE['from']) . '" ) '); + mysql_query( + 'INSERT INTO `from` (`type`,`ip`,`uid`,`time`,`val`) VALUES ( 0, "' . UserIp::get( + ) . '",' . $uid . ', unix_timestamp(), "' . mysql_real_escape_string($_COOKIE['from']) . '" ) ' + ); } //Сообщения при регистрации от паладинов. - $pal = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `align` > 1 AND `align` < 2 AND `online` > "' . (time() - 120) . '" ORDER BY `online` DESC LIMIT 1')); + $pal = mysql_fetch_array( + mysql_query( + 'SELECT * FROM `users` WHERE `align` > 1 AND `align` < 2 AND `online` > "' . (time( + ) - 120) . '" ORDER BY `online` DESC LIMIT 1' + ) + ); if (!isset($pal['id'])) { - $pal = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `align` > 3 AND `align` < 4 AND `online` > "' . (time() - 120) . '" ORDER BY `online` DESC LIMIT 1')); + $pal = mysql_fetch_array( + mysql_query( + 'SELECT * FROM `users` WHERE `align` > 3 AND `align` < 4 AND `online` > "' . (time( + ) - 120) . '" ORDER BY `online` DESC LIMIT 1' + ) + ); } if (isset($pal['id'])) { //отсылаем сообщение от $pal['login'] $paltext = 'Приветствую ' . $_POST['nick_u'] . '. Отправляемся драться в хаоты, если нет заявок, создайте бой, дополнительно купите зверя и не забывайте выходить на центральную площать убивать Трупожора своего уровня!Приятной игры. '; - mysql_query("INSERT INTO `chat` (`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`new`) VALUES ('capitalcity','0','" . $pal['login'] . "','" . $_POST['nick_u'] . "','" . $paltext . "','" . time() . "','3','0','1')"); + mysql_query( + "INSERT INTO `chat` (`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`new`) VALUES ('capitalcity','0','" . $pal['login'] . "','" . $_POST['nick_u'] . "','" . $paltext . "','" . time( + ) . "','3','0','1')" + ); } else { //Не знаю что делать, пусть будет просто приветствие :) $text = 'Приветствую ' . $_POST['nick_u'] . '.В инвентаре Вы найдете сундук, в котором Ваше Обмундирование!Отправляйтесь драться в хаоты и не забывайте бить Городского Монстра!'; - mysql_query("INSERT INTO `chat` (`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`new`) VALUES ('capitalcity','0','','" . $_POST['nick_u'] . "','" . $text . "','" . time() . "','3','0','1')"); + mysql_query( + "INSERT INTO `chat` (`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`new`) VALUES ('capitalcity','0','','" . $_POST['nick_u'] . "','" . $text . "','" . time( + ) . "','3','0','1')" + ); } //топор @@ -757,41 +798,69 @@ if ($_SERVER['HTTP_USER_AGENT'] != '' && $us = add_effn($uid, 1); // сила $us = add_effn($uid, 20); // сокрушение //ТОПОР - mysql_query("INSERT INTO `stats` (`id`,`stats`,`ability`,`skills`,exp) VALUES ('" . $uid . "','s1=62|s2=3|s3=3|s4=30|rinv=40|m9=5|m6=10|s7=0|a1=0|a2=9|a3=0|a4=0|a5=0|mg1=0|mg2=0|mg3=0|mg4=0|mg5=0|mg6=0|mg7=0|s5=0|s6=0|a6=0|s8=0|s9=0|s10=0|s11=0|s12=0|s13=0|s14=0|s15=0',-75,-9,100000)"); + mysql_query( + "INSERT INTO `stats` (`id`,`stats`,`ability`,`skills`,exp) VALUES ('" . $uid . "','s1=62|s2=3|s3=3|s4=30|rinv=40|m9=5|m6=10|s7=0|a1=0|a2=9|a3=0|a4=0|a5=0|mg1=0|mg2=0|mg3=0|mg4=0|mg5=0|mg6=0|mg7=0|s5=0|s6=0|a6=0|s8=0|s9=0|s10=0|s11=0|s12=0|s13=0|s14=0|s15=0',-75,-9,100000)" + ); $re = $u->addItem(6433, $uid); - Db::sql('update items_users set `1price` = (select price_1 from items_shop where items_shop.item_id = ? and sid = 1) where id = ?', [6433, $re]); + Db::sql( + 'update items_users set `1price` = (select price_1 from items_shop where items_shop.item_id = ? and sid = 1) where id = ?', + [6433, $re] + ); //Коррекция кредов - mysql_query('UPDATE `users` SET `money` = `money`200 WHERE `id` = "' . $uid . '" LIMIT 1');//коректировка денег 2244 - 2101 + mysql_query( + 'UPDATE `users` SET `money` = `money`200 WHERE `id` = "' . $uid . '" LIMIT 1' + );//коректировка денег 2244 - 2101 //уворот } elseif ($_POST['class_u'] == 2) { //кастим эфекты уворота $us = add_effn($uid, 8); // ловка $us = add_effn($uid, 20); // сокрушение - mysql_query("INSERT INTO `stats` (`id`,`stats`,`ability`,`skills`,exp) VALUES ('" . $uid . "','s1=21|s2=31|s3=16|s4=30|rinv=40|m9=5|m6=10|s7=0|a1=9|a2=0|a3=0|a4=0|a5=0|mg1=0|mg2=0|mg3=0|mg4=0|mg5=0|mg6=0|mg7=0|s5=0|s6=0',-75,-9,100000)"); + mysql_query( + "INSERT INTO `stats` (`id`,`stats`,`ability`,`skills`,exp) VALUES ('" . $uid . "','s1=21|s2=31|s3=16|s4=30|rinv=40|m9=5|m6=10|s7=0|a1=9|a2=0|a3=0|a4=0|a5=0|mg1=0|mg2=0|mg3=0|mg4=0|mg5=0|mg6=0|mg7=0|s5=0|s6=0',-75,-9,100000)" + ); $re = $u->addItem(6431, $uid); - Db::sql('update items_users set `1price` = (select price_1 from items_shop where items_shop.item_id = ? and sid = 1) where id = ?', [6431, $re]); + Db::sql( + 'update items_users set `1price` = (select price_1 from items_shop where items_shop.item_id = ? and sid = 1) where id = ?', + [6431, $re] + ); //Коррекция кредитов - mysql_query('UPDATE `users` SET `money` = `money`200 WHERE `id` = "' . $uid . '" LIMIT 1');//коректировка денег 2244 - 1972 + mysql_query( + 'UPDATE `users` SET `money` = `money`200 WHERE `id` = "' . $uid . '" LIMIT 1' + );//коректировка денег 2244 - 1972 //танк } elseif ($_POST['class_u'] == 3) { //кастим эфекты $us = add_effn($uid, 1); // сила $us = add_effn($uid, 20); // сокрушение - mysql_query("INSERT INTO `stats` (`id`,`stats`,`ability`,`skills`,exp) VALUES ('" . $uid . "','s1=42|s2=3|s3=3|s4=50|rinv=40|m9=5|m6=10|s7=0|a1=0|a2=0|a3=9|a4=0|a5=0|mg1=0|mg2=0|mg3=0|mg4=0|mg5=0|mg6=0|mg7=0|s5=0|s6=0|a6=0|s8=0|s9=0|s10=0|s11=0|s12=0|s13=0|s14=0|s15=0',-75,-9,100000)"); + mysql_query( + "INSERT INTO `stats` (`id`,`stats`,`ability`,`skills`,exp) VALUES ('" . $uid . "','s1=42|s2=3|s3=3|s4=50|rinv=40|m9=5|m6=10|s7=0|a1=0|a2=0|a3=9|a4=0|a5=0|mg1=0|mg2=0|mg3=0|mg4=0|mg5=0|mg6=0|mg7=0|s5=0|s6=0|a6=0|s8=0|s9=0|s10=0|s11=0|s12=0|s13=0|s14=0|s15=0',-75,-9,100000)" + ); $re = $u->addItem(6432, $uid); - Db::sql('update items_users set `1price` = (select price_1 from items_shop where items_shop.item_id = ? and sid = 1) where id = ?', [6432, $re]); + Db::sql( + 'update items_users set `1price` = (select price_1 from items_shop where items_shop.item_id = ? and sid = 1) where id = ?', + [6432, $re] + ); //Коррекция Кредитов - mysql_query('UPDATE `users` SET `money` = `money`200 WHERE `id` = "' . $uid . '" LIMIT 1');//коректировка денег 2244 - 2101 + mysql_query( + 'UPDATE `users` SET `money` = `money`200 WHERE `id` = "' . $uid . '" LIMIT 1' + );//коректировка денег 2244 - 2101 //крит } elseif ($_POST['class_u'] == 4)//крит { $us = add_effn($uid, 7); // инта $us = add_effn($uid, 20); // сокрушение - mysql_query("INSERT INTO `stats` (`id`,`stats`,`ability`,`skills`,exp) VALUES ('" . $uid . "','s1=24|s2=15|s3=29|s4=30|rinv=40|m9=5|m6=10|s7=0|a1=0|a2=0|a3=0|a4=9|a5=0|mg1=0|mg2=0|mg3=0|mg4=0|mg5=0|mg6=0|mg7=0|s5=0|s6=0|a6=0|s8=0|s9=0|s10=0|s11=0|s12=0|s13=0|s14=0|s15=0',-75,-9,100000)"); + mysql_query( + "INSERT INTO `stats` (`id`,`stats`,`ability`,`skills`,exp) VALUES ('" . $uid . "','s1=24|s2=15|s3=29|s4=30|rinv=40|m9=5|m6=10|s7=0|a1=0|a2=0|a3=0|a4=9|a5=0|mg1=0|mg2=0|mg3=0|mg4=0|mg5=0|mg6=0|mg7=0|s5=0|s6=0|a6=0|s8=0|s9=0|s10=0|s11=0|s12=0|s13=0|s14=0|s15=0',-75,-9,100000)" + ); $re = $u->addItem(6430, $uid); - Db::sql('update items_users set `1price` = (select price_1 from items_shop where items_shop.item_id = ? and sid = 1) where id = ?', [6430, $re]); + Db::sql( + 'update items_users set `1price` = (select price_1 from items_shop where items_shop.item_id = ? and sid = 1) where id = ?', + [6430, $re] + ); //коррекция кредов при старте - mysql_query('UPDATE `users` SET `money` = `money`200 WHERE `id` = "' . $uid . '" LIMIT 1');//коректировка денег 2244 - 1988 + mysql_query( + 'UPDATE `users` SET `money` = `money`200 WHERE `id` = "' . $uid . '" LIMIT 1' + );//коректировка денег 2244 - 1988 //воздух } elseif ($_POST['class_u'] == 5)//воздух { @@ -800,11 +869,18 @@ if ($_SERVER['HTTP_USER_AGENT'] != '' && $us = add_effn($uid, 32); // Холодный разум $us = add_effn($uid, 53); // Маг уселок воздух $us = add_effn($uid, 439); // Маг уселок - mysql_query("INSERT INTO `stats` (`id`,`stats`,`ability`,`skills`,exp) VALUES ('" . $uid . "','s1=14|s2=3|s3=3|s4=25|rinv=40|m9=5|m6=10|s7=0|a1=0|a2=0|a3=0|a4=0|a5=3|mg1=0|mg2=6|mg3=0|mg4=0|mg5=0|mg6=0|mg7=0|s5=13|s6=40|a6=0|s8=0|s9=0|s10=0|s11=0|s12=0|s13=0|s14=0|s15=0',-75,-9,100000)"); + mysql_query( + "INSERT INTO `stats` (`id`,`stats`,`ability`,`skills`,exp) VALUES ('" . $uid . "','s1=14|s2=3|s3=3|s4=25|rinv=40|m9=5|m6=10|s7=0|a1=0|a2=0|a3=0|a4=0|a5=3|mg1=0|mg2=6|mg3=0|mg4=0|mg5=0|mg6=0|mg7=0|s5=13|s6=40|a6=0|s8=0|s9=0|s10=0|s11=0|s12=0|s13=0|s14=0|s15=0',-75,-9,100000)" + ); $re = $u->addItem(6435, $uid); - Db::sql('update items_users set `1price` = (select price_1 from items_shop where items_shop.item_id = ? and sid = 1) where id = ?', [6435, $re]); + Db::sql( + 'update items_users set `1price` = (select price_1 from items_shop where items_shop.item_id = ? and sid = 1) where id = ?', + [6435, $re] + ); // Коррекция Кредов - mysql_query('UPDATE `users` SET `money` = `money`200 WHERE `id` = "' . $uid . '" LIMIT 1');//коректировка денег 2244 - 1988 + mysql_query( + 'UPDATE `users` SET `money` = `money`200 WHERE `id` = "' . $uid . '" LIMIT 1' + );//коректировка денег 2244 - 1988 //огонь } elseif ($_POST['class_u'] == 6) { //кастим эфекты @@ -812,11 +888,18 @@ if ($_SERVER['HTTP_USER_AGENT'] != '' && $us = add_effn($uid, 32); // Холодный разум $us = add_effn($uid, 51); // Маг уселок огонь $us = add_effn($uid, 439); // Маг уселок - mysql_query("INSERT INTO `stats` (`id`,`stats`,`ability`,`skills`,exp) VALUES ('" . $uid . "','s1=14|s2=3|s3=3|s4=25|rinv=40|m9=5|m6=10|s7=0|a1=0|a2=0|a3=0|a4=0|a5=3|mg1=6|mg2=0|mg3=0|mg4=0|mg5=0|mg6=0|mg7=0|s5=13|s6=40|a6=0|s8=0|s9=0|s10=0|s11=0|s12=0|s13=0|s14=0|s15=0',-75,-9,100000)"); + mysql_query( + "INSERT INTO `stats` (`id`,`stats`,`ability`,`skills`,exp) VALUES ('" . $uid . "','s1=14|s2=3|s3=3|s4=25|rinv=40|m9=5|m6=10|s7=0|a1=0|a2=0|a3=0|a4=0|a5=3|mg1=6|mg2=0|mg3=0|mg4=0|mg5=0|mg6=0|mg7=0|s5=13|s6=40|a6=0|s8=0|s9=0|s10=0|s11=0|s12=0|s13=0|s14=0|s15=0',-75,-9,100000)" + ); $re = $u->addItem(6447, $uid); - Db::sql('update items_users set `1price` = (select price_1 from items_shop where items_shop.item_id = ? and sid = 1) where id = ?', [6447, $re]); + Db::sql( + 'update items_users set `1price` = (select price_1 from items_shop where items_shop.item_id = ? and sid = 1) where id = ?', + [6447, $re] + ); //Коррекция Кредитов - mysql_query('UPDATE `users` SET `money` = `money`200 WHERE `id` = "' . $uid . '" LIMIT 1');//коректировка денег 2244 - 1988 + mysql_query( + 'UPDATE `users` SET `money` = `money`200 WHERE `id` = "' . $uid . '" LIMIT 1' + );//коректировка денег 2244 - 1988 //земля } elseif ($_POST['class_u'] == 7) { //кастим эфекты @@ -824,11 +907,18 @@ if ($_SERVER['HTTP_USER_AGENT'] != '' && $us = add_effn($uid, 32); // Холодный разум $us = add_effn($uid, 54); // Маг уселок земля $us = add_effn($uid, 439); // Маг уселок - mysql_query("INSERT INTO `stats` (`id`,`stats`,`ability`,`skills`,exp) VALUES ('" . $uid . "','s1=14|s2=3|s3=3|s4=25|rinv=40|m9=5|m6=10|s7=0|a1=0|a2=0|a3=0|a4=0|a5=3|mg1=0|mg2=0|mg3=0|mg4=6|mg5=0|mg6=0|mg7=0|s5=13|s6=40|a6=0|s8=0|s9=0|s10=0|s11=0|s12=0|s13=0|s14=0|s15=0',-75,-9,100000)"); + mysql_query( + "INSERT INTO `stats` (`id`,`stats`,`ability`,`skills`,exp) VALUES ('" . $uid . "','s1=14|s2=3|s3=3|s4=25|rinv=40|m9=5|m6=10|s7=0|a1=0|a2=0|a3=0|a4=0|a5=3|mg1=0|mg2=0|mg3=0|mg4=6|mg5=0|mg6=0|mg7=0|s5=13|s6=40|a6=0|s8=0|s9=0|s10=0|s11=0|s12=0|s13=0|s14=0|s15=0',-75,-9,100000)" + ); $re = $u->addItem(6436, $uid); - Db::sql('update items_users set `1price` = (select price_1 from items_shop where items_shop.item_id = ? and sid = 1) where id = ?', [6436, $re]); + Db::sql( + 'update items_users set `1price` = (select price_1 from items_shop where items_shop.item_id = ? and sid = 1) where id = ?', + [6436, $re] + ); //Коррекция Кредитов - mysql_query('UPDATE `users` SET `money` = `money`200 WHERE `id` = "' . $uid . '" LIMIT 1');//коректировка денег 2244 - 1988 + mysql_query( + 'UPDATE `users` SET `money` = `money`200 WHERE `id` = "' . $uid . '" LIMIT 1' + );//коректировка денег 2244 - 1988 //вода } elseif ($_POST['class_u'] == 8) { //кастим эфекты @@ -836,21 +926,35 @@ if ($_SERVER['HTTP_USER_AGENT'] != '' && $us = add_effn($uid, 32); // Холодный разум $us = add_effn($uid, 52); // Маг уселок вода $us = add_effn($uid, 439); // Маг уселок - mysql_query("INSERT INTO `stats` (`id`,`stats`,`ability`,`skills`,exp) VALUES ('" . $uid . "','s1=14|s2=3|s3=3|s4=25|rinv=40|m9=5|m6=10|s7=0|a1=0|a2=0|a3=0|a4=0|a5=3|mg1=0|mg2=0|mg3=6|mg4=0|mg5=0|mg6=0|mg7=0|s5=13|s6=40|a6=0|s8=0|s9=0|s10=0|s11=0|s12=0|s13=0|s14=0|s15=0',-75,-9,100000)"); + mysql_query( + "INSERT INTO `stats` (`id`,`stats`,`ability`,`skills`,exp) VALUES ('" . $uid . "','s1=14|s2=3|s3=3|s4=25|rinv=40|m9=5|m6=10|s7=0|a1=0|a2=0|a3=0|a4=0|a5=3|mg1=0|mg2=0|mg3=6|mg4=0|mg5=0|mg6=0|mg7=0|s5=13|s6=40|a6=0|s8=0|s9=0|s10=0|s11=0|s12=0|s13=0|s14=0|s15=0',-75,-9,100000)" + ); $re = $u->addItem(6448, $uid); - Db::sql('update items_users set `1price` = (select price_1 from items_shop where items_shop.item_id = ? and sid = 1) where id = ?', [6448, $re]); + Db::sql( + 'update items_users set `1price` = (select price_1 from items_shop where items_shop.item_id = ? and sid = 1) where id = ?', + [6448, $re] + ); //Коррекция кредов - mysql_query('UPDATE `users` SET `money` = `money`200 WHERE `id` = "' . $uid . '" LIMIT 1');//коректировка денег 2244 - 1988 + mysql_query( + 'UPDATE `users` SET `money` = `money`200 WHERE `id` = "' . $uid . '" LIMIT 1' + );//коректировка денег 2244 - 1988 //Критоуворот } elseif ($_POST['class_u'] == 9) { //кастим эфекты уворота $us = add_effn($uid, 8); // ловка $us = add_effn($uid, 20); // сокрушение - mysql_query("INSERT INTO `stats` (`id`,`stats`,`ability`,`skills`,exp) VALUES ('" . $uid . "','s1=15|s2=23|s3=30|s4=30|rinv=40|m9=5|m6=10|s7=0|a1=9|a2=0|a3=0|a4=0|a5=0|mg1=0|mg2=0|mg3=0|mg4=0|mg5=0|mg6=0|mg7=0|s5=0|s6=0',-75,-9,100000)"); + mysql_query( + "INSERT INTO `stats` (`id`,`stats`,`ability`,`skills`,exp) VALUES ('" . $uid . "','s1=15|s2=23|s3=30|s4=30|rinv=40|m9=5|m6=10|s7=0|a1=9|a2=0|a3=0|a4=0|a5=0|mg1=0|mg2=0|mg3=0|mg4=0|mg5=0|mg6=0|mg7=0|s5=0|s6=0',-75,-9,100000)" + ); $re = $u->addItem(6530, $uid); - Db::sql('update items_users set `1price` = (select price_1 from items_shop where items_shop.item_id = ? and sid = 1) where id = ?', [6530, $re]); + Db::sql( + 'update items_users set `1price` = (select price_1 from items_shop where items_shop.item_id = ? and sid = 1) where id = ?', + [6530, $re] + ); //Коррекция кредитов - mysql_query('UPDATE `users` SET `money` = `money`200 WHERE `id` = "' . $uid . '" LIMIT 1');//коректировка денег 2244 - 1972 + mysql_query( + 'UPDATE `users` SET `money` = `money`200 WHERE `id` = "' . $uid . '" LIMIT 1' + );//коректировка денег 2244 - 1972 } if ($_POST['ref'] > 0) { $re = $u->addItem(4811, $uid); @@ -870,22 +974,44 @@ if ($_SERVER['HTTP_USER_AGENT'] != '' && //добовляем благодать ангела при регистрации $ttime = time(); - mysql_query("INSERT INTO `eff_users`(`id_eff`, `uid`, `name`, `data`, `overType`, `timeUse`, `timeAce`, `user_use`, `delete`, `v1`, `v2`, `img2`, `x`, `hod`, `bj`, `sleeptime`, `no_Ace`, `file_finish`, `tr_life_user`, `deactiveTime`, `deactiveLast`, `mark`, `bs`) VALUES - (412,'" . $uid . "','Благодать Ангела [1]','add_gold=1|add_speedhp=35|add_speedmp=35|add_exp=35|add_repair_discount=25|add_speed_dungeon=10|add_hpVinos=5|add_m10=5|add_m11=5|add_za=25|add_zma=25',52," . $ttime . ",0,'',0,0,0,'',1,-1,0,0,1,'',0,0,0,0,0)"); + mysql_query( + "INSERT INTO `eff_users`(`id_eff`, `uid`, `name`, `data`, `overType`, `timeUse`, `timeAce`, `user_use`, `delete`, `v1`, `v2`, `img2`, `x`, `hod`, `bj`, `sleeptime`, `no_Ace`, `file_finish`, `tr_life_user`, `deactiveTime`, `deactiveLast`, `mark`, `bs`) VALUES + (412,'" . $uid . "','Благодать Ангела [1]','add_gold=1|add_speedhp=35|add_speedmp=35|add_exp=35|add_repair_discount=25|add_speed_dungeon=10|add_hpVinos=5|add_m10=5|add_m11=5|add_za=25|add_zma=25',52," . $ttime . ",0,'',0,0,0,'',1,-1,0,0,1,'',0,0,0,0,0)" + ); //мульты - $ipm1 = mysql_fetch_array(mysql_query('SELECT * FROM `logs_auth` WHERE `uid` = "' . $uid . '" AND `ip`!="' . getIp() . '" ORDER BY `id` LIMIT 1')); - $ppl = mysql_query('SELECT * FROM `logs_auth` WHERE `ip`!="" AND (`ip` = "' . getIp() . '" OR `ip`="' . $ipm1['ip'] . '" OR `ip`="' . $_COOKIE['ip'] . '")'); + $ipm1 = mysql_fetch_array( + mysql_query( + 'SELECT * FROM `logs_auth` WHERE `uid` = ' . $uid . ' AND `ip`!="' . UserIp::get( + ) . '" ORDER BY `id` LIMIT 1' + ) + ); + $ppl = mysql_query( + 'SELECT * FROM `logs_auth` WHERE `ip`!="" AND (`ip` = "' . UserIp::get( + ) . '" OR `ip`="' . $ipm1['ip'] . '" OR `ip`="' . $_COOKIE['ip'] . '")' + ); while ($spl = mysql_fetch_array($ppl)) { - $ml = mysql_fetch_array(mysql_query('SELECT `id` FROM `mults` WHERE (`uid` = "' . $spl['uid'] . '" AND `uid2` = "' . $uid . '") OR (`uid2` = "' . $spl['uid'] . '" AND `uid` = "' . $uid . '") LIMIT 1')); + $ml = mysql_fetch_array( + mysql_query( + 'SELECT `id` FROM `mults` WHERE (`uid` = "' . $spl['uid'] . '" AND `uid2` = "' . $uid . '") OR (`uid2` = "' . $spl['uid'] . '" AND `uid` = "' . $uid . '") LIMIT 1' + ) + ); if (!isset($ml['id']) && $spl['ip'] != '' && $spl['ip'] != '127.0.0.1') { - mysql_query('INSERT INTO `mults` (`uid`,`uid2`,`ip`) VALUES ("' . $uid . '","' . $spl['uid'] . '","' . $spl['ip'] . '")'); + mysql_query( + 'INSERT INTO `mults` (`uid`,`uid2`,`ip`) VALUES ("' . $uid . '","' . $spl['uid'] . '","' . $spl['ip'] . '")' + ); } } - mysql_query("INSERT INTO `logs_auth` (`uid`,`ip`,`browser`,`type`,`time`,`depass`) VALUES ('" . $uid . "','" . getIp() . "','" . $_SERVER['HTTP_USER_AGENT'] . "','1','" . time() . "','')"); + mysql_query( + "INSERT INTO `logs_auth` (`uid`,`ip`,`browser`,`type`,`time`,`depass`) VALUES ('" . $uid . "','" . UserIp::get( + ) . "','" . $_SERVER['HTTP_USER_AGENT'] . "','1','" . time() . "','')" + ); //Обновяем таблицы - mysql_query("UPDATE `users` SET `online`='" . time() . "',`ip` = '" . getIp() . "' WHERE `uid` = '" . $uid . "' LIMIT 1"); + mysql_query( + "UPDATE `users` SET `online`= unix_timestamp(),`ip` = '" . UserIp::get( + ) . "' WHERE id = '" . $uid . "' LIMIT 1" + ); if ( !setcookie('login', $_POST['nick_u'], (time() + 60 * 60 * 24 * 7), '', '.new-combats.com') || @@ -895,15 +1021,17 @@ if ($_SERVER['HTTP_USER_AGENT'] != '' && die('Ошибка сохранения cookie.'); } else { Db::sql('insert into users_learning_status (uid) values (?)', [$uid]); - die('Спасибо за регистрацию в игровом мире Бойцовского Клуба, желаем вам побед и долгой игры. -В случае вопросов по игре, Вам будет доступен общий чат!
'); + die( + 'Спасибо за регистрацию в игровом мире Бойцовского Клуба, желаем вам побед и долгой игры. +В случае вопросов по игре, Вам будет доступен общий чат!
' + ); } } } else { ?>

- + 0, 1 => '']; + $eff = mysql_fetch_array(mysql_query('SELECT * FROM `eff_main` WHERE `id2` = "' . $id . '" LIMIT 1')); + if (isset($eff['id2'])) { + $n = $eff['mname']; + $d = $eff['mdata']; + $ins = mysql_query( + 'INSERT INTO `eff_users` (`overType`,`id_eff`,`uid`,`name`,`timeUse`,`data`) VALUES ("' . $eff['oneType'] . '","' . $eff['id2'] . '","' . $uid . '","' . $n . '","' . time( + ) . '","' . $d . '")' + ); + if ($ins) { + $g[0] = 1; + $g[1] = '...'; + } } - } + return $g; } -function add_effn($uid,$id) - { - $g = array(0=>0,1=>''); - $eff = mysql_fetch_array(mysql_query('SELECT * FROM `eff_main` WHERE `id2` = "'.$id.'" LIMIT 1')); - if(isset($eff['id2'])) - { - $n = $eff['mname']; - $d = $eff['mdata']; - $ins = mysql_query('INSERT INTO `eff_users` (`overType`,`id_eff`,`uid`,`name`,`timeUse`,`data`) VALUES ("'.$eff['oneType'].'","'.$eff['id2'].'","'.$uid.'","'.$n.'","'.time().'","'.$d.'")'); - if($ins) - { - $g[0] = 1; - $g[1] = '...'; - } - } - return $g; - } - - function send_mime_mail($name_from, // имя отправителя - $email_from, // email отправителя - $name_to, // имя получателя - $email_to, // email получателя - $data_charset, // кодировка переданных данных - $send_charset, // кодировка письма - $subject, // тема письма - $body // текст письма - ) - { - - $to = mime_header_encode($name_to, $data_charset, $send_charset) - . ' <' . $email_to . '>'; - $subject = mime_header_encode($subject, $data_charset, $send_charset); - $from = mime_header_encode($name_from, $data_charset, $send_charset) - .' <' . $email_from . '>'; - if($data_charset != $send_charset) { - $body = iconv($data_charset, $send_charset, $body); - } - /*$headers = "From: $from\r\n"; +function send_mime_mail( + $name_from, // имя отправителя + $email_from, // email отправителя + $name_to, // имя получателя + $email_to, // email получателя + $data_charset, // кодировка переданных данных + $send_charset, // кодировка письма + $subject, // тема письма + $body // текст письма +) +{ + + $to = mime_header_encode($name_to, $data_charset, $send_charset) + . ' <' . $email_to . '>'; + $subject = mime_header_encode($subject, $data_charset, $send_charset); + $from = mime_header_encode($name_from, $data_charset, $send_charset) + . ' <' . $email_from . '>'; + if ($data_charset != $send_charset) { + $body = iconv($data_charset, $send_charset, $body); + } + /*$headers = "From: $from\r\n"; $headers .= "Content-type: text/html; charset=$send_charset\r\n";*/ - $headers = array ('From' => $email_from, 'Content-type' => 'text/html; charset='.$send_charset.'\r\n', 'To' => $to, 'Subject' => $subject, 'Reply-To' => $email_from); - //error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED ^ E_STRICT); - set_include_path("." . PATH_SEPARATOR . ($UserDir = dirname($_SERVER['DOCUMENT_ROOT'])) . "/pear/php" . PATH_SEPARATOR . get_include_path()); - require_once "/usr/local/lib/php/Mail.php"; // /usr/local/lib/php/Mail.php - - $smtp = Mail::factory('smtp', array( - 'host' => 'smtp.gmail.com', - 'port' => '587', - 'auth' => true, - 'username' => 'newcombats22@gmail.com', //your gmail account - 'password' => 'newcombats1974' // your password - )); - - $mail = $smtp->send($to, $headers, $body); - - if (PEAR::isError($mail)) { - echo("

" . $mail->getMessage() . "

"); die; - } else { - echo("

Message successfully sent!

"); die; - } - - return $mail; - - - - } - - function mime_header_encode($str, $data_charset, $send_charset) { - if($data_charset != $send_charset) { - $str = iconv($data_charset, $send_charset, $str); - } - return '=?' . $send_charset . '?B?' . base64_encode($str) . '?='; - } - - function send_mail($to,$to_name,$from = 'newcombats22@gmail.com',$name = 'Бойцовский Клуб 2',$title,$text) { - send_mime_mail($name, - $from, - $to_name, - $to, - 'CP1251', // кодировка, в которой находятся передаваемые строки - 'KOI8-R', // кодировка, в которой будет отправлено письмо - $title, - $text); // \r\n - } + $headers = ['From' => $email_from, 'Content-type' => 'text/html; charset=' . $send_charset . '\r\n', 'To' => $to, 'Subject' => $subject, 'Reply-To' => $email_from]; + //error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED ^ E_STRICT); + set_include_path( + "." . PATH_SEPARATOR . ($UserDir = dirname( + $_SERVER['DOCUMENT_ROOT'] + )) . "/pear/php" . PATH_SEPARATOR . get_include_path() + ); + require_once "/usr/local/lib/php/Mail.php"; // /usr/local/lib/php/Mail.php + + $smtp = Mail::factory( + 'smtp', [ + 'host' => 'smtp.gmail.com', + 'port' => '587', + 'auth' => true, + 'username' => 'newcombats22@gmail.com', //your gmail account + 'password' => 'newcombats1974', // your password + ] + ); + + $mail = $smtp->send($to, $headers, $body); + + if (PEAR::isError($mail)) { + echo("

" . $mail->getMessage() . "

"); + die; + } else { + echo("

Message successfully sent!

"); + die; + } + + return $mail; + + +} + +function mime_header_encode($str, $data_charset, $send_charset) +{ + if ($data_charset != $send_charset) { + $str = iconv($data_charset, $send_charset, $str); + } + return '=?' . $send_charset . '?B?' . base64_encode($str) . '?='; +} + +function send_mail($to, $to_name, $from = 'newcombats22@gmail.com', $name = 'Бойцовский Клуб 2', $title, $text) +{ + send_mime_mail( + $name, + $from, + $to_name, + $to, + 'CP1251', // кодировка, в которой находятся передаваемые строки + 'KOI8-R', // кодировка, в которой будет отправлено письмо + $title, + $text + ); // \r\n +} 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 error_check($id,$str_u,$name = 0) - { - - //*************************************************** - session_start(); - $error=""; - if ($id==1 && !empty($str_u)) // Проверка логина - { - $nologin = array(0=>'ангел',1=>'angel',2=>'администрация',3=>'administration',4=>'Комментатор',5=>'Мироздатель',6=>'Мусорщик',7=>'Падальщик',8=>'Повелитель',9=>'Архивариус',10=>'Пересмешник',11=>'Волынщик',12=>'Лорд Разрушитель',13=>'Милосердие',14=>'Справедливость',15=>'Искушение',16=>'Вознесение'); - $i = 0; - while($i20) - { - $error = 'Логин должен содержать не более 20 символов.'; - $error = $error.'
Пример правильного никнейма: Петя Убиватор, Коля, xalop.
Пример неправильного никнейма: )))), kolя)=-/.'; - } - if(strlen($str_u)<4) - { - $error = 'Логин должен содержать не менее 4 символов.'; - $error = $error.'
Пример правильного никнейма: Петя Убиватор, Коля, xalop.
Пример неправильного никнейма: )))), kolя)=-/.'; - } - //Один алфавит - $er = en_ru($str_u); - if($er==true) - { - $error = 'В логине разрешено использовать только буквы одного алфавита русского или английского. Нельзя смешивать.'; - $error = $error.'
Пример правильного никнейма: Петя Убиватор, Коля, xalop.
Пример неправильного никнейма: )))), kolя)=-/.'; - } - //Запрещенный символы - if(strpos($sr,$str_u)) - { - $error = 'Логин содержит запрещенные символы.'; - $error = $error.'
Пример правильного никнейма: Петя Убиватор, Коля, xalop.
Пример неправильного никнейма: )))), kolя)=-/.'; - } - - //Персонажи в базе - $log = mysql_fetch_array(mysql_query('SELECT `id` from `users` where `login`="'.mysql_real_escape_string($str_u).'" LIMIT 1')); - $log2 = mysql_fetch_array(mysql_query('SELECT `id` from `lastNames` where `login`="'.mysql_real_escape_string($str_u).'" LIMIT 1')); - if(isset($log['id']) || isset($log2['id'])) - { - $error = 'Логин '.$str_u.' уже занят, выберите другой.'; - } - //Разделители - if(substr_count($str_u,' ')+substr_count($str_u,'-')+substr_count($str_u,'_')>2) - { - $error = 'Не более двух разделителей одновременно (пробел, тире, нижнее подчеркивание).'; - $error = $error.'
Пример правильного никнейма: Петя Убиватор, Коля, xalop.
Пример неправильного никнейма: )))), kolя)=-/.'; - } - - } - - if ($id==2 && !empty($str_u)) //проверка емаила - { - if(strlen($str_u)<6 || strlen($str_u)>50) - { - $error = 'E-mail не может быть короче 6-х символов и длинее 50-ти.'; - } - else - { - $testEREm = mysql_fetch_array(mysql_query('SELECT `mail` FROM `users` WHERE `mail` LIKE "'.$str_u.'" LIMIT 1')); - $emails = mysql_fetch_array(mysql_query('SELECT * FROM `ban_email` WHERE `email` LIKE "'.$str_u.'" LIMIT 1')); - if (isset($testEREm['mail'])) - { - $error = 'E-mail уже занят.'; - } - if (isset($emails['email'])) - { - $error = 'E-mail заблокирован свяжитесь с Администрацией.'; - } - - $x=1; - $i=1; - $tx='
Возможно использовать только сервисы почты:
'; - $sp = mysql_query('SELECT * FROM `trust_email`'); - while($pl = mysql_fetch_array($sp)) - { - $emailtest=$pl['email']; - if(!preg_match("/".$emailtest."/i",$str_u)) - { - $i++; - } - $tx=$tx.$pl['email'].' '; - $x++; - } - if ($i==$x) - { - $error='Данный почтовый сервис использовать нельзя.'.$tx; - } - - } - if(!preg_match('#^[a-z0-9.!\#$%&\'*+-/=?^_`{|}~]+@([0-9.]+|([^\s]+\.+[a-z]{2,6}))$#si', $str_u)) - { - $error = 'Вы указали явно ошибочный E-mail.
'; - } - if($error != '') { - $gd[4] = $error; - $good = 0; - }else{ - $gd[4] = 1; - } - } - - if ($id==3 && !empty($str_u)&& !empty($name)) //отсылка емаила при удачном емаиле str_u -> mail name -> nickname - { - - if (empty($str_u) || empty($name)) {$error = 'Емеил или Логин пуст.';} - $code=rand(10000000,99999999); - mysql_query('INSERT INTO `secure_code`(`email`, `code`, `time`) VALUES ("'.$str_u.'","'.$code.'","'.time().'");'); - $title = 'Секретный Код - Новый Бойцовский Клуб' .$name; - $txt .= 'Секретный Код: '.$code; - if(send_mime_mail('Бойцовский Клуб - Support', - 'newcombats22@gmail.com', - ''.$name.'', - $str_u, - 'CP1251', // кодировка, в которой находятся передаваемые строки - 'KOI8-R', // кодировка, в которой будет отправлено письмо - $title, - $txt)) - { - - }else{ - $error = 'Не удалось отправить сообщение. Попробуйте позже.'; - } - } - - if ($id==4 && !empty($str_u)&& !empty($name)) //проверка кода безопасности str_u -> введенный код name -> email - { - $testcode = mysql_fetch_array(mysql_query('SELECT * FROM `secure_code` WHERE `email` = "'.$name.'" ORDER BY `secure_code`.`time` DESC LIMIT 1')); - if ($testcode['code']<>$str_u) - { - $error = 'Неверный код безопасности (Проверте пробелы и сам код в последнем емеиле)'; - } - } - if ($id==5 && !empty($str_u)&& !empty($name)) //проверка пароля str_u -> p1 код name -> p2 - { - if(strlen($str_u)<8 || strlen($str_u)>30) - { - $error = 'Длина пароля не может быть меньше 8 символов или более 30 символов.'; - $error = $error.'
Пример правильного пароля: Parol228, Kotik111, Pswerd112.
Пример неправильного пароля: parol228, kotik.'; - } - if($str_u!=$name) - { - $error = 'В анкете пароль нужно ввести дважды, для проверки. Во второй раз вы его ввели неверно, будьте внимательнее.'; - $error = $error.'
Пример правильного пароля: Parol228, Kotik111, Pswerd112.
Пример неправильного пароля: parol228, kotik.'; - } - if (!preg_match('/[a-zа-я]+/', $str_u)) - { - $error = 'Пароль не содержит букв нижнего регитра а..я/a..z.'; - $error = $error.'
Пример правильного пароля: Parol228, Kotik111, Pswerd112.
Пример неправильного пароля: parol228, kotik.'; - } - elseif (!preg_match('/[A-ZА-Я]+/', $str_u)) - { - $error = 'Пароль не содержит букв верхнего регитра А..Я/A..Z .'; - $error = $error.'
Пример правильного пароля: Parol228, Kotik111, Pswerd112.
Пример неправильного пароля: parol228, kotik.'; - } - else - { - if (!preg_match('/[0-9]+/', $str_u)) - { - $error = 'Пароль не содержит цифр.'; - $error = $error.'
Пример правильного пароля: Parol228, Kotik111, Pswerd112.
Пример неправильного пароля: parol228, kotik.'; - } - - } - } - - - //*************************************************** - return $error; - } - -if ($_SERVER['HTTP_USER_AGENT']!='' && - $_SERVER['HTTP_USER_AGENT']!='Mozilla/5.0 (Windows NT 6.1; rv:60.0) Gecko/20100101 Firefox/60.0'&& - $_SERVER['HTTP_USER_AGENT']!='Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:71.0) Gecko/20100101 Firefox/71.0' && - $_SERVER['HTTP_USER_AGENT']!='Mozilla/5.0 (Windows NT 10.0; rv:68.0) Gecko/20100101 Firefox/68.0' - ) { - ?> - - - - Регистрация - создай персонажа в игре Новый «Бойцовский клуб» - - - - - -
- - - -
-

-
- -
-

Введите никнейм для Вашего персонажа

-
- -
-

Введите никнейм для Вашего персонажа

-

-
- -
-

Имя вашего персонажа (login):

-
- - -
-

Введите ваш действующий и настоящий "Email" адрес

-

Внимание! Не используйте несуществующие "Email" адреса, а так же проверяйте то, какой эмеил вы вводите, ибо перед стартом игры, вам необходимо будет подтвердить ваш эмеил адрес.

-

Ваш "Email" Адрес не будет использоваться нигде и служит исключительно для того, чтобы вы смогли восстановить пароль от своего персонажа, а так же для получения новостной рассылки.

-
- -
-

Введите ваш действующий и настоящий "Email" адрес

-

-
- -
-

-
- - - - - -
-

Войдите на "Email": и проверьте почту,
вам пришло письмо с кодом подтверждения, скопируйте его и вставьте сюда:

-
- -
-

Войдите на "Email": и проверьте почту,
вам пришло письмо с кодом подтверждения, скопируйте его и вставьте сюда:

-

-
- -
-

-
- - + + + + + +
+

+
+ +
+

+

Введите никнейм для Вашего персонажа

+
+ +
+

+

Введите никнейм для Вашего персонажа

+

+
+ +
+

Имя вашего персонажа (login):

+
+ + +
+

+

Введите ваш действующий и настоящий "Email" адрес

+

+

Внимание! Не используйте несуществующие "Email" адреса, а так же проверяйте то, какой эмеил вы вводите, + ибо перед стартом игры, вам необходимо будет подтвердить ваш эмеил адрес.

+

+

Ваш "Email" Адрес не будет использоваться нигде и служит исключительно для того, чтобы вы смогли + восстановить пароль от своего персонажа, а так же для получения новостной рассылки.

+
+ +
+

+

Введите ваш действующий и настоящий "Email" адрес

+

+
+ +
+

+
+ + + + + +
+

+

Войдите на "Email": и проверьте почту,
вам пришло письмо с кодом + подтверждения, скопируйте его и вставьте сюда:

+
+ +
+

+

Войдите на "Email": и проверьте почту,
вам пришло письмо с кодом + подтверждения, скопируйте его и вставьте сюда:

+

+
+ +
+

+
+ + + + +
+

+

Придумайте пароль для Вашего персонажа

+

+

Подтвердите придуманный пароль для Вашего персонажа


+

+

Пароль должен состоять с букв верхнего и нижнего регистра, а так же, помимо букв, необходимо добавить и + цифры для надёжности.

+
+ +
+

+

Придумайте пароль для Вашего персонажа

+

+

Подтвердите придуманный пароль для Вашего персонажа

+

+

Пароль должен состоять с букв верхнего и нижнего регистра, а так же, помимо букв, необходимо добавить и + цифры для надёжности.

+


+
+ +
+

+

+
+ + + +
+

+

Выберите пол вашего персонажа:

+

+
+ +
+

+
+ + + +
+

Укажите дату вашего рождения:

+ +
+ +
+ +
+ + + +
+

+

Выберите игровой класс для вашего персонажа:

+

+

Внимание! Выбор игрового класса не влияет на игру в целом и нигде не фиксируется или же используется, + это необходимо для того, чтобы ваш персонаж получил нужные предметы в начале игры, а так же нужные + баффы.

+
+
+

+
+
+

+

+
+
+

+
+
+

+

+
+
+

+
+
+

+

+
+
+

+

+
+
+

+

+
+
+

+

Внимание! Выбрав класс персонажа вы автоматически соглашаетесь с правилами и законами игрового мира

+
+
+ 0) { + $ref = mysql_fetch_array( + mysql_query( + 'SELECT `id`,`login` FROM `users` WHERE `id` = "' . mysql_real_escape_string( + $_POST['ref'] + ) . '" LIMIT 1' + ) + ); + if (isset($ref['id'])) { + $_POST['ref'] = $ref['id']; + } else { + $_POST['ref'] = 0; + } + unset($ref); + } + mysql_query( + 'INSERT INTO `users` (`name`,`align`,`real`,`login`,`host_reg`,`pass`,`ip`,`ipreg`,`city`,`cityreg`,`room`,`timereg`, `activ`,`mail`,`bithday`,`sex`,`fnq`,`battle`,`design`,`molch2`,`level` ) VALUES ( "", "0", "1", - "'.mysql_real_escape_string($_POST['nick_u']).'", - "'.mysql_real_escape_string(0+(int)$_POST['ref']).'", - "'.mysql_real_escape_string(md5($_POST['pass1_u'])).'", - "'.mysql_real_escape_string(getIp()).'", - "'.mysql_real_escape_string(getIp()).'", + "' . mysql_real_escape_string($_POST['nick_u']) . '", + "' . mysql_real_escape_string(0 + (int)$_POST['ref']) . '", + "' . mysql_real_escape_string(md5($_POST['pass1_u'])) . '", + "' . mysql_real_escape_string(UserIp::get()) . '", + "' . mysql_real_escape_string(UserIp::get()) . '", "capitalcity", "capitalcity", "9", - "'.time().'", + "' . time() . '", "0", - "'.mysql_real_escape_string($_POST['email_u']).'", - "'.mysql_real_escape_string(date('d.m.Y', strtotime($_POST['bday_u']))).'", - "'.mysql_real_escape_string($_POST['pol_u']-10).'", + "' . mysql_real_escape_string($_POST['email_u']) . '", + "' . mysql_real_escape_string(date('d.m.Y', strtotime($_POST['bday_u']))) . '", + "' . mysql_real_escape_string($_POST['pol_u'] - 10) . '", "0", "0", "1", - "'.mysql_real_escape_string(time()+86400).'", + "' . mysql_real_escape_string(time() + 86400) . '", "8" - )'); - - $uid = mysql_insert_id(); - if( $uid > 0 ) { - //=================================================================== - - if(isset($_COOKIE['from'])) { - mysql_query('INSERT INTO `from` (`type`,`ip`,`uid`,`time`,`val`) VALUES ( "0", "'.getIp().'","'.$uid.'", "'.time().'", "'.mysql_real_escape_string($_COOKIE['from']).'" ) '); - } - //Сообщения при регистрации от паладинов. - $pal = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `align` > 1 AND `align` < 2 AND `online` > "'.(time()-120).'" ORDER BY `online` DESC LIMIT 1')); - if(!isset($pal['id'])) { - $pal = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `align` > 3 AND `align` < 4 AND `online` > "'.(time()-120).'" ORDER BY `online` DESC LIMIT 1')); - } - if(isset($pal['id'])) { - //отсылаем сообщение от $pal['login'] - $paltext = 'Приветствую '.$_POST['nick_u'].'. Отправляемся драться в хаоты, если нет заявок, создайте бой, дополнительно купите зверя и не забывайте выходить на центральную площать убивать Трупожора своего уровня!Приятной игры. '; - mysql_query("INSERT INTO `chat` (`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`new`) VALUES ('capitalcity','0','".$pal['login']."','".$_POST['nick_u']."','".$paltext."','".time()."','3','0','1')"); - }else{ - //Не знаю что делать, пусть будет просто приветствие :) - $text = 'Приветствую '.$_POST['nick_u'].'. Отправляемся драться в хаоты, если нет заявок, создайте бой, дополнительно купите зверя и не забывайте выходить на центральную площать убивать Трупожора своего уровня!Приятной игры.'; - mysql_query("INSERT INTO `chat` (`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`new`) VALUES ('capitalcity','0','','".$_POST['nick_u']."','".$text."','".time()."','3','0','1')"); - } - - //$text = 'Приветствую '.$_POST['nick_u'].'. Крайне рекомендую прочесть мини гайд по ссылке https://new-combats.com/forum?read=5762&rnd=1 , если останутся вопросы,задавайте в общий чат!'; - //mysql_query("INSERT INTO `chat` (`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`new`) VALUES ('capitalcity','0','','".$_POST['nick_u']."','".$text."','".time()."','6','0','1')"); - if($_POST['class_u']==1) //топор - { - //кастим эфекты - $us = add_effn($uid,1); // сила - $us = add_effn($uid,20); // сокрушение - - mysql_query("INSERT INTO `stats` (`id`,`stats`,`ability`,`skills`,exp) VALUES ('".$uid."','s1=62|s2=3|s3=3|s4=30|rinv=40|m9=5|m6=10|s7=0|a1=0|a2=9|a3=0|a4=0|a5=0|mg1=0|mg2=0|mg3=0|mg4=0|mg5=0|mg6=0|mg7=0|s5=0|s6=0|a6=0|s8=0|s9=0|s10=0|s11=0|s12=0|s13=0|s14=0|s15=0',-75,-9,100000)"); - $re =$u->addItem(528,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 1 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "528" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(540,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 2 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "540" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(552,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 3 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "552" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - $re =$u->addItem(552,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 14 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "552" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(291,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 4 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "291" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(543,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 5 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "543" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); + )' + ); - $re =$u->addItem(627,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 7 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "627" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(653,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 8 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "653" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(681,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 9 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "681" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(687,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 10 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "687" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - $re =$u->addItem(687,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 11 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "687" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - $re =$u->addItem(687,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 12 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "687" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(320,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 13 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "320" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(709,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 16 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "709" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(716,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 17 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "716" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - mysql_query('UPDATE `users` SET `money` = `money`-2101 WHERE `id` = "'.$uid.'" LIMIT 1');//коректировка денег 2244 - 2101 - } - elseif($_POST['class_u']==2) //уворот - { - //кастим эфекты - $us = add_effn($uid,8); // ловка - $us = add_effn($uid,20); // сокрушение - - mysql_query("INSERT INTO `stats` (`id`,`stats`,`ability`,`skills`,exp) VALUES ('".$uid."','s1=21|s2=31|s3=16|s4=30|rinv=40|m9=5|m6=10|s7=0|a1=9|a2=0|a3=0|a4=0|a5=0|mg1=0|mg2=0|mg3=0|mg4=0|mg5=0|mg6=0|mg7=0|s5=0|s6=0',-75,-9,100000)"); - $re =$u->addItem(525,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 1 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "525" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(539,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 2 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "539" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(523,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 3 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "523" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(523,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 14 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "523" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(290,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 4 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "290" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(541,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 5 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "541" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(633,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 7 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "633" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(647,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 8 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "647" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(680,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 9 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "680" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(685,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 10 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "685" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - $re =$u->addItem(685,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 11 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "685" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - $re =$u->addItem(685,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 12 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "685" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(1151,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 13 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "1151" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(707,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 16 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "707" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(712,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 17 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "712" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - mysql_query('UPDATE `users` SET `money` = `money`-1972 WHERE `id` = "'.$uid.'" LIMIT 1');//коректировка денег 2244 - 1972 - - } - elseif($_POST['class_u']==3)//танк - { - //кастим эфекты - $us = add_effn($uid,1); // сила - $us = add_effn($uid,20); // сокрушение - - mysql_query("INSERT INTO `stats` (`id`,`stats`,`ability`,`skills`,exp) VALUES ('".$uid."','s1=42|s2=3|s3=3|s4=50|rinv=40|m9=5|m6=10|s7=0|a1=0|a2=0|a3=9|a4=0|a5=0|mg1=0|mg2=0|mg3=0|mg4=0|mg5=0|mg6=0|mg7=0|s5=0|s6=0|a6=0|s8=0|s9=0|s10=0|s11=0|s12=0|s13=0|s14=0|s15=0',-75,-9,100000)"); - $re =$u->addItem(533,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 1 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "533" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(536,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 2 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "536" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(558,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 3 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "558" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - $re =$u->addItem(722,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 14 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "722" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(291,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 4 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "291" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(545,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 5 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "545" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); + $uid = mysql_insert_id(); + if ($uid > 0) { + //=================================================================== - $re =$u->addItem(628,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 7 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "628" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(654,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 8 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "654" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(684,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 9 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "684" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(689,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 10 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "689" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - $re =$u->addItem(689,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 11 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "689" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - $re =$u->addItem(689,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 12 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "689" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(700,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 13 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "700" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(710,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 16 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "710" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(718,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 17 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "718" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - mysql_query('UPDATE `users` SET `money` = `money`-2101 WHERE `id` = "'.$uid.'" LIMIT 1');//коректировка денег 2244 - 2101 - } - elseif($_POST['class_u']==4)//крит - { - //кастим эфекты - $us = add_effn($uid,7); // инта - $us = add_effn($uid,20); // сокрушение - - mysql_query("INSERT INTO `stats` (`id`,`stats`,`ability`,`skills`,exp) VALUES ('".$uid."','s1=24|s2=20|s3=24|s4=30|rinv=40|m9=5|m6=10|s7=0|a1=0|a2=0|a3=0|a4=9|a5=0|mg1=0|mg2=0|mg3=0|mg4=0|mg5=0|mg6=0|mg7=0|s5=0|s6=0|a6=0|s8=0|s9=0|s10=0|s11=0|s12=0|s13=0|s14=0|s15=0',-75,-9,100000)"); - $re =$u->addItem(527,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 1 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "527" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(537,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 2 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "537" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(567,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 3 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "567" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - $re =$u->addItem(723,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 14 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "723" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(291,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 4 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "291" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(544,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 5 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "544" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); + if (isset($_COOKIE['from'])) { + mysql_query( + 'INSERT INTO `from` (`type`,`ip`,`uid`,`time`,`val`) VALUES ( "0", "' . UserIp::get( + ) . '","' . $uid . '", "' . time() . '", "' . mysql_real_escape_string($_COOKIE['from']) . '" ) ' + ); + } + //Сообщения при регистрации от паладинов. + $pal = mysql_fetch_array( + mysql_query( + 'SELECT * FROM `users` WHERE `align` > 1 AND `align` < 2 AND `online` > "' . (time( + ) - 120) . '" ORDER BY `online` DESC LIMIT 1' + ) + ); + if (!isset($pal['id'])) { + $pal = mysql_fetch_array( + mysql_query( + 'SELECT * FROM `users` WHERE `align` > 3 AND `align` < 4 AND `online` > "' . (time( + ) - 120) . '" ORDER BY `online` DESC LIMIT 1' + ) + ); + } + if (isset($pal['id'])) { + //отсылаем сообщение от $pal['login'] + $paltext = 'Приветствую ' . $_POST['nick_u'] . '. Отправляемся драться в хаоты, если нет заявок, создайте бой, дополнительно купите зверя и не забывайте выходить на центральную площать убивать Трупожора своего уровня!Приятной игры. '; + mysql_query( + "INSERT INTO `chat` (`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`new`) VALUES ('capitalcity','0','" . $pal['login'] . "','" . $_POST['nick_u'] . "','" . $paltext . "','" . time( + ) . "','3','0','1')" + ); + } else { + //Не знаю что делать, пусть будет просто приветствие :) + $text = 'Приветствую ' . $_POST['nick_u'] . '. Отправляемся драться в хаоты, если нет заявок, создайте бой, дополнительно купите зверя и не забывайте выходить на центральную площать убивать Трупожора своего уровня!Приятной игры.'; + mysql_query( + "INSERT INTO `chat` (`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`new`) VALUES ('capitalcity','0','','" . $_POST['nick_u'] . "','" . $text . "','" . time( + ) . "','3','0','1')" + ); + } - $re =$u->addItem(626,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 7 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "626" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(651,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 8 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "651" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(683,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 9 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "683" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(686,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 10 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "686" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - $re =$u->addItem(686,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 11 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "686" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - $re =$u->addItem(686,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 12 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "686" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(706,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 13 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "706" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(708,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 16 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "708" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(717,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 17 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "717" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - mysql_query('UPDATE `users` SET `money` = `money`-1988 WHERE `id` = "'.$uid.'" LIMIT 1');//коректировка денег 2244 - 1988 - } - elseif($_POST['class_u']==5)//воздух - { - //кастим эфекты - $us = add_effn($uid,9); // интелект - $us = add_effn($uid,32); // Холодный разум - $us = add_effn($uid,53); // Маг уселок воздух - $us = add_effn($uid,439); // Маг уселок - - - mysql_query("INSERT INTO `stats` (`id`,`stats`,`ability`,`skills`,exp) VALUES ('".$uid."','s1=14|s2=3|s3=3|s4=25|rinv=40|m9=5|m6=10|s7=0|a1=0|a2=0|a3=0|a4=0|a5=3|mg1=0|mg2=6|mg3=0|mg4=0|mg5=0|mg6=0|mg7=0|s5=13|s6=40|a6=0|s8=0|s9=0|s10=0|s11=0|s12=0|s13=0|s14=0|s15=0',-75,-9,100000)"); - $re =$u->addItem(531,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 1 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "531" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(534,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 2 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "534" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(1026,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 3 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "1026" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(291,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 4 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "291" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(548,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 5 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "548" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); + //$text = 'Приветствую '.$_POST['nick_u'].'. Крайне рекомендую прочесть мини гайд по ссылке https://new-combats.com/forum?read=5762&rnd=1 , если останутся вопросы,задавайте в общий чат!'; + //mysql_query("INSERT INTO `chat` (`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`new`) VALUES ('capitalcity','0','','".$_POST['nick_u']."','".$text."','".time()."','6','0','1')"); + if ($_POST['class_u'] == 1) //топор + { + //кастим эфекты + $us = add_effn($uid, 1); // сила + $us = add_effn($uid, 20); // сокрушение - $re =$u->addItem(629,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 7 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "629" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(698,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 13 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "698" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(711,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 16 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "711" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(714,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 17 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "714" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - ///------- юва - $re =$u->addItem(658,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 8 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "658" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(675,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 9 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "675" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(693,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 10 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "693" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - $re =$u->addItem(693,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 11 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "693" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - $re =$u->addItem(693,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 12 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "693" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - ///---- - mysql_query('UPDATE `users` SET `money` = `money`-1988 WHERE `id` = "'.$uid.'" LIMIT 1');//коректировка денег 2244 - 1988 - } - elseif($_POST['class_u']==6)//огонь - { - //кастим эфекты - $us = add_effn($uid,9); // интелект - $us = add_effn($uid,32); // Холодный разум - $us = add_effn($uid,51); // Маг уселок огонь - $us = add_effn($uid,439); // Маг уселок - - mysql_query("INSERT INTO `stats` (`id`,`stats`,`ability`,`skills`,exp) VALUES ('".$uid."','s1=14|s2=3|s3=3|s4=25|rinv=40|m9=5|m6=10|s7=0|a1=0|a2=0|a3=0|a4=0|a5=3|mg1=6|mg2=0|mg3=0|mg4=0|mg5=0|mg6=0|mg7=0|s5=13|s6=40|a6=0|s8=0|s9=0|s10=0|s11=0|s12=0|s13=0|s14=0|s15=0',-75,-9,100000)"); - $re =$u->addItem(531,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 1 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "531" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(534,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 2 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "534" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(1026,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 3 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "1026" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(291,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 4 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "291" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(549,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 5 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "549" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); + mysql_query( + "INSERT INTO `stats` (`id`,`stats`,`ability`,`skills`,exp) VALUES ('" . $uid . "','s1=62|s2=3|s3=3|s4=30|rinv=40|m9=5|m6=10|s7=0|a1=0|a2=9|a3=0|a4=0|a5=0|mg1=0|mg2=0|mg3=0|mg4=0|mg5=0|mg6=0|mg7=0|s5=0|s6=0|a6=0|s8=0|s9=0|s10=0|s11=0|s12=0|s13=0|s14=0|s15=0',-75,-9,100000)" + ); + $re = $u->addItem(528, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 1 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "528" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); - $re =$u->addItem(629,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 7 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "629" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(698,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 13 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "698" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(711,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 16 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "711" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(714,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 17 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "714" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - ///------- юва - $re =$u->addItem(655,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 8 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "655" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(679,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 9 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "679" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(696,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 10 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "696" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - $re =$u->addItem(696,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 11 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "696" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - $re =$u->addItem(696,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 12 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "696" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - ///---- - - mysql_query('UPDATE `users` SET `money` = `money`-1988 WHERE `id` = "'.$uid.'" LIMIT 1');//коректировка денег 2244 - 1988 - } - elseif($_POST['class_u']==7)//земля - { - - - //кастим эфекты - $us = add_effn($uid,9); // интелект - $us = add_effn($uid,32); // Холодный разум - $us = add_effn($uid,54); // Маг уселок земля - $us = add_effn($uid,439); // Маг уселок - - mysql_query("INSERT INTO `stats` (`id`,`stats`,`ability`,`skills`,exp) VALUES ('".$uid."','s1=14|s2=3|s3=3|s4=25|rinv=40|m9=5|m6=10|s7=0|a1=0|a2=0|a3=0|a4=0|a5=3|mg1=0|mg2=0|mg3=0|mg4=6|mg5=0|mg6=0|mg7=0|s5=13|s6=40|a6=0|s8=0|s9=0|s10=0|s11=0|s12=0|s13=0|s14=0|s15=0',-75,-9,100000)"); - $re =$u->addItem(531,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 1 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "531" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(534,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 2 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "534" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(1026,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 3 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "1026" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(291,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 4 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "291" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(548,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 5 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "548" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); + $re = $u->addItem(540, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 2 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "540" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); - $re =$u->addItem(629,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 7 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "629" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(698,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 13 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "698" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(711,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 16 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "711" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(714,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 17 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "714" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - ///------- юва - $re =$u->addItem(657,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 8 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "657" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(674,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 9 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "674" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(692,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 10 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "692" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - $re =$u->addItem(692,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 11 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "692" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - $re =$u->addItem(692,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 12 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "692" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - ///---- - - mysql_query('UPDATE `users` SET `money` = `money`-1988 WHERE `id` = "'.$uid.'" LIMIT 1');//коректировка денег 2244 - 1988 - } - elseif($_POST['class_u']==8)//вода - { - //кастим эфекты - $us = add_effn($uid,9); // интелект - $us = add_effn($uid,32); // Холодный разум - $us = add_effn($uid,52); // Маг уселок вода - $us = add_effn($uid,439); // Маг уселок - mysql_query("INSERT INTO `stats` (`id`,`stats`,`ability`,`skills`,exp) VALUES ('".$uid."','s1=14|s2=3|s3=3|s4=25|rinv=40|m9=5|m6=10|s7=0|a1=0|a2=0|a3=0|a4=0|a5=3|mg1=0|mg2=0|mg3=6|mg4=0|mg5=0|mg6=0|mg7=0|s5=13|s6=40|a6=0|s8=0|s9=0|s10=0|s11=0|s12=0|s13=0|s14=0|s15=0',-75,-9,100000)"); - $re =$u->addItem(531,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 1 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "531" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(534,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 2 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "534" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(1026,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 3 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "1026" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(291,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 4 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "291" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(548,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 5 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "548" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); + $re = $u->addItem(552, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 3 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "552" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + $re = $u->addItem(552, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 14 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "552" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); - $re =$u->addItem(629,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 7 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "629" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(318,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 13 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "318" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(711,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 16 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "711" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(714,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 17 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "714" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - ///------- юва - $re =$u->addItem(660,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 8 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "660" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(677,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 9 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "677" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - - $re =$u->addItem(695,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 10 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "695" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - $re =$u->addItem(695,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 11 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "695" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - $re =$u->addItem(695,$uid); - mysql_query('UPDATE `items_users` SET `inodet` = 12 WHERE `id` = "'.$re.'" LIMIT 1'); - $price = mysql_fetch_array(mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "695" AND `sid`=1 LIMIT 1')); - mysql_query('UPDATE `items_users` SET `1price` = "'.$price['price_1'].'" WHERE `id` = "'.$re.'" LIMIT 1'); - ///---- - - mysql_query('UPDATE `users` SET `money` = `money`-1988 WHERE `id` = "'.$uid.'" LIMIT 1');//коректировка денег 2244 - 1988 - } - if($_POST['ref'] > 0) { - $re =$u->addItem(6417,$uid); - } - - //катим эфекты - // - // - $us = add_effn($uid,37); - $us = add_effn($uid,38); - $us = add_effn($uid,283); - $us = add_effn($uid,25); - $us = add_effn($uid,296); - $us = add_effn($uid,472); - - //Магическое усиление - mysql_query("INSERT INTO `items_users` (`item_id`, `1price`, `2price`, `3price`, `4price`, `uid`, `use_text`, `data`, `inOdet`, `inShop`, `inGroup`, `delete`, `iznosNOW`, `iznosMAX`, `gift`, `gtxt1`, `gtxt2`, `kolvo`, `geniration`, `magic_inc`, `maidin`, `lastUPD`, `timeOver`, `overType`, `secret_id`, `time_create`, `time_sleep`, `dn_delete`, `inTransfer`, `post_delivery`, `lbtl_`, `bexp`, `so`, `blvl`, `pok_itm`, `btl_zd`) VALUES - (4942, 40, 0.00, 0.00, 0.00, ".$uid.", 0, 'oneType=72|onlyOne=1|musor=1|noremont=1|sudba=1|nosale=1', 0, 0, 0, 0, 0.00, 4, 'Администрация', '', '', 1, 2, '439', 'capitalcity', ".time().", 0, 0, '', ".time().", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);"); - //Защита от оружия - mysql_query("INSERT INTO `items_users` (`item_id`, `1price`, `2price`, `3price`, `4price`, `uid`, `use_text`, `data`, `inOdet`, `inShop`, `inGroup`, `delete`, `iznosNOW`, `iznosMAX`, `gift`, `gtxt1`, `gtxt2`, `kolvo`, `geniration`, `magic_inc`, `maidin`, `lastUPD`, `timeOver`, `overType`, `secret_id`, `time_create`, `time_sleep`, `dn_delete`, `inTransfer`, `post_delivery`, `lbtl_`, `bexp`, `so`, `blvl`, `pok_itm`, `btl_zd`) VALUES - (1001, 40, 0.00, 0.00, 0.00, ".$uid.", 0, 'onlyOne=1|oneType=7|noremont=1|musor=1|sudba=1|nosale=1', 0, 0, 0, 0, 0.00, 4, 'Администрация', '', '', 1, 2, '25', 'capitalcity', ".time().", 0, 0, '', ".time().", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);"); - //Защита от магии - mysql_query("INSERT INTO `items_users` (`item_id`, `1price`, `2price`, `3price`, `4price`, `uid`, `use_text`, `data`, `inOdet`, `inShop`, `inGroup`, `delete`, `iznosNOW`, `iznosMAX`, `gift`, `gtxt1`, `gtxt2`, `kolvo`, `geniration`, `magic_inc`, `maidin`, `lastUPD`, `timeOver`, `overType`, `secret_id`, `time_create`, `time_sleep`, `dn_delete`, `inTransfer`, `post_delivery`, `lbtl_`, `bexp`, `so`, `blvl`, `pok_itm`, `btl_zd`) VALUES - (4941, 40, 0.00, 0.00, 0.00, ".$uid.", 0, 'oneType=71|onlyOne=1|musor=1|noremont=1|sudba=1|nosale=1', 0, 0, 0, 0, 0.00, 4, 'Администрация', '', '', 1, 2, '438', 'capitalcity', ".time().", 0, 0, '', ".time().", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);"); - //Жажда жизни +6 - mysql_query("INSERT INTO `items_users` (`item_id`, `1price`, `2price`, `3price`, `4price`, `uid`, `use_text`, `data`, `inOdet`, `inShop`, `inGroup`, `delete`, `iznosNOW`, `iznosMAX`, `gift`, `gtxt1`, `gtxt2`, `kolvo`, `geniration`, `magic_inc`, `maidin`, `lastUPD`, `timeOver`, `overType`, `secret_id`, `time_create`, `time_sleep`, `dn_delete`, `inTransfer`, `post_delivery`, `lbtl_`, `bexp`, `so`, `blvl`, `pok_itm`, `btl_zd`) VALUES - (3101, 50, 0.00, 0.00, 0.00, ".$uid.", 0, 'onlyOne=1|noremont=1|oneType=33|musor=1|sudba=1|nosale=1', 0, 0, 0, 0, 0.00, 5, 'Администрация', '', '', 1, 2, '296', 'capitalcity', ".time().", 0, 33, '', ".time().", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);"); - //Аптечка (Исцеляет легкие травмы) - mysql_query("INSERT INTO `items_users` (`item_id`, `1price`, `2price`, `3price`, `4price`, `uid`, `use_text`, `data`, `inOdet`, `inShop`, `inGroup`, `delete`, `iznosNOW`, `iznosMAX`, `gift`, `gtxt1`, `gtxt2`, `kolvo`, `geniration`, `magic_inc`, `maidin`, `lastUPD`, `timeOver`, `overType`, `secret_id`, `time_create`, `time_sleep`, `dn_delete`, `inTransfer`, `post_delivery`, `lbtl_`, `bexp`, `so`, `blvl`, `pok_itm`, `btl_zd`) VALUES - (4412, 7, 0.00, 0.00, 0.00, ".$uid.", 0, 'tr_lvl=1|useOnLogin=1|musor=1|noremont=1', 0, 0, 0, 0, 0.00, 2, 'Администрация', '', '', 1, 2, 'lech_free_1', 'capitalcity', ".time().", 0, 0, '', ".time().", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);"); - //Аптечка (Исцеляет средние травмы) - mysql_query("INSERT INTO `items_users` (`item_id`, `1price`, `2price`, `3price`, `4price`, `uid`, `use_text`, `data`, `inOdet`, `inShop`, `inGroup`, `delete`, `iznosNOW`, `iznosMAX`, `gift`, `gtxt1`, `gtxt2`, `kolvo`, `geniration`, `magic_inc`, `maidin`, `lastUPD`, `timeOver`, `overType`, `secret_id`, `time_create`, `time_sleep`, `dn_delete`, `inTransfer`, `post_delivery`, `lbtl_`, `bexp`, `so`, `blvl`, `pok_itm`, `btl_zd`) VALUES - (4413, 14, 0.00, 0.00, 0.00, ".$uid.", 0, 'tr_lvl=1|useOnLogin=1|musor=1|noremont=1', 0, 0, 0, 0, 0.00, 2, 'Администрация', '', '', 1, 2, 'lech_free_2', 'capitalcity', ".time().", 0, 0, '', ".time().", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);"); - //Аптечка (Исцеляет тяжелые травмы) - mysql_query("INSERT INTO `items_users` (`item_id`, `1price`, `2price`, `3price`, `4price`, `uid`, `use_text`, `data`, `inOdet`, `inShop`, `inGroup`, `delete`, `iznosNOW`, `iznosMAX`, `gift`, `gtxt1`, `gtxt2`, `kolvo`, `geniration`, `magic_inc`, `maidin`, `lastUPD`, `timeOver`, `overType`, `secret_id`, `time_create`, `time_sleep`, `dn_delete`, `inTransfer`, `post_delivery`, `lbtl_`, `bexp`, `so`, `blvl`, `pok_itm`, `btl_zd`) VALUES - (4414, 21, 0.00, 0.00, 0.00, ".$uid.", 0, 'tr_lvl=1|useOnLogin=1|musor=1|noremont=1', 0, 0, 0, 0, 0.00, 2, 'Администрация', '', '', 1, 2, 'lech_free_3', 'capitalcity', ".time().", 0, 0, '', ".time().", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);"); - //Холодный разум - mysql_query("INSERT INTO `items_users` (`item_id`, `1price`, `2price`, `3price`, `4price`, `uid`, `use_text`, `data`, `inOdet`, `inShop`, `inGroup`, `delete`, `iznosNOW`, `iznosMAX`, `gift`, `gtxt1`, `gtxt2`, `kolvo`, `geniration`, `magic_inc`, `maidin`, `lastUPD`, `timeOver`, `overType`, `secret_id`, `time_create`, `time_sleep`, `dn_delete`, `inTransfer`, `post_delivery`, `lbtl_`, `bexp`, `so`, `blvl`, `pok_itm`, `btl_zd`) VALUES - (1460, 15, 0.00, 0.00, 0.00, ".$uid.", 0, 'musor=1|noremont=1|sudba=1|nosale=1', 0, 0, 0, 0, 0.00, 5, 'Администрация', '', '', 1, 5, '32', 'capitalcity', ".time().", 0, 0, '', ".time().", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);"); - //Сокрушение - mysql_query("INSERT INTO `items_users` (`item_id`, `1price`, `2price`, `3price`, `4price`, `uid`, `use_text`, `data`, `inOdet`, `inShop`, `inGroup`, `delete`, `iznosNOW`, `iznosMAX`, `gift`, `gtxt1`, `gtxt2`, `kolvo`, `geniration`, `magic_inc`, `maidin`, `lastUPD`, `timeOver`, `overType`, `secret_id`, `time_create`, `time_sleep`, `dn_delete`, `inTransfer`, `post_delivery`, `lbtl_`, `bexp`, `so`, `blvl`, `pok_itm`, `btl_zd`) VALUES - (994, 40, 0.00, 0.00, 0.00, ".$uid.", 0, 'onlyOne=1|oneType=44|noremont=1|musor=1|sudba=1|nosale=1', 0, 0, 0, 0, 0.00, 4, 'Администрация', '', '', 1, 4, '20', 'capitalcity', ".time().", 0, 0, '', ".time().", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);"); - //Эликсир жизни (восстанавливает +500 хп) - mysql_query("INSERT INTO `items_users` (`item_id`, `1price`, `2price`, `3price`, `4price`, `uid`, `use_text`, `data`, `inOdet`, `inShop`, `inGroup`, `delete`, `iznosNOW`, `iznosMAX`, `gift`, `gtxt1`, `gtxt2`, `kolvo`, `geniration`, `magic_inc`, `maidin`, `lastUPD`, `timeOver`, `overType`, `secret_id`, `time_create`, `time_sleep`, `dn_delete`, `inTransfer`, `post_delivery`, `lbtl_`, `bexp`, `so`, `blvl`, `pok_itm`, `btl_zd`) VALUES - (4736, 5, 0.00, 0.00, 0.00, ".$uid.", 0, 'moment=1|moment_hp=500|nohaos=1|musor=2|noremont=1|sudba=1|nosale=1', 0, 0, 0, 0, 0.00, 10, 'Администрация', '', '', 1, 4, 'elicsir_hp -w500', 'capitalcity', ".time().", 0, 0, '', ".time().", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);"); - //Зелье жизни (восстанавливает +200 хп) - mysql_query("INSERT INTO `items_users` (`item_id`, `1price`, `2price`, `3price`, `4price`, `uid`, `use_text`, `data`, `inOdet`, `inShop`, `inGroup`, `delete`, `iznosNOW`, `iznosMAX`, `gift`, `gtxt1`, `gtxt2`, `kolvo`, `geniration`, `magic_inc`, `maidin`, `lastUPD`, `timeOver`, `overType`, `secret_id`, `time_create`, `time_sleep`, `dn_delete`, `inTransfer`, `post_delivery`, `lbtl_`, `bexp`, `so`, `blvl`, `pok_itm`, `btl_zd`) VALUES - (724, 2, 0.00, 0.00, 0.00, ".$uid.", 0, 'moment=1|moment_hp=200|nohaos=1|musor=2|noremont=1|sudba=1|nosale=1', 0, 0, 0, 0, 0.00, 10, 'Администрация', '', '', 1, 4, 'elicsir_hp -w200', 'capitalcity', ".time().", 0, 0, '', ".time().", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);"); - //Зелье могущества (+10 силы) - mysql_query("INSERT INTO `items_users` (`item_id`, `1price`, `2price`, `3price`, `4price`, `uid`, `use_text`, `data`, `inOdet`, `inShop`, `inGroup`, `delete`, `iznosNOW`, `iznosMAX`, `gift`, `gtxt1`, `gtxt2`, `kolvo`, `geniration`, `magic_inc`, `maidin`, `lastUPD`, `timeOver`, `overType`, `secret_id`, `time_create`, `time_sleep`, `dn_delete`, `inTransfer`, `post_delivery`, `lbtl_`, `bexp`, `so`, `blvl`, `pok_itm`, `btl_zd`) VALUES - (870, 5, 0.00, 0.00, 0.00, ".$uid.", 0, 'nohaos=1|onlyOne=1|oneType=1|musor=2|noremont=1|nohaos=1|onlyOne=1|oneType=1|noremont=1|add_s1=15|sudba=1|nosale=1', 0, 0, 0, 0, 0.00, 5, 'Администрация', '', '', 1, 4, '1', 'capitalcity', ".time().", 0, 1, '', ".time().", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);"); - //Зелье стремительности (+10 ловкости) - mysql_query("INSERT INTO `items_users` (`item_id`, `1price`, `2price`, `3price`, `4price`, `uid`, `use_text`, `data`, `inOdet`, `inShop`, `inGroup`, `delete`, `iznosNOW`, `iznosMAX`, `gift`, `gtxt1`, `gtxt2`, `kolvo`, `geniration`, `magic_inc`, `maidin`, `lastUPD`, `timeOver`, `overType`, `secret_id`, `time_create`, `time_sleep`, `dn_delete`, `inTransfer`, `post_delivery`, `lbtl_`, `bexp`, `so`, `blvl`, `pok_itm`, `btl_zd`) VALUES - (872, 5, 0.00, 0.00, 0.00, ".$uid.", 0, 'nohaos=1|onlyOne=1|oneType=1|musor=2|noremont=1|nohaos=1|onlyOne=1|oneType=1|noremont=1|add_s2=15|sudba=1|nosale=1', 0, 0, 0, 0, 0.00, 5, 'Администрация', '', '', 1, 4, '8', 'capitalcity', ".time().", 0, 1, '', ".time().", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);"); - //Зелье прозрения(+10 интуиции) - mysql_query("INSERT INTO `items_users` (`item_id`, `1price`, `2price`, `3price`, `4price`, `uid`, `use_text`, `data`, `inOdet`, `inShop`, `inGroup`, `delete`, `iznosNOW`, `iznosMAX`, `gift`, `gtxt1`, `gtxt2`, `kolvo`, `geniration`, `magic_inc`, `maidin`, `lastUPD`, `timeOver`, `overType`, `secret_id`, `time_create`, `time_sleep`, `dn_delete`, `inTransfer`, `post_delivery`, `lbtl_`, `bexp`, `so`, `blvl`, `pok_itm`, `btl_zd`) VALUES - (871, 5, 0.00, 0.00, 0.00, ".$uid.", 0, 'nohaos=1|onlyOne=1|oneType=1|musor=2|noremont=1|nohaos=1|onlyOne=1|oneType=1|noremont=1|add_s3=15|sudba=1|nosale=1', 0, 0, 0, 0, 0.00, 5, 'Администрация', '', '', 1, 4, '7', 'capitalcity', ".time().", 0, 1, '', ".time().", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);"); - //Зелье разума(+10 интеллекта) - mysql_query("INSERT INTO `items_users` (`item_id`, `1price`, `2price`, `3price`, `4price`, `uid`, `use_text`, `data`, `inOdet`, `inShop`, `inGroup`, `delete`, `iznosNOW`, `iznosMAX`, `gift`, `gtxt1`, `gtxt2`, `kolvo`, `geniration`, `magic_inc`, `maidin`, `lastUPD`, `timeOver`, `overType`, `secret_id`, `time_create`, `time_sleep`, `dn_delete`, `inTransfer`, `post_delivery`, `lbtl_`, `bexp`, `so`, `blvl`, `pok_itm`, `btl_zd`) VALUES - (873, 5, 0.00, 0.00, 0.00, ".$uid.", 0, 'nohaos=1|onlyOne=1|oneType=1|musor=2|noremont=1|nohaos=1|onlyOne=1|oneType=1|noremont=1|add_s5=15|sudba=1|nosale=1', 0, 0, 0, 0, 0.00, 5, 'Администрация', '', '', 1, 4, '9', 'capitalcity', ".time().", 0, 1, '', ".time().", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);"); - //Нектар Отрицания(+160 защиты от магии) - mysql_query("INSERT INTO `items_users` (`item_id`, `1price`, `2price`, `3price`, `4price`, `uid`, `use_text`, `data`, `inOdet`, `inShop`, `inGroup`, `delete`, `iznosNOW`, `iznosMAX`, `gift`, `gtxt1`, `gtxt2`, `kolvo`, `geniration`, `magic_inc`, `maidin`, `lastUPD`, `timeOver`, `overType`, `secret_id`, `time_create`, `time_sleep`, `dn_delete`, `inTransfer`, `post_delivery`, `lbtl_`, `bexp`, `so`, `blvl`, `pok_itm`, `btl_zd`) VALUES - (2140, 30, 0.00, 0.00, 0.00, ".$uid.", 0, 'nohaos=1|onlyOne=1|oneType=8|musor=2|noremont=1|add_zm=160|sudba=1|nosale=1', 0, 0, 0, 0, 0.00, 5, 'Администрация', '', '', 1, 4, '38', 'capitalcity', ".time().", 0, 0, '', ".time().", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);"); - //Нектар уязвимости(+160 защиты от урона) - mysql_query("INSERT INTO `items_users` (`item_id`, `1price`, `2price`, `3price`, `4price`, `uid`, `use_text`, `data`, `inOdet`, `inShop`, `inGroup`, `delete`, `iznosNOW`, `iznosMAX`, `gift`, `gtxt1`, `gtxt2`, `kolvo`, `geniration`, `magic_inc`, `maidin`, `lastUPD`, `timeOver`, `overType`, `secret_id`, `time_create`, `time_sleep`, `dn_delete`, `inTransfer`, `post_delivery`, `lbtl_`, `bexp`, `so`, `blvl`, `pok_itm`, `btl_zd`) VALUES - (2139, 30, 0.00, 0.00, 0.00, ".$uid.", 0, 'nohaos=1|onlyOne=1|oneType=8|musor=2|noremont=1|add_za=160|sudba=1|nosale=1', 0, 0, 0, 0, 0.00, 5, 'Администрация', '', '', 1, 4, '37', 'capitalcity', ".time().", 0, 0, '', ".time().", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);"); - //Бутер (+180 хп) - mysql_query("INSERT INTO `items_users` (`item_id`, `1price`, `2price`, `3price`, `4price`, `uid`, `use_text`, `data`, `inOdet`, `inShop`, `inGroup`, `delete`, `iznosNOW`, `iznosMAX`, `gift`, `gtxt1`, `gtxt2`, `kolvo`, `geniration`, `magic_inc`, `maidin`, `lastUPD`, `timeOver`, `overType`, `secret_id`, `time_create`, `time_sleep`, `dn_delete`, `inTransfer`, `post_delivery`, `lbtl_`, `bexp`, `so`, `blvl`, `pok_itm`, `btl_zd`) VALUES - (3075, 10, 0.00, 0.00, 0.00, ".$uid.", 0, 'nohaos=1|onlyOne=1|oneType=4|musor=1|noremont=1|sudba=1|nosale=1', 0, 0, 0, 0, 0.00, 10, 'Администрация', '', '', 1, 4, '283', 'capitalcity', ".time().", 0, 0, '', ".time().", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);"); - - mysql_query('UPDATE `users` SET `online` = "'.time().'" WHERE `id` = "'.$uid.'" LIMIT 1'); - - //Создаем статы персонажа - mysql_query("INSERT INTO `online` (`uid`,`timeStart`) VALUES ('".$uid."','".time()."')"); - - //добовляем благодать ангела 1н день - $ttime=time(); - mysql_query("INSERT INTO `eff_users`(`id_eff`, `uid`, `name`, `data`, `overType`, `timeUse`, `timeAce`, `user_use`, `delete`, `v1`, `v2`, `img2`, `x`, `hod`, `bj`, `sleeptime`, `no_Ace`, `file_finish`, `tr_life_user`, `deactiveTime`, `deactiveLast`, `mark`, `bs`) VALUES - (412,'".$uid."','Благодать Ангела [1]','add_gold=1|add_speedhp=35|add_speedmp=35|add_exp=35|add_repair_discount=25|add_speed_dungeon=10|add_hpVinos=5|add_m10=5|add_m11=5|add_za=25|add_zma=25',52,".$ttime.",0,'',0,0,0,'',1,-1,0,0,1,'',0,0,0,0,0)"); - - - - //мульты - $ipm1 = mysql_fetch_array(mysql_query('SELECT * FROM `logs_auth` WHERE `uid` = "'.mysql_real_escape_string($uid).'" AND `ip`!="'.mysql_real_escape_string(getIp()).'" ORDER BY `id` ASC LIMIT 1')); - $ppl = mysql_query('SELECT * FROM `logs_auth` WHERE `ip`!="" AND (`ip` = "'.mysql_real_escape_string(getIp()).'" OR `ip`="'.mysql_real_escape_string($ipm1['ip']).'" OR `ip`="'.mysql_real_escape_string($_COOKIE['ip']).'")'); - while($spl = mysql_fetch_array($ppl)) - { - $ml = mysql_fetch_array(mysql_query('SELECT `id` FROM `mults` WHERE (`uid` = "'.$spl['uid'].'" AND `uid2` = "'.$uid.'") OR (`uid2` = "'.$spl['uid'].'" AND `uid` = "'.$uid.'") LIMIT 1')); - if(!isset($ml['id']) && $spl['ip']!='' && $spl['ip']!='127.0.0.1') - { - mysql_query('INSERT INTO `mults` (`uid`,`uid2`,`ip`) VALUES ("'.$uid.'","'.$spl['uid'].'","'.$spl['ip'].'")'); - } - } - mysql_query("INSERT INTO `logs_auth` (`uid`,`ip`,`browser`,`type`,`time`,`depass`) VALUES ('".$uid."','".mysql_real_escape_string(getIp())."','".mysql_real_escape_string($_SERVER['HTTP_USER_AGENT'])."','1','".time()."','')"); - - //Обновяем таблицы - mysql_query("UPDATE `users` SET `online`='".time()."',`ip` = '".mysql_real_escape_string(getIp())."' WHERE `uid` = '".$uid."' LIMIT 1"); - - if(!setcookie('login',$_POST['nick_u'], (time()+60*60*24*7) , '' , '.new-combats.com' ) || !setcookie('pass',md5($_POST['pass1_u']), (time()+60*60*24*7) , '' , '.new-combats.com' )) { - die('Ошибка сохранения cookie.'); - }else{ - - die('Спасибо за регистрацию в игровом мире Бойцовского Клуба, желаем вам побед и долгой игры. -В случае вопросов по игре, Вам будет доступен общий чат!
'); - - } - - setcookie('login',$_POST['nick_u'],time()+60*60*24*7,'',$c['host']); - setcookie('pass',md5($_POST['pass1_u']),time()+60*60*24*7,'',$c['host']); - setcookie('login',$_POST['nick_u'],time()+60*60*24*7); - setcookie('pass',md5($_POST['pass1_u']),time()+60*60*24*7); - - header('location: https://new-combats.com/bk'); - - - - //=================================================================== - } - //================================ - } - else - { - ?> -
-

-
-
+ $re = $u->addItem(291, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 4 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "291" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); -addItem(543, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 5 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "543" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(627, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 7 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "627" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(653, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 8 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "653" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(681, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 9 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "681" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(687, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 10 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "687" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + $re = $u->addItem(687, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 11 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "687" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + $re = $u->addItem(687, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 12 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "687" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(320, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 13 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "320" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(709, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 16 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "709" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(716, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 17 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "716" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + mysql_query( + 'UPDATE `users` SET `money` = `money`-2101 WHERE `id` = "' . $uid . '" LIMIT 1' + );//коректировка денег 2244 - 2101 + } elseif ($_POST['class_u'] == 2) //уворот + { + //кастим эфекты + $us = add_effn($uid, 8); // ловка + $us = add_effn($uid, 20); // сокрушение + + mysql_query( + "INSERT INTO `stats` (`id`,`stats`,`ability`,`skills`,exp) VALUES ('" . $uid . "','s1=21|s2=31|s3=16|s4=30|rinv=40|m9=5|m6=10|s7=0|a1=9|a2=0|a3=0|a4=0|a5=0|mg1=0|mg2=0|mg3=0|mg4=0|mg5=0|mg6=0|mg7=0|s5=0|s6=0',-75,-9,100000)" + ); + $re = $u->addItem(525, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 1 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "525" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(539, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 2 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "539" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(523, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 3 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "523" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(523, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 14 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "523" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(290, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 4 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "290" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(541, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 5 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "541" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(633, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 7 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "633" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(647, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 8 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "647" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(680, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 9 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "680" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(685, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 10 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "685" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + $re = $u->addItem(685, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 11 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "685" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + $re = $u->addItem(685, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 12 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "685" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(1151, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 13 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "1151" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(707, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 16 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "707" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(712, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 17 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "712" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + mysql_query( + 'UPDATE `users` SET `money` = `money`-1972 WHERE `id` = "' . $uid . '" LIMIT 1' + );//коректировка денег 2244 - 1972 + + } elseif ($_POST['class_u'] == 3)//танк + { + //кастим эфекты + $us = add_effn($uid, 1); // сила + $us = add_effn($uid, 20); // сокрушение + + mysql_query( + "INSERT INTO `stats` (`id`,`stats`,`ability`,`skills`,exp) VALUES ('" . $uid . "','s1=42|s2=3|s3=3|s4=50|rinv=40|m9=5|m6=10|s7=0|a1=0|a2=0|a3=9|a4=0|a5=0|mg1=0|mg2=0|mg3=0|mg4=0|mg5=0|mg6=0|mg7=0|s5=0|s6=0|a6=0|s8=0|s9=0|s10=0|s11=0|s12=0|s13=0|s14=0|s15=0',-75,-9,100000)" + ); + $re = $u->addItem(533, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 1 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "533" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(536, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 2 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "536" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(558, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 3 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "558" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + $re = $u->addItem(722, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 14 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "722" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(291, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 4 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "291" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(545, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 5 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "545" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(628, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 7 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "628" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(654, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 8 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "654" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(684, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 9 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "684" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(689, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 10 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "689" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + $re = $u->addItem(689, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 11 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "689" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + $re = $u->addItem(689, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 12 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "689" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(700, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 13 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "700" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(710, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 16 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "710" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(718, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 17 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "718" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + mysql_query( + 'UPDATE `users` SET `money` = `money`-2101 WHERE `id` = "' . $uid . '" LIMIT 1' + );//коректировка денег 2244 - 2101 + } elseif ($_POST['class_u'] == 4)//крит + { + //кастим эфекты + $us = add_effn($uid, 7); // инта + $us = add_effn($uid, 20); // сокрушение + + mysql_query( + "INSERT INTO `stats` (`id`,`stats`,`ability`,`skills`,exp) VALUES ('" . $uid . "','s1=24|s2=20|s3=24|s4=30|rinv=40|m9=5|m6=10|s7=0|a1=0|a2=0|a3=0|a4=9|a5=0|mg1=0|mg2=0|mg3=0|mg4=0|mg5=0|mg6=0|mg7=0|s5=0|s6=0|a6=0|s8=0|s9=0|s10=0|s11=0|s12=0|s13=0|s14=0|s15=0',-75,-9,100000)" + ); + $re = $u->addItem(527, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 1 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "527" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(537, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 2 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "537" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(567, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 3 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "567" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + $re = $u->addItem(723, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 14 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "723" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(291, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 4 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "291" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(544, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 5 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "544" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(626, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 7 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "626" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(651, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 8 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "651" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(683, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 9 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "683" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(686, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 10 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "686" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + $re = $u->addItem(686, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 11 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "686" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + $re = $u->addItem(686, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 12 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "686" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(706, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 13 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "706" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(708, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 16 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "708" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(717, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 17 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "717" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + mysql_query( + 'UPDATE `users` SET `money` = `money`-1988 WHERE `id` = "' . $uid . '" LIMIT 1' + );//коректировка денег 2244 - 1988 + } elseif ($_POST['class_u'] == 5)//воздух + { + //кастим эфекты + $us = add_effn($uid, 9); // интелект + $us = add_effn($uid, 32); // Холодный разум + $us = add_effn($uid, 53); // Маг уселок воздух + $us = add_effn($uid, 439); // Маг уселок + + + mysql_query( + "INSERT INTO `stats` (`id`,`stats`,`ability`,`skills`,exp) VALUES ('" . $uid . "','s1=14|s2=3|s3=3|s4=25|rinv=40|m9=5|m6=10|s7=0|a1=0|a2=0|a3=0|a4=0|a5=3|mg1=0|mg2=6|mg3=0|mg4=0|mg5=0|mg6=0|mg7=0|s5=13|s6=40|a6=0|s8=0|s9=0|s10=0|s11=0|s12=0|s13=0|s14=0|s15=0',-75,-9,100000)" + ); + $re = $u->addItem(531, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 1 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "531" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(534, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 2 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "534" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(1026, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 3 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "1026" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(291, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 4 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "291" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(548, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 5 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "548" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(629, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 7 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "629" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(698, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 13 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "698" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(711, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 16 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "711" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(714, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 17 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "714" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + ///------- юва + $re = $u->addItem(658, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 8 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "658" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(675, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 9 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "675" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(693, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 10 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "693" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + $re = $u->addItem(693, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 11 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "693" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + $re = $u->addItem(693, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 12 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "693" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + ///---- + mysql_query( + 'UPDATE `users` SET `money` = `money`-1988 WHERE `id` = "' . $uid . '" LIMIT 1' + );//коректировка денег 2244 - 1988 + } elseif ($_POST['class_u'] == 6)//огонь + { + //кастим эфекты + $us = add_effn($uid, 9); // интелект + $us = add_effn($uid, 32); // Холодный разум + $us = add_effn($uid, 51); // Маг уселок огонь + $us = add_effn($uid, 439); // Маг уселок + + mysql_query( + "INSERT INTO `stats` (`id`,`stats`,`ability`,`skills`,exp) VALUES ('" . $uid . "','s1=14|s2=3|s3=3|s4=25|rinv=40|m9=5|m6=10|s7=0|a1=0|a2=0|a3=0|a4=0|a5=3|mg1=6|mg2=0|mg3=0|mg4=0|mg5=0|mg6=0|mg7=0|s5=13|s6=40|a6=0|s8=0|s9=0|s10=0|s11=0|s12=0|s13=0|s14=0|s15=0',-75,-9,100000)" + ); + $re = $u->addItem(531, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 1 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "531" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(534, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 2 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "534" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(1026, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 3 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "1026" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(291, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 4 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "291" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(549, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 5 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "549" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(629, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 7 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "629" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(698, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 13 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "698" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(711, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 16 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "711" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(714, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 17 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "714" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + ///------- юва + $re = $u->addItem(655, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 8 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "655" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(679, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 9 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "679" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(696, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 10 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "696" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + $re = $u->addItem(696, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 11 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "696" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + $re = $u->addItem(696, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 12 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "696" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + ///---- + + mysql_query( + 'UPDATE `users` SET `money` = `money`-1988 WHERE `id` = "' . $uid . '" LIMIT 1' + );//коректировка денег 2244 - 1988 + } elseif ($_POST['class_u'] == 7)//земля + { + + + //кастим эфекты + $us = add_effn($uid, 9); // интелект + $us = add_effn($uid, 32); // Холодный разум + $us = add_effn($uid, 54); // Маг уселок земля + $us = add_effn($uid, 439); // Маг уселок + + mysql_query( + "INSERT INTO `stats` (`id`,`stats`,`ability`,`skills`,exp) VALUES ('" . $uid . "','s1=14|s2=3|s3=3|s4=25|rinv=40|m9=5|m6=10|s7=0|a1=0|a2=0|a3=0|a4=0|a5=3|mg1=0|mg2=0|mg3=0|mg4=6|mg5=0|mg6=0|mg7=0|s5=13|s6=40|a6=0|s8=0|s9=0|s10=0|s11=0|s12=0|s13=0|s14=0|s15=0',-75,-9,100000)" + ); + $re = $u->addItem(531, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 1 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "531" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(534, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 2 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "534" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(1026, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 3 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "1026" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(291, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 4 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "291" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(548, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 5 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "548" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(629, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 7 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "629" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(698, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 13 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "698" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(711, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 16 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "711" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(714, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 17 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "714" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + ///------- юва + $re = $u->addItem(657, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 8 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "657" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(674, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 9 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "674" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(692, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 10 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "692" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + $re = $u->addItem(692, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 11 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "692" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + $re = $u->addItem(692, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 12 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "692" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + ///---- + + mysql_query( + 'UPDATE `users` SET `money` = `money`-1988 WHERE `id` = "' . $uid . '" LIMIT 1' + );//коректировка денег 2244 - 1988 + } elseif ($_POST['class_u'] == 8)//вода + { + //кастим эфекты + $us = add_effn($uid, 9); // интелект + $us = add_effn($uid, 32); // Холодный разум + $us = add_effn($uid, 52); // Маг уселок вода + $us = add_effn($uid, 439); // Маг уселок + mysql_query( + "INSERT INTO `stats` (`id`,`stats`,`ability`,`skills`,exp) VALUES ('" . $uid . "','s1=14|s2=3|s3=3|s4=25|rinv=40|m9=5|m6=10|s7=0|a1=0|a2=0|a3=0|a4=0|a5=3|mg1=0|mg2=0|mg3=6|mg4=0|mg5=0|mg6=0|mg7=0|s5=13|s6=40|a6=0|s8=0|s9=0|s10=0|s11=0|s12=0|s13=0|s14=0|s15=0',-75,-9,100000)" + ); + $re = $u->addItem(531, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 1 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "531" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(534, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 2 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "534" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(1026, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 3 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "1026" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(291, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 4 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "291" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(548, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 5 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "548" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(629, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 7 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "629" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(318, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 13 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "318" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(711, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 16 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "711" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(714, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 17 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "714" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + ///------- юва + $re = $u->addItem(660, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 8 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "660" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(677, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 9 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "677" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + + $re = $u->addItem(695, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 10 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "695" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + $re = $u->addItem(695, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 11 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "695" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + $re = $u->addItem(695, $uid); + mysql_query('UPDATE `items_users` SET `inodet` = 12 WHERE `id` = "' . $re . '" LIMIT 1'); + $price = mysql_fetch_array( + mysql_query('SELECT `price_1` FROM `items_shop` WHERE `item_id` = "695" AND `sid`=1 LIMIT 1') + ); + mysql_query( + 'UPDATE `items_users` SET `1price` = "' . $price['price_1'] . '" WHERE `id` = "' . $re . '" LIMIT 1' + ); + ///---- + + mysql_query( + 'UPDATE `users` SET `money` = `money`-1988 WHERE `id` = "' . $uid . '" LIMIT 1' + );//коректировка денег 2244 - 1988 + } + if ($_POST['ref'] > 0) { + $re = $u->addItem(6417, $uid); + } + + //катим эфекты + // + // + $us = add_effn($uid, 37); + $us = add_effn($uid, 38); + $us = add_effn($uid, 283); + $us = add_effn($uid, 25); + $us = add_effn($uid, 296); + $us = add_effn($uid, 472); + + //Магическое усиление + mysql_query( + "INSERT INTO `items_users` (`item_id`, `1price`, `2price`, `3price`, `4price`, `uid`, `use_text`, `data`, `inOdet`, `inShop`, `inGroup`, `delete`, `iznosNOW`, `iznosMAX`, `gift`, `gtxt1`, `gtxt2`, `kolvo`, `geniration`, `magic_inc`, `maidin`, `lastUPD`, `timeOver`, `overType`, `secret_id`, `time_create`, `time_sleep`, `dn_delete`, `inTransfer`, `post_delivery`, `lbtl_`, `bexp`, `so`, `blvl`, `pok_itm`, `btl_zd`) VALUES + (4942, 40, 0.00, 0.00, 0.00, " . $uid . ", 0, 'oneType=72|onlyOne=1|musor=1|noremont=1|sudba=1|nosale=1', 0, 0, 0, 0, 0.00, 4, 'Администрация', '', '', 1, 2, '439', 'capitalcity', " . time( + ) . ", 0, 0, '', " . time() . ", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);" + ); + //Защита от оружия + mysql_query( + "INSERT INTO `items_users` (`item_id`, `1price`, `2price`, `3price`, `4price`, `uid`, `use_text`, `data`, `inOdet`, `inShop`, `inGroup`, `delete`, `iznosNOW`, `iznosMAX`, `gift`, `gtxt1`, `gtxt2`, `kolvo`, `geniration`, `magic_inc`, `maidin`, `lastUPD`, `timeOver`, `overType`, `secret_id`, `time_create`, `time_sleep`, `dn_delete`, `inTransfer`, `post_delivery`, `lbtl_`, `bexp`, `so`, `blvl`, `pok_itm`, `btl_zd`) VALUES + (1001, 40, 0.00, 0.00, 0.00, " . $uid . ", 0, 'onlyOne=1|oneType=7|noremont=1|musor=1|sudba=1|nosale=1', 0, 0, 0, 0, 0.00, 4, 'Администрация', '', '', 1, 2, '25', 'capitalcity', " . time( + ) . ", 0, 0, '', " . time() . ", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);" + ); + //Защита от магии + mysql_query( + "INSERT INTO `items_users` (`item_id`, `1price`, `2price`, `3price`, `4price`, `uid`, `use_text`, `data`, `inOdet`, `inShop`, `inGroup`, `delete`, `iznosNOW`, `iznosMAX`, `gift`, `gtxt1`, `gtxt2`, `kolvo`, `geniration`, `magic_inc`, `maidin`, `lastUPD`, `timeOver`, `overType`, `secret_id`, `time_create`, `time_sleep`, `dn_delete`, `inTransfer`, `post_delivery`, `lbtl_`, `bexp`, `so`, `blvl`, `pok_itm`, `btl_zd`) VALUES + (4941, 40, 0.00, 0.00, 0.00, " . $uid . ", 0, 'oneType=71|onlyOne=1|musor=1|noremont=1|sudba=1|nosale=1', 0, 0, 0, 0, 0.00, 4, 'Администрация', '', '', 1, 2, '438', 'capitalcity', " . time( + ) . ", 0, 0, '', " . time() . ", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);" + ); + //Жажда жизни +6 + mysql_query( + "INSERT INTO `items_users` (`item_id`, `1price`, `2price`, `3price`, `4price`, `uid`, `use_text`, `data`, `inOdet`, `inShop`, `inGroup`, `delete`, `iznosNOW`, `iznosMAX`, `gift`, `gtxt1`, `gtxt2`, `kolvo`, `geniration`, `magic_inc`, `maidin`, `lastUPD`, `timeOver`, `overType`, `secret_id`, `time_create`, `time_sleep`, `dn_delete`, `inTransfer`, `post_delivery`, `lbtl_`, `bexp`, `so`, `blvl`, `pok_itm`, `btl_zd`) VALUES + (3101, 50, 0.00, 0.00, 0.00, " . $uid . ", 0, 'onlyOne=1|noremont=1|oneType=33|musor=1|sudba=1|nosale=1', 0, 0, 0, 0, 0.00, 5, 'Администрация', '', '', 1, 2, '296', 'capitalcity', " . time( + ) . ", 0, 33, '', " . time() . ", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);" + ); + //Аптечка (Исцеляет легкие травмы) + mysql_query( + "INSERT INTO `items_users` (`item_id`, `1price`, `2price`, `3price`, `4price`, `uid`, `use_text`, `data`, `inOdet`, `inShop`, `inGroup`, `delete`, `iznosNOW`, `iznosMAX`, `gift`, `gtxt1`, `gtxt2`, `kolvo`, `geniration`, `magic_inc`, `maidin`, `lastUPD`, `timeOver`, `overType`, `secret_id`, `time_create`, `time_sleep`, `dn_delete`, `inTransfer`, `post_delivery`, `lbtl_`, `bexp`, `so`, `blvl`, `pok_itm`, `btl_zd`) VALUES + (4412, 7, 0.00, 0.00, 0.00, " . $uid . ", 0, 'tr_lvl=1|useOnLogin=1|musor=1|noremont=1', 0, 0, 0, 0, 0.00, 2, 'Администрация', '', '', 1, 2, 'lech_free_1', 'capitalcity', " . time( + ) . ", 0, 0, '', " . time() . ", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);" + ); + //Аптечка (Исцеляет средние травмы) + mysql_query( + "INSERT INTO `items_users` (`item_id`, `1price`, `2price`, `3price`, `4price`, `uid`, `use_text`, `data`, `inOdet`, `inShop`, `inGroup`, `delete`, `iznosNOW`, `iznosMAX`, `gift`, `gtxt1`, `gtxt2`, `kolvo`, `geniration`, `magic_inc`, `maidin`, `lastUPD`, `timeOver`, `overType`, `secret_id`, `time_create`, `time_sleep`, `dn_delete`, `inTransfer`, `post_delivery`, `lbtl_`, `bexp`, `so`, `blvl`, `pok_itm`, `btl_zd`) VALUES + (4413, 14, 0.00, 0.00, 0.00, " . $uid . ", 0, 'tr_lvl=1|useOnLogin=1|musor=1|noremont=1', 0, 0, 0, 0, 0.00, 2, 'Администрация', '', '', 1, 2, 'lech_free_2', 'capitalcity', " . time( + ) . ", 0, 0, '', " . time() . ", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);" + ); + //Аптечка (Исцеляет тяжелые травмы) + mysql_query( + "INSERT INTO `items_users` (`item_id`, `1price`, `2price`, `3price`, `4price`, `uid`, `use_text`, `data`, `inOdet`, `inShop`, `inGroup`, `delete`, `iznosNOW`, `iznosMAX`, `gift`, `gtxt1`, `gtxt2`, `kolvo`, `geniration`, `magic_inc`, `maidin`, `lastUPD`, `timeOver`, `overType`, `secret_id`, `time_create`, `time_sleep`, `dn_delete`, `inTransfer`, `post_delivery`, `lbtl_`, `bexp`, `so`, `blvl`, `pok_itm`, `btl_zd`) VALUES + (4414, 21, 0.00, 0.00, 0.00, " . $uid . ", 0, 'tr_lvl=1|useOnLogin=1|musor=1|noremont=1', 0, 0, 0, 0, 0.00, 2, 'Администрация', '', '', 1, 2, 'lech_free_3', 'capitalcity', " . time( + ) . ", 0, 0, '', " . time() . ", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);" + ); + //Холодный разум + mysql_query( + "INSERT INTO `items_users` (`item_id`, `1price`, `2price`, `3price`, `4price`, `uid`, `use_text`, `data`, `inOdet`, `inShop`, `inGroup`, `delete`, `iznosNOW`, `iznosMAX`, `gift`, `gtxt1`, `gtxt2`, `kolvo`, `geniration`, `magic_inc`, `maidin`, `lastUPD`, `timeOver`, `overType`, `secret_id`, `time_create`, `time_sleep`, `dn_delete`, `inTransfer`, `post_delivery`, `lbtl_`, `bexp`, `so`, `blvl`, `pok_itm`, `btl_zd`) VALUES + (1460, 15, 0.00, 0.00, 0.00, " . $uid . ", 0, 'musor=1|noremont=1|sudba=1|nosale=1', 0, 0, 0, 0, 0.00, 5, 'Администрация', '', '', 1, 5, '32', 'capitalcity', " . time( + ) . ", 0, 0, '', " . time() . ", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);" + ); + //Сокрушение + mysql_query( + "INSERT INTO `items_users` (`item_id`, `1price`, `2price`, `3price`, `4price`, `uid`, `use_text`, `data`, `inOdet`, `inShop`, `inGroup`, `delete`, `iznosNOW`, `iznosMAX`, `gift`, `gtxt1`, `gtxt2`, `kolvo`, `geniration`, `magic_inc`, `maidin`, `lastUPD`, `timeOver`, `overType`, `secret_id`, `time_create`, `time_sleep`, `dn_delete`, `inTransfer`, `post_delivery`, `lbtl_`, `bexp`, `so`, `blvl`, `pok_itm`, `btl_zd`) VALUES + (994, 40, 0.00, 0.00, 0.00, " . $uid . ", 0, 'onlyOne=1|oneType=44|noremont=1|musor=1|sudba=1|nosale=1', 0, 0, 0, 0, 0.00, 4, 'Администрация', '', '', 1, 4, '20', 'capitalcity', " . time( + ) . ", 0, 0, '', " . time() . ", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);" + ); + //Эликсир жизни (восстанавливает +500 хп) + mysql_query( + "INSERT INTO `items_users` (`item_id`, `1price`, `2price`, `3price`, `4price`, `uid`, `use_text`, `data`, `inOdet`, `inShop`, `inGroup`, `delete`, `iznosNOW`, `iznosMAX`, `gift`, `gtxt1`, `gtxt2`, `kolvo`, `geniration`, `magic_inc`, `maidin`, `lastUPD`, `timeOver`, `overType`, `secret_id`, `time_create`, `time_sleep`, `dn_delete`, `inTransfer`, `post_delivery`, `lbtl_`, `bexp`, `so`, `blvl`, `pok_itm`, `btl_zd`) VALUES + (4736, 5, 0.00, 0.00, 0.00, " . $uid . ", 0, 'moment=1|moment_hp=500|nohaos=1|musor=2|noremont=1|sudba=1|nosale=1', 0, 0, 0, 0, 0.00, 10, 'Администрация', '', '', 1, 4, 'elicsir_hp -w500', 'capitalcity', " . time( + ) . ", 0, 0, '', " . time() . ", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);" + ); + //Зелье жизни (восстанавливает +200 хп) + mysql_query( + "INSERT INTO `items_users` (`item_id`, `1price`, `2price`, `3price`, `4price`, `uid`, `use_text`, `data`, `inOdet`, `inShop`, `inGroup`, `delete`, `iznosNOW`, `iznosMAX`, `gift`, `gtxt1`, `gtxt2`, `kolvo`, `geniration`, `magic_inc`, `maidin`, `lastUPD`, `timeOver`, `overType`, `secret_id`, `time_create`, `time_sleep`, `dn_delete`, `inTransfer`, `post_delivery`, `lbtl_`, `bexp`, `so`, `blvl`, `pok_itm`, `btl_zd`) VALUES + (724, 2, 0.00, 0.00, 0.00, " . $uid . ", 0, 'moment=1|moment_hp=200|nohaos=1|musor=2|noremont=1|sudba=1|nosale=1', 0, 0, 0, 0, 0.00, 10, 'Администрация', '', '', 1, 4, 'elicsir_hp -w200', 'capitalcity', " . time( + ) . ", 0, 0, '', " . time() . ", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);" + ); + //Зелье могущества (+10 силы) + mysql_query( + "INSERT INTO `items_users` (`item_id`, `1price`, `2price`, `3price`, `4price`, `uid`, `use_text`, `data`, `inOdet`, `inShop`, `inGroup`, `delete`, `iznosNOW`, `iznosMAX`, `gift`, `gtxt1`, `gtxt2`, `kolvo`, `geniration`, `magic_inc`, `maidin`, `lastUPD`, `timeOver`, `overType`, `secret_id`, `time_create`, `time_sleep`, `dn_delete`, `inTransfer`, `post_delivery`, `lbtl_`, `bexp`, `so`, `blvl`, `pok_itm`, `btl_zd`) VALUES + (870, 5, 0.00, 0.00, 0.00, " . $uid . ", 0, 'nohaos=1|onlyOne=1|oneType=1|musor=2|noremont=1|nohaos=1|onlyOne=1|oneType=1|noremont=1|add_s1=15|sudba=1|nosale=1', 0, 0, 0, 0, 0.00, 5, 'Администрация', '', '', 1, 4, '1', 'capitalcity', " . time( + ) . ", 0, 1, '', " . time() . ", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);" + ); + //Зелье стремительности (+10 ловкости) + mysql_query( + "INSERT INTO `items_users` (`item_id`, `1price`, `2price`, `3price`, `4price`, `uid`, `use_text`, `data`, `inOdet`, `inShop`, `inGroup`, `delete`, `iznosNOW`, `iznosMAX`, `gift`, `gtxt1`, `gtxt2`, `kolvo`, `geniration`, `magic_inc`, `maidin`, `lastUPD`, `timeOver`, `overType`, `secret_id`, `time_create`, `time_sleep`, `dn_delete`, `inTransfer`, `post_delivery`, `lbtl_`, `bexp`, `so`, `blvl`, `pok_itm`, `btl_zd`) VALUES + (872, 5, 0.00, 0.00, 0.00, " . $uid . ", 0, 'nohaos=1|onlyOne=1|oneType=1|musor=2|noremont=1|nohaos=1|onlyOne=1|oneType=1|noremont=1|add_s2=15|sudba=1|nosale=1', 0, 0, 0, 0, 0.00, 5, 'Администрация', '', '', 1, 4, '8', 'capitalcity', " . time( + ) . ", 0, 1, '', " . time() . ", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);" + ); + //Зелье прозрения(+10 интуиции) + mysql_query( + "INSERT INTO `items_users` (`item_id`, `1price`, `2price`, `3price`, `4price`, `uid`, `use_text`, `data`, `inOdet`, `inShop`, `inGroup`, `delete`, `iznosNOW`, `iznosMAX`, `gift`, `gtxt1`, `gtxt2`, `kolvo`, `geniration`, `magic_inc`, `maidin`, `lastUPD`, `timeOver`, `overType`, `secret_id`, `time_create`, `time_sleep`, `dn_delete`, `inTransfer`, `post_delivery`, `lbtl_`, `bexp`, `so`, `blvl`, `pok_itm`, `btl_zd`) VALUES + (871, 5, 0.00, 0.00, 0.00, " . $uid . ", 0, 'nohaos=1|onlyOne=1|oneType=1|musor=2|noremont=1|nohaos=1|onlyOne=1|oneType=1|noremont=1|add_s3=15|sudba=1|nosale=1', 0, 0, 0, 0, 0.00, 5, 'Администрация', '', '', 1, 4, '7', 'capitalcity', " . time( + ) . ", 0, 1, '', " . time() . ", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);" + ); + //Зелье разума(+10 интеллекта) + mysql_query( + "INSERT INTO `items_users` (`item_id`, `1price`, `2price`, `3price`, `4price`, `uid`, `use_text`, `data`, `inOdet`, `inShop`, `inGroup`, `delete`, `iznosNOW`, `iznosMAX`, `gift`, `gtxt1`, `gtxt2`, `kolvo`, `geniration`, `magic_inc`, `maidin`, `lastUPD`, `timeOver`, `overType`, `secret_id`, `time_create`, `time_sleep`, `dn_delete`, `inTransfer`, `post_delivery`, `lbtl_`, `bexp`, `so`, `blvl`, `pok_itm`, `btl_zd`) VALUES + (873, 5, 0.00, 0.00, 0.00, " . $uid . ", 0, 'nohaos=1|onlyOne=1|oneType=1|musor=2|noremont=1|nohaos=1|onlyOne=1|oneType=1|noremont=1|add_s5=15|sudba=1|nosale=1', 0, 0, 0, 0, 0.00, 5, 'Администрация', '', '', 1, 4, '9', 'capitalcity', " . time( + ) . ", 0, 1, '', " . time() . ", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);" + ); + //Нектар Отрицания(+160 защиты от магии) + mysql_query( + "INSERT INTO `items_users` (`item_id`, `1price`, `2price`, `3price`, `4price`, `uid`, `use_text`, `data`, `inOdet`, `inShop`, `inGroup`, `delete`, `iznosNOW`, `iznosMAX`, `gift`, `gtxt1`, `gtxt2`, `kolvo`, `geniration`, `magic_inc`, `maidin`, `lastUPD`, `timeOver`, `overType`, `secret_id`, `time_create`, `time_sleep`, `dn_delete`, `inTransfer`, `post_delivery`, `lbtl_`, `bexp`, `so`, `blvl`, `pok_itm`, `btl_zd`) VALUES + (2140, 30, 0.00, 0.00, 0.00, " . $uid . ", 0, 'nohaos=1|onlyOne=1|oneType=8|musor=2|noremont=1|add_zm=160|sudba=1|nosale=1', 0, 0, 0, 0, 0.00, 5, 'Администрация', '', '', 1, 4, '38', 'capitalcity', " . time( + ) . ", 0, 0, '', " . time() . ", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);" + ); + //Нектар уязвимости(+160 защиты от урона) + mysql_query( + "INSERT INTO `items_users` (`item_id`, `1price`, `2price`, `3price`, `4price`, `uid`, `use_text`, `data`, `inOdet`, `inShop`, `inGroup`, `delete`, `iznosNOW`, `iznosMAX`, `gift`, `gtxt1`, `gtxt2`, `kolvo`, `geniration`, `magic_inc`, `maidin`, `lastUPD`, `timeOver`, `overType`, `secret_id`, `time_create`, `time_sleep`, `dn_delete`, `inTransfer`, `post_delivery`, `lbtl_`, `bexp`, `so`, `blvl`, `pok_itm`, `btl_zd`) VALUES + (2139, 30, 0.00, 0.00, 0.00, " . $uid . ", 0, 'nohaos=1|onlyOne=1|oneType=8|musor=2|noremont=1|add_za=160|sudba=1|nosale=1', 0, 0, 0, 0, 0.00, 5, 'Администрация', '', '', 1, 4, '37', 'capitalcity', " . time( + ) . ", 0, 0, '', " . time() . ", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);" + ); + //Бутер (+180 хп) + mysql_query( + "INSERT INTO `items_users` (`item_id`, `1price`, `2price`, `3price`, `4price`, `uid`, `use_text`, `data`, `inOdet`, `inShop`, `inGroup`, `delete`, `iznosNOW`, `iznosMAX`, `gift`, `gtxt1`, `gtxt2`, `kolvo`, `geniration`, `magic_inc`, `maidin`, `lastUPD`, `timeOver`, `overType`, `secret_id`, `time_create`, `time_sleep`, `dn_delete`, `inTransfer`, `post_delivery`, `lbtl_`, `bexp`, `so`, `blvl`, `pok_itm`, `btl_zd`) VALUES + (3075, 10, 0.00, 0.00, 0.00, " . $uid . ", 0, 'nohaos=1|onlyOne=1|oneType=4|musor=1|noremont=1|sudba=1|nosale=1', 0, 0, 0, 0, 0.00, 10, 'Администрация', '', '', 1, 4, '283', 'capitalcity', " . time( + ) . ", 0, 0, '', " . time() . ", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);" + ); + + mysql_query('UPDATE `users` SET `online` = "' . time() . '" WHERE `id` = "' . $uid . '" LIMIT 1'); + + //Создаем статы персонажа + mysql_query("INSERT INTO `online` (`uid`,`timeStart`) VALUES ('" . $uid . "','" . time() . "')"); + + //добовляем благодать ангела 1н день + $ttime = time(); + mysql_query( + "INSERT INTO `eff_users`(`id_eff`, `uid`, `name`, `data`, `overType`, `timeUse`, `timeAce`, `user_use`, `delete`, `v1`, `v2`, `img2`, `x`, `hod`, `bj`, `sleeptime`, `no_Ace`, `file_finish`, `tr_life_user`, `deactiveTime`, `deactiveLast`, `mark`, `bs`) VALUES + (412,'" . $uid . "','Благодать Ангела [1]','add_gold=1|add_speedhp=35|add_speedmp=35|add_exp=35|add_repair_discount=25|add_speed_dungeon=10|add_hpVinos=5|add_m10=5|add_m11=5|add_za=25|add_zma=25',52," . $ttime . ",0,'',0,0,0,'',1,-1,0,0,1,'',0,0,0,0,0)" + ); + + + //мульты + $ipm1 = mysql_fetch_array( + mysql_query( + 'SELECT * FROM `logs_auth` WHERE `uid` = "' . mysql_real_escape_string( + $uid + ) . '" AND `ip`!="' . mysql_real_escape_string(UserIp::get()) . '" ORDER BY `id` ASC LIMIT 1' + ) + ); + $ppl = mysql_query( + 'SELECT * FROM `logs_auth` WHERE `ip`!="" AND (`ip` = "' . mysql_real_escape_string( + UserIp::get() + ) . '" OR `ip`="' . mysql_real_escape_string($ipm1['ip']) . '" OR `ip`="' . mysql_real_escape_string( + $_COOKIE['ip'] + ) . '")' + ); + while ($spl = mysql_fetch_array($ppl)) { + $ml = mysql_fetch_array( + mysql_query( + 'SELECT `id` FROM `mults` WHERE (`uid` = "' . $spl['uid'] . '" AND `uid2` = "' . $uid . '") OR (`uid2` = "' . $spl['uid'] . '" AND `uid` = "' . $uid . '") LIMIT 1' + ) + ); + if (!isset($ml['id']) && $spl['ip'] != '' && $spl['ip'] != '127.0.0.1') { + mysql_query( + 'INSERT INTO `mults` (`uid`,`uid2`,`ip`) VALUES ("' . $uid . '","' . $spl['uid'] . '","' . $spl['ip'] . '")' + ); + } + } + mysql_query( + "INSERT INTO `logs_auth` (`uid`,`ip`,`browser`,`type`,`time`,`depass`) VALUES ('" . $uid . "','" . mysql_real_escape_string( + UserIp::get() + ) . "','" . mysql_real_escape_string($_SERVER['HTTP_USER_AGENT']) . "','1','" . time() . "','')" + ); + + //Обновяем таблицы + mysql_query( + "UPDATE `users` SET `online`='" . time() . "',`ip` = '" . mysql_real_escape_string( + UserIp::get() + ) . "' WHERE `uid` = '" . $uid . "' LIMIT 1" + ); + + if (!setcookie( + 'login', $_POST['nick_u'], (time() + 60 * 60 * 24 * 7), '', '.new-combats.com' + ) || !setcookie('pass', md5($_POST['pass1_u']), (time() + 60 * 60 * 24 * 7), '', '.new-combats.com')) { + die('Ошибка сохранения cookie.'); + } else { + die( + 'Спасибо за регистрацию в игровом мире Бойцовского Клуба, желаем вам побед и долгой игры. +В случае вопросов по игре, Вам будет доступен общий чат!
' + ); + } + } + //================================ + } else { + ?> +
+

+
+ + + diff --git a/repass.php b/repass.php index 4e34efe2..bac7d58e 100644 --- a/repass.php +++ b/repass.php @@ -20,13 +20,11 @@ if (isset($_POST['relogin'])) { Config::init(); Database::init(); define('IP', UserIp::get()); - + $u = User::start(); $usr = mysql_fetch_array( mysql_query( - 'SELECT * FROM `users` WHERE `login` = "' . mysql_real_escape_string($_POST['relogin']) . '" LIMIT 1' - ) - ); + 'SELECT * FROM `users` WHERE `login` = "' . mysql_real_escape_string($_POST['relogin']) . '"')); if (isset($usr['id'])) { if ($usr['admin'] == 0 && $usr['banned'] == 0) { @@ -41,9 +39,10 @@ if (isset($_POST['relogin'])) { ); if (isset($lst_psw['id'])) { $error = 'Высылать пароль можно не более одного раза в сутки.'; - } elseif (str_replace('0', '', $_POST['redate']) == str_replace( - '0', '', $usr['bithday'] - ) && ($_POST['reanswer'] == $usr['q1'] || $usr['q1'] == '')) { + } elseif ( + str_replace('0', '', $_POST['redate']) == str_replace('0', '', $usr['bithday']) && + ($_POST['reanswer'] == $usr['q1'] || $usr['q1'] == '') + ) { $error = '


Пароль от персонажа "' . $usr['login'] . '" был успешно выслан на E-mail указанный при регистрации!


'; $re = mysql_fetch_array( mysql_query( diff --git a/reting_clans_cron.php b/reting_clans_cron.php index 77ef5924..aee6f371 100644 --- a/reting_clans_cron.php +++ b/reting_clans_cron.php @@ -1,116 +1,141 @@ -' . $_SERVER['SERVER_ADDR']); } -if(getIP() != $_SERVER['SERVER_ADDR'] && getIP() != '127.0.0.1') { - if(!isset($_GET['test15684555'])) { - die(getIP().'
'.$_SERVER['SERVER_ADDR']); - } -} - define('GAME',true); - require_once('_incl_data/__config.php'); - require_once('_incl_data/class/__db_connect.php'); +$add_exp_list = []; +$all_exp_list = []; +$exp_list = []; +$win_list = []; +$lose_list = []; +$nich_list = []; +$xu_list = []; +$level_list = []; - $add_exp_list = array(); - $all_exp_list = array(); - $exp_list = array(); - $win_list = array(); - $lose_list = array(); - $nich_list = array(); - $xu_list = array(); - $level_list = array(); - - $sp = mysql_query('SELECT `id`,`level`,`name` FROM `clan`'); - while( $pl = mysql_fetch_array($sp) ) { - $timday=time()-86400; - $xu = mysql_fetch_array(mysql_query('SELECT COUNT(`id`) FROM `users` WHERE `clan` = "'.$pl['id'].'" AND `admin` = 0 AND `online` > "'.$timday.'" AND `real` = 1 LIMIT 1')); - $xu = $xu[0]; - - $clanw = mysql_fetch_array(mysql_query('SELECT COUNT(`id`) FROM `battle` WHERE `type` = 250 AND `time_over` > "'.$timday.'" AND ((`team_win`=1 AND `clan1` = "'.$pl['id'].'") OR (`team_win`=2 AND `clan2` = "'.$pl['id'].'")) LIMIT 1')); - $clanw = $clanw[0]; - - $clanl = mysql_fetch_array(mysql_query('SELECT COUNT(`id`) FROM `battle` WHERE `type` = 250 AND `time_over` > "'.$timday.'" AND ((`team_win`=2 AND `clan1` = "'.$pl['id'].'") OR (`team_win`=1 AND `clan2` = "'.$pl['id'].'")) LIMIT 1')); - $clanl = $clanl[0]; - - //$st = mysql_fetch_array(mysql_query('SELECT SUM(`val`) AS `exp` FROM `users_reting` WHERE `clan` = "'.$pl['id'].'" LIMIT 1')); - $st = mysql_fetch_array(mysql_query('SELECT `exp` FROM `clan` WHERE `id` = "'.$pl['id'].'" LIMIT 1')); - - $wn = mysql_fetch_array(mysql_query('SELECT SUM(`win`) AS `win` , SUM(`lose`) AS `lose` , SUM(`nich`) AS `nich` FROM `users` WHERE `clan` = "'.$pl['id'].'" LIMIT 1')); - - $rl = mysql_fetch_array(mysql_query('SELECT `exp`,`global`,`exp_real`, `win`,`lose` FROM `aaa_clan_reting_list` WHERE `clan` = "'.$pl['id'].'" ORDER BY `id` DESC LIMIT 1')); - - $exp_list[$pl['id']] = $st['exp']; - $log_list[$pl['id']] = $pl['name']; - $level_list[$pl['id']] = $pl['level']; - $win_list[$pl['id']] = $wn['win']; - $lose_list[$pl['id']] = $wn['lose']; - $nich_list[$pl['id']] = $wn['nich']; - - $xu_list[$pl['id']] = $xu; - $add_exp = 0 ; - if( date('d') == 1) - { - $global_exp = 0; - } - else - { - $global_exp = round($rl['global']); - } - //$xul = mysql_query('SELECT `level` FROM `users` WHERE `clan` = "'.$pl['id'].'" AND `admin` = 0 AND `real` = 1 LIMIT 1'); - $xul = mysql_query('SELECT `st`.`repexp`,`st`.`id` FROM `users` AS `u` LEFT JOIN `stats` AS `st` ON (`u`.`id` = `st`.`id`) WHERE `u`.`clan`="'.$pl['id'].'"'); - while( $xull = mysql_fetch_array($xul) ) - { - $add_exp = $add_exp + $xull['repexp']; - mysql_query('UPDATE `stats` SET `repexp` = 0 WHERE `id` = "'.$xull['id'].'" LIMIT 1'); - } - - if ($xu > 0 && $pl['id'] !=62 && $pl['id'] !=93 ) - { - $add_exp_list[$pl['id']] = $add_exp; //записываем сколько опыта получил за сегодня - $all_exp_list[$pl['id']] = $global_exp+$add_exp; //записываем сколько опыта получил всего + сегодняшний - } - else - { - $add_exp_list[$pl['id']] = 0; //записываем сколько опыта получил за сегодня - $all_exp_list[$pl['id']] = 0; //записываем сколько опыта получил всего + сегодняшний - } - - //$nonlin=mysql_fetch_array(mysql_query('SELECT COUNT(*) as num FROM `users` WHERE `clan` = "'.$pl['id'].'" AND `online` < "'.(time()-86400).'" ')); - //$all_exp_list[$pl['id']] -= $nonlin['num']*50000; - } - - unset($pl,$sp,$xul,$xull); - - arsort($all_exp_list); - - $keys = array_keys($all_exp_list); - $i = 0; - while( $i <= count($keys) ) { - if( isset($keys[$i]) ) { - mysql_query('INSERT INTO `aaa_clan_reting_list` ( `level`,`xu`,`win`,`lose`,`nich`,`exp_real`,`clan`,`pos`,`global`,`exp`,`date`,`time` ) VALUES ( - "'.$level_list[$keys[$i]].'","'.$xu_list[$keys[$i]].'","'.$win_list[$keys[$i]].'","'.$lose_list[$keys[$i]].'","'.$nich_list[$keys[$i]].'","'.$exp_list[$keys[$i]].'","'.$keys[$i].'","'.($i+1).'","'.$all_exp_list[$keys[$i]].'","'.$add_exp_list[$keys[$i]].'","'.date('dmY').'","'.time().'" - )'); - if ($i == 0) - { - mysql_query('UPDATE `clan` SET `money2` = `money2` + "'.($xu_list[$keys[$i]]*3/10).'" WHERE `id` = "'.$keys[$i].'" LIMIT 1'); - mysql_query('INSERT INTO `chat` (`text`,`city`,`to`,`type`,`new`,`time`) VALUES ("Рейтинг кланов '.date('d-m-Y').':","capitalcity","","6","1","'.time().'")'); - mysql_query('INSERT INTO `chat` (`text`,`city`,`to`,`type`,`new`,`time`) VALUES ("Клан '.$log_list[$keys[$i]].' получает '.($xu_list[$keys[$i]]*3/10).' Екр. в казну клана за 1-е место в рейтинге.","capitalcity","","6","1","'.time().'")'); - } - elseif ($i == 1) - { - mysql_query('UPDATE `clan` SET `money2` = `money2` + "'.($xu_list[$keys[$i]]*2/10).'" WHERE `id` = "'.$keys[$i].'" LIMIT 1'); - mysql_query('INSERT INTO `chat` (`text`,`city`,`to`,`type`,`new`,`time`) VALUES ("Клан '.$log_list[$keys[$i]].' получает '.($xu_list[$keys[$i]]*2/10).' Екр. в казну клана за 2-е место в рейтинге.","capitalcity","","6","1","'.time().'")'); - } - elseif ($i == 2) - { - mysql_query('UPDATE `clan` SET `money2` = `money2` + "'.($xu_list[$keys[$i]]*1/10).'" WHERE `id` = "'.$keys[$i].'" LIMIT 1'); - mysql_query('INSERT INTO `chat` (`text`,`city`,`to`,`type`,`new`,`time`) VALUES ("Клан '.$log_list[$keys[$i]].' получает '.($xu_list[$keys[$i]]*1/10).' Екр. в казну клана за 3-е место в рейтинге.","capitalcity","","6","1","'.time().'")'); - } - - } - $i++; - } - mysql_query('UPDATE `stats` SET `repexp` = 0 WHERE `repexp` > 0'); -?> \ No newline at end of file +$sp = mysql_query('SELECT `id`,`level`,`name` FROM `clan`'); +while ($pl = mysql_fetch_array($sp)) { + $timday = time() - 86400; + $xu = mysql_fetch_array( + mysql_query( + 'SELECT COUNT(`id`) FROM `users` WHERE `clan` = "' . $pl['id'] . '" AND `admin` = 0 AND `online` > "' . $timday . '" AND `real` = 1 LIMIT 1' + ) + ); + $xu = $xu[0]; + + $clanw = mysql_fetch_array( + mysql_query( + 'SELECT COUNT(`id`) FROM `battle` WHERE `type` = 250 AND `time_over` > "' . $timday . '" AND ((`team_win`=1 AND `clan1` = "' . $pl['id'] . '") OR (`team_win`=2 AND `clan2` = "' . $pl['id'] . '")) LIMIT 1' + ) + ); + $clanw = $clanw[0]; + + $clanl = mysql_fetch_array( + mysql_query( + 'SELECT COUNT(`id`) FROM `battle` WHERE `type` = 250 AND `time_over` > "' . $timday . '" AND ((`team_win`=2 AND `clan1` = "' . $pl['id'] . '") OR (`team_win`=1 AND `clan2` = "' . $pl['id'] . '")) LIMIT 1' + ) + ); + $clanl = $clanl[0]; + + //$st = mysql_fetch_array(mysql_query('SELECT SUM(`val`) AS `exp` FROM `users_reting` WHERE `clan` = "'.$pl['id'].'" LIMIT 1')); + $st = mysql_fetch_array(mysql_query('SELECT `exp` FROM `clan` WHERE `id` = "' . $pl['id'] . '" LIMIT 1')); + + $wn = mysql_fetch_array( + mysql_query( + 'SELECT SUM(`win`) AS `win` , SUM(`lose`) AS `lose` , SUM(`nich`) AS `nich` FROM `users` WHERE `clan` = "' . $pl['id'] . '" LIMIT 1' + ) + ); + + $rl = mysql_fetch_array( + mysql_query( + 'SELECT `exp`,`global`,`exp_real`, `win`,`lose` FROM `aaa_clan_reting_list` WHERE `clan` = "' . $pl['id'] . '" ORDER BY `id` DESC LIMIT 1' + ) + ); + + $exp_list[$pl['id']] = $st['exp']; + $log_list[$pl['id']] = $pl['name']; + $level_list[$pl['id']] = $pl['level']; + $win_list[$pl['id']] = $wn['win']; + $lose_list[$pl['id']] = $wn['lose']; + $nich_list[$pl['id']] = $wn['nich']; + + $xu_list[$pl['id']] = $xu; + $add_exp = 0; + if (date('d') == 1) { + $global_exp = 0; + } else { + $global_exp = round($rl['global']); + } + + $xul = mysql_query( + 'SELECT `st`.`repexp`,`st`.`id` FROM `users` AS `u` LEFT JOIN `stats` AS `st` ON (`u`.`id` = `st`.`id`) WHERE `u`.`clan`="' . $pl['id'] . '"' + ); + while ($xull = mysql_fetch_array($xul)) { + $add_exp = $add_exp + $xull['repexp']; + mysql_query('UPDATE `stats` SET `repexp` = 0 WHERE `id` = "' . $xull['id'] . '" LIMIT 1'); + } + + if ($xu > 0 && $pl['id'] != 62 && $pl['id'] != 93) { + $add_exp_list[$pl['id']] = $add_exp; //записываем сколько опыта получил за сегодня + $all_exp_list[$pl['id']] = $global_exp + $add_exp; //записываем сколько опыта получил всего + сегодняшний + } else { + $add_exp_list[$pl['id']] = 0; //записываем сколько опыта получил за сегодня + $all_exp_list[$pl['id']] = 0; //записываем сколько опыта получил всего + сегодняшний + } + +} + +unset($pl, $sp, $xul, $xull); + +arsort($all_exp_list); + +$keys = array_keys($all_exp_list); +$i = 0; +while ($i <= count($keys)) { + if (isset($keys[$i])) { + mysql_query( + 'INSERT INTO `aaa_clan_reting_list` ( `level`,`xu`,`win`,`lose`,`nich`,`exp_real`,`clan`,`pos`,`global`,`exp`,`date`,`time` ) VALUES ( + "' . $level_list[$keys[$i]] . '","' . $xu_list[$keys[$i]] . '","' . $win_list[$keys[$i]] . '","' . $lose_list[$keys[$i]] . '","' . $nich_list[$keys[$i]] . '","' . $exp_list[$keys[$i]] . '","' . $keys[$i] . '","' . ($i + 1) . '","' . $all_exp_list[$keys[$i]] . '","' . $add_exp_list[$keys[$i]] . '","' . date( + 'dmY' + ) . '","' . time() . '" + )' + ); + if ($i == 0) { + mysql_query( + 'UPDATE `clan` SET `money2` = `money2` + "' . ($xu_list[$keys[$i]] * 3 / 10) . '" WHERE `id` = "' . $keys[$i] . '" LIMIT 1' + ); + mysql_query( + 'INSERT INTO `chat` (`text`,`city`,`to`,`type`,`new`,`time`) VALUES ("Рейтинг кланов ' . date( + 'd-m-Y' + ) . ':","capitalcity","","6","1","' . time() . '")' + ); + mysql_query( + 'INSERT INTO `chat` (`text`,`city`,`to`,`type`,`new`,`time`) VALUES ("Клан ' . $log_list[$keys[$i]] . ' получает ' . ($xu_list[$keys[$i]] * 3 / 10) . ' Екр. в казну клана за 1-е место в рейтинге.","capitalcity","","6","1","' . time( + ) . '")' + ); + } elseif ($i == 1) { + mysql_query( + 'UPDATE `clan` SET `money2` = `money2` + "' . ($xu_list[$keys[$i]] * 2 / 10) . '" WHERE `id` = "' . $keys[$i] . '" LIMIT 1' + ); + mysql_query( + 'INSERT INTO `chat` (`text`,`city`,`to`,`type`,`new`,`time`) VALUES ("Клан ' . $log_list[$keys[$i]] . ' получает ' . ($xu_list[$keys[$i]] * 2 / 10) . ' Екр. в казну клана за 2-е место в рейтинге.","capitalcity","","6","1","' . time( + ) . '")' + ); + } elseif ($i == 2) { + mysql_query( + 'UPDATE `clan` SET `money2` = `money2` + "' . ($xu_list[$keys[$i]] * 1 / 10) . '" WHERE `id` = "' . $keys[$i] . '" LIMIT 1' + ); + mysql_query( + 'INSERT INTO `chat` (`text`,`city`,`to`,`type`,`new`,`time`) VALUES ("Клан ' . $log_list[$keys[$i]] . ' получает ' . ($xu_list[$keys[$i]] * 1 / 10) . ' Екр. в казну клана за 3-е место в рейтинге.","capitalcity","","6","1","' . time( + ) . '")' + ); + } + + } + $i++; +} +mysql_query('UPDATE `stats` SET `repexp` = 0 WHERE `repexp` > 0'); diff --git a/reting_pers_cron.php b/reting_pers_cron.php index 82d7d5ad..b2ce9dd0 100644 --- a/reting_pers_cron.php +++ b/reting_pers_cron.php @@ -1,139 +1,144 @@ -'.$_SERVER['SERVER_ADDR']); - } -} -define('GAME',true); require_once('_incl_data/__config.php'); require_once('_incl_data/class/__db_connect.php'); +if (UserIp::get() != $_SERVER['SERVER_ADDR'] && UserIp::get() != '127.0.0.1' && !isset($_GET['test15684555'])) { + die(UserIp::get() . '
' . $_SERVER['SERVER_ADDR']); +} -//if(isset($_GET['test'])) { - - //Рейтинг по вкладам - $ub = array(); - $ui = array(); - $sp = mysql_query('SELECT * FROM `pay_operation` WHERE `good` > 0 ORDER BY `id` DESC'); - while( $pl = mysql_fetch_array($sp) ) { - if(!isset($ub[$pl['uid']])) { - $ui[] = $pl['uid']; - } - $ub[$pl['uid']][date('d.m.Y',$pl['good'])] = $pl['ekr']; - } - $i = 0; - while( $i < count($ui) ) { - if(isset($ui[$i])) { - $j = 1; - $k = 0; - $nj = 0; - while( $j <= 1000 ) { - $dt = date('d.m.Y',time() - (86400 * $j)); - if( isset($ub[$ui[$i]][$dt]) ) { - $k++; - $nj = 0; - }elseif( $j > 0 && $nj >= 6 ) { - $j = 1000; - }else{ - $nj++; - } - $j++; - } - mysql_query('DELETE FROM `users_paybonus` WHERE `id` = "'.$ui[$i].'" LIMIT 1'); - mysql_query('INSERT INTO `users_paybonus` (`id`,`level`) VALUES ( - "'.$ui[$i].'","'.$k.'" - )'); - } - $i++; - } - - $add_exp_list = array(); - $all_exp_list = array(); - $exp_list = array(); - $win_list = array(); - - $test = mysql_fetch_array(mysql_query('SELECT `id` FROM `aaa_reting_list` WHERE `date` = "'.date('dmY').'" LIMIT 1')); - if(isset($test['id'])) { - mysql_query('DELETE FROM `aaa_reting_list` WHERE `date` = "'.date('dmY').'"'); - } - unset($test); - - $sp = mysql_query('SELECT `id`,`login`,`win` FROM `users` WHERE `real` = 1 AND `admin` = 0'); - while( $pl = mysql_fetch_array($sp) ) { - $st = mysql_fetch_array(mysql_query('SELECT `id`,`exp`,`repexp` FROM `stats` WHERE `id` = "'.$pl['id'].'" AND `bot` = 0 LIMIT 1')); - $rl = mysql_fetch_array(mysql_query('SELECT `exp`,`global`,`exp_real` FROM `aaa_reting_list` WHERE `uid` = "'.$pl['id'].'" ORDER BY `id` DESC LIMIT 1')); - - $exp_list[$pl['id']] = $st['exp']; - - $win_list[$pl['id']] = $pl['win']; - $log_list[$pl['id']] = $pl['login']; - - $add_exp = $st['exp']; // - $rl['exp_real']; - if( date('d') == 1) - { - $global_exp = 0; //значение рейтинга обнуляется 1го числа - } - else - { - //$global_exp = 0; - $global_exp = round($rl['global']); - } - $global_exp = $global_exp + round($st['repexp']); - //$cp = mysql_query('SELECT `exp` FROM `aaa_reting_list` WHERE `uid` = "'.$pl['id'].'" ORDER BY `id` DESC LIMIT 100'); - //$dd = 0; - //while( $cl = mysql_fetch_array($cp) ) { - // $global_exp += round($cl['exp']/100*(100-$dd)); - // $dd++; - //} - - $add_exp_list[$pl['id']] = $add_exp; //записываем сколько опыта получил за сегодня - $all_exp_list[$pl['id']] = $global_exp;// + $add_exp; //записываем сколько опыта получил всего + сегодняшний - } - unset($pl,$sp); - - arsort($all_exp_list); - - $keys = array_keys($all_exp_list); - - $i = 0; - while( $i <= count($keys) ) { - if( isset($keys[$i]) ) { - mysql_query('INSERT INTO `aaa_reting_list` ( `win`,`exp_real`,`uid`,`pos`,`global`,`exp`,`date`,`time` ) VALUES ( - "'.$win_list[$keys[$i]].'","'.$exp_list[$keys[$i]].'","'.$keys[$i].'","'.($i+1).'","'.$all_exp_list[$keys[$i]].'","'.$add_exp_list[$keys[$i]].'","'.date('dmY').'","'.time().'" - )'); - if ($i == 0) - { - mysql_query('UPDATE `users` SET `money2` = `money2` + 1 WHERE `id` = "'.$keys[$i].'" LIMIT 1'); - mysql_query('INSERT INTO `chat` (`text`,`city`,`to`,`type`,`new`,`time`) VALUES ("Рейтинг игроков '.date('d-m-Y').':","capitalcity","","6","1","'.time().'")'); - mysql_query('INSERT INTO `chat` (`text`,`city`,`to`,`type`,`new`,`time`) VALUES ("Игрок '.$log_list[$keys[$i]].' получает 1 Екр. за 1-е место в рейтинге.","capitalcity","","6","1","'.time().'")'); - } - elseif ($i == 1) - { - mysql_query('UPDATE `users` SET `money2` = `money2` + 0.75 WHERE `id` = "'.$keys[$i].'" LIMIT 1'); - mysql_query('INSERT INTO `chat` (`text`,`city`,`to`,`type`,`new`,`time`) VALUES ("Игрок '.$log_list[$keys[$i]].' получает 0.75 …кр. за 2-е место в рейтинге.","capitalcity","","6","1","'.time().'")'); - } - elseif ($i == 2) - { - mysql_query('UPDATE `users` SET `money2` = `money2` + 0.5 WHERE `id` = "'.$keys[$i].'" LIMIT 1'); - mysql_query('INSERT INTO `chat` (`text`,`city`,`to`,`type`,`new`,`time`) VALUES ("Игрок '.$log_list[$keys[$i]].' получает 0.5 …кр. за 3-е место в рейтинге.","capitalcity","","6","1","'.time().'")'); - } - elseif ($i == 3) - { - mysql_query('UPDATE `users` SET `money2` = `money2` + 0.25 WHERE `id` = "'.$keys[$i].'" LIMIT 1'); - mysql_query('INSERT INTO `chat` (`text`,`city`,`to`,`type`,`new`,`time`) VALUES ("Игрок '.$log_list[$keys[$i]].' получает 0.25 …кр. за 4-е место в рейтинге.","capitalcity","","6","1","'.time().'")'); - } - elseif ($i == 4) - { - mysql_query('UPDATE `users` SET `money2` = `money2` + 0.15 WHERE `id` = "'.$keys[$i].'" LIMIT 1'); - mysql_query('INSERT INTO `chat` (`text`,`city`,`to`,`type`,`new`,`time`) VALUES ("Игрок '.$log_list[$keys[$i]].' получает 0.15 …кр. за 5-е место в рейтинге.","capitalcity","","6","1","'.time().'")'); - } - } - $i++; - } - -//} -?> \ No newline at end of file +//Рейтинг по вкладам +$ub = []; +$ui = []; +$sp = mysql_query('SELECT * FROM `pay_operation` WHERE `good` > 0 ORDER BY `id` DESC'); +while ($pl = mysql_fetch_array($sp)) { + if (!isset($ub[$pl['uid']])) { + $ui[] = $pl['uid']; + } + $ub[$pl['uid']][date('d.m.Y', $pl['good'])] = $pl['ekr']; +} +$i = 0; +while ($i < count($ui)) { + if (isset($ui[$i])) { + $j = 1; + $k = 0; + $nj = 0; + while ($j <= 1000) { + $dt = date('d.m.Y', time() - (86400 * $j)); + if (isset($ub[$ui[$i]][$dt])) { + $k++; + $nj = 0; + } elseif ($j > 0 && $nj >= 6) { + $j = 1000; + } else { + $nj++; + } + $j++; + } + mysql_query('DELETE FROM `users_paybonus` WHERE `id` = "' . $ui[$i] . '" LIMIT 1'); + mysql_query( + 'INSERT INTO `users_paybonus` (`id`,`level`) VALUES ( + "' . $ui[$i] . '","' . $k . '" + )' + ); + } + $i++; +} + +$add_exp_list = []; +$all_exp_list = []; +$exp_list = []; +$win_list = []; + +$test = mysql_fetch_array( + mysql_query('SELECT `id` FROM `aaa_reting_list` WHERE `date` = "' . date('dmY') . '" LIMIT 1') +); +if (isset($test['id'])) { + mysql_query('DELETE FROM `aaa_reting_list` WHERE `date` = "' . date('dmY') . '"'); +} +unset($test); + +$sp = mysql_query('SELECT `id`,`login`,`win` FROM `users` WHERE `real` = 1 AND `admin` = 0'); +while ($pl = mysql_fetch_array($sp)) { + $st = mysql_fetch_array( + mysql_query('SELECT `id`,`exp`,`repexp` FROM `stats` WHERE `id` = "' . $pl['id'] . '" AND `bot` = 0 LIMIT 1') + ); + $rl = mysql_fetch_array( + mysql_query( + 'SELECT `exp`,`global`,`exp_real` FROM `aaa_reting_list` WHERE `uid` = "' . $pl['id'] . '" ORDER BY `id` DESC LIMIT 1' + ) + ); + + $exp_list[$pl['id']] = $st['exp']; + + $win_list[$pl['id']] = $pl['win']; + $log_list[$pl['id']] = $pl['login']; + + $add_exp = $st['exp']; // - $rl['exp_real']; + if (date('d') == 1) { + $global_exp = 0; //значение рейтинга обнуляется 1го числа + } else { + //$global_exp = 0; + $global_exp = round($rl['global']); + } + $global_exp = $global_exp + round($st['repexp']); + + $add_exp_list[$pl['id']] = $add_exp; //записываем сколько опыта получил за сегодня + $all_exp_list[$pl['id']] = $global_exp;// + $add_exp; //записываем сколько опыта получил всего + сегодняшний +} +unset($pl, $sp); + +arsort($all_exp_list); + +$keys = array_keys($all_exp_list); + +$i = 0; +while ($i <= count($keys)) { + if (isset($keys[$i])) { + mysql_query( + 'INSERT INTO `aaa_reting_list` ( `win`,`exp_real`,`uid`,`pos`,`global`,`exp`,`date`,`time` ) VALUES ( + "' . $win_list[$keys[$i]] . '","' . $exp_list[$keys[$i]] . '","' . $keys[$i] . '","' . ($i + 1) . '","' . $all_exp_list[$keys[$i]] . '","' . $add_exp_list[$keys[$i]] . '","' . date( + 'dmY' + ) . '","' . time() . '" + )' + ); + if ($i == 0) { + mysql_query('UPDATE `users` SET `money2` = `money2` + 1 WHERE `id` = "' . $keys[$i] . '" LIMIT 1'); + mysql_query( + 'INSERT INTO `chat` (`text`,`city`,`to`,`type`,`new`,`time`) VALUES ("Рейтинг игроков ' . date( + 'd-m-Y' + ) . ':","capitalcity","","6","1","' . time() . '")' + ); + mysql_query( + 'INSERT INTO `chat` (`text`,`city`,`to`,`type`,`new`,`time`) VALUES ("Игрок ' . $log_list[$keys[$i]] . ' получает 1 Екр. за 1-е место в рейтинге.","capitalcity","","6","1","' . time( + ) . '")' + ); + } elseif ($i == 1) { + mysql_query('UPDATE `users` SET `money2` = `money2` + 0.75 WHERE `id` = "' . $keys[$i] . '" LIMIT 1'); + mysql_query( + 'INSERT INTO `chat` (`text`,`city`,`to`,`type`,`new`,`time`) VALUES ("Игрок ' . $log_list[$keys[$i]] . ' получает 0.75 …кр. за 2-е место в рейтинге.","capitalcity","","6","1","' . time( + ) . '")' + ); + } elseif ($i == 2) { + mysql_query('UPDATE `users` SET `money2` = `money2` + 0.5 WHERE `id` = "' . $keys[$i] . '" LIMIT 1'); + mysql_query( + 'INSERT INTO `chat` (`text`,`city`,`to`,`type`,`new`,`time`) VALUES ("Игрок ' . $log_list[$keys[$i]] . ' получает 0.5 …кр. за 3-е место в рейтинге.","capitalcity","","6","1","' . time( + ) . '")' + ); + } elseif ($i == 3) { + mysql_query('UPDATE `users` SET `money2` = `money2` + 0.25 WHERE `id` = "' . $keys[$i] . '" LIMIT 1'); + mysql_query( + 'INSERT INTO `chat` (`text`,`city`,`to`,`type`,`new`,`time`) VALUES ("Игрок ' . $log_list[$keys[$i]] . ' получает 0.25 …кр. за 4-е место в рейтинге.","capitalcity","","6","1","' . time( + ) . '")' + ); + } elseif ($i == 4) { + mysql_query('UPDATE `users` SET `money2` = `money2` + 0.15 WHERE `id` = "' . $keys[$i] . '" LIMIT 1'); + mysql_query( + 'INSERT INTO `chat` (`text`,`city`,`to`,`type`,`new`,`time`) VALUES ("Игрок ' . $log_list[$keys[$i]] . ' получает 0.15 …кр. за 5-е место в рейтинге.","capitalcity","","6","1","' . time( + ) . '")' + ); + } + } + $i++; +}