dev-fixes #14

Merged
lopar merged 12 commits from dev-fixes into master 2022-07-01 12:45:44 +00:00
84 changed files with 2741 additions and 17188 deletions
Showing only changes of commit 03a4fa1275 - Show all commits

File diff suppressed because it is too large Load Diff

View File

@ -798,7 +798,7 @@ $r .= '<script>top.startHpRegen("main",'.($pl['id']+1000000000000).','.(0+$stt['
$i = count($a);
}
} elseif($s[0] == 'repl_ptp') {
include('dnaction/_dungeon_replace.php');
require_once('dnaction/_dungeon_replace.php');
die();
//header('Location: ../../modules_data/location/_dungeon_replace.php');
}elseif($s[0]=='add_eff') {

View File

@ -1,32 +1,24 @@
<?
if(!defined('GAME'))
{
<?php
if (!defined('GAME')) {
die();
}
class Filter {
//
public $spamtxt = 'acreshoperu|club|ly|gd|click|do|mibb|ml|us|cc|ee|gl|vc|bit|cutt|ow|is|ali|Utka|utka|su|Droplr|Bc|mirbk|worldofcombats|shambalru|oldcombats|oldbk2|oldbk|sebkru|oldbknet|welcombats|mycombats|vipbk|goldbk|recombats|legbkcom|febkru|skycombats|cambats|zagadnet|su0ru|suru|kgam|vkcc|acreshoperu|xaasu|googl|warcombatscom|skycombatsru|mycombatsnet|mycombatsru |worldcombatsru|oldcombats|fcitysu|isgd|ebby|greatcombatsru|greatcombats| uáto |cestparla|vbk2com|petitlienfr|scurtime|7pcguma| uto|yyyyt|÷î÷ðô|úcc|warcombatsxcom|wqdnl|qpsru|yahsru|ur1ca|gua|Lyrlfi|ally|hikg|haasu|mubkdoam|karues|0ll0ru|combatszcom|s0eru|bitdo|Clckru|uto|óáèðàåìçâåçäî÷êè|rkssu|ryru|mtgco|tynee|silverbkcom|hlru|h4lru|úcc|pfinkstenucoznet|5fsru|x0by|bkwarcom|realfight|rcombatsru|bcvc|toly|1likru|nnbb|urlinua|combatsz|cuttus|lly|zipvn|qrurlcc|seosprint|8bkz|kombatfight|warbk|owly|rebk|izipus|wonderlands|oldsbk|hecsu|combatslink|combatz|totc|alnoworld|bkz|bkxo|anberbk|sbkru|myêîìáàòñ|pysme|<>Š2<C5A0>“ |urlidru|legcombats|realcombats|ñáêðó|wbtlink|Kombatsfighitru |combatsclubru|legendbattles|darkarmada|obk2com|Cruelbknet|vbk2com|mirozdatel|gggg|rcombats|oldmains|bitly|obkcom|sbk2ru|goodbk|allbk|lastbk|îëäêîìáàòñ|crazycombats|linkac|s3sso|owly|cruelbk|likebk|isgd|fightbk|vbkcom|ëåãáêêîì|vgd|hardfight|my-combats|my-combatc|mbk|goo|bkwar|anti|ws|s3s|bakubk|idealbk|bespridel|perbk|adminbk|online|cf|artovik|probk|twar|oyy|krbk|habk|timebk|sbi|s b i|eea|sokbk|inbk|refbk|administratorbk|perfektbk|darkbk|dark|s3s|bk20|analogbk|monstrbk|bk2005|legendabk|awOev|cruelcity|tlgr|vntr|supbk|azhon0p|cu|tn|af|svel|kwn|krati|ohh|gHjq|Narlands|ogw|lur|lmy|idz|hop|eee|bestbk|pixl|ssylka|THEBESTBK|f34r|exelendbk|9tl|9tk|qil|adminbk|2t9|sportbk|NjQ0|net|jq|bishky|getl|ixz|nvm|prok|5char|tdl|pick|jj|FORM|zik|biz|sns|snsh|pnut|Ventus-terra|pb8|short|legendabk|prnt|utf|coombats|Silver|Premium|Account|tiny|êîìáàòñ|ñóï|orDåNŠ|nbk|orden|acreshoperu|shambalru|oldcombats|oldbk2|oldbk|sebkru|oldbknet|welcombats|mycombats|vipbk|goldbk|recombats|legbkcom|febkru|skycombats|COOMBATS|cambats|zagadnet|.ru|.net|.tk|.ucoz|www|.ua|.tv|.info|.org|.su|.ñó|.êîì|.èíôî|. ru|. com|. net|. tk|. ucoz|. ua|. tv|. info|. org|. su|. ñó|. êîì|. èíôî|realdeal|ïîèñêå|ãóãë|ïîèñêîâèê|kortr|MIBBK|vip|Îðäåí|Îpäåí|neverwords|xcombat|world|death|legendbattles|plu|dbe|kombatz|over|âorläcombt|dek|ci8|ðô|ÐÔ|ÁÊ2|êîïèðóéòå|';
public $abuse = array(
"ëîõ","ìóäàê","ãàíäîí","ïèäàðàñ","÷ìî","õóé","õóéíÿ","õóéíè","øëþõà","ïàñêóäà","áëÿ",'áëÿòü','áëÿäü',
'åáëàí','øàëàâà','åáàë','åáàòü','äðî÷èòü'
,'óåáèùå', 'õ ó é', 'ñóêà', 'ïèçäà', 'õóéëî', 'ïèäàð', 'õóéëî', 'ïèçäþê', 'áëÿäèíà', 'ïèçäåö', 'àõóåòü', 'åáó'
);
//
class Filter
{
public function str_count($str, $col)
{
if (strlen($str) > $col)
{
if (strlen($str) > $col) {
$str = substr($str, 0, $col);
}
return ($str);
}
//
//Ñìàéëèêè
public $sm = array("laugh"=>1,"fingal"=>1,"eek"=>1,"smoke"=>1,"hi"=>1,"bye"=>1,"king"=>1,"king2"=>1,"boks2"=>1,"boks"=>1,"gent"=>1,"lady"=>1,"tongue"=>1,"smil"=>1,"rotate"=>1,"ponder"=>1,"bow"=>1,"angel"=>1,"angel2"=>1,"hello"=>1,"dont"=>1,"idea"=>1,"mol"=>1,"super"=>1,"beer"=>1,"drink"=>1,"baby"=>1,"tongue2"=>1,"sword"=>1,"agree"=>1,"loveya"=>1,"kiss"=>1,"kiss2"=>1,"kiss3"=>1,"kiss4"=>1,"rose"=>1,"love"=>1,"love2"=>1,"confused"=>1,"yes"=>1,"no"=>1,"shuffle"=>1,"nono"=>1,"maniac"=>1,"privet"=>1,"ok"=>1,"ninja"=>1,"pif"=>1,"smash"=>1,"alien"=>1,"pirate"=>1,"gun"=>1,"trup"=>1,"mdr"=>1,"sneeze"=>1,"mad"=>1,"friday"=>1,"cry"=>1,"grust"=>1,"rupor"=>1,"fie"=>1,"nnn"=>1,"row"=>1,"red"=>1,"lick"=>1,"help"=>1,"wink"=>1,"jeer"=>1,"tease"=>1,"nunu"=>1,"inv"=>1,"duel"=>1,"susel"=>1,"nun"=>1,"kruger"=>1,"flowers"=>1,"horse"=>1,"hug"=>1,"str"=>1,"alch"=>1,"pal"=>1,"mag"=>1,"sniper"=>1,"vamp"=>1,"doc"=>1,"doc2"=>1,"sharp"=>1,"naem"=>1,"naem2"=>1,"naem3"=>1,"invis"=>1,"chtoza"=>1,"beggar"=>1,"sorry"=>1,"sorry2"=>1,
"creator"=>1,"grace"=>1,"dustman"=>1,"carreat"=>1,"lordhaos"=>1,"ura"=>1,"elix"=>1,"dedmoroz"=>1,"snegur"=>1,"showng"=>1,"superng"=>1,"podz"=>1,"sten"=>1,"devil"=>1,"cat"=>1,"owl"=>1,"lightfly"=>1,"snowfight"=>1,"rocket"=>1,"ball"=>1,"smile"=>1,"fuck"=>1);
public $sm = ["laugh" => 1, "fingal" => 1, "eek" => 1, "smoke" => 1, "hi" => 1, "bye" => 1, "king" => 1, "king2" => 1, "boks2" => 1, "boks" => 1, "gent" => 1, "lady" => 1, "tongue" => 1, "smil" => 1, "rotate" => 1, "ponder" => 1, "bow" => 1, "angel" => 1, "angel2" => 1, "hello" => 1, "dont" => 1, "idea" => 1, "mol" => 1, "super" => 1, "beer" => 1, "drink" => 1, "baby" => 1, "tongue2" => 1, "sword" => 1, "agree" => 1, "loveya" => 1, "kiss" => 1, "kiss2" => 1, "kiss3" => 1, "kiss4" => 1, "rose" => 1, "love" => 1, "love2" => 1, "confused" => 1, "yes" => 1, "no" => 1, "shuffle" => 1, "nono" => 1, "maniac" => 1, "privet" => 1, "ok" => 1, "ninja" => 1, "pif" => 1, "smash" => 1, "alien" => 1, "pirate" => 1, "gun" => 1, "trup" => 1, "mdr" => 1, "sneeze" => 1, "mad" => 1, "friday" => 1, "cry" => 1, "grust" => 1, "rupor" => 1, "fie" => 1, "nnn" => 1, "row" => 1, "red" => 1, "lick" => 1, "help" => 1, "wink" => 1, "jeer" => 1, "tease" => 1, "nunu" => 1, "inv" => 1, "duel" => 1, "susel" => 1, "nun" => 1, "kruger" => 1, "flowers" => 1, "horse" => 1, "hug" => 1, "str" => 1, "alch" => 1, "pal" => 1, "mag" => 1, "sniper" => 1, "vamp" => 1, "doc" => 1, "doc2" => 1, "sharp" => 1, "naem" => 1, "naem2" => 1, "naem3" => 1, "invis" => 1, "chtoza" => 1, "beggar" => 1, "sorry" => 1, "sorry2" => 1,
"creator" => 1, "grace" => 1, "dustman" => 1, "carreat" => 1, "lordhaos" => 1, "ura" => 1, "elix" => 1, "dedmoroz" => 1, "snegur" => 1, "showng" => 1, "superng" => 1, "podz" => 1, "sten" => 1, "devil" => 1, "cat" => 1, "owl" => 1, "lightfly" => 1, "snowfight" => 1, "rocket" => 1, "ball" => 1, "smile" => 1, "fuck" => 1];
public function e($t) {
public function e($t)
{
mysql_query('INSERT INTO `chat` (`text`,`city`,`to`,`type`,`new`,`time`) VALUES ("#' . date('d.m.Y') . ' %' . date('H:i:s') . ': <b>' . mysql_real_escape_string($t) . '</b>","capitalcity","Èãðîìèð","6","1","-1")');
}
@ -34,8 +26,7 @@ class Filter {
{
$add = 0;
if(time()-$online>=1)
{
if (time() - $online >= 1) {
if (time() - $online < 60) {
$add += time() - $online;
} else {
@ -43,29 +34,17 @@ class Filter {
}
}
//$this->e('test');
$afk = 0;
if($add>0)
{
if ($add > 0) {
$on = mysql_fetch_array(mysql_query('SELECT * FROM `online` WHERE `uid` = "' . $uid . '" LIMIT 1'));
if(isset($on['id']))
{
if (isset($on['id'])) {
$mt = 0;
$lst = time();
if(date('d',$on['lastUp'])!=date('d',$lst))
{
if (date('d', $on['lastUp']) != date('d', $lst)) {
$on['time_today'] = $add;
} else {
$on['time_today'] += $add;
}
$add = $on['time_all'] + $add;
$afkNow = 0;
$afkAll = 0;
if($afk==1)
{
$mt = time();
}
mysql_query('UPDATE `online` SET `mainTime` = "' . $mt . '",`time_today` = "' . $on['time_today'] . '",`lastUp` = "' . $lst . '",`time_all` = "' . $add . '" WHERE `id` = "' . $on['id'] . '" LIMIT 1');
}
}
@ -74,21 +53,17 @@ class Filter {
public function mystr($string)
{
$str = strtolower($string);
if(strtolower('S')!='s')
{
if (strtolower('S') != 's') {
$ru = 'ÀÁÂÃÄŨÆÇÈÉÊËÌÍÎÐÏÑÒÓÔÕÖ×ØÙÚÜÛÝÞß';
$ru2 = 'àáâãäå¸æçèéêëìíîðïñòóôõö÷øùúüûýþÿ';
$en = 'QWERTYUIOPASDFGHJKLZXCVBNM';
$en2 = 'qwertyuiopasdfghjklzxcvbnm';
$i = 0;
while($i<33)
{
if(isset($ru[$i]))
{
while ($i < 33) {
if (isset($ru[$i])) {
$str = strtr($str, $ru[$i], $ru2[$i]);
}
if(isset($en[$i]))
{
if (isset($en[$i])) {
$str = strtr($str, $en[$i], $en2[$i]);
}
$i++;
@ -97,43 +72,6 @@ class Filter {
return $str;
}
public function reverse_i($str)
{
/*$newstr = '';
for ($i=1; $i<=strlen($str); $i++)
{
$newstr .= substr($str, -$i, 1);
} */
$newstr = $str;
return $newstr;
}
public function antimat($txt) {
global $u;
$txt = ' '.$txt.' ';
//$vc = iconv( 'windows-1251' , 'UTF-8' , 'ÂÖ');
/*if( $u->info['admin'] > 0 ) {
$i = 0;
while( $i < count( $this->abuse ) ) {
$txt = iconv( 'windows-1251' , 'UTF-8' , $txt );
//
$word = $this->abuse[$i];
$word = iconv( 'windows-1251' , 'UTF-8' , $word);
//
$txt = str_replace(' #'.$word.'#is '," <i><f c=".$word." />&lt;".$vc."&gt;</i> ",$txt);
$txt = iconv( 'UTF-8' , 'windows-1251' , $txt );
$i++;
}
}else{*/
$i = 0;
while( $i < count( $this->abuse ) ) {
$txt = str_ireplace(' '.$this->abuse[$i].' ',' <i><f c='.$this->abuse[$i].' />&lt;ÂÖ&gt;</i> ',$txt);
$i++;
}
//}
return $txt;
}
public function spamFiltr($txt)
{
@ -145,17 +83,13 @@ class Filter {
$txt = str_replace('&quot;', '', $txt);
$txt = $this->mystr($txt);
$i = 0;
$j = 0;
while($i <= count($this->sm))
{
if(isset($this->sm[$i]))
{
while ($i <= count($this->sm)) {
if (isset($this->sm[$i])) {
$txt = preg_replace('/:' . $this->sm[$i] . ':/', "", $txt);
}
$i++;
}
/* ôèëüòð */
//$spam = $this->spamtxt;
$spam = mysql_fetch_array(mysql_query('SELECT * FROM `spam_word` WHERE `id` = 1 LIMIT 1'));
$spam = $spam['data'];
//
@ -204,86 +138,27 @@ class Filter {
$testRU2 = str_replace('u', 'è', $testRU2);
$testRU2 = str_replace('()', 'î', $testRU2);
$testRU2 = str_replace('0', 'î', $testRU2);
$testRU2 = preg_replace('/[^à-ÿ]*/i', ' ', $testRU2);
$testRU2 = preg_replace('/[^À-ÿ]*/i', ' ', $testRU2);
$testRU2 = preg_replace('/[^À-ß]*/i', ' ', $testRU2);
$i = 0; $spe = explode('|',$spam);
while($i<=count($spe))
{
if(isset($spe[$i]) && $spe[$i]!='' && $spe[$i] != 'new-combats.com')
{
if( stristr($testEN,$spe[$i]) == true ) {
$i = 0;
$spe = explode('|', $spam);
while ($i <= count($spe)) {
if (
isset($spe[$i]) &&
$spe[$i] != '' &&
$spe[$i] != 'new-combats.com' &&
(
stristr($testEN, $spe[$i]) ||
stristr($testRU, $spe[$i])
)
) {
$nospam .= '%' . $spe[$i];
}elseif( stristr($testRU,$spe[$i]) == true ) {
$nospam .= '%'.$spe[$i];
}
/*if(preg_match("/".($spe[$i])."/i",($testEN)))
{
$nospam .= '%'.$spe[$i];
}elseif(preg_match("/".($spe[$i])."/i",($testRU)))
{
$nospam .= '%'.$spe[$i];
}*//*elseif(preg_match("/".($spe[$i])."/i",($testRU2)))
{
$nospam .= '%'.$spe[$i];
}elseif(preg_match("/".($spe[$i])."/i",($testEN2)))
{
$nospam .= '%'.$spe[$i];
}*/
}
$i++;
}
return $nospam;
}
public function getSmiles($txt,$lg)
{
global $c,$u;
$i = 0;
$j = 0;
$txt = ' '.$txt;
$h = explode(':',$txt);
$user_sm = array();
if($lg!=false)
{
$k = 0;
$ke = explode(',',$u->info['add_smiles']);
while($k<count($ke))
{
if(isset($ke[$k]) && $ke[$k]!='')
{
$user_sm[$ke[$k]] = 1;
}
$k++;
}
}
while($i <= count($this->sm))
{
if(isset($h[$i]))
{
if(isset($this->sm[$h[$i]]) || isset($user_sm[$h[$i]]))
{
if($j<3)
{
$clk = 'onClick=\"top.addSm(\''.$h[$i].'\');\" style=\"cursor:pointer;\"';
if(isset($user_sm[$h[$i]]))
{
$clk = 'title=\"Èìåííîé ñìàéëèê\"';
}
$h[$i] = '*not_dbl_ponts*<img '.$clk.' src=\"https://img.new-combats.com/i/smile/'.$h[$i].'.gif\">*not_dbl_ponts*';
$j++;
}
}
}
$i++;
}
$txt = implode($h,':');
$txt = str_replace(':*not_dbl_ponts*','',$txt);
$txt = str_replace('*not_dbl_ponts*:','',$txt);
$txt = str_replace('*not_dbl_ponts*','',$txt);
$txt = trim($txt,' ');
return $txt;
}
public function __clone()
{
trigger_error('Äóáëèðîâàíèå íå äîïóñêàåòñÿ.', E_USER_ERROR);
@ -291,4 +166,3 @@ class Filter {
}
$filter = new Filter();
?>

View File

@ -1,32 +1,27 @@
<?
if(!defined('GAME'))
{
if (!defined('GAME')) {
die();
}
class quests {
public $free_x = 28,$data = array();
/* ïðîâåðêà ïî îêîí÷àíèþ áîÿ*/
public function bfinuser($uid,$btl,$tmwin)
class quests
{
}
public $free_x = 28, $data = [];
/* Ïðîâåðêà äîñòóïíîñòè êâåñòà */
public function testGood($pl)
{
global $c,$u;
global $u;
if (!is_array($pl)) {
$pl = mysql_fetch_array(mysql_query('SELECT * FROM `quests` WHERE `id` = "' . $pl . '" LIMIT 1'));
}
$r = 1; $d1 = 0;
$r = 1;
$d1 = 0;
$sp1 = mysql_fetch_array(mysql_query('SELECT COUNT(`id`) FROM `actions` WHERE `vars` LIKE "%start_quest%" AND `vals` = "go" AND `uid` = "' . $u->info['id'] . '" LIMIT 100'));
$pl1 = $pl1[0];
//Åñëè óæå áîëåå 5 êâåñòîâ âçÿëè
if($d1>=$this->free_x)
{
if ($d1 >= $this->free_x) {
$r = 0;
}
unset($d1, $pl1, $sp1);
@ -39,15 +34,12 @@ class quests {
$d = $this->expl($pl['tr_date']);
//Çàâåðøèòü êâåñòû [ 1,2,3,4,5 ...
if(isset($d['tr_endq']))
{
if (isset($d['tr_endq'])) {
$i = 0;
$e = explode(',', $d['tr_endq']);
while($i<count($e))
{
while ($i < count($e)) {
$qlst = mysql_fetch_array(mysql_query('SELECT `id`,`vals` FROM `actions` WHERE `uid` = "' . $u->info['id'] . '" AND `vars` = "start_quest' . $e[$i] . '" AND `vals` = "win" ORDER BY `id` DESC LIMIT 1'));
if(!isset($qlst['id']))
{
if (!isset($qlst['id'])) {
$r = 0;
}
$i++;
@ -55,19 +47,15 @@ class quests {
unset($qn, $qlst, $qlst2);
}
//Çàäåðæêà ìåæäó âûïîëíåíèåì êâåñòà
if(isset($d['tr_zdr']))
{
if (isset($d['tr_zdr'])) {
$qlst = mysql_fetch_array(mysql_query('SELECT * FROM `actions` WHERE `uid` = "' . $u->info['id'] . '" AND `vars` = "start_quest' . $pl['id'] . '" AND `vals` != "go" ORDER BY `time` DESC LIMIT 1'));
if($qlst['time']+($d['tr_zdr']*60*60)-time()>0)
{
//$t .= '<small>(Îñòàëîñü: '.$u->timeOut($qlst['time']+($d['tr_zdr']*60*60)-time()).' ÷.)</small>';
if ($qlst['time'] + ($d['tr_zdr'] * 60 * 60) - time() > 0) {
$r = 0;
}
unset($qlst);
}
//Ïåðåîäè÷íîñòü êâåñòà
if(isset($d['tr_tm1']))
{
if (isset($d['tr_tm1'])) {
$d['tr_tm1'] = str_replace('d', date('d'), $d['tr_tm1']);
$d['tr_tm1'] = str_replace('m', date('m'), $d['tr_tm1']);
$d['tr_tm1'] = str_replace('y', date('y'), $d['tr_tm1']);
@ -77,21 +65,17 @@ class quests {
//ïðîâåðêà èíòåðâàëîâ
}
//Ñêîëüêî ðàç ìîæíî ïðîéòè êâåñò
if(isset($d['tr_raz']))
{
if (isset($d['tr_raz'])) {
$qlst = $u->testAction('SELECT `id` FROM `actions` WHERE `uid` = "' . $u->info['id'] . '" AND `vars` = "start_quest' . $pl['id'] . '" LIMIT ' . $d['tr_raz'], 2);
if($d['tr_raz']>0 && $d['tr_raz']-$qlst[0] <= 0)
{
if ($d['tr_raz'] > 0 && $d['tr_raz'] - $qlst[0] <= 0) {
$r = 0;
}
unset($qlst);
}
//Ïîïûòîê ïðîéòè êâåñò
if(isset($d['tr_raz2']))
{
if (isset($d['tr_raz2'])) {
$qlst = $u->testAction('SELECT `id` FROM `actions` WHERE `uid` = "' . $u->info['id'] . '" AND `vars` = "start_quest' . $pl['id'] . '" AND `vals` != "go" AND `vals` != "win" LIMIT ' . $d['tr_raz2'], 2);
if($d['tr_raz2']-$qlst[0] <= 0)
{
if ($d['tr_raz2'] - $qlst[0] <= 0) {
$r = 0;
}
unset($qlst);
@ -99,11 +83,10 @@ class quests {
return $r;
}
public function onlyOnceQuest($quests, $uid)
{ // Îòñåèâàåì îäíîðàçîâûå êâåñòû
$result = array();
$rep = mysql_fetch_array(mysql_query('SELECT * FROM `rep` WHERE `id` = "'.$uid.'" LIMIT 1'));
$result = [];
$rep = mysql_fetch_array(mysql_query('SELECT * FROM `rep` WHERE `id` = "' . $uid));
foreach ($quests as $quest) {
$ok = true;
$t = $this->expl($quest['tr_date']);
@ -111,27 +94,39 @@ class quests {
$ins = mysql_fetch_array(mysql_query('SELECT COUNT(`id`) as sum FROM `actions` WHERE `uid` = "' . $uid . '" AND `vars` = "start_quest' . $quest['id'] . '" AND (`vals` = "go" OR `vals` = "end")'));
} else {
$ins = mysql_fetch_array(mysql_query('SELECT COUNT(`id`) as sum FROM `actions` WHERE `uid` = "' . $uid . '" AND `vars` = "start_quest' . $quest['id'] . '" AND `vals` = "go" '));
if($ins['sum']>0) $ins['sum']='delete';
if ($ins['sum'] > 0) {
$ins['sum'] = 'delete';
}
}
if ($ins['sum'] == 'delete') {
$ok = false;
}elseif(isset($ins) && $ins['sum'] >= 1 && $rep['rep'.$quest['city']] < 10000) {
} elseif (
isset($ins) &&
$ins['sum'] >= 1 &&
$rep['rep' . $quest['city']] < 10000
) {
$ok = false;
}elseif(isset($ins) && $ins['sum'] >= 2 && $rep['rep'.$quest['city']] <= 24999 && $rep['rep'.$quest['city']] >= 10000) {
} elseif (
isset($ins) &&
$ins['sum'] >= 2 &&
$rep['rep' . $quest['city']] <= 24999 &&
$rep['rep' . $quest['city']] >= 10000) {
$ok = false;
} else $result[] = $quest;
} else {
$result[] = $quest;
}
unset($ins, $t, $ok);
}
return $result;
}
/* Âçÿòü êâåñò */
public function startq($id, $val=NULL)
public function startq($id, $val = null)
{
global $c, $u;
$pl = mysql_fetch_array(mysql_query('SELECT * FROM `quests` WHERE (`city` = "" OR `city` = "' . $u->info['city'] . '") AND `delete` = "0" AND `min_lvl` <= ' . $u->info['level'] . ' AND `max_lvl` >= ' . $u->info['level'] . ' AND (`align` = "0" OR `align` = "' . floor($u->info['align']) . '") AND `id` = "' . mysql_real_escape_string($id) . '" LIMIT 1'));
if(isset($pl['id']))
{
$u->addAction(time(),'start_quest'.$pl['id'],'go', NULL, $val);
if (isset($pl['id'])) {
$u->addAction(time(), 'start_quest' . $pl['id'], 'go', null, $val);
$u->error = 'Âû óñïåøíî ïîëó÷èëè çàäàíèå &quot;' . $pl['name'] . '&quot;';
} else {
$u->error = 'Íå óäàëîñü ïîëó÷èòü äàííîå çàäàíèå';
@ -139,13 +134,12 @@ class quests {
}
/* Âçÿòü êâåñò â ïåùåðå */
public function startq_dn($id, $val=NULL)
public function startq_dn($id, $val = null)
{
global $c, $u;
$pl = mysql_fetch_array(mysql_query('SELECT * FROM `quests` WHERE `delete` = "0" AND `min_lvl` <= ' . $u->info['level'] . ' AND `max_lvl` >= ' . $u->info['level'] . ' AND (`align` = "0" OR `align` = "' . floor($u->info['align']) . '") AND `id` = "' . mysql_real_escape_string($id) . '" LIMIT 1'));
if(isset($pl['id']))
{
if($val==NULL)
if (isset($pl['id'])) {
if ($val == null)
$u->addAction(time(), 'start_quest' . $pl['id'], 'go');
else
$u->addAction(time(), 'start_quest' . $pl['id'], 'go', $u->info['id'], $val);
@ -158,17 +152,14 @@ class quests {
/* Îòêàçàòüñÿ îò êâåñòà */
public function endq($id, $tp)
{
global $u,$c;
global $u;
$pl = mysql_fetch_array(mysql_query('SELECT * FROM `quests` WHERE `delete` = "0" AND `min_lvl` <= ' . $u->info['level'] . ' AND `max_lvl` >= ' . $u->info['level'] . ' AND (`align` = "0" OR `align` = "' . floor($u->info['align']) . '") AND `id` = "' . mysql_real_escape_string($id) . '" LIMIT 1'));
$qlst = mysql_fetch_array(mysql_query('SELECT `id` FROM `actions` WHERE `uid` = "' . $u->info['id'] . '" AND `vars` = "start_quest' . $pl['id'] . '" AND `vals` = "go" ORDER BY `id` DESC LIMIT 1'));
if(isset($qlst['id']))
{
if($tp=='end')
{
if (isset($qlst['id'])) {
if ($tp == 'end') {
mysql_query('UPDATE `actions` SET `vals` = "end" WHERE `id` = "' . $qlst['id'] . '" LIMIT 1');
$u->error = 'Âû óñïåøíî îòêàçàëèñü îò çàäàíèÿ &quot;' . $pl['name'] . '&quot;';
}elseif($tp=='win')
{
} elseif ($tp == 'win') {
mysql_query('UPDATE `actions` SET `vals` = "win" ,`time` = "' . time() . '" WHERE `id` = "' . $qlst['id'] . '" LIMIT 1');
}
} else {
@ -177,14 +168,14 @@ class quests {
}
/* Èíôî î êâåñòå â ïåùåðàõ */
public function infoDng($pl) {
$r = '';
global $c,$u;
$r = 0; $t = '';
public function infoDng($pl)
{
global $u;
$r = 0;
$xrz = 0;
$qst = mysql_fetch_array(mysql_query('SELECT * FROM `actions` WHERE `uid` = "' . $u->info['id'] . '" AND `vars` = "start_quest' . $pl['id'] . '" AND `vals` = "go" LIMIT 1'));
//Óñëîâèÿ çàäàíèÿ êîòîðûå äîëæíû óäîâëåòâîðÿòü òåêóùèì õàðàêòåðèñòèêàì
$d = $this->expl($pl['tr_date']);
//$d = $this->expl($pl['tr_date']);
//Äåéñòâèÿ êâåñòà
$d = $this->expl($pl['act_date']);
@ -203,11 +194,8 @@ class quests {
}
//Óáèòü èãðîêîâ
if(isset($d['kill_user']))
{
$x = 0;
if (isset($d['kill_user'])) {
$r += $d['kill_user'];
unset($x);
}
//Óáèòü áîòîâ
@ -223,7 +211,6 @@ class quests {
if (isset($qst['id'])) {
$x2 = $u->testAction('`uid` = "' . $u->info['id'] . '" AND `time` > ' . $qst['time'] . ' AND `vars` = "win_bot_' . $ex2[0] . '" LIMIT ' . $ex2[1], 2);
$x2 = 0 + $x2[0];
}
if (isset($d['all_kill']) && $d['all_kill'] > 0) {
$r = $d['all_kill'];
@ -241,18 +228,12 @@ class quests {
if (isset($d['tk_itm'])) {
$ex = explode(',', $d['tk_itm']);
$i = 0;
$x = '';
while ($i < count($ex)) {
$ex2 = explode('=', $ex[$i]);
$x2 = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `items_users` WHERE `item_id` = "'.mysql_real_escape_string($ex2[0]).'" AND `uid` = "'.$u->info['id'].'" AND (`delete` = 1000 OR `delete` = 0) AND `inTransfer` = 0 AND `inShop` = 0 LIMIT 1'));
$x2[0] = (int)$x2[0];
$x2 = mysql_fetch_row(mysql_query('SELECT COUNT(*) FROM `items_users` WHERE `item_id` = "' . mysql_real_escape_string($ex2[0]) . '" AND `uid` = "' . $u->info['id'] . '" AND (`delete` = 1000 OR `delete` = 0) AND `inTransfer` = 0 AND `inShop` = 0 LIMIT 1'));
if ($x2[0] >= $ex2[1]) {
if( $x2[0] <= ($ex2[1] + round($ex2[1]*0.15)) ){
$x2[0] = $x2[0];
} else {
$x2[0] = ($ex2[1] + round($ex2[1] * 0.15));
}
}
$r += $ex2[1];
$xrz += $x2[0];
$i++;
@ -263,19 +244,12 @@ class quests {
if (isset($d['tkill_itm'])) {
$ex = explode(',', $d['tkill_itm']);
$i = 0;
$x = '';
while ($i < count($ex)) {
$ex2 = explode('=', $ex[$i]);
$x2 = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `items_users` WHERE `maidin` = "'.$pl['city'].'" AND `item_id` = "'.mysql_real_escape_string($ex2[0]).'" AND `uid` = "'.$u->info['id'].'" AND (`delete` = 1000 OR `delete` = 0) AND `inTransfer` = 0 AND `inShop` = 0 LIMIT 1'));
$x2[0] = (int)$x2[0];
$x2 = mysql_fetch_row(mysql_query('SELECT COUNT(*) FROM `items_users` WHERE `maidin` = "' . $pl['city'] . '" AND `item_id` = "' . mysql_real_escape_string($ex2[0]) . '" AND `uid` = "' . $u->info['id'] . '" AND (`delete` = 1000 OR `delete` = 0) AND `inTransfer` = 0 AND `inShop` = 0 LIMIT 1'));
if ($x2[0] >= $ex2[1]) {
if( $x2[0] <= ($ex2[1] + round($ex2[1]*0.15)) ){
$x2[0] = $x2[0];
} else {
$x2[0] = ($ex2[1] + round($ex2[1] * 0.15));
}
}
$bot2 = mysql_fetch_array(mysql_query('SELECT `id`,`name`,`img` FROM `items_main` WHERE `id` = "'.mysql_real_escape_string($ex2[0]).'" LIMIT 1'));
$r += $ex2[1];
$xrz += $x2[0];
$i++;
@ -291,7 +265,6 @@ class quests {
if ($xrz > $r) {
$xrz = $r;
}
//$r = '['.$xrz.'/'.$r.']';
$r = '<table style="display:inline-block;" border="0" cellspacing="0" cellpadding="0" height="10"><tr><td valign="middle" width="120" style="padding-top:12px">
<div style="position:relative;"><div id="vhp-1234500000' . $pl['id'] . '" title="Âûïîëíåíèå çàäàíèÿ" align="left" class="seehp" style="position:absolute; top:-10px; width:120px; height:10px; z-index:12;"> ' . $xrz . '/' . $r . '</div>
<div title="Âûïîëíåíèå çàäàíèÿ" class="hpborder" style="position:absolute; top:-10px; width:120px; height:9px; z-index:13;"><img src="https://img.new-combats.com/1x1.gif" height="9" width="1"></div>
@ -303,25 +276,23 @@ class quests {
}
/* Èíôîðìàöèÿ î êâåñòå */
public function info($pl) {
global $c,$u;
$r = ''; $t = '';
public function info($pl)
{
global $u;
$r = '';
$t = '';
$qst = mysql_fetch_array(mysql_query('SELECT * FROM `actions` WHERE `uid` = "' . $u->info['id'] . '" AND `vars` = "start_quest' . $pl['id'] . '" AND `vals` = "go" LIMIT 1'));
//Óñëîâèÿ çàäàíèÿ êîòîðûå äîëæíû óäîâëåòâîðÿòü òåêóùèì õàðàêòåðèñòèêàì
$d = $this->expl($pl['tr_date']);
//Çàâåðøèòü êâåñòû [ 1,2,3,4,5 ...
if(isset($d['tr_endq']))
{
if (isset($d['tr_endq'])) {
$t .= 'Çàâåðøèòü êâåñòû: ';
$i = 0;
$e = explode(',', $d['tr_endq']);
while($i<=count($e))
{
if($e[$i]>0)
{
while ($i <= count($e)) {
if ($e[$i] > 0) {
$qn = mysql_fetch_array(mysql_query('SELECT `name` FROM `quests` WHERE `id` = "' . $e[$i] . '" LIMIT 1'));
if(isset($qn['name']))
{
if (isset($qn['name'])) {
$t .= '&quot;' . $qn['name'] . '&quot;, ';
}
}
@ -332,8 +303,7 @@ class quests {
unset($qn);
}
//Èç áîòîâ ïàäàþò ïðåäìåòû [ idbot-itm1=%,itm2=%|
if(isset($d['tr_botitm']))
{
if (isset($d['tr_botitm'])) {
$t .= 'Èç áîòîâ âûïàäàþò ïðåäìåòû:<ul>';
$e = explode('|', $d['tr_botitm']);
$i = 0;
@ -348,10 +318,8 @@ class quests {
$t .= '&nbsp; &nbsp; &bull; Èç ëþáûõ áîòîâ âûïàäàåò: ';
}
//$e2[1] - ïðåäìåòû
$j = 0;
$e3 = explode(',', $e2[1]);
while($j<count($e3))
{
while ($j < count($e3)) {
$e4 = explode('=', $e3[$j]);
//$e4[0] - ïðåäìåò , $e4[1] - øàíñ
$qi = mysql_fetch_array(mysql_query('SELECT `id`,`name`,`img` FROM `items_main` WHERE `id` = "' . $e4[0] . '" LIMIT 1'));
@ -365,19 +333,15 @@ class quests {
unset($qn, $qi, $e2, $e3, $e4);
}
//Ïðè âûéãðûøå ïàäàþò ïðåäìåòû [ type-itm1=%,itm2=%|
if(isset($d['tr_winitm']))
{
if (isset($d['tr_winitm'])) {
$t .= 'Ïîñëå ïîáåäû âûïàäàþò ïðåäìåòû:<br>';
$e = explode('|', $d['tr_winitm']);
$i = 0;
while($i<count($e))
{
$j = 0;
while ($i < count($e)) {
$e2 = explode('-', $e[$i]);
$t .= '&nbsp; &nbsp; &bull; ';
//$e2[0] - id áîòà
if($e2[0]>0)
{
if ($e2[0] > 0) {
$t .= 'Èç ëþäåé âûïàäàåò: ';
} else {
$t .= 'Èç áîòîâ âûïàäàåò: ';
@ -385,8 +349,7 @@ class quests {
//$e2[1] - ïðåäìåòû
$j = 0;
$e3 = explode(',', $e2[1]);
while($j<count($e3))
{
while ($j < count($e3)) {
$e4 = explode('=', $e3[$j]);
//$e4[0] - ïðåäìåò , $e4[1] - øàíñ
$qi = mysql_fetch_array(mysql_query('SELECT `id`,`name`,`img` FROM `items_main` WHERE `id` = "' . $e4[0] . '" LIMIT 1'));
@ -400,20 +363,17 @@ class quests {
unset($qn, $qi, $e2, $e3, $e4);
}
//Çàäåðæêà ìåæäó âûïîëíåíèåì êâåñòà
if(isset($d['tr_zdr']))
{
if (isset($d['tr_zdr'])) {
$qlst = mysql_fetch_array(mysql_query('SELECT * FROM `actions` WHERE `uid` = "' . $u->info['id'] . '" AND `vars` = "start_quest' . $pl['id'] . '" AND `vals` != "go" LIMIT 1'));
$t .= 'Çàäåðæêà ìåæäó âûïîëíåíèåì çàäàíèÿ: ' . $u->timeOut($d['tr_zdr'] * 60 * 60);
if($qlst['time']+($d['tr_zdr']*60*60)-time()>0)
{
if ($qlst['time'] + ($d['tr_zdr'] * 60 * 60) - time() > 0) {
$t .= '<small>(Îñòàëîñü: ' . $u->timeOut($qlst['time'] + ($d['tr_zdr'] * 60 * 60) - time()) . ' ÷.)</small>';
}
$t .= '<br>';
unset($qlst);
}
//Ïåðåîäè÷íîñòü êâåñòà
if(isset($d['tr_tm1']))
{
if (isset($d['tr_tm1'])) {
$d['tr_tm1'] = str_replace('d', date('d'), $d['tr_tm1']);
$d['tr_tm1'] = str_replace('m', date('m'), $d['tr_tm1']);
$d['tr_tm1'] = str_replace('y', date('y'), $d['tr_tm1']);
@ -425,10 +385,8 @@ class quests {
$t .= 'Ïåðèîä êâåñòà: ' . $d['tr_tm1'] . ' - ' . $d['tr_tm2'] . '<br>';
}
//Ñêîëüêî ðàç ìîæíî ïðîéòè êâåñò
if(isset($d['tr_raz']))
{
if($d['tr_raz']==-1)
{
if (isset($d['tr_raz'])) {
if ($d['tr_raz'] == -1) {
$t .= 'Ñêîëüêî åùå ðàç ìîæíî âûïîëíèòü çàäàíèå: <b><small>áåñêîíå÷íî</small></b><br>';
} else {
$qlst = $u->testAction('SELECT `id` FROM `actions` WHERE `uid` = "' . $u->info['id'] . '" AND `vars` = "start_quest' . $pl['id'] . '" LIMIT ' . $d['tr_raz'], 2);
@ -437,15 +395,13 @@ class quests {
unset($qlst);
}
//Ïîïûòîê ïðîéòè êâåñò
if(isset($d['tr_raz2']))
{
if (isset($d['tr_raz2'])) {
$qlst = $u->testAction('SELECT `id` FROM `actions` WHERE `uid` = "' . $u->info['id'] . '" AND `vars` = "start_quest' . $pl['id'] . '" AND `vals` != "go" AND `vals` != "win" LIMIT ' . $d['tr_raz2'], 2);
$t .= 'Îñòàëîñü ïîïûòîê âûïîëíèòü çàäàíèå: ' . ($d['tr_raz2'] - $qlst[0]) . '<br>';
unset($qlst);
}
if($t!='')
{
if ($t != '') {
$r .= '<b>Óñëîâèÿ çàäàíèÿ:</b><br>' . $t . '<br>';
$t = '';
}
@ -453,8 +409,7 @@ class quests {
//Íàãðàäà çà êâåñò
$d = $this->expl($pl['win_date']);
if(isset($d['add_eff']))
{
if (isset($d['add_eff'])) {
$x5 = '';
$x3 = explode(',', $d['add_eff']);
$x4 = 0;
@ -468,34 +423,24 @@ class quests {
$x4++;
}
if ($x5 != '') {
$t .= ''.$x5.'<br>';
$t .= $x5 . '<br>';
}
unset($x3, $x4, $x5, $x6, $x7);
}
if(isset($d['add_rep']))
{
//if($pl['city']!='')
//{
if (isset($d['add_rep'])) {
$t .= 'Ðåïóòàöèÿ ' . $u->city_name[$pl['city']] . ': ' . $d['add_rep'] . '<br>';
//}
}
if(isset($d['add_repizlom']))
{
//if($pl['city']!='')
//{
if (isset($d['add_repizlom'])) {
$t .= 'Ðåïóòàöèÿ Èçëîì Õàîñà: ' . $d['add_repizlom'] . '<br>';
//}
}
if(isset($d['add_cr']))
{
if (isset($d['add_cr'])) {
$t .= 'Äåíüãè: ' . $d['add_cr'] . ' êð.<br>';
}
if($t!='')
{
if ($t != '') {
$r = '<b>Íàãðàäà:</b><br>' . $t . '<br>' . $r;
$t = '';
}
@ -524,18 +469,13 @@ class quests {
}
//Óáèòü èãðîêîâ
if(isset($d['kill_user']))
{
$x = 0;
$t .= 'Óáèòü èãðîêîâ: '.$x.'/'.$d['kill_user'].'<br>';
unset($x);
if (isset($d['kill_user'])) {
$t .= 'Óáèòü èãðîêîâ: 0/' . $d['kill_user'] . '<br>';
}
//Óáèòü áîòîâ
if (isset($d['kill_bot'])) {
if (isset($d['all_kill']) && (int)$d['all_kill'] > 0) {
$x = '';
$ex = explode(',', $d['kill_bot']);
@ -543,14 +483,18 @@ class quests {
$q = '';
while ($i < count($ex)) {
$ex2 = explode('=', $ex[$i]);
if($q != '') $q .= ' OR ';
if ($q != '') {
$q .= ' OR ';
}
$q .= ' (`uid` = "' . $u->info['id'] . '" AND `time` > ' . $qst['time'] . ' AND `vars` = "win_bot_' . $ex2[0] . '" )';
$i++;
}
$x2 = $u->testAction($q, 2); $x2 = $x2[0];
if($d['all_kill'] < $x2) $x2 = $d['all_kill'];
$x2 = $u->testAction($q, 2);
$x2 = $x2[0];
if ($d['all_kill'] < $x2) {
$x2 = $d['all_kill'];
}
$bot2 = mysql_fetch_array(mysql_query('SELECT * FROM `test_bot` WHERE `id` = "' . $ex2[0] . '" LIMIT 1'));
$bot2['id'] = $bot2['id'];
if (isset($bot2['id'])) {
$x .= '&nbsp; &nbsp; &bull; <b>' . $bot2['login'] . '</b> [' . $x2 . '/' . $d['all_kill'] . ']<br>';
} else {
@ -559,28 +503,23 @@ class quests {
} else {
$i = 0;
while ($i < count($ex)) {
$x2 = 0;
$ex2 = explode('=', $ex[$i]);
$bot2 = mysql_fetch_array(mysql_query('SELECT * FROM `test_bot` WHERE `id` = "' . $ex2[0] . '" LIMIT 1'));
if (isset($bot2['id'])) {
if (isset($qst['id'])) {
$x2 = $u->testAction('`uid` = "' . $u->info['id'] . '" AND `time` > ' . $qst['time'] . ' AND `vars` = "win_bot_' . $ex2[0] . '" LIMIT ' . $ex2[1], 2);
$x2 = 0 + $x2[0];
}
$x .= '&nbsp; &nbsp; &bull; <b>' . $bot2['login'] . '</b> [' . $x2 . '/' . $ex2[1] . ']<br>';
}
$i++;
}
}
if($x!='')
{
if ($x != '') {
$x = trim($x, ', ');
$t .= 'Óáèòü áîòîâ: <br>'.$x.'';
$t .= 'Óáèòü áîòîâ: <br>' . $x;
}
unset($x, $ex, $x2, $bot2, $ex2);
}
@ -592,23 +531,17 @@ class quests {
$x = '';
while ($i < count($ex)) {
$ex2 = explode('=', $ex[$i]);
$x2 = mysql_fetch_array(mysql_query('SELECT COUNT(*) as count FROM `items_users` WHERE `item_id` = "'.mysql_real_escape_string($ex2[0]).'" AND `uid` = "'.$u->info['id'].'" AND (`delete` = 1000 OR `delete` = 0) AND `inTransfer` = 0 AND `inShop` = 0 LIMIT 1'));
$x2[0] = (int)$x2[0];
$x2 = mysql_fetch_row(mysql_query('SELECT COUNT(*) FROM `items_users` WHERE `item_id` = "' . mysql_real_escape_string($ex2[0]) . '" AND `uid` = "' . $u->info['id'] . '" AND (`delete` = 1000 OR `delete` = 0) AND `inTransfer` = 0 AND `inShop` = 0 LIMIT 1'));
if ($x2[0] >= $ex2[1]) {
if( $x2[0] <= ($ex2[1] + round($ex2[1]*0.15)) ){
$x2[0] = $x2[0];
} else {
$x2[0] = ($ex2[1] + round($ex2[1] * 0.15));
}
}
$bot2 = mysql_fetch_array(mysql_query('SELECT `id`,`name`,`img` FROM `items_main` WHERE `id` = "' . mysql_real_escape_string($ex2[0]) . '" LIMIT 1'));
$x .= '&nbsp; &nbsp; &bull; <a target=_blank href=https://new-combats.com/item/' . $bot2['id'] . ' >' . $bot2['name'] . '</a> [' . $x2[0] . '/' . $ex2[1] . ']<br>';
$i++;
}
if($x!='')
{
if ($x != '') {
$x = trim($x, ', ');
$t .= 'Ñîáðàòü ðåñóðñû: <br>'.$x.'';
$t .= 'Ñîáðàòü ðåñóðñû: <br>' . $x;
}
}
@ -619,23 +552,17 @@ class quests {
$x = '';
while ($i < count($ex)) {
$ex2 = explode('=', $ex[$i]);
$x2 = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `items_users` WHERE `maidin` = "'.$pl['city'].'" AND `item_id` = "'.mysql_real_escape_string($ex2[0]).'" AND `uid` = "'.$u->info['id'].'" AND (`delete` = 1000 OR `delete` = 0) AND `inTransfer` = 0 AND `inShop` = 0 LIMIT 1'));
$x2[0] = (int)$x2[0];
$x2 = mysql_fetch_row(mysql_query('SELECT COUNT(*) FROM `items_users` WHERE `maidin` = "' . $pl['city'] . '" AND `item_id` = "' . mysql_real_escape_string($ex2[0]) . '" AND `uid` = "' . $u->info['id'] . '" AND (`delete` = 1000 OR `delete` = 0) AND `inTransfer` = 0 AND `inShop` = 0 LIMIT 1'));
if ($x2[0] >= $ex2[1]) {
if( $x2[0] <= ($ex2[1] + round($ex2[1]*0.15)) ){
$x2[0] = $x2[0];
} else {
$x2[0] = ($ex2[1] + round($ex2[1] * 0.15));
}
}
$bot2 = mysql_fetch_array(mysql_query('SELECT `id`,`name`,`img` FROM `items_main` WHERE `id` = "' . mysql_real_escape_string($ex2[0]) . '" LIMIT 1'));
$x .= '&nbsp; &nbsp; &bull; <a target=_blank href=https://new-combats.com/item/' . $bot2['id'] . ' >' . $bot2['name'] . '</a> [' . $x2[0] . '/' . $ex2[1] . ']<br>';
$i++;
}
if($x!='')
{
if ($x != '') {
$x = trim($x, ', ');
$t .= 'Ñîáðàòü òðîôåè: <br>'.$x.'';
$t .= 'Ñîáðàòü òðîôåè: <br>' . $x;
}
}
@ -644,26 +571,20 @@ class quests {
$t = '';
}
if ($r == '') {
$r = 'Äîïîëíèòåëüíàÿ èíôîðìàöèÿ ïî çàäàíèþ îòñóòñòâóåò';
}
return $r;
}
public function takeInfo($id)
/** Íåèçâåñòíî ïî÷åìó ëîìàåò ïëàâêó ðóí.
* PHP Fatal error: Call to a member function testquest() on a non-object
* @return void
*/
public function testquest()
{
global $u;
$r = '';
return $r;
}
public function testquest(){
global $c, $u, $code;
if ($u->info['battle'] == 0 && $u->room['name'] != 'Áàøíÿ Ñìåðòè') {
//$time = mysql_fetch_array( mysql_query('SELECT * FROM `dungeon_room` WHERE `dungeon_room` = "'.$u->info['room'].'" LIMIT 1') ); // Ïðèâÿçêà çàäàíèé ê ïîäçåìåëüþ!
// AND `room` = '.$time['id'].'
$sp = mysql_query('SELECT * FROM `actions` WHERE `uid` = "' . $u->info['id'] . '" AND `vars` LIKE "%start_quest%" AND `vals` = "go" LIMIT 100');
while ($pl2 = mysql_fetch_array($sp)) {
@ -695,13 +616,15 @@ class quests {
$q = '';
while ($ii < count($ex)) {
$ex2 = explode('=', $ex[$ii]);
if($q != '') $q .= ' OR ';
if ($q != '') {
$q .= ' OR ';
}
$q .= ' (`uid` = "' . $u->info['id'] . '" AND `time` > ' . $pl2['time'] . ' AND `vars` = "win_bot_' . $ex2[0] . '" )';
$ii++;
}
if (isset($d['all_kill']) && $d['all_kill'] > 0) {
$x2 = $u->testAction($q . ' LIMIT ' . $d['all_kill'], 2);
if(isset($d['all_kill']) && $x2[0]<$d['all_kill']){
if ($x2[0] < $d['all_kill']) {
$g = 0;
}
} else {
@ -712,31 +635,14 @@ class quests {
}
unset($x, $ex, $x2, $x3, $bot2, $ex2);
}
//Ñîáðàòü ðåñóðñû
if (isset($d['tk_itm'])) {
$ex = explode(',',$d['tk_itm']);
$i = 0;
while($i < count($ex)) {
$ex2 = explode('=',$ex[$i]);
$x2 = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `items_users` WHERE `item_id` = "'.mysql_real_escape_string($ex2[0]).'" AND `uid` = "'.$u->info['id'].'" AND (`delete` = 1000 OR `delete` = 0) AND `inTransfer` = 0 AND `inShop` = 0 LIMIT 1'));
if( $x2[0] < $ex2[1] ) {
$g = 0;
}
$i++;
}
$g = $this->collect_01(explode(',', $d['tk_itm']), $u);
}
//Ñîáèðàíèå òðîôååâ
if (isset($d['tkill_itm'])) {
$ex = explode(',',$d['tkill_itm']);
$i = 0;
while($i < count($ex)) {
$ex2 = explode('=',$ex[$i]);
$x2 = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `items_users` WHERE `item_id` = "'.mysql_real_escape_string($ex2[0]).'" AND `uid` = "'.$u->info['id'].'" AND (`delete` = 1000 OR `delete` = 0) AND `inTransfer` = 0 AND `inShop` = 0 LIMIT 1'));
if( $x2[0] < $ex2[1] ) {
$g = 0;
}
$i++;
}
$g = $this->collect_01(explode(',', $d['tkill_itm']), $u);
}
if ($g == 1) {
$pl['time'] = $pl2['time'];
@ -748,9 +654,43 @@ class quests {
}
}
private function collect_01($arr, $u){ // óáèðàþ äóáëèðîâàíèå. õåð ïîéìè ÷òî ïðîâåðÿåì, õç êàê íàçâàòü.
$i = 0;
while ($i < count($arr)) {
$ex2 = explode('=', $arr[$i]);
$x2 = mysql_fetch_row(mysql_query('SELECT COUNT(*) FROM `items_users` WHERE `item_id` = ' . (int)$arr[0] . ' AND `uid` = ' . $u->info['id'] . ' AND (`delete` = 1000 OR `delete` = 0) AND `inTransfer` = 0 AND `inShop` = 0 LIMIT 1'));
if ($x2[0] < $ex2[1]) {
return 0;
}
$i++;
}
return 1;
}
private function collect_02($ex, $u, $pl) { // óáèðàþ äóáëèðîâàíèå. õåð ïîéìè ÷òî ïðîâåðÿåì, õç êàê íàçâàòü.
$i = 0;
while ($i < count($ex)) {
$ex2 = explode('=', $ex[$i]);
$x2 = mysql_fetch_row(mysql_query('SELECT COUNT(*) FROM `items_users` WHERE `maidin` = "' . $pl['city'] . '" AND `item_id` = "' . mysql_real_escape_string($ex2[0]) . '" AND `uid` = "' . $u->info['id'] . '" AND (`delete` = 1000 OR `delete` = 0) AND `inTransfer` = 0 AND `inShop` = 0 LIMIT 1'));
if ($x2[0] >= $ex2[1]) {
if ($x2[0] <= ($ex2[1] + round($ex2[1] * 0.15))) {
$ex2[1] = $x2[0];
} else {
$ex2[1] = ($ex2[1] + round($ex2[1] * 0.15));
}
}
if ($x2[0] < $ex2[1]) {
return 0;
}
$i++;
}
return 1;
}
# Ôóíêöèÿ îòâå÷àåò çà ÏÐÎÂÅÐÊÓ íà ÇÀÂÅÐØÅÍÈÅ êâåñòîâ äëÿ ÏÎÄÇÅÌÎÊ
public function questCheckEnd( $pl ) {
global $u, $c, $magic;
public function questCheckEnd($pl)
{
global $u;
$quest = mysql_fetch_array(mysql_query('SELECT * FROM `actions` WHERE `uid` = "' . $u->info['id'] . '" AND `vars` = "start_quest' . $pl['id'] . '" ORDER BY `time` DESC LIMIT 1'));
#Ïðîâåðÿåì êâåñò, çàâåðøåí = 0 íåò, 1 äà.
$r = 0;
@ -781,7 +721,9 @@ class quests {
$q = '';
while ($i < count($ex)) {
$ex2 = explode('=', $ex[$i]);
if($q != '') $q .= ' OR ';
if ($q != '') {
$q .= ' OR ';
}
$q .= ' (`uid` = "' . $u->info['id'] . '" AND `time` > ' . $quest['time'] . ' AND `vars` = "win_bot_' . $ex2[0] . '" )';
$i++;
}
@ -797,93 +739,56 @@ class quests {
}
} else {
$x2 = $u->testAction($q . ' LIMIT ' . $ex2[1], 2);
if( $ex2[1] < $x2[0] ) {
$x2 = $ex2[1];
} else {
$x2 = $x2[0];
}
$x2 = min($ex2[1], $x2[0]);
if ($x2 < $ex2[1]) {
$g = 0;
}
}
unset($x, $ex, $x2, $x3, $bot2, $ex2);
}
# Ñîáðàòü ðåñóðñû
if (isset($d['tk_itm'])) {
$ex = explode(',',$d['tk_itm']);
$i = 0;
while( $i < count($ex) ) {
$ex2 = explode('=',$ex[$i]);
$x2 = mysql_fetch_array(mysql_query('SELECT COUNT(*) as count FROM `items_users` WHERE `maidin` = "'.$pl['city'].'" AND `item_id` = "'.mysql_real_escape_string($ex2[0]).'" AND `uid` = "'.$u->info['id'].'" AND (`delete` = 1000 OR `delete` = 0) AND `inTransfer` = 0 AND `inShop` = 0 LIMIT 1'));
$x2['count'] = (int)$x2['count'];
if( $x2['count'] >= $ex2[1] ) {
if( $x2['count'] <= ($ex2[1] + round($ex2[1]*0.15)) ) {
$ex2[1] = $x2['count'];
} else {
$ex2[1] = ($ex2[1] + round($ex2[1]*0.15));
}
}
if( $x2[0] < $ex2[1] ) {
$g = 0;
}
$i++;
}
$g = $this->collect_02(explode(',', $d['tk_itm']), $u, $pl);
}
# Ñîáèðàíèå òðîôååâ
if (isset($d['tkill_itm'])) {
$ex = explode(',',$d['tkill_itm']);
$i = 0;
while( $i < count($ex) ) {
$ex2 = explode('=',$ex[$i]);
$x2 = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `items_users` WHERE `maidin` = "'.$pl['city'].'" AND `item_id` = "'.mysql_real_escape_string($ex2[0]).'" AND `uid` = "'.$u->info['id'].'" AND (`delete` = 1000 OR `delete` = 0) AND `inTransfer` = 0 AND `inShop` = 0 LIMIT 1'));
$x2['count'] = (int)$x2['count'];
if( $x2['count'] >= $ex2[1] ) {
if( $x2['count'] <= ($ex2[1] + round($ex2[1]*0.15)) ) {
$ex2[1] = $x2['count'];
} else {
$ex2[1] = ($ex2[1] + round($ex2[1]*0.15));
$g = $this->collect_02(explode(',', $d['tkill_itm']), $u, $pl);
}
}
if( $x2[0] < $ex2[1] ) {
$g = 0;
}
$i++;
}
}
if( $g == 1 ) {
$r = 1;
} else $r = 0;
$r = $g == 1 ? 1 : 0;
}
return $r;
}
public function questSuccesEnd( $quest , $action ) {
/** Âûäà÷à íàãðàä çà ïåùåðû */
public function questSuccesEnd($quest, $action)
{
global $u, $c, $magic;
$r = '';
if( isset($quest['id']) ) {
if (!isset($quest['id'])) {
return '';
}
$d = $this->expl($quest['act_date']);
$d = array_merge($d, $this->expl($quest['win_date']));
// Çàáèðàåì ðåñóðñû èëè òðîôåè
if( isset($d['tk_itm']) OR isset($d['tkill_itm']) ) {
if( isset($d['tk_itm']) AND isset($d['tkill_itm']) ) {
if (isset($d['tk_itm']) || isset($d['tkill_itm'])) {
$ex = [];
if (isset($d['tk_itm'])) {
$ex[0] = explode(',', $d['tk_itm']);
}
if (isset($d['tkill_itm'])) {
$ex[1] = explode(',', $d['tkill_itm']);
} elseif( isset($d['tk_itm']) ) {
$ex = explode(',',$d['tk_itm']);
} elseif( isset($d['tkill_itm']) ) {
$ex = explode(',',$d['tkill_itm']);
}
$i = 0;
while ($i < count($ex)) {
$ex2 = explode('=', $ex[$i]);
$x2 = mysql_fetch_array(mysql_query('SELECT COUNT(*) as count FROM `items_users` WHERE `maidin` = "'.$quest['city'].'" AND `item_id` = "'.mysql_real_escape_string($ex2[0]).'" AND `uid` = "'.$u->info['id'].'" AND (`delete` = 1000 OR `delete` = 0) AND `inTransfer` = 0 AND `inShop` = 0 LIMIT 1'));
$x2['count'] = (int)$x2['count'];
if( $x2['count'] >= $ex2[1] ) {
if( $x2['count'] <= ($ex2[1] + round($ex2[1]*0.15)) ){
$ex2[1] = $x2['count'];
$x2 = mysql_fetch_row(mysql_query('SELECT COUNT(*) FROM `items_users` WHERE `maidin` = "' . $quest['city'] . '" AND `item_id` = "' . mysql_real_escape_string($ex2[0]) . '" AND `uid` = "' . $u->info['id'] . '" AND (`delete` = 1000 OR `delete` = 0) AND `inTransfer` = 0 AND `inShop` = 0 LIMIT 1'));
if ($x2[0] >= $ex2[1]) {
if ($x2[0] <= ($ex2[1] + round($ex2[1] * 0.15))) {
$ex2[1] = $x2[0];
} else {
$ex2[1] = ($ex2[1] + round($ex2[1] * 0.15));
}
@ -920,24 +825,27 @@ class quests {
}
unset($x, $i, $ii, $ex, $x2, $bot2, $ex2);
$rep = mysql_fetch_array(mysql_query('SELECT * FROM `rep` WHERE `id` = ' . $u->info['id']));
if ($quest['city'] != '') {
if ($this->stats['more_awards'] >= 0) {
$d['add_rep'] += $d['add_rep'] / 100 * 50;
}
$t .= '' . $d['add_rep'] . ' åä. ðåïóòàöèè ' . $u->city_name[$quest['city']] . ', ';
$rep = mysql_fetch_array(mysql_query('SELECT * FROM `rep` WHERE `id` = "'.$u->info['id'].'" LIMIT 1'));
# Ðûöàðêè
/*if($rep['rep'.$quest['city']] < 10000 && $rep['rep'.$quest['city']] + $d['add_rep'] >= 10000 && $quest['kin'] != 1) {
$rep['rep'.$quest['city']] = 9999;
} else*/if($rep['rep'.$quest['city']] < 24999 && $rep['rep'.$quest['city']] + $d['add_rep'] >= 24999 && $quest['kin'] != 2) {
if (
$rep['rep' . $quest['city']] < 24999 &&
$rep['rep' . $quest['city']] + $d['add_rep'] >= 24999 &&
$quest['kin'] != 2
) {
$rep['rep' . $quest['city']] = 24999;
} else {
$rep['rep' . $quest['city']] += $d['add_rep'];
}
mysql_query('UPDATE `rep` SET `rep' . $quest['city'] . '` = "' . $rep['rep' . $quest['city']] . '" WHERE `id` = "' . $rep['id'] . '" LIMIT 1');
}
}
if (isset($d['add_repizlom'])) {
$t .= '' . $d['add_repizlom'] . ' åä. ðåïóòàöèè Èçëîìà Õàîñà, ';
$rep = mysql_fetch_array(mysql_query('SELECT * FROM `rep` WHERE `id` = "' . $u->info['id'] . '" LIMIT 1'));
@ -947,9 +855,9 @@ class quests {
}
mysql_query('UPDATE `rep` SET `repizlom` = "' . $rep['repizlom'] . '" WHERE `id` = "' . $rep['id'] . '" LIMIT 1');
}
if (isset($d['add_eff'])) {
$i = 0; $j = explode('=',$d['add_eff']);
$i = 0;
$j = explode('=', $d['add_eff']);
while ($i < count($j)) {
if ($j[$i] > 0) {
$magic->add_eff($u->info['id'], $j[$i], 1);
@ -957,12 +865,10 @@ class quests {
$i++;
}
}
if (isset($d['add_cr'])) {
$t .= '' . $d['add_cr'] . ' êð., ';
mysql_query('UPDATE `users` SET `money` = `money`+' . $d['add_cr'] . ' WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
}
if ($t != '') {
$t = rtrim($t, ', ');
$r = 'Çàäàíèå <b>' . $quest['name'] . '</b> áûëî óñïåøíî âûïîëíåíî! Âû ïîëó÷èëè íàãðàäó: ' . $t . '.';
@ -970,19 +876,17 @@ class quests {
} else {
$r = 'Çàäàíèå <b>' . $quest['name'] . '</b> áûëî óñïåøíî âûïîëíåíî!';
}
$r = '<small>' . $r . '</small>';
//Îòïðàâëÿåì ñîîáùåíèå â ÷àò
mysql_query('UPDATE `actions` SET `vals` = "win" , `time` = "' . time() . '" WHERE `id` = "' . $action['id'] . '" AND `vals` = "go" LIMIT 1');
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','" . $u->info['city'] . "','" . $u->info['room'] . "','','" . $u->info['login'] . "','" . $r . "','-1','5','0')");
}
return $r;
}
public function winQuest( $pl ) {
public function winQuest($pl)
{
global $u, $c, $magic;
if (isset($pl['id'])) {
@ -1047,7 +951,8 @@ class quests {
// Ðûöàðêè
/*if($rep['rep'.$pl['city']] < 10000 && $rep['rep'.$pl['city']] + $d['add_rep'] >= 10000 && $pl['kin'] != 1) {
$rep['rep'.$pl['city']] = 9999;
} else*/if($rep['rep'.$pl['city']] < 24999 && $rep['rep'.$pl['city']] + $d['add_rep'] >= 24999 && $pl['kin'] != 2) {
} else*/
if ($rep['rep' . $pl['city']] < 24999 && $rep['rep' . $pl['city']] + $d['add_rep'] >= 24999 && $pl['kin'] != 2) {
$rep['rep' . $pl['city']] = 24999;
} else {
$rep['rep' . $pl['city']] += $d['add_rep'];
@ -1067,7 +972,8 @@ class quests {
}
if (isset($d['add_eff'])) {
$i = 0; $j = explode('=',$d['add_eff']);
$i = 0;
$j = explode('=', $d['add_eff']);
while ($i < count($j)) {
if ($j[$i] > 0) {
$magic->add_eff($u->info['id'], $j[$i], 1);
@ -1094,22 +1000,20 @@ class quests {
}
}
public function expl($d) {
private function expl($d)
{
$i = 0;
$dr = [];
$e = explode(':|:', $d);
while($i<count($e))
{
while ($i < count($e)) {
$t = explode(':=:', $e[$i]);
if(isset($t[0]))
{
if (isset($t[0])) {
$dr[$t[0]] = $t[1];
}
$i++;
}
unset($i,$e,$t);
return $dr;
}
}
$q = new quests;
?>

File diff suppressed because it is too large Load Diff

View File

@ -181,7 +181,7 @@ class dialog
$act0 = explode('=',$act[0]);
if( $act0[0] == 'fileqst' ) {
if(file_exists('_incl_data/class/quest/'.htmlspecialchars($act0[1]).'.php')) {
include('_incl_data/class/quest/'.htmlspecialchars($act0[1]).'.php');
require_once('_incl_data/class/quest/'.htmlspecialchars($act0[1]).'.php');
}else{
$txt .= '<br><b><font color=red>Êâåñò íå íàéäåí â ñïèñêàõ NPS...</b></font>';
}

View File

@ -1,7 +1,7 @@
<?php
define('GAME',time());
include('_incl_data/class/__db_connect.php');
require_once('_incl_data/class/__db_connect.php');
if (isset($_COOKIE['login']))
{
$u = mysql_fetch_array(mysql_query('SELECT `id`,`admin` FROM `users` WHERE `login` = "'.mysql_real_escape_string($_COOKIE['login']).'" AND `pass` = "'.mysql_real_escape_string($_COOKIE['pass']).'" LIMIT 1'));

View File

@ -6,7 +6,7 @@ $tm = explode(' ', $tm);
$tm = $tm[0] + $tm[1];
if (!isset($CRON_CORE)) {
include('../../_incl_data/__config.php');
require_once('../../_incl_data/__config.php');
}
if (isset($_GET['cron_core'])) {
@ -19,7 +19,7 @@ if (isset($_GET['cron_core'])) {
if (!isset($CRON_CORE)) {
define('GAME', true);
include('../../_incl_data/class/__db_connect.php');
require_once('../../_incl_data/class/__db_connect.php');
}
function e($t)
@ -62,10 +62,10 @@ if ($_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest' || isset($CRON_CORE))
unset($tm);
$js = '';
include('../../_incl_data/class/__user.php');
include('../../_incl_data/class/__magic.php');
include('../../_incl_data/class/_cron_.php');
include('../../_incl_data/class/__quest.php');
require_once('../../_incl_data/class/__user.php');
require_once('../../_incl_data/class/__magic.php');
require_once('../../_incl_data/class/_cron_.php');
require_once('../../_incl_data/class/__quest.php');
if ($u->info['battle'] == 0) {
$btl_last = mysql_fetch_array(mysql_query('SELECT `id`,`battle` FROM `battle_users` WHERE `uid` = "' . $u->info['id'] . '" AND `finish` = "0" LIMIT 1'));
@ -98,8 +98,8 @@ if ($_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest' || isset($CRON_CORE))
}
}
include('../../_incl_data/class/__battle.php');
include('log_text.php');
require_once('../../_incl_data/class/__battle.php');
require_once('log_text.php');
$btl->is = $u->is;
$btl->items = $u->items;
$btl->info = $btl->battleInfo($u->info['battle']);

View File

@ -18,22 +18,8 @@
$tm = explode(' ',$tm);
$tm = $tm[0]+$tm[1];
if(!isset($CRON_CORE)) {
//include('../../_incl_data/__config.php');
/*if($_SESSION['tbr']>$tm)
{
die('<script>ggcode="'.$code.'";if(t057!=null){clearTimeout(t057);}</script>');
}else{
$_SESSION['tbr'] = $tm+0.350;
}*/
}
unset($tm);
$js = '';
//include('../../_incl_data/class/__user.php');
//include('../../_incl_data/class/__magic.php');
//include('../../_incl_data/class/_cron_.php');
//include('../../_incl_data/class/__quest.php');
if( $u->info['battle'] == 0 ) {
$btl_last = mysql_fetch_array(mysql_query('SELECT `id`,`battle` FROM `battle_users` WHERE `uid` = "'.$u->info['id'].'" AND `finish` = "0" LIMIT 1'));

View File

@ -19,7 +19,7 @@
$tm = $tm[0]+$tm[1];
if(!isset($CRON_CORE)) {
//include('../../_incl_data/__config.php');
//require_once('../../_incl_data/__config.php');
/*if($_SESSION['tbr']>$tm)
{
die('<script>ggcode="'.$code.'";if(t057!=null){clearTimeout(t057);}</script>');
@ -30,10 +30,10 @@
unset($tm);
$js = '';
//include('../../_incl_data/class/__user.php');
//include('../../_incl_data/class/__magic.php');
//include('../../_incl_data/class/_cron_.php');
//include('../../_incl_data/class/__quest.php');
//require_once('../../_incl_data/class/__user.php');
//require_once('../../_incl_data/class/__magic.php');
//require_once('../../_incl_data/class/_cron_.php');
//require_once('../../_incl_data/class/__quest.php');
if( $u->info['battle'] == 0 ) {
$btl_last = mysql_fetch_array(mysql_query('SELECT `id`,`battle` FROM `battle_users` WHERE `uid` = "'.$u->info['id'].'" AND `finish` = "0" LIMIT 1'));

View File

@ -15,7 +15,7 @@ if(getIPblock() != $_SERVER['SERVER_ADDR'] && getIPblock() != '127.0.0.1' && get
*/
define('GAME',true);
include('../../_incl_data/class/__db_connect.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').' (Êðèòè÷åñêàÿ îøèáêà): <b>'.mysql_real_escape_string($t).'</b>","capitalcity","-NIGHTmare-","6","1","-1")');
@ -67,7 +67,7 @@ if(isset($CRON_CORE))
$tm = $tm[0]+$tm[1];
if(!isset($CRON_CORE)) {
include('../../_incl_data/__config.php');
require_once('../../_incl_data/__config.php');
if($_SESSION['tbr']>$tm)
{
die('<script>ggcode="'.$code.'";if(t057!=null){clearTimeout(t057);}</script>');
@ -78,10 +78,10 @@ if(isset($CRON_CORE))
unset($tm);
$js = '';
include('../../_incl_data/class/__user.php');
include('../../_incl_data/class/__magic.php');
include('../../_incl_data/class/_cron_.php');
include('../../_incl_data/class/__quest.php');
require_once('../../_incl_data/class/__user.php');
require_once('../../_incl_data/class/__magic.php');
require_once('../../_incl_data/class/_cron_.php');
require_once('../../_incl_data/class/__quest.php');
if(!isset($CRON_CORE)) {
if(!isset($u->info['id']) || ($u->info['joinIP']==1 && $u->info['ip']!=$_SERVER['HTTP_X_REAL_IP']))
@ -98,8 +98,8 @@ if(isset($CRON_CORE))
mysql_query("UPDATE `users` SET `online`='".time()."',`timeMain`='".time()."' WHERE `id`='".$u->info['id']."' LIMIT 1");
}
}
include('../../_incl_data/class/__battle.php');
include('log_text.php');
require_once('../../_incl_data/class/__battle.php');
require_once('log_text.php');
$btl->is = $u->is;
$btl->items = $u->items;
$btl->info = $btl->battleInfo($u->info['battle']);

View File

@ -4,7 +4,7 @@ die();
if(!isset($CRON_CORE)) {
define('GAME',true);
include('../../_incl_data/class/__db_connect.php');
require_once('../../_incl_data/class/__db_connect.php');
}
function e($t) {
@ -58,7 +58,7 @@ if($_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest' || isset($CRON_CORE))
$tm = $tm[0]+$tm[1];
if(!isset($CRON_CORE)) {
include('../../_incl_data/__config.php');
require_once('../../_incl_data/__config.php');
if($_SESSION['tbr']>$tm)
{
die('<script>ggcode="'.$code.'";if(t057!=null){clearTimeout(t057);}</script>');
@ -69,10 +69,10 @@ if($_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest' || isset($CRON_CORE))
unset($tm);
$js = '';
include('../../_incl_data/class/__user.php');
include('../../_incl_data/class/__magic.php');
include('../../_incl_data/class/_cron_.php');
include('../../_incl_data/class/__quest.php');
require_once('../../_incl_data/class/__user.php');
require_once('../../_incl_data/class/__magic.php');
require_once('../../_incl_data/class/_cron_.php');
require_once('../../_incl_data/class/__quest.php');
if(!isset($CRON_CORE)) {
if(!isset($u->info['id']) || ($u->info['joinIP']==1 && $u->info['ip']!=$_SERVER['HTTP_X_REAL_IP']))
@ -135,8 +135,8 @@ if($_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest' || isset($CRON_CORE))
mysql_query("UPDATE `users` SET `online`='".time()."',`timeMain`='".time()."' WHERE `id`='".$u->info['id']."' LIMIT 1");
}
}
include('../../_incl_data/class/__battle.php');
include('log_text.php');
require_once('../../_incl_data/class/__battle.php');
require_once('log_text.php');
$btl->is = $u->is;
$btl->items = $u->items;
$btl->info = $btl->battleInfo($u->info['battle']);

434
main.php
View File

@ -2,8 +2,17 @@
/* Paste this css to your style sheet file or under head tag */
/* This only works with JavaScript,
if it's not present, don't show loader */
.no-js #loader { display: none; }
.js #loader { display: block; position: absolute; left: 100px; top: 0; }
.no-js #loader {
display: none;
}
.js #loader {
display: block;
position: absolute;
left: 100px;
top: 0;
}
.se-pre-con {
position: fixed;
left: 0px;
@ -19,103 +28,29 @@ if it's not present, don't show loader */
<?php
function GetRealIp(){
function GetRealIp()
{
if (!empty($_SERVER['HTTP_CLIENT_IP']))
return $_SERVER['HTTP_CLIENT_IP'];
else if (!empty($_SERVER['HTTP_X_FORWARDED_FOR']))
return $_SERVER['HTTP_X_FORWARDED_FOR'];
return $_SERVER['REMOTE_ADDR'];
}
function var_info($vars, $d = false){
function var_info($vars, $d = false)
{
echo "<pre style='border: 1px solid gray;border-radius: 5px;padding: 3px 6px;background: #cecece;color: black;font-family: Arial;font-size: 12px;'>\n";
var_dump($vars);
echo "</pre>\n";
if ($d) exit();
}
define('IP', GetRealIp());
include('_incl_data/__config.php');
define('GAME', true);
include('_incl_data/class/__db_connect.php');
date_default_timezone_set('Europe/Moscow');
//header('refresh: 30');
/*mysql_query("LOCK TABLES
`aaa_monsters` WRITE,
`actions` WRITE,
`bank` WRITE,
`battle` WRITE,
`battle_act` WRITE,
`battle_actions` WRITE,
`battle_cache` WRITE,
`battle_end` WRITE,
`battle_last` WRITE,
`battle_logs` WRITE,
`battle_logs_save` WRITE,
`battle_stat` WRITE,
`battle_users` WRITE,
`bs_actions` WRITE,
`bs_items` WRITE,
`bs_items_use` WRITE,
`bs_logs` WRITE,
`bs_map` WRITE,
`bs_statistic` WRITE,
`bs_trap` WRITE,
`bs_turnirs` WRITE,
`bs_zv` WRITE,
`clan` WRITE,
`clan_wars` WRITE,
`dungeon_actions` WRITE,
`dungeon_bots` WRITE,
`dungeon_items` WRITE,
`dungeon_map` WRITE,
`dungeon_now` WRITE,
`dungeon_zv` WRITE,
`eff_main` WRITE,
`eff_users` WRITE,
`items_img` WRITE,
`items_local` WRITE,
`items_main` WRITE,
`items_main_data` WRITE,
`items_users` WRITE,
`izlom` WRITE,
`izlom_rating` WRITE,
`laba_act` WRITE,
`laba_itm` WRITE,
`laba_map` WRITE,
`laba_now` WRITE,
`laba_obj` WRITE,
`levels` WRITE,
`levels_animal` WRITE,
`online` WRITE,
`priems` WRITE,
`quests` WRITE,
`reimage` WRITE,
`reg` WRITE,
`stats` WRITE,
`test_bot` WRITE,
`turnirs` WRITE,
`users` WRITE,
`users_animal` WRITE,
`user_ico` WRITE,
`users_twink` WRITE,
`zayvki` WRITE;");*/
include('_incl_data/class/__magic.php');
@ -134,9 +69,6 @@ if($u->info['bithday'] == '01.01.1800' && $u->info['inTurnirnew'] == 0) {
unset($_GET, $_POST);
}
/*if( !eregi("new-combats\.com", $_SERVER['HTTP_REFERER']) ) {
//die('Ïåðåçàéäèòå â èãðó, ñåññèÿ çàêðûòà.<br>last_page:%'.$_SERVER['HTTP_REFERER'].'');
}*/
error_reporting(E_ALL ^ E_NOTICE);
ini_set('display_errors', 'Off');
ini_set('max_execution_time', '120');
@ -145,7 +77,11 @@ $sleep = $u->testAction('`vars` = "sleep" AND `uid` = "'.$u->info['id'].'" LIMIT
if ($u->room['file'] != "room_hostel" && $u->room['file'] != "an/room_hostel" && $sleep['id'] > 0) {
mysql_query('UPDATE `actions` SET `vars` = "unsleep" WHERE `id` = "' . $sleep['id'] . '" LIMIT 1');
}
if($u->room['file']=="room_hostel" || $u->room['file']=="post"){$trololo=0;}else{$trololo=1;}
if ($u->room['file'] == "room_hostel" || $u->room['file'] == "post") {
$trololo = 0;
} else {
$trololo = 1;
}
#--------äëÿ îáùàãè, è ïîçæå äëÿ ïî÷òû
if ($u->info['online'] < time() - 60 || $u->info['afk'] != '') {
@ -160,59 +96,14 @@ if(!isset($u->info['id']) || ($u->info['joinIP']==1 && $u->info['ip']!=$_SERVER[
die($c['exit']);
}
//mysql_query('START TRANSACTION');
if ($u->info['battle_text'] != '') {
//Ïîêàçûâàåì ñèñòåìêó è çàíîñèì äàííûå
if ($u->info['last_b'] > 0) {
mysql_query('INSERT INTO `battle_last` (`battle_id`,`uid`,`time`,`act`,`level`,`align`,`clan`,`exp`) VALUES ("' . $u->info['last_b'] . '","' . $u->info['id'] . '","' . time() . '","' . $u->info['last_a'] . '","' . $u->info['level'] . '","' . $u->info['align'] . '","' . $u->info['clan'] . '","' . $u->info['exp'] . '")');
}
//mysql_query('UPDATE `stats` SET `battle_text` = "",`last_b`="0" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
}
/*if(isset($_GET['newclan'])) {
$czv = mysql_fetch_array(mysql_query('SELECT * FROM `clan_add` WHERE `uid` = "'.$u->info['id'].'" AND `yes` = 0 AND `no` = 0 AND `id` = "'.mysql_real_escape_string($_GET['newclan']).'" LIMIT 1'));
if( isset($czv['id']) ) {
$clns = mysql_fetch_array(mysql_query('SELECT `id`,`name`,`align` FROM `clan` WHERE `id` = "'.$czv['clan'].'" LIMIT 1'));
$usr = mysql_fetch_array(mysql_query('SELECT `id`,`login`,`level`,`money` FROM `users` WHERE `id` = "'.$czv['uid_clan'].'" LIMIT 1'));
if(isset($_GET['newclan_val'])) {
if( $_GET['newclan_val'] == 2 ) {
$u->error = 'Âû îòêàçàëèñü îò çàÿâêè íà âñòóïëåíèå â êëàí &quot;'.$clns['name'].'&quot;.';
mysql_query('UPDATE `clan_add` SET `no` = "'.time().'" WHERE `id` = "'.$czv['id'].'" LIMIT 1');
}elseif( $_GET['newclan_val'] == 1 ) {
if($u->info['clan'] > 0) {
$u->error = 'Âû óæå íàõîäèòåñü â êëàíå è íå ìîæåòå ïðèíÿòü çàÿâêó.';
}elseif($u->info['align'] == 2) {
$u->error = 'Õàîñíèêàì íåëüçÿ âñòóïàòü â êëàí.';
}elseif($u->info['align'] == 50) {
$u->error = 'Àëõèìèêàì íåëüçÿ âñòóïàòü â êëàí.';
}elseif(($u->info['align'] > 1 && $u->info['align'] < 2) || ($u->info['align'] > 3 && $u->info['align'] < 4)) {
$u->error = 'Ìîäåðàòîðàì íåëüçÿ âñòóïàòü â êëàí.';
}elseif($u->info['banned'] > 0) {
$u->error = 'Âàø ïåðñîíàæ çàáëîêèðîâàí. ×òî æå âû çäåñü äåëàåòå?';
}elseif($u->info['level'] < 8) {
$u->error = 'Ïåðñîíàæàì íèæå 8-ãî óðîâíÿ íåëüçÿ âñòóïàòü â êëàí.';
}elseif($usr['money'] < 100) {
$u->error = 'Ó ïåðñîíàæà &quot;'.$usr['login'].'&quot;, êîòîðûé ïðèãëàñèë âàñ, â êëàí íåäîñòàòî÷íî äåíåã. Íåîáõîäèìî: 100 êð.';
}else{
$usr['money'] -= 100;
$u->info['align'] = $clns['align'];
$u->info['clan'] = $clns['id'];
$u->info['mod_zvanie'] = 'Ðåêðóò';
$u->info['clan_prava'] = '0|0|0|0|0';
mysql_query('UPDATE `users` SET `align` = "'.$u->info['align'].'", `clan` = "'.$u->info['clan'].'", `mod_zvanie` = "Ðåêðóò", `clan_prava` = "0|0|0|0|0" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
mysql_query('UPDATE `users` SET `money` = "'.$usr['money'].'" WHERE `id` = "'.$usr['id'].'" LIMIT 1');
mysql_query('UPDATE `clan_add` SET `yes` = "'.time().'" WHERE `id` = "'.$czv['id'].'" LIMIT 1');
mysql_query('UPDATE `clan_add` SET `no` = "'.time().'" WHERE `uid` = "'.$u->info['id'].'" AND `yes` = 0 AND `no` = 0');
}
}
}
}else{
$u->error = 'Íåóäàëîñü íàéòè çàÿâêó #'.(0+$_GET['newclan']).' íà âñòóïëåíèå â êëàí';
}
}*/
if(!isset($_GET['mAjax']) AND !isset($_GET['ajaxHostel']))
if (!isset($_GET['mAjax']) and !isset($_GET['ajaxHostel']))
echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
@ -225,150 +116,22 @@ if(!isset($_GET['mAjax']) AND !isset($_GET['ajaxHostel']))
<link href="https://img.new-combats.com/css/main.css" rel="stylesheet" type="text/css">
</head>
<body style="padding-top:0px; margin-top:7px; height:100%; background-color:#e2e0e1;">';
//dedede
/*if( !isset($_COOKIE['d1c']) ) {
include('_incl_data/class/mobile.php');
$detect = new Mobile_Detect;
$deviceType = ($detect->isMobile() ? ($detect->isTablet() ? 'tablet' : 'phone') : 'computer');
$_COOKIE['d1c'] = $deviceType;
setcookie('d1c',$deviceType,(time()+864000));
}else{
$deviceType = $_COOKIE['d1c'];
}*/
/*if( $deviceType == 'tablet' || $deviceType == 'mobile' ) {
?>
<script>
top.$(top.frames['main'].document.body).bind('touchmove', function(e) {
});
</script>
<?
}*/
/*if($u->info['activ'] > 0) {
if(isset($_POST['mail_activ'])) {
$test_mail = mysql_fetch_array(mysql_query('SELECT `id` FROM `users` WHERE (`send` = "'.mysql_real_escape_string($_POST['mail_activ']).'" OR `mail` = "'.mysql_real_escape_string($_POST['mail_activ']).'") AND `activ` = "0" LIMIT 1'));
if(isset($test_mail['id'])) {
$a_error = 'Äàííûé <b>e-mail</b> óæå èñïîëüçîâàëñÿ ðàíåå. Åñëè ó âàñ âîçíèêëè ïðîáëåìû ñ àêòèâàöèåé - îáðàòèòåñü ê Ïàëàäèíàì.';
}else{
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";
return mail($to, $subject, $body, $headers);
}
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) . '?=';
}
if( $u->info['activ'] < time() ) {
$u->info['send'] = htmlspecialchars($_POST['mail_activ'],NULL,'cp1251');
mysql_query('UPDATE `users` SET `activ` = "'.(time()+1*3600).'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
//mysql_query('UPDATE `users` SET `activ` = "0" WHERE `id` = "'.$b_pass['id'].'" LIMIT 1');
if(
send_mime_mail('Áîéöîâñêèé Êëóá',
'support@new-combats.com',
' ' . $u->info['login'] . ' ',
''.$u->info['send'].'',
'CP1251', // êîäèðîâêà, â êîòîðîé íàõîäÿòñÿ ïåðåäàâàåìûå ñòðîêè
'KOI8-R', // êîäèðîâêà, â êîòîðîé áóäåò îòïðàâëåíî ïèñüìî
'Óñïåøíàÿ ðåãèñòðàöèÿ ïåðñîíàæà, ïîäòâåðäèòå E-mail',
'<b>Ìû ðàäû ïðèâåòñòâîâàòü Âàñ â ðÿäàõ áîéöîâ íàøåãî ïðîåêòà!</b><br>'.
'Àêòèâàöèÿ ïåðñîíàæà <b>'.$u->info['login'].'</b><br>'.
'Äëÿ àêòèâàöèè ââåäèòå êîä: ' . md5($u->info['login'].'&[new-combats.com]') . '<br>'.
'Ññûëêà äëÿ àêòèâàöèè: <a target="_blank" href="https://new-combats.com/active.php?code='.md5($u->info['login'].'&[new-combats.com]').'">Àêòèâàöèÿ</a>'.
'<br><br>Ñ óâàæåíèåì,<br>Àäìèíèñòðàöèÿ Áîéöîâñêîãî Êëóáà'
)
) {
}else{
$a_error = 'Îøèáêà îòïðàâêè ñîîáùåíèÿ íà ïî÷òîâûé ÿùèê.';
}
mysql_query('UPDATE `users` SET `send` = "'.mysql_real_escape_string($u->info['send']).'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
}else{
$a_error = 'Âûñëàòü ïèñüìî íà äðóãîé ïî÷òîâûé ÿùèê áóäåò âîçìîæíî ÷åðåç <b>'.$u->timeOut($u->info['activ']-time()).'</b>.';
}
}
}elseif(isset($_POST['new_real_mail'])) {
if($u->info['activ'] > time()) {
$a_error = 'Íåëüçÿ ìåíÿòü <b>e-mail</b> ÷àùå îäíîãî ðàçà â ÷àñ, ïîïðîáóéòå ïîçæå.';
}else{
$u->info['send'] = '0';
mysql_query('UPDATE `users` SET `send` = "'.mysql_real_escape_string($u->info['send']).'",`activ` = "'.(time()-60*60).'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
}
}
if($a_error != '') {
$a_error = '<br><font color=red>'.$a_error.'</font>';
}
if($u->info['send'] == '0') {
echo '<div style="padding:4px;background-color:#FFEEEE;border:1px solid #EEAAAA;margin:2px;">';
echo '<small><form method="post" action="main.php"><b>Âàø ïåðñîíàæ íå àêòèâèðîâàí</b>. Äëÿ àêòèâàöèè ïåðñîíàæà ââåäèòå e-mail: <input name="mail_activ" style="font-size:10px;width:180px;" type="text" value="'.$u->info['mail'].'"> <input type="submit" value="Âûñëàòü èíñòðóêöèþ ïî àêòèâàöèè!">'.$a_error.'</form></small>';
}else{
echo '<div style="padding:4px;background-color:#EEEEFF;border:1px solid #AAAAEE;margin:2px;">';
echo '<small><form method="post" action="main.php"><b>Âàø ïåðñîíàæ íå àêòèâèðîâàí</b>. Èíñòðóêöèÿ äëÿ àêòèâàöèè âûñëàíà íà e-mail <b>'.$u->info['send'].'</b> <input name="new_real_mail" type="submit" value="Ââåñòè äðóãîé e-mail">'.$a_error.'</form></small>';
}
echo '</div>';
}*/
/*-----------------------*/
$act = -2; $act2 = 0;
$act = -2;
$act2 = 0;
$u->stats = $u->getStats($u->info['id'], 0);
$u->aves = $u->ves(NULL);
if(!isset($u->stats['act']))
{
$u->aves = $u->ves(null);
if (!isset($u->stats['act'])) {
$u->stats['act'] = 0;
}
if($u->stats['act']==1)
{
if ($u->stats['act'] == 1) {
$act = 1;
}
$u->rgd = $u->regen($u->info['id'], 0, 0);
/*if( date('d.m.Y') == '05.05.2014' ) {
if($u->stats['silver'] < 1) {
mysql_query('INSERT INTO `eff_users` (
`id_eff`,`uid`,`name`,`data`,`overType`,`timeUse`,`no_Ace`
) VALUES (
"276","'.$u->info['id'].'","VIP (50) - Íàãðàäà","add_silver=1","30","'.(time()-29*24*60*60).'","1"
)');
echo '<script>top.chat.sendMsg(["new","'.time().'","6","","'.$u->info['login'].'","<u> ñâÿçè ñ ñåãîäíÿøíèìè ïåðåáîÿìè â ðàáîòå ñåðâåðà Âû ïîëó÷àåòå <b>VIP-ñòàòóñ</b> íà îäèí äåíü!</u>","Grey","1","1","0"]);</script>';
}
}*/
//Ïðîâåðêà óðîâíÿ
$ul = $u->testLevel();
if(isset($_GET['atak_user']) && $u->info['battle'] == 0 && $_GET['atak_user']!=$u->info['id'] )
{
if (isset($_GET['atak_user']) && $u->info['battle'] == 0 && $_GET['atak_user'] != $u->info['id']) {
if ($u->room['noatack'] == 0) {
$ua = mysql_fetch_array(mysql_query('SELECT `id`,`clan` FROM `users` WHERE`id` = "' . mysql_real_escape_string($_GET['atak_user']) . '" LIMIT 1'));
$cruw = mysql_fetch_array(mysql_query('SELECT `id`,`type` FROM `clan_wars` WHERE
@ -382,27 +145,22 @@ if(isset($_GET['atak_user']) && $u->info['battle'] == 0 && $_GET['atak_user']!=$
}
$ua = mysql_fetch_array(mysql_query('SELECT `s`.*,`u`.* FROM `stats` AS `s` LEFT JOIN `users` AS `u` ON `s`.`id` = `u`.`id` WHERE (`s`.`atack` > "' . time() . '" OR `s`.`atack` = 1 OR 1 = ' . $cruw . ' OR 2 = ' . $cruw . ') AND `s`.`id` = "' . mysql_real_escape_string($_GET['atak_user']) . '" LIMIT 1'));
//$check = mysql_fetch_array(mysql_query('SELECT * FROM `actions` WHERE `uid` = "'.$u->info['id'].'" AND `vars`= "end_trup" AND `time` > "'.(time()-3*60*60).'" ORDER BY `actions`.`time` DESC LIMIT 1;'));
$check = mysql_fetch_array(mysql_query('SELECT * FROM `eff_users` WHERE `id_eff` = 478 AND `uid` = "' . $u->info['id'] . '" AND `delete` = 0 ORDER BY `overType` DESC LIMIT 1;'));
$check2 = mysql_fetch_array(mysql_query('SELECT * FROM `eff_users` WHERE `id_eff` = 479 AND `uid` = "' . $ua['id'] . '" AND `delete` = 0 ORDER BY `overType` DESC LIMIT 1;'));
$test = mysql_fetch_array(mysql_query('SELECT `id` FROM `battle_last` WHERE `uid` = "' . $u->info['id'] . '" AND `battle_id` = "' . $ua['battle'] . '" LIMIT 1'));
/*if( $ua['no_ip'] == 'trupojor' && $ua['level'] != $u->info['level'] ) {
$u->error = 'Íåëüçÿ íàïàäàòü íà ìîíñòðà ýòîãî óðîâíÿ!';*/
if ($ua['no_ip'] == 'trupojor' && $ua['level'] == 9 && $u->info['level'] > 9) {
$u->error = 'Íåëüçÿ íàïàäàòü íà ìîíñòðà ýòîãî óðîâíÿ!';
} elseif ($ua['no_ip'] == 'trupojor' && $ua['level'] == 10 && $u->info['level'] < 10) {
$u->error = 'Íåëüçÿ íàïàäàòü íà ìîíñòðà ýòîãî óðîâíÿ!';
}elseif( $ua['no_ip'] != 'trupojor' && $ua['level'] != $u->info['level'] ) { //&& !isset($cruw)
} elseif ($ua['no_ip'] != 'trupojor' && $ua['level'] != $u->info['level']) {
$u->error = 'Íàïàäàòü ìîæíî íà ïåðñîíàæåé òîëüêî ñâîåãî óðîâíÿ!';
} elseif (isset($test['id'])) {
$u->error = 'Íåëüçÿ âìåøàòüñÿ, âû óæå áûëè â ýòîì ïîåäèíêå.';
}elseif( $ua['no_ip'] == 'trupojor' && isset($check['id']) ) { //&& $ua['level'] >9
} elseif ($ua['no_ip'] == 'trupojor' && isset($check['id'])) {
$u->error = 'Íåëüçÿ íàïàäàòü íà ìîíñòðà ÷àùå îäíîãî ðàçà â 3 ÷àñà!';
}elseif(isset($check2['id'])) { //&& $ua['level'] >9
} elseif (isset($check2['id'])) {
$u->error = 'Ïåðñîíàæ èìååò çàùèòó îò íàïàäåíèÿ!';
}elseif(isset($ua['id']) && $ua['online'] > time()-520)
{
} elseif (isset($ua['id']) && $ua['online'] > time() - 520) {
$usta = $u->getStats($ua['id'], 0); // ñòàòû öåëè
$minHp = floor($usta['hpAll'] / 100 * 33); // ìèíèìàëüíûé çàïàñ çäîðîâüÿ öåëè ïðè êîòîðîì ìîæíî íàïàñòü
@ -419,12 +177,11 @@ if(isset($_GET['atak_user']) && $u->info['battle'] == 0 && $_GET['atak_user']!=$
$u->error = 'Íåëüçÿ ñðàæàòüñÿ íà ñòîðîíå ìîíñòðîâ!';
} elseif (isset($uabt['id']) && $uabt['invis'] > 0) {
$u->error = 'Íåëüçÿ âìåøèâàòüñÿ â íåâèäèìûé áîé!';
}elseif( $magic->testTravma( $ua['id'] , 3 ) == true ) {
} elseif ($magic->testTravma($ua['id'], 3)) {
$u->error = 'Ïðîòèâíèê òÿæåëî òðàâìèðîâàí, íåëüçÿ íàïàñòü!';
}elseif( $magic->testTravma( $u->info['id'] , 2 ) == true ) {
} elseif ($magic->testTravma($u->info['id'], 2)) {
$u->error = 'Âû òðàâìèðîâàíû, íåëüçÿ íàïàñòü!';
}elseif($ua['room']==$u->info['room'] && ($minHp <= $usta['hpNow'] || $ua['battle'] > 0))
{
} elseif ($ua['room'] == $u->info['room'] && ($minHp <= $usta['hpNow'] || $ua['battle'] > 0)) {
if ($ua['type_pers'] == 0) {
if ($cruw == 2) {
$ua['type_pers'] = 99;
@ -446,8 +203,7 @@ if(isset($_GET['atak_user']) && $u->info['battle'] == 0 && $_GET['atak_user']!=$
$rtxt = '[img[items/pal_button8.gif]] &quot;' . $u->info['login'] . '&quot; ñîâåðøèë' . $sx . ' íàïàäåíèå ïî ìåòêå íà ïåðñîíàæà &quot;' . $ua['login'] . '&quot;.';
}
if ($goodt>0)
{
if ($goodt > 0) {
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`) VALUES (1,'" . $u->info['city'] . "','" . $u->info['room'] . "','','','" . $rtxt . "','" . time() . "','6','0','1')");
}
unset($goodt);
@ -470,27 +226,22 @@ if(isset($_GET['atak_user']) && $u->info['battle'] == 0 && $_GET['atak_user']!=$
}
}
if($ul==1)
{
if ($ul == 1) {
$act = 1;
}
if ($u->info['repass'] > 0) {
function GetRealIp()
{
if (!empty($_SERVER['HTTP_CLIENT_IP']))
{
if (!empty($_SERVER['HTTP_CLIENT_IP'])) {
$ip = $_SERVER['HTTP_CLIENT_IP'];
}
elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR']))
{
} elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
}
else
{
} else {
$ip = $_SERVER['REMOTE_ADDR'];
}
return $ip;
}
define('IP', GetRealIp());
if (isset($_POST['renpass']) && $_POST['renpass'] == $_POST['renpass2'] && md5($_POST['renpass']) != $u->info['pass']) {
if ($u->info['ip'] == IP) {
@ -502,10 +253,8 @@ define('IP',GetRealIp());
die('<font color="red"><b>Âíèìàíèå!</b> Ñìåíà ïàðîëÿ ïðèâÿçàíà ê ip %' . $u->info['ip'] . '.<br>Äëÿ âîññòàíîâëåíèÿ êîíòðîëÿ âîéäèòå ñ äàííîãî IP, ëèáî îáðàòèòåñü ê Àäìèíèñòðàöèè ïðîåêòà ÷åðåç íîâîãî ïåðñîíàæà. Ïðèíîñèì èçâèíåíèÿ çà íåóäîáñòâà!</font>');
}
} else {
//unlink($lock_file);
if (isset($_POST['renpass'])) {
if($u->info['pass']==md5($_POST['renpass']))
{
if ($u->info['pass'] == md5($_POST['renpass'])) {
echo '<font color="red"><b>Âíèìàíèå!</b>Âàø íîâûé ïàðîëü äîëæåí ðàçëè÷àòüñÿ ñî ñòàðûì.</font>';
} elseif ($_POST['renpass'] != $_POST['renpass2']) {
echo '<font color="red"><b>Âíèìàíèå!</b>Ïàðîëè íå ñîâïàäàþò.</font>';
@ -525,7 +274,6 @@ define('IP',GetRealIp());
}
}
/*-----------------------*/
if ($u->info['battle'] == 0) {
$btl_last = mysql_fetch_array(mysql_query('SELECT `id`,`battle` FROM `battle_users` WHERE `uid` = "' . $u->info['id'] . '" AND `finish` = "0" LIMIT 1'));
@ -566,7 +314,7 @@ if( isset($btl_last['id']) && $u->info['battle'] == 0 ) {
} elseif (isset($_GET['oid']) && isset($_GET['inv'])) {
$act = $u->odetItem($_GET['oid'], $u->info['id']);
} elseif (isset($_GET['item_rune']) && isset($_GET['inv'])) {
$act = $u->runeItem(NULL);
$act = $u->runeItem(null);
} elseif (isset($_GET['remitem'], $_GET['inv'])) {
$act = $u->snatItemAll($u->info['id']);
} elseif (isset($_GET['delete']) && isset($_GET['inv']) && $u->newAct($_GET['sd4'])) {
@ -588,18 +336,9 @@ if( isset($btl_last['id']) && $u->info['battle'] == 0 ) {
}
} else {
if ($u->room['block_all'] > 0) {
//if(isset($_GET['use_pid'])) {
$u->error = ' äàííîé ëîêàöèè çàïðåùåíî ïîëüçîâàòüñÿ ÷åì-ëèáî...';
//}
}
}
}elseif($u->info['battle_text']!=''){
//Ïîêàçûâàåì ñèñòåìêó è çàíîñèì äàííûå
if($u->info['last_b']>0) {
}
//mysql_query('UPDATE `stats` SET `battle_text` = "",`last_b`="0" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
}
if ($magic->youuse > 0) {
@ -608,7 +347,7 @@ if($magic->youuse > 0){
//Ïîëó÷åíèå ñòàòîâ
if ($act != -2) {
$u->stats = $u->getStats($u->info['id'], 0, 1);
$u->aves = $u->ves(NULL);
$u->aves = $u->ves(null);
if (!isset($sleep['id'])) {
$act2 = $u->testItems($u->info['id'], $u->stats, 0);
}
@ -620,12 +359,8 @@ if($act!=-2){
/*-----------------------*/
if (isset($_GET['worklist']) && $u->info['admin'] > 0) {
include('modules_data/worklist.php');
}elseif( isset($btl_last['id']) && $u->info['battle'] == 0 ) {
//
} elseif (isset($_GET['security']) && !isset($u->tfer['id']) && $trololo == 1) {
include('modules_data/_changepass.php');
}elseif(isset($_GET['quests']) && true == false){
include('modules_data/_quests.php');
} elseif ($u->info['level'] >= 0 && isset($_GET['friends']) && !isset($u->tfer['id'])) {
include('modules_data/_friends.php');
} elseif (($u->info['admin'] > 0 || $u->info['level'] > 7 || $u->info['align'] == 50) && isset($_GET['notepad']) && !isset($u->tfer['id'])) {
@ -635,23 +370,13 @@ if( isset($_GET['worklist']) && $u->info['admin'] > 0 ) {
$u->info['admin'] = 0;
die();
}
//if( $u->info['admin'] > 0 ) {
include('modules_data/_mod.php');
//}else{
// include('modules_data/_mod2.php');
//}
} elseif ((($u->info['align'] > 3 && $u->info['align'] < 4) || $u->info['admin'] > 0) && isset($_GET['dark']) && !isset($u->tfer['id'])) {
if ($u->info['id'] == 1000001) {
$u->info['admin'] = 0;
die();
}
//if( $u->info['admin'] > 0 ) {
include('modules_data/_mod.php');
//}else{
// include('modules_data/_mod2.php');
//}
}elseif(isset($_GET['bagreport']) && true == false){
include('modules_data/_bagreport.php');
} elseif (isset($_GET['admin']) && $u->info['admin'] > 0) {
if ($u->info['id'] == 1000001) {
$u->info['admin'] = 0;
@ -659,9 +384,9 @@ if( isset($_GET['worklist']) && $u->info['admin'] > 0 ) {
}
if ($u->info['id'] == 7) {
include('modules_data/_light.php');
}else{include('modules_data/_mod.php');}
}elseif(isset($_GET['help']) && true == false){
include('modules_data/help.php');
} else {
include('modules_data/_mod.php');
}
} elseif (isset($_GET['vip']) && !isset($u->tfer['id'])) {
include('modules_data/vip.php');
} elseif ((isset($_GET['zayvka']) && $u->info['battle'] == 0) || (isset($_GET['zayvka']) && ($_GET['r'] == 6 || $_GET['r'] == 7 || !isset($_GET['r'])) && $u->info['battle'] > 0) && !isset($u->tfer['id'])) {
@ -698,16 +423,11 @@ if( isset($_GET['worklist']) && $u->info['admin'] > 0 ) {
include('modules_data/7_panel.php');
} elseif ($u->info['battle'] != 0) {
//ïîåäèíîê
//if( $u->info['id'] != 1000000 || isset($_GET['back_btl']) ) {
if ((!isset($btl_last['id']) || $u->info['battle'] > 0) && !isset($u->info['battle_lsto'])) {
include('modules_data/btl_.php');
echo '<script type="text/javascript" src="js/onlineList.js"></script>';
}
/*}else{
include('modules_data/btl_new.php');
echo '<hr><a href="main.php?back_btl">Ñòàðûé âàðèàíò Áîåâîé ñèñòåìû</a>';
}*/
} else {
if (isset($_GET['talk']) && !isset($u->tfer['id'])) {
echo "
@ -720,21 +440,14 @@ if( isset($_GET['worklist']) && $u->info['admin'] > 0 ) {
include('_incl_data/class/__dungeon.php');
}
include('modules_data/_dialog.php');
//}elseif(isset($_GET['act_sec']) && !isset($u->tfer['id']) && $trololo==1){
//include('modules_data/_security.php');
} elseif (isset($_GET['inv']) && !isset($u->tfer['id']) && $trololo == 1) {
include('modules_data/_inv.php');
// include('modules_data/_inv-old.php');
} elseif (isset($_GET['add_eff']) && !isset($u->tfer['id']) && $trololo == 1) {
include('modules_data/add_eff.php');
//}elseif(isset($_GET['cryshop']) && !isset($u->tfer['id']) && $trololo==1 && $u->info['level']>0){
//include('modules_data/_cryshop.php');
} elseif (isset($_GET['referals']) && $trololo == 1 && !isset($u->tfer['id'])) {
include('modules_data/_ref.php');
} elseif (isset($_GET['obraz']) && !isset($u->tfer['id']) && $trololo == 1) {
include('modules_data/_obraz.php');
//}elseif(isset($_GET['galery']) && !isset($u->tfer['id']) && $trololo==1){
//include('modules_data/_galery.php');
} elseif (isset($_GET['skills']) && !isset($u->tfer['id']) && $trololo == 1) {
include('modules_data/_umenie.php');
} elseif ((isset($_GET['transfer']) || isset($u->tfer['id'])) && $u->info['level'] >= $c['level_ransfer'] && $trololo == 1 && $u->info['inTurnir'] == 0 && $u->info['inTurnirnew'] == 0) {
@ -746,8 +459,6 @@ if( isset($_GET['worklist']) && $u->info['admin'] > 0 ) {
}
} elseif (isset($_GET['anketa']) && !isset($u->tfer['id']) && $trololo == 1) {
include('settings.php');
}elseif(isset($_GET['pet']) && $u->info['animal']>0 && true == false && $trololo==1){
include('modules_data/_animal.php');
} elseif (isset($_GET['newanimal']) && $trololo == 1) {
include('modules_data/_newanimal.php');
} elseif (isset($_GET['act_trf']) && $u->room['block_all'] == 0) {
@ -755,23 +466,30 @@ if( isset($_GET['worklist']) && $u->info['admin'] > 0 ) {
} elseif (isset($_GET['titul']) && $u->room['block_all'] == 0) {
include('modules_data/titul.php');
} elseif (!isset($u->tfer['id'])) {
// if($u->info['login'] == 'Ìóñîðùèê')
// exit(include('modules_data/_NewLocations.php'));
// else
include('modules_data/_locations.php');
}
}
//mysql_query('COMMIT');
if($u->room['name']=='Áàøíÿ Ñìåðòè' && $u->info['inUser']>0 && $u->info['lost']>0){
//mysql_query('UPDATE `users` SET `inUser` = "0" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
//êèäàåì òðàâìó
//header('location: main.php');
}
/**
* Îòêëþ÷èë ïîòîìó ÷òî ýòà ñòðî÷êà êðàøèò ïëàâêó ðóí.
* PHP Fatal error: Call to a member function testquest() on a non-object
* Íåâåðîÿòíî, íî ôàêò. Èíñ. 09.06.22
*/
//Ïðîâåðÿåì êâåñòû íà ãîòîâíîñòü
if (in_array($u->room['file'], [
'dungeon_enter',
'dungeon_enter_all',
'enterbezdna',
'entercat',
'enterdrago',
'entergrib',
'enternizin',
'enterptp',
'house_belaun',
'dungeon'
])) {
$q->testquest();
}
$iloc = '';
$iloce = '';
@ -816,11 +534,6 @@ while( $pl = mysql_fetch_array($sp) ) {
} else {
$u->addItem($pl['item_id'], $u->info['id'], '|from_loc_id=' . $pl['id'] . '|from_loc=' . $u->info['room'] . '|' . $pl['data']);
}
/*
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES
('1','".$u->info['city']."','".$u->info['room']."','','".$u->info['login']."',
'Ïåðñîíàæ <b>".$u->info['login']."</b> ïîäíÿë ïðåäìåò <b>".$itmo['name']."</b> â ëîêàöèè ".$u->room['name'].".','".time()."','6','0')");
*/
}
}
if ($glid == 0) {
@ -861,22 +574,12 @@ if( $iloc != '' ) {
}
unset($iloc, $iloce);
/*if( $u->info['fnq'] < 38 ) {
include('_incl_data/class/noob.quests.php');
noob::start();
}*/
/*-----------------------*/
$spl = mysql_fetch_array(mysql_query('SELECT `exp` FROM `levels` WHERE `nextLevel` = "' . ($u->info['level'] + 1) . '" ORDER BY `exp` ASC LIMIT 1'));
$spl = $spl['exp'];
echo '<script>top.myexpLineTop27(' . $u->info['exp'] . ',' . $spl . ');' . $tjs . 'top.ctest("' . $u->info['city'] . '");top.sd4key="' . $u->info['nextAct'] . '"; var battle = ' . (0 + $u->info['battle']) . '; top.hic();</script></body>
</html>';
//mysql_query('UNLOCK TABLES');
//unlink($lock_file);
?>
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.2/modernizr.js"></script>-->
<script>
@ -884,7 +587,6 @@ echo '<script>top.myexpLineTop27('.$u->info['exp'].','.$spl.');'.$tjs.'top.ctest
// Wait for window load
$(window).load(function () {
// Animate loader off screen
$(".se-pre-con").fadeOut(100);;
$(".se-pre-con").fadeOut(100);
});
</script>
<?

View File

@ -29,7 +29,7 @@ if($u->room['file']=='cp')
<td width="250" valign="top">
<? $usee = $u->getInfoPers($u->info['id'],0); if($usee!=false){ echo $usee[0]; }else{ echo 'information is lost.'; } ?>
</td>
<td width="230" valign="top" style="padding-top:19px;"><? include('modules_data/stats_loc.php'); ?></td>
<td width="230" valign="top" style="padding-top:19px;"><? require_once('modules_data/stats_loc.php'); ?></td>
<td valign="top"><div align="right">
<table border="0" cellpadding="0" cellspacing="0">
<tr align="right" valign="top">

View File

@ -160,7 +160,7 @@ if(isset($_GET['loc']))
if($u->info['room']==209)
{
include('_incl_data/class/__zv.php');
require_once('_incl_data/class/__zv.php');
}
if($re!=''){ $re = $re.'&nbsp;'; }

View File

@ -29,7 +29,7 @@ if($u->room['file']=='ab/cp')
<td width="250" valign="top">
<? $usee = $u->getInfoPers($u->info['id'],0); if($usee!=false){ echo $usee[0]; }else{ echo 'information is lost.'; } ?>
</td>
<td width="230" valign="top" style="padding-top:19px;"><? include('modules_data/stats_loc.php'); ?></td>
<td width="230" valign="top" style="padding-top:19px;"><? require_once('modules_data/stats_loc.php'); ?></td>
<td valign="top"><div align="right">
<table border="0" cellpadding="0" cellspacing="0">
<tr align="right" valign="top">

View File

@ -29,7 +29,7 @@ if($u->room['file']=='ab/cp2')
<td width="250" valign="top">
<? $usee = $u->getInfoPers($u->info['id'],0); if($usee!=false){ echo $usee[0]; }else{ echo 'information is lost.'; } ?>
</td>
<td width="230" valign="top" style="padding-top:19px;"><? include('modules_data/stats_loc.php'); ?></td>
<td width="230" valign="top" style="padding-top:19px;"><? require_once('modules_data/stats_loc.php'); ?></td>
<td valign="top"><div align="right">
<table border="0" cellpadding="0" cellspacing="0">
<tr align="right" valign="top">

View File

@ -206,7 +206,7 @@ if (!isset($_GET['r'])) {
} else {
echo 'information is lost.';
} ?></td>
<td width="230" valign="top" style="padding-top:19px;"><? include('modules_data/stats_loc.php'); ?></td>
<td width="230" valign="top" style="padding-top:19px;"><? require_once('modules_data/stats_loc.php'); ?></td>
<td valign="top">
<div align="right">
<?= !empty($re) ? '<span style="color: red; font-weight: bold">' . $re . '</span>' : '' ?>

View File

@ -29,7 +29,7 @@ if($u->room['file']=='ab/izlom16')
<td width="250" valign="top">
<? $usee = $u->getInfoPers($u->info['id'],0); if($usee!=false){ echo $usee[0]; }else{ echo 'information is lost.'; } ?>
</td>
<td width="230" valign="top" style="padding-top:19px;"><? include('modules_data/stats_loc.php'); ?></td>
<td width="230" valign="top" style="padding-top:19px;"><? require_once('modules_data/stats_loc.php'); ?></td>
<td valign="top"><div align="right">
<table border="0" cellpadding="0" cellspacing="0">
<tr align="right" valign="top">

View File

@ -17,7 +17,7 @@ if(isset($_POST['level']))
if(file_exists('_incl_data/class/__zv.php')) {
if(!isset($zv))
{
include('_incl_data/class/__zv.php');
require_once('_incl_data/class/__zv.php');
}
$zv->startIzlom(1,((int)$_POST['level']));
}else{

View File

@ -93,7 +93,7 @@ if($u->room['file']=='ab/quest')
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="250" valign="top"><? $usee = $u->getInfoPers($u->info['id'],0); if($usee!=false){ echo $usee[0]; }else{ echo 'information is lost.'; } ?></td>
<td width="230" valign="top" style="padding-top:19px;"><? include('modules_data/stats_loc.php'); ?></td>
<td width="230" valign="top" style="padding-top:19px;"><? require_once('modules_data/stats_loc.php'); ?></td>
<td valign="top"><div align="right">
<table border="0" cellpadding="0" cellspacing="0">
<tr align="right" valign="top">

View File

@ -129,7 +129,7 @@ if($u->room['file']=='an/bk'){
<td width="250" valign="top">
<? $usee = $u->getInfoPers($u->info['id'],0); if($usee!=false){ echo $usee[0]; }else{ echo 'information is lost.'; } ?>
</td>
<td width="230" valign="top" style="padding-top:19px;"><? include('modules_data/stats_loc.php'); ?></td>
<td width="230" valign="top" style="padding-top:19px;"><? require_once('modules_data/stats_loc.php'); ?></td>
<td valign="top"><div align="right">
<? if($u->error!=''){ echo '<font color="red"><b>'.$u->error.'</b></font>'; } ?>
<table border="0" cellpadding="0" cellspacing="0">
@ -141,7 +141,7 @@ if($u->room['file']=='an/bk'){
<td id="ViewLocation"><?php
if(true == false){
?><script><?php
include('modules_data/location/fight-club.database.php');
require_once('modules_data/location/fight-club.database.php');
?>
var json = <?php echo json_encode($Response); ?>;
var tgo = <?php echo ($tmGo*10); ?>;

View File

@ -12,7 +12,7 @@ if($u->room['file']=='an/bk2')
<td width="250" valign="top">
<? $usee = $u->getInfoPers($u->info['id'],0); if($usee!=false){ echo $usee[0]; }else{ echo 'information is lost.'; } ?>
</td>
<td width="230" valign="top" style="padding-top:19px;"><? include('modules_data/stats_loc.php'); ?></td>
<td width="230" valign="top" style="padding-top:19px;"><? require_once('modules_data/stats_loc.php'); ?></td>
<td valign="top"><div align="right">
<? if($u->error!=''){ echo '<font color="red"><b>'.$u->error.'</b></font>'; } ?>
<table border="0" cellpadding="0" cellspacing="0">

View File

@ -107,7 +107,7 @@ function WeatherBegin() { // IE main animation function
<td width="250" valign="top">
<? $usee = $u->getInfoPers($u->info['id'],0); if($usee!=false){ echo $usee[0]; }else{ echo 'information is lost.'; } ?>
</td>
<td width="230" valign="top" style="padding-top:19px;"><? include('modules_data/stats_loc.php'); ?></td>
<td width="230" valign="top" style="padding-top:19px;"><? require_once('modules_data/stats_loc.php'); ?></td>
<td valign="top"><div align="right">
<table border="0" cellpadding="0" cellspacing="0">
<tr align="right" valign="top">

View File

@ -107,7 +107,7 @@ function WeatherBegin() { // IE main animation function
<td width="250" valign="top">
<? $usee = $u->getInfoPers($u->info['id'],0); if($usee!=false){ echo $usee[0]; }else{ echo 'information is lost.'; } ?>
</td>
<td width="230" valign="top" style="padding-top:19px;"><? include('modules_data/stats_loc.php'); ?></td>
<td width="230" valign="top" style="padding-top:19px;"><? require_once('modules_data/stats_loc.php'); ?></td>
<td valign="top"><div align="right">
<table border="0" cellpadding="0" cellspacing="0">
<tr align="right" valign="top">

View File

@ -12,7 +12,7 @@ if($u->room['file']=='an/kinght')
<td width="250" valign="top">
<? $usee = $u->getInfoPers($u->info['id'],0); if($usee!=false){ echo $usee[0]; }else{ echo 'information is lost.'; } ?>
</td>
<td width="230" valign="top" style="padding-top:19px;"><? include('modules_data/stats_loc.php'); ?></td>
<td width="230" valign="top" style="padding-top:19px;"><? require_once('modules_data/stats_loc.php'); ?></td>
<td valign="top"><div align="right">
<table border="0" cellpadding="0" cellspacing="0">
<tr align="right" valign="top">

View File

@ -12,7 +12,7 @@ if($u->room['file']=='an/torg')
<td width="250" valign="top">
<? $usee = $u->getInfoPers($u->info['id'],0); if($usee!=false){ echo $usee[0]; }else{ echo 'information is lost.'; } ?>
</td>
<td width="230" valign="top" style="padding-top:19px;"><? include('modules_data/stats_loc.php'); ?></td>
<td width="230" valign="top" style="padding-top:19px;"><? require_once('modules_data/stats_loc.php'); ?></td>
<td valign="top"><div align="right">
<table border="0" cellpadding="0" cellspacing="0">
<tr align="right" valign="top">

View File

@ -12,7 +12,7 @@ if($u->room['file']=='an/zalu')
<td width="250" valign="top">
<? $usee = $u->getInfoPers($u->info['id'],0); if($usee!=false){ echo $usee[0]; }else{ echo 'information is lost.'; } ?>
</td>
<td width="230" valign="top" style="padding-top:19px;"><? include('modules_data/stats_loc.php'); ?></td>
<td width="230" valign="top" style="padding-top:19px;"><? require_once('modules_data/stats_loc.php'); ?></td>
<td valign="top"><div align="right">
<table border="0" cellpadding="0" cellspacing="0">
<tr align="right" valign="top">

View File

@ -12,7 +12,7 @@ if($u->room['file']=='an/zalu_pal')
<td width="250" valign="top">
<? $usee = $u->getInfoPers($u->info['id'],0); if($usee!=false){ echo $usee[0]; }else{ echo 'information is lost.'; } ?>
</td>
<td width="230" valign="top" style="padding-top:19px;"><? include('modules_data/stats_loc.php'); ?></td>
<td width="230" valign="top" style="padding-top:19px;"><? require_once('modules_data/stats_loc.php'); ?></td>
<td valign="top"><div align="right">
<table border="0" cellpadding="0" cellspacing="0">
<tr align="right" valign="top">

View File

@ -12,7 +12,7 @@ if($u->room['file']=='an/zv1')
<td width="250" valign="top">
<? $usee = $u->getInfoPers($u->info['id'],0); if($usee!=false){ echo $usee[0]; }else{ echo 'information is lost.'; } ?>
</td>
<td width="230" valign="top" style="padding-top:19px;"><? include('modules_data/stats_loc.php'); ?></td>
<td width="230" valign="top" style="padding-top:19px;"><? require_once('modules_data/stats_loc.php'); ?></td>
<td valign="top"><div align="right">
<table border="0" cellpadding="0" cellspacing="0">
<tr align="right" valign="top">

View File

@ -12,7 +12,7 @@ if($u->room['file']=='an/zv2')
<td width="250" valign="top">
<? $usee = $u->getInfoPers($u->info['id'],0); if($usee!=false){ echo $usee[0]; }else{ echo 'information is lost.'; } ?>
</td>
<td width="230" valign="top" style="padding-top:19px;"><? include('modules_data/stats_loc.php'); ?></td>
<td width="230" valign="top" style="padding-top:19px;"><? require_once('modules_data/stats_loc.php'); ?></td>
<td valign="top"><div align="right">
<table border="0" cellpadding="0" cellspacing="0">
<tr align="right" valign="top">

View File

@ -12,7 +12,7 @@ if($u->room['file']=='an/zv3')
<td width="250" valign="top">
<? $usee = $u->getInfoPers($u->info['id'],0); if($usee!=false){ echo $usee[0]; }else{ echo 'information is lost.'; } ?>
</td>
<td width="230" valign="top" style="padding-top:19px;"><? include('modules_data/stats_loc.php'); ?></td>
<td width="230" valign="top" style="padding-top:19px;"><? require_once('modules_data/stats_loc.php'); ?></td>
<td valign="top"><div align="right">
<table border="0" cellpadding="0" cellspacing="0">
<tr align="right" valign="top">

View File

@ -12,7 +12,7 @@ if($u->room['file']=='an/zv4')
<td width="250" valign="top">
<? $usee = $u->getInfoPers($u->info['id'],0); if($usee!=false){ echo $usee[0]; }else{ echo 'information is lost.'; } ?>
</td>
<td width="230" valign="top" style="padding-top:19px;"><? include('modules_data/stats_loc.php'); ?></td>
<td width="230" valign="top" style="padding-top:19px;"><? require_once('modules_data/stats_loc.php'); ?></td>
<td valign="top"><div align="right">
<table border="0" cellpadding="0" cellspacing="0">
<tr align="right" valign="top">

View File

@ -11,7 +11,7 @@ if($u->room['file']=='bk'){
<td width="250" valign="top">
<? $usee = $u->getInfoPers($u->info['id'],0); if($usee!=false){ echo $usee[0]; }else{ echo 'information is lost.'; } ?>
</td>
<td width="230" valign="top" style="padding-top:19px;"><? include('modules_data/stats_loc.php'); ?></td>
<td width="230" valign="top" style="padding-top:19px;"><? require_once('modules_data/stats_loc.php'); ?></td>
<td valign="top"><div align="right">
<? if($u->error!=''){ echo '<font color="red"><b>'.$u->error.'</b></font>'; } ?>
<table border="0" cellpadding="0" cellspacing="0">
@ -23,7 +23,7 @@ if($u->room['file']=='bk'){
<td id="ViewLocation"><?php
if($u->info['login'] == 'mZer0ne'){
?><script><?php
include('modules/location/fight-club.database.php');
require_once('modules/location/fight-club.database.php');
?>
var json = <?php echo json_encode($Response); ?>;
var tgo = <?php echo ($tmGo*10); ?>;

View File

@ -12,7 +12,7 @@ if($u->room['file']=='bk2')
<td width="250" valign="top">
<? $usee = $u->getInfoPers($u->info['id'],0); if($usee!=false){ echo $usee[0]; }else{ echo 'information is lost.'; } ?>
</td>
<td width="230" valign="top" style="padding-top:19px;"><? include('modules/stats_loc.php'); ?></td>
<td width="230" valign="top" style="padding-top:19px;"><? require_once('modules/stats_loc.php'); ?></td>
<td valign="top"><div align="right">
<? if($u->error!=''){ echo '<font color="red"><b>'.$u->error.'</b></font>'; } ?>
<table border="0" cellpadding="0" cellspacing="0">

View File

@ -10,13 +10,13 @@ $old_battle = true;
if( isset($_COOKIE['newbattle']) ) {
$old_battle = false;
include('btl_2.php');
require_once('btl_2.php');
die();
}
include('jx/battle/log_text.php');
require_once('jx/battle/log_text.php');
if( $old_battle == true ) {
@ -761,9 +761,9 @@ function timedCount() { //reflesh_btn
refleshPoints();
</script>
<?
include('_incl_data/class/_cron_.php');
include('_incl_data/class/__battle.php');
include('jx/battle/refresh1.php'); ?>
require_once('_incl_data/class/_cron_.php');
require_once('_incl_data/class/__battle.php');
require_once('jx/battle/refresh1.php'); ?>
</div>
<?

View File

@ -3,8 +3,8 @@ if(!defined('GAME'))
{
die();
}
include('/home/newcom1/public_html/_incl_data/__config.php');
include('/home/newcom1/public_html/_incl_data/class/__db_connect.php');
require_once('/home/newcom1/public_html/_incl_data/__config.php');
require_once('/home/newcom1/public_html/_incl_data/class/__db_connect.php');
if($u->room['file']=='cp1')
{
@ -92,7 +92,7 @@ function AtackNoWindow()
<td width="250" valign="top">
<? $usee = $u->getInfoPers($u->info['id'],0); if($usee!=false){ echo $usee[0]; }else{ echo 'information is lost.'; } ?>
</td>
<td width="230" valign="top" style="padding-top:19px;"><? include('modules_data/stats_loc.php'); ?></td>
<td width="230" valign="top" style="padding-top:19px;"><? require_once('modules_data/stats_loc.php'); ?></td>
<td width="230" valign="top" style="padding-top:19px;">
<span style="font-size:12px;">

View File

@ -108,7 +108,7 @@ function WeatherBegin() { // IE main animation function
<td width="250" valign="top">
<? $usee = $u->getInfoPers($u->info['id'],0); if($usee!=false){ echo $usee[0]; }else{ echo 'information is lost.'; } ?>
</td>
<td width="230" valign="top" style="padding-top:19px;"><? include('modules_data/stats_loc.php'); ?></td>
<td width="230" valign="top" style="padding-top:19px;"><? require_once('modules_data/stats_loc.php'); ?></td>
<td valign="top"><div align="right">
<td valign="top"><div align="right">
<table border="0" cellpadding="0" cellspacing="0">

View File

@ -106,7 +106,7 @@ function WeatherBegin() { // IE main animation function
<td width="250" valign="top">
<? $usee = $u->getInfoPers($u->info['id'],0); if($usee!=false){ echo $usee[0]; }else{ echo 'information is lost.'; } ?>
</td>
<td width="230" valign="top" style="padding-top:19px;"><? include('modules_data/stats_loc.php'); ?></td>
<td width="230" valign="top" style="padding-top:19px;"><? require_once('modules_data/stats_loc.php'); ?></td>
<td valign="top"><div align="right">
<table border="0" cellpadding="0" cellspacing="0">
<tr align="right" valign="top">

View File

@ -11,7 +11,7 @@ if($u->room['file']=='cp4') {
<td width="250" valign="top">
<? $usee = $u->getInfoPers($u->info['id'],0); if($usee!=false){ echo $usee[0]; }else{ echo 'information is lost.'; } ?>
</td>
<td width="230" valign="top" style="padding-top:19px;"><? include('modules_data/stats_loc.php'); ?></td>
<td width="230" valign="top" style="padding-top:19px;"><? require_once('modules_data/stats_loc.php'); ?></td>
<td valign="top"><div align="right">
<table border="0" cellpadding="0" cellspacing="0">
<tr align="right" valign="top">

View File

@ -6,7 +6,7 @@ if(!defined('GAME'))
if($u->room['file']=='dragopsh') {
include('_incl_data/class/__dungeon.php');
require_once('_incl_data/class/__dungeon.php');
$lab = mysql_fetch_array(mysql_query('SELECT * FROM `laba_now` WHERE `id` = "'.$u->info['dnow'].'" LIMIT 1'));
if( !isset($lab['id']) ) {

View File

@ -69,7 +69,7 @@ if(isset($_GET['back'])) {
unset($dp);
}
include('_incl_data/class/__dungeon.php');
require_once('_incl_data/class/__dungeon.php');
if(!isset($d->info['id'])) {
$_GET['exitd'] = true;
@ -307,7 +307,7 @@ if( $d->point['fileadd']==1 && $d->point['file']!='0' && $d->point['file']!=''){
if( $d->point['fileadd']==0 && $d->point['file']!='0' && $d->point['file']!=''){
$file = explode('=',$d->point['file']);
if( file_exists('modules_data/location/'.$file[0]) ) {
include('modules_data/location/'.$file[0]);
require_once('modules_data/location/'.$file[0]);
} else {
if( $file[3]<1 || $file[3]>4 ) {
$file[3] = 1;

View File

@ -673,7 +673,7 @@ if( $dungeonGroupList == '' ) {
if( $roomSection == 0 ) { echo $dungeonGroupList; }
if( $roomSection == 1 ) {
# endQuest çàâåðøàåì çàäàíèå ïî íàæàòèþ.
if( isset( $_GET['endQuest'] ) && $_GET['endQuest'] != '' ){
if(!empty($_GET['endQuest'])){
$action = mysql_fetch_array(mysql_query('SELECT * FROM `actions` WHERE `uid` = '.$u->info['id'].' AND `id`="'.$_GET['endQuest'].'" AND `vals` = "go" LIMIT 1'));
$quest = mysql_fetch_array(mysql_query('SELECT * FROM `quests` WHERE `id` = "'.str_replace('start_quest','',$action['vars']).'" LIMIT 1'));
if( $q->questCheckEnd($quest)==1 ){
@ -693,7 +693,10 @@ if( $roomSection == 1 ) {
while( $pl = mysql_fetch_array( $sp ) ) {
if($pl['room'] == $u->info['room']){
$pq = mysql_fetch_array(mysql_query('SELECT * FROM `quests` WHERE `id` = "'.str_replace('start_quest','',$pl['vars']).'" LIMIT 1'));
if( $q->questCheckEnd($pq)==1 ) $qsee2 = '<input style="margin-top:6px;" type="button" value="Çàâåðøèòü çàäàíèå" onclick="location=\'main.php?rz=1&amp;endQuest='.$pl['id'].'\'">'; else $qsee2 = '';
if( $q->questCheckEnd($pq)==1 or $u->info['login'] == 'òåñò1') {
if ($u->info['login'] == 'òåñò1') {print_r($pl['id'] . ' ');}
$qsee2 = '<input style="margin-top:6px;" type="button" value="Çàâåðøèòü çàäàíèå" onclick="location=\'main.php?rz=1&amp;endQuest=' . $pl['id'] . '\'">';
} else $qsee2 = '';
$qsee .= '
<a href="main.php?rz=1&end_qst_now='.$pq['id'].'"><img src="https://img.new-combats.com/i/clear.gif" title="Îòêàçàòüñÿ îò çàäàíèÿ"></a>

View File

@ -12,7 +12,7 @@ if($u->room['file']=='em/cp') {
<td width="250" valign="top">
<? $usee = $u->getInfoPers($u->info['id'],0); if($usee!=false){ echo $usee[0]; }else{ echo 'information is lost.'; } ?>
</td>
<td width="230" valign="top" style="padding-top:19px;"><? include('modules_data/stats_loc.php'); ?></td>
<td width="230" valign="top" style="padding-top:19px;"><? require_once('modules_data/stats_loc.php'); ?></td>
<td valign="top"><div align="right">
<table border="0" cellpadding="0" cellspacing="0">
<tr align="right" valign="top">

View File

@ -12,7 +12,7 @@ if($u->room['file']=='em/cp2') {
<td width="250" valign="top">
<? $usee = $u->getInfoPers($u->info['id'],0); if($usee!=false){ echo $usee[0]; }else{ echo 'information is lost.'; } ?>
</td>
<td width="230" valign="top" style="padding-top:19px;"><? include('modules_data/stats_loc.php'); ?></td>
<td width="230" valign="top" style="padding-top:19px;"><? require_once('modules_data/stats_loc.php'); ?></td>
<td valign="top"><div align="right">
<table border="0" cellpadding="0" cellspacing="0">
<tr align="right" valign="top">

View File

@ -12,7 +12,7 @@ if($u->room['file']=='fe/bk')
<td width="250" valign="top">
<? $usee = $u->getInfoPers($u->info['id'],0); if($usee!=false){ echo $usee[0]; }else{ echo 'information is lost.'; } ?>
</td>
<td width="230" valign="top" style="padding-top:19px;"><? include('modules_data/stats_loc.php'); ?></td>
<td width="230" valign="top" style="padding-top:19px;"><? require_once('modules_data/stats_loc.php'); ?></td>
<td valign="top"><div align="right">
<table border="0" cellpadding="0" cellspacing="0">
<tr align="right" valign="top">

View File

@ -29,7 +29,7 @@ if($u->room['file']=='fe/cp')
<td width="250" valign="top">
<? $usee = $u->getInfoPers($u->info['id'],0); if($usee!=false){ echo $usee[0]; }else{ echo 'information is lost.'; } ?>
</td>
<td width="230" valign="top" style="padding-top:19px;"><? include('modules_data/stats_loc.php'); ?></td>
<td width="230" valign="top" style="padding-top:19px;"><? require_once('modules_data/stats_loc.php'); ?></td>
<td valign="top"><div align="right">
<table border="0" cellpadding="0" cellspacing="0">
<tr align="right" valign="top">

View File

@ -29,7 +29,7 @@ if($u->room['file']=='fe/sclep')
<td width="250" valign="top">
<? $usee = $u->getInfoPers($u->info['id'],0); if($usee!=false){ echo $usee[0]; }else{ echo 'information is lost.'; } ?>
</td>
<td width="230" valign="top" style="padding-top:19px;"><? include('modules_data/stats_loc.php'); ?></td>
<td width="230" valign="top" style="padding-top:19px;"><? require_once('modules_data/stats_loc.php'); ?></td>
<td valign="top"><div align="right">
<table border="0" cellpadding="0" cellspacing="0">
<tr align="right" valign="top">

View File

@ -12,7 +12,7 @@ if($u->room['file']=='nc/zv1')
<td width="250" valign="top">
<? $usee = $u->getInfoPers($u->info['id'],0); if($usee!=false){ echo $usee[0]; }else{ echo 'information is lost.'; } ?>
</td>
<td width="230" valign="top" style="padding-top:19px;"><? include('modules_data/stats_loc.php'); ?></td>
<td width="230" valign="top" style="padding-top:19px;"><? require_once('modules_data/stats_loc.php'); ?></td>
<td valign="top"><div align="right">
<table border="0" cellpadding="0" cellspacing="0">
<tr align="right" valign="top">

View File

@ -12,7 +12,7 @@ if($u->room['file']=='nc/zv2')
<td width="250" valign="top">
<? $usee = $u->getInfoPers($u->info['id'],0); if($usee!=false){ echo $usee[0]; }else{ echo 'information is lost.'; } ?>
</td>
<td width="230" valign="top" style="padding-top:19px;"><? include('modules_data/stats_loc.php'); ?></td>
<td width="230" valign="top" style="padding-top:19px;"><? require_once('modules_data/stats_loc.php'); ?></td>
<td valign="top"><div align="right">
<table border="0" cellpadding="0" cellspacing="0">
<tr align="right" valign="top">

View File

@ -12,7 +12,7 @@ if($u->room['file']=='nc/zv3')
<td width="250" valign="top">
<? $usee = $u->getInfoPers($u->info['id'],0); if($usee!=false){ echo $usee[0]; }else{ echo 'information is lost.'; } ?>
</td>
<td width="230" valign="top" style="padding-top:19px;"><? include('modules_data/stats_loc.php'); ?></td>
<td width="230" valign="top" style="padding-top:19px;"><? require_once('modules_data/stats_loc.php'); ?></td>
<td valign="top"><div align="right">
<table border="0" cellpadding="0" cellspacing="0">
<tr align="right" valign="top">

View File

@ -12,7 +12,7 @@ if($u->room['file']=='nc/zv4')
<td width="250" valign="top">
<? $usee = $u->getInfoPers($u->info['id'],0); if($usee!=false){ echo $usee[0]; }else{ echo 'information is lost.'; } ?>
</td>
<td width="230" valign="top" style="padding-top:19px;"><? include('modules_data/stats_loc.php'); ?></td>
<td width="230" valign="top" style="padding-top:19px;"><? require_once('modules_data/stats_loc.php'); ?></td>
<td valign="top"><div align="right">
<table border="0" cellpadding="0" cellspacing="0">
<tr align="right" valign="top">

View File

@ -1,5 +1,5 @@
<?php
include('modules_data/location/fight-club.database.php');
require_once('modules_data/location/fight-club.database.php');
if(!defined('GAME')){
die();
}
@ -15,7 +15,7 @@ if(!defined('GAME')){
echo 'information is lost.';
}
?></td>
<td width="230" valign="top" style="padding-top:19px;"><? include('modules/stats_loc.php'); ?></td>
<td width="230" valign="top" style="padding-top:19px;"><? require_once('modules/stats_loc.php'); ?></td>
<td valign="top"><div align="right"><?php
if($u->error!=''){
echo '<font color="red"><b>'.$u->error.'</b></font>';

View File

@ -16,7 +16,7 @@ if(isset($_POST['level']))
if(file_exists('_incl_data/class/__zv.php')) {
if(!isset($zv))
{
include('_incl_data/class/__zv.php');
require_once('_incl_data/class/__zv.php');
}
$zv->startIzlom(1,((int)$_POST['level']));
}else{

View File

@ -12,7 +12,7 @@ if($u->room['file']=='kinght')
<td width="250" valign="top">
<? $usee = $u->getInfoPers($u->info['id'],0); if($usee!=false){ echo $usee[0]; }else{ echo 'information is lost.'; } ?>
</td>
<td width="230" valign="top" style="padding-top:19px;"><? include('modules_data/stats_loc.php'); ?></td>
<td width="230" valign="top" style="padding-top:19px;"><? require_once('modules_data/stats_loc.php'); ?></td>
<td valign="top"><div align="right">
<? if( $u->error != '' ) { ?>
<font color=red><b>

View File

@ -12,7 +12,7 @@ if($u->room['file']=='nc/bk')
<td width="250" valign="top">
<? $usee = $u->getInfoPers($u->info['id'],0); if($usee!=false){ echo $usee[0]; }else{ echo 'information is lost.'; } ?>
</td>
<td width="230" valign="top" style="padding-top:19px;"><? include('modules_data/stats_loc.php'); ?></td>
<td width="230" valign="top" style="padding-top:19px;"><? require_once('modules_data/stats_loc.php'); ?></td>
<td valign="top"><div align="right">
<table border="0" cellpadding="0" cellspacing="0">
<tr align="right" valign="top">

View File

@ -29,7 +29,7 @@ if($u->room['file']=='nc/cp')
<td width="250" valign="top">
<? $usee = $u->getInfoPers($u->info['id'],0); if($usee!=false){ echo $usee[0]; }else{ echo 'information is lost.'; } ?>
</td>
<td width="230" valign="top" style="padding-top:19px;"><? include('modules_data/stats_loc.php'); ?></td>
<td width="230" valign="top" style="padding-top:19px;"><? require_once('modules_data/stats_loc.php'); ?></td>
<td valign="top"><div align="right">
<table border="0" cellpadding="0" cellspacing="0">
<tr align="right" valign="top">

View File

@ -12,7 +12,7 @@ if($u->room['file']=='nc/zv1')
<td width="250" valign="top">
<? $usee = $u->getInfoPers($u->info['id'],0); if($usee!=false){ echo $usee[0]; }else{ echo 'information is lost.'; } ?>
</td>
<td width="230" valign="top" style="padding-top:19px;"><? include('modules_data/stats_loc.php'); ?></td>
<td width="230" valign="top" style="padding-top:19px;"><? require_once('modules_data/stats_loc.php'); ?></td>
<td valign="top"><div align="right">
<table border="0" cellpadding="0" cellspacing="0">
<tr align="right" valign="top">

View File

@ -12,7 +12,7 @@ if($u->room['file']=='nc/zv2')
<td width="250" valign="top">
<? $usee = $u->getInfoPers($u->info['id'],0); if($usee!=false){ echo $usee[0]; }else{ echo 'information is lost.'; } ?>
</td>
<td width="230" valign="top" style="padding-top:19px;"><? include('modules_data/stats_loc.php'); ?></td>
<td width="230" valign="top" style="padding-top:19px;"><? require_once('modules_data/stats_loc.php'); ?></td>
<td valign="top"><div align="right">
<table border="0" cellpadding="0" cellspacing="0">
<tr align="right" valign="top">

View File

@ -12,7 +12,7 @@ if($u->room['file']=='nc/zv3')
<td width="250" valign="top">
<? $usee = $u->getInfoPers($u->info['id'],0); if($usee!=false){ echo $usee[0]; }else{ echo 'information is lost.'; } ?>
</td>
<td width="230" valign="top" style="padding-top:19px;"><? include('modules_data/stats_loc.php'); ?></td>
<td width="230" valign="top" style="padding-top:19px;"><? require_once('modules_data/stats_loc.php'); ?></td>
<td valign="top"><div align="right">
<table border="0" cellpadding="0" cellspacing="0">
<tr align="right" valign="top">

View File

@ -12,7 +12,7 @@ if($u->room['file']=='nc/zv4')
<td width="250" valign="top">
<? $usee = $u->getInfoPers($u->info['id'],0); if($usee!=false){ echo $usee[0]; }else{ echo 'information is lost.'; } ?>
</td>
<td width="230" valign="top" style="padding-top:19px;"><? include('modules_data/stats_loc.php'); ?></td>
<td width="230" valign="top" style="padding-top:19px;"><? require_once('modules_data/stats_loc.php'); ?></td>
<td valign="top"><div align="right">
<table border="0" cellpadding="0" cellspacing="0">
<tr align="right" valign="top">

View File

@ -2,7 +2,7 @@
if(!defined('GAME')) { die(); }
if($u->room['file'] == 'newtower') {
include('_incl_data/class/__zv.php');
require_once('_incl_data/class/__zv.php');
$bs = mysql_fetch_array(mysql_query('SELECT * FROM `bs_turnirs` WHERE `id` = "'.$u->info['inTurnir'].'" LIMIT 1'));
$bmid = 0;
if(!isset($bs['id']) || $bs['status'] == 0) { die('Òóðíèð íå íàéäåí.'); }

View File

@ -123,7 +123,7 @@ if($u->room['file']=='novich')
<td width="250" valign="top">
<? $usee = $u->getInfoPers($u->info['id'],0); if($usee!=false){ echo $usee[0]; }else{ echo 'information is lost.'; } ?>
</td>
<td width="230" valign="top" style="padding-top:19px;"><? include('modules_data/stats_loc.php'); ?></td>
<td width="230" valign="top" style="padding-top:19px;"><? require_once('modules_data/stats_loc.php'); ?></td>
<td valign="top"><div align="right">
<table width="510" border="0" cellpadding="0" cellspacing="0">
<tr align="right" valign="top">

View File

@ -12,7 +12,7 @@ if($u->room['file']=='perehod')
<td width="250" valign="top">
<? $usee = $u->getInfoPers($u->info['id'],0); if($usee!=false){ echo $usee[0]; }else{ echo 'information is lost.'; } ?>
</td>
<td width="230" valign="top" style="padding-top:19px;"><? include('modules_data/stats_loc.php'); ?></td>
<td width="230" valign="top" style="padding-top:19px;"><? require_once('modules_data/stats_loc.php'); ?></td>
<td valign="top"><div align="right">
<table border="0" cellpadding="0" cellspacing="0">
<tr align="right" valign="top">

View File

@ -11,7 +11,7 @@ if($u->room['file']=='poklon') {
<td width="250" valign="top">
<? $usee = $u->getInfoPers($u->info['id'],0); if($usee!=false){ echo $usee[0]; }else{ echo 'information is lost.'; } ?>
</td>
<td width="230" valign="top" style="padding-top:19px;"><? include('modules_data/stats_loc.php'); ?></td>
<td width="230" valign="top" style="padding-top:19px;"><? require_once('modules_data/stats_loc.php'); ?></td>
<td valign="top"><div align="right">
<table border="0" cellpadding="0" cellspacing="0">
<tr align="right" valign="top">

View File

@ -13,7 +13,7 @@ if($u->room['file']=='ric_zv')
<td width="250" valign="top">
<? $usee = $u->getInfoPers($u->info['id'],0); if($usee!=false){ echo $usee[0]; }else{ echo 'information is lost.'; } ?>
</td>
<td width="230" valign="top" style="padding-top:19px;"><? include('modules_data/stats_loc.php'); ?></td>
<td width="230" valign="top" style="padding-top:19px;"><? require_once('modules_data/stats_loc.php'); ?></td>
<td valign="top"><div align="right">
<table border="0" cellpadding="0" cellspacing="0">
<tr align="right" valign="top">

View File

@ -11,7 +11,7 @@ if($u->room['file']=='room_xot') {
<td width="250" valign="top">
<? $usee = $u->getInfoPers($u->info['id'],0); if($usee!=false){ echo $usee[0]; }else{ echo 'information is lost.'; } ?>
</td>
<td width="230" valign="top" style="padding-top:19px;"><? include('modules_data/stats_loc.php'); ?></td>
<td width="230" valign="top" style="padding-top:19px;"><? require_once('modules_data/stats_loc.php'); ?></td>
<td valign="top"><div align="right">
<table border="0" cellpadding="0" cellspacing="0">
<tr align="right" valign="top">

View File

@ -29,7 +29,7 @@ if($u->room['file']=='nc/cp')
<td width="250" valign="top">
<? $usee = $u->getInfoPers($u->info['id'],0); if($usee!=false){ echo $usee[0]; }else{ echo 'information is lost.'; } ?>
</td>
<td width="230" valign="top" style="padding-top:19px;"><? include('modules_data/stats_loc.php'); ?></td>
<td width="230" valign="top" style="padding-top:19px;"><? require_once('modules_data/stats_loc.php'); ?></td>
<td valign="top"><div align="right">
<table border="0" cellpadding="0" cellspacing="0">
<tr align="right" valign="top">

View File

@ -12,7 +12,7 @@ if($u->room['file']=='torg')
<td width="250" valign="top">
<? $usee = $u->getInfoPers($u->info['id'],0); if($usee!=false){ echo $usee[0]; }else{ echo 'information is lost.'; } ?>
</td>
<td width="230" valign="top" style="padding-top:19px;"><? include('modules_data/stats_loc.php'); ?></td>
<td width="230" valign="top" style="padding-top:19px;"><? require_once('modules_data/stats_loc.php'); ?></td>
<td valign="top"><div align="right">
<? if( $u->error != '' ) { ?>
<font color=red><b>

View File

@ -13,7 +13,7 @@ if($u->room['file']=='trade_zv')
<td width="250" valign="top">
<? $usee = $u->getInfoPers($u->info['id'],0); if($usee!=false){ echo $usee[0]; }else{ echo 'information is lost.'; } ?>
</td>
<td width="230" valign="top" style="padding-top:19px;"><? include('modules_data/stats_loc.php'); ?></td>
<td width="230" valign="top" style="padding-top:19px;"><? require_once('modules_data/stats_loc.php'); ?></td>
<td valign="top"><div align="right">
<table border="0" cellpadding="0" cellspacing="0">
<tr align="right" valign="top">

View File

@ -7,7 +7,7 @@ if(!defined('GAME'))
if($u->room['file']=='turnir')
{
include('_incl_data/class/__turnir.php');
require_once('_incl_data/class/__turnir.php');
$tur->locationSee();

View File

@ -12,7 +12,7 @@ if($u->room['file']=='zalu')
<td width="250" valign="top">
<? $usee = $u->getInfoPers($u->info['id'],0); if($usee!=false){ echo $usee[0]; }else{ echo 'information is lost.'; } ?>
</td>
<td width="230" valign="top" style="padding-top:19px;"><? include('modules_data/stats_loc.php'); ?></td>
<td width="230" valign="top" style="padding-top:19px;"><? require_once('modules_data/stats_loc.php'); ?></td>
<td valign="top"><div align="right">
<table border="0" cellpadding="0" cellspacing="0">
<tr align="right" valign="top">

View File

@ -12,7 +12,7 @@ if($u->room['file']=='zalu_pal')
<td width="250" valign="top">
<? $usee = $u->getInfoPers($u->info['id'],0); if($usee!=false){ echo $usee[0]; }else{ echo 'information is lost.'; } ?>
</td>
<td width="230" valign="top" style="padding-top:19px;"><? include('modules_data/stats_loc.php'); ?></td>
<td width="230" valign="top" style="padding-top:19px;"><? require_once('modules_data/stats_loc.php'); ?></td>
<td valign="top"><div align="right">
<table border="0" cellpadding="0" cellspacing="0">
<tr align="right" valign="top">

View File

@ -12,7 +12,7 @@ if($u->room['file']=='zalu_pal2')
<td width="250" valign="top">
<? $usee = $u->getInfoPers($u->info['id'],0); if($usee!=false){ echo $usee[0]; }else{ echo 'information is lost.'; } ?>
</td>
<td width="230" valign="top" style="padding-top:19px;"><? include('modules_data/stats_loc.php'); ?></td>
<td width="230" valign="top" style="padding-top:19px;"><? require_once('modules_data/stats_loc.php'); ?></td>
<td valign="top"><div align="right">
<table border="0" cellpadding="0" cellspacing="0">
<tr align="right" valign="top">

View File

@ -12,7 +12,7 @@ if($u->room['file']=='zalu_pal3')
<td width="250" valign="top">
<? $usee = $u->getInfoPers($u->info['id'],0); if($usee!=false){ echo $usee[0]; }else{ echo 'information is lost.'; } ?>
</td>
<td width="230" valign="top" style="padding-top:19px;"><? include('modules_data/stats_loc.php'); ?></td>
<td width="230" valign="top" style="padding-top:19px;"><? require_once('modules_data/stats_loc.php'); ?></td>
<td valign="top"><div align="right">
<table border="0" cellpadding="0" cellspacing="0">
<tr align="right" valign="top">

View File

@ -12,7 +12,7 @@ if($u->room['file']=='zalu_pal4')
<td width="250" valign="top">
<? $usee = $u->getInfoPers($u->info['id'],0); if($usee!=false){ echo $usee[0]; }else{ echo 'information is lost.'; } ?>
</td>
<td width="230" valign="top" style="padding-top:19px;"><? include('modules_data/stats_loc.php'); ?></td>
<td width="230" valign="top" style="padding-top:19px;"><? require_once('modules_data/stats_loc.php'); ?></td>
<td valign="top"><div align="right">
<table border="0" cellpadding="0" cellspacing="0">
<tr align="right" valign="top">

View File

@ -12,7 +12,7 @@ if($u->room['file']=='zv1')
<td width="250" valign="top">
<? $usee = $u->getInfoPers($u->info['id'],0); if($usee!=false){ echo $usee[0]; }else{ echo 'information is lost.'; } ?>
</td>
<td width="230" valign="top" style="padding-top:19px;"><? include('modules_data/stats_loc.php'); ?></td>
<td width="230" valign="top" style="padding-top:19px;"><? require_once('modules_data/stats_loc.php'); ?></td>
<td valign="top"><div align="right">
<table border="0" cellpadding="0" cellspacing="0">
<tr align="right" valign="top">

View File

@ -12,7 +12,7 @@ if($u->room['file']=='zv2')
<td width="250" valign="top">
<? $usee = $u->getInfoPers($u->info['id'],0); if($usee!=false){ echo $usee[0]; }else{ echo 'information is lost.'; } ?>
</td>
<td width="230" valign="top" style="padding-top:19px;"><? include('modules_data/stats_loc.php'); ?></td>
<td width="230" valign="top" style="padding-top:19px;"><? require_once('modules_data/stats_loc.php'); ?></td>
<td valign="top"><div align="right">
<table border="0" cellpadding="0" cellspacing="0">
<tr align="right" valign="top">

View File

@ -12,7 +12,7 @@ if($u->room['file']=='zv3')
<td width="250" valign="top">
<? $usee = $u->getInfoPers($u->info['id'],0); if($usee!=false){ echo $usee[0]; }else{ echo 'information is lost.'; } ?>
</td>
<td width="230" valign="top" style="padding-top:19px;"><? include('modules_data/stats_loc.php'); ?></td>
<td width="230" valign="top" style="padding-top:19px;"><? require_once('modules_data/stats_loc.php'); ?></td>
<td valign="top"><div align="right">
<table border="0" cellpadding="0" cellspacing="0">
<tr align="right" valign="top">

View File

@ -12,7 +12,7 @@ if($u->room['file']=='zv4')
<td width="250" valign="top">
<? $usee = $u->getInfoPers($u->info['id'],0); if($usee!=false){ echo $usee[0]; }else{ echo 'information is lost.'; } ?>
</td>
<td width="230" valign="top" style="padding-top:19px;"><? include('modules/stats_loc.php'); ?></td>
<td width="230" valign="top" style="padding-top:19px;"><? require_once('modules/stats_loc.php'); ?></td>
<td valign="top"><div align="right">
<table border="0" cellpadding="0" cellspacing="0">
<tr align="right" valign="top">

View File

@ -16,7 +16,7 @@ if($u->room['file']=='zv_svet')
echo '<br><center>'.$u->abilsRoom('look').'</center>';
?>
</td>
<td width="230" valign="top" style="padding-top:19px;"><? include('modules_data/stats_loc.php'); ?></td>
<td width="230" valign="top" style="padding-top:19px;"><? require_once('modules_data/stats_loc.php'); ?></td>
<td valign="top"><div align="right">
<table border="0" cellpadding="0" cellspacing="0">
<tr align="right" valign="top">

View File

@ -8,8 +8,8 @@ header('Content-Type: text/html; charset=windows-1251');
if($_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest')
{
define('GAME',true);
include('_incl_data/__config.php');
include('_incl_data/class/__db_connect.php');
require_once('_incl_data/__config.php');
require_once('_incl_data/class/__db_connect.php');
include('_incl_data/class/__user.php');
if(isset($u->tfer['id']) && $u->info['align'] != 2)
{

View File

@ -1,26 +1,19 @@
<?php
header('Content-Type: text/html; charset=windows-1251');
define('GAME', true);
include('_incl_data/__config.php');
include('_incl_data/class/__db_connect.php');
include('_incl_data/class/__user.php');
include('_incl_data/class/__filter_class.php');
include('_incl_data/class/__chat_class.php');
require_once '_incl_data/__config.php';
require_once '_incl_data/class/__db_connect.php';
require_once '_incl_data/class/__user.php';
require_once '_incl_data/class/__filter_class.php';
require_once '_incl_data/class/__chat_class.php';
if(!isset($u->info['id']) || $u->info['banned']>0)
{
die(json_encode(array('js'=>'top.location="bk?exit='.$code.'";')));
}elseif($u->info['ip']!=$_SERVER['HTTP_X_REAL_IP'])
{
}
if(!isset($u->info['id']) || !isset($_COOKIE['login'])) {
die();
}
if($u->info['repass'] > 0) {
die();
if (
!isset($u->info['id']) ||
$u->info['banned'] > 0 ||
!isset($_COOKIE['login']) ||
$u->info['repass'] > 0
) {
exit(json_encode(['js' => 'top.location="bk?exit=' . $code . '";']));
}
if ($u->info['bithday'] == '01.01.1800') {
@ -33,13 +26,24 @@
}
if ($u->info['online'] < time() - 60) {
mysql_query('UPDATE `users` SET `online` = '.time().' WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
mysql_query('UPDATE users SET online = unix_timestamp() WHERE id = ' . $u->info['id']);
$filter->setOnline($u->info['online'], $u->info['id'], 0);
$u->onlineBonus();
}
if(isset($_POST['delMsg']) && ($u->info['admin']>0 || ($u->info['align']>1 && $u->info['align']<2) || ($u->info['align']>3 && $u->info['align']<4)))
{
if (
isset($_POST['delMsg']) &&
(
$u->info['admin'] > 0 ||
(
$u->info['align'] > 1 &&
$u->info['align'] < 2) ||
(
$u->info['align'] > 3 &&
$u->info['align'] < 4
)
)
) {
if (((int)$_POST['delMsg']) > 0) {
mysql_query('UPDATE `chat` SET `delete` = "' . $u->info['id'] . '" WHERE `id` = "' . mysql_real_escape_string(((int)$_POST['delMsg'])) . '" LIMIT 1');
} else {
@ -47,15 +51,14 @@
}
}
$r = array(
$r = [
'rnd' => $code,
'rn'=>NULL,
'list'=>NULL,
'msg'=>NULL,
'key'=>NULL,
'js'=>NULL,
'rn' => null,
'list' => null,
'msg' => null,
'js' => null,
'xu' => 0
);
];
$u->onlineBonus();
if ($u->info['battle'] > 0) {
@ -65,19 +68,20 @@
}
}
if(isset($_POST['msg']) && str_replace(' ','',$_POST['msg'])!='')
{
$msg = array();
if (isset($_POST['msg']) && str_replace(' ', '', $_POST['msg']) != '') {
$msg = [];
$_POST['msg'] = str_replace('\x3C', '<', $_POST['msg']);
$_POST['msg'] = str_replace('\x3', '>', $_POST['msg']);
$_POST['msg'] = iconv('UTF-8', 'windows-1251', $_POST['msg']);
function tolink($buf) {
function tolink($buf)
{
$x = explode(" ", $buf);
$newbuf = '';
for ($j = 0; $j < count($x); $j++) {
$uname = '&lt;Âíóòðåííÿÿ ññûëêà&gt;';
//
if( strripos($x[$j], 'new-combats.com/info/') == true ) {
if (strripos($x[$j], 'new-combats.com/info/')) {
$ulogin = explode('/info/', $x[$j]);
$ulogin = $ulogin[1];
$ulogin = mysql_fetch_array(mysql_query('SELECT `login` FROM `users` WHERE `id` = "' . mysql_real_escape_string($ulogin) . '" OR `login` = "' . mysql_real_escape_string($ulogin) . '" LIMIT 1'));
@ -85,11 +89,9 @@
$ulogin = htmlspecialchars($ulogin['login']);
$uname = '<font color=#831db7>&lt;Èíôîðìàöèÿ î &quot;' . $ulogin . '&quot;&gt;</font>';
}
}elseif( strripos($x[$j], 'audio_1610649509.mp3') == true ) { //ÒÓÒ àóäèî
$ulogin = explode('audio_1610649509.mp3',$x[$j]);
} elseif (strripos($x[$j], 'audio_1610649509.mp3')) { //ÒÓÒ àóäèî
$uname = '<font color=#FF851B>&lt;Ãîëîñîâîå ñîîáùåíèå&gt;</font>';
// }
}elseif( strripos($x[$j], 'new-combats.com/item/') == true ) {
} elseif (strripos($x[$j], 'new-combats.com/item/')) {
$ulogin = explode('/item/', $x[$j]);
$ulogin = $ulogin[1];
$ulogin = mysql_fetch_array(mysql_query('SELECT `name` FROM `items_main` WHERE `id` = "' . mysql_real_escape_string($ulogin) . '" LIMIT 1'));
@ -99,7 +101,7 @@
} else {
$uname = '<font color=#5f9b00>&lt;Áèáëèîòåêà ïðåäìåòîâ&gt;</font>';
}
}elseif( strripos($x[$j], 'new-combats.com/news') == true ) {
} elseif (strripos($x[$j], 'new-combats.com/news')) {
$ulogin = explode('/news', $x[$j]);
$ulogin = $ulogin[1];
$ulogin = ltrim($ulogin, '/');
@ -110,7 +112,7 @@
} else {
$uname = '<font color=#b57300>&lt;Íîâîñòíàÿ ëåíòà&gt;</font>';
}
}elseif( strripos($x[$j], 'new-combats.com/lib') == true ) {
} elseif (strripos($x[$j], 'new-combats.com/lib')) {
$ulogin = explode('/lib', $x[$j]);
$ulogin = $ulogin[1];
$ulogin = ltrim($ulogin, '/');
@ -122,7 +124,7 @@
} else {
$uname = '<font color=#4c6e00>&lt;Áèáëèîòåêà&gt;</font>';
}
}elseif( strripos($x[$j], 'new-combats.com/forum') == true ) {
} elseif (strripos($x[$j], 'new-combats.com/forum')) {
$ulogin = explode('/forum?read=', $x[$j]);
$ulogin = $ulogin[1];
$ulogin = explode('&', $ulogin);
@ -147,16 +149,14 @@
}
}
//
if (preg_match
$newbuf .= preg_match
("/(https:\\/\\/)?(new-combats+\\.com(([ \"'>\r\n\t])|(\\/([^ \"'>\r\n\t]*)?)))/",
$x[$j],$ok))
$newbuf.=str_replace($ok[2],"<small><a href=https://$ok[2] target=_blank ><i>".$uname."</i></a></small>",
str_replace("https://","",$x[$j]))." ";
else
$newbuf.=$x[$j]." ";
$x[$j], $ok) ? str_replace($ok[2], "<small><a href=https://$ok[2] target=_blank ><i>" . $uname . "</i></a></small>",
str_replace("https://", "", $x[$j])) . " " : $x[$j] . " ";
}
return $newbuf;
}
$_POST['msg'] = $chat->expworld($_POST['msg'], 120);
$_POST['msg'] = str_replace('\\', '\\\\', $_POST['msg']);
$_POST['msg'] = str_replace('"', '[s1;]', $_POST['msg']);
@ -172,7 +172,7 @@
$_POST['msg'] = str_replace(" ", '[s3;]TAB[s4;]', $_POST['msg']);
$_POST['msg'] = str_replace("", '[s3;]TAB[s4;]', $_POST['msg']);
$_POST['msg'] = htmlspecialchars($_POST['msg'],NULL,'cp1251');
$_POST['msg'] = htmlspecialchars($_POST['msg'], null, 'cp1251');
$_POST['msg'] = str_replace('%usersmile%', '', $_POST['msg']);
$_POST['msg'] = tolink($_POST['msg']);
@ -187,17 +187,13 @@
$smg = mysql_fetch_array(mysql_query('SELECT * FROM `chat` WHERE `login` = "' . $u->info['login'] . '" AND `time` > ' . (time() - 20) . ' ORDER BY `time` DESC LIMIT 1'));
if ($u->info['exp'] < 499999999)
{
if ($u->info['exp'] < 499999999) {
$lmg = mysql_fetch_array(mysql_query('SELECT COUNT(`id`) FROM `chat` WHERE `login` = "' . $u->info['login'] . '" AND `time` > ' . (time() - 5) . ' LIMIT 2'));
}
else
{
} else {
$lmg[0] = 0;
}
$testsmg = ' ' . $_POST['msg'] . ' ';
if ($testsmg == $smg['text'] && $u->info['exp'] > 100000)
{
if ($testsmg == $smg['text'] && $u->info['exp'] > 100000) {
if ($u->info['molch1'] < time()) {
@ -267,8 +263,7 @@
}
mysql_query('UPDATE `users` SET `molch1` = "' . $u->info['molch1'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
}
}elseif((preg_match("/private\[(.*?)\]/", $_POST['msg'], $msg['to']) || preg_match("/private \[(.*?)\]/", $_POST['msg'], $msg['to'])) && $u->info['exp'] < 150000)
{
} elseif ((preg_match("/private\[(.*?)\]/", $_POST['msg'], $msg['to']) || preg_match("/private \[(.*?)\]/", $_POST['msg'], $msg['to'])) && $u->info['exp'] < 150000) {
$r['js'] .= 'chat.sendMsg(["new","' . time() . '","6","","' . $u->info['login'] . '","<small>Âû íå ìîæåòå îòïðàâëÿòü ïðèâàò äî äîñòèæåíèÿ 150000 îïûòà.</small>","Black","1","1","0"]);';
} else {
@ -288,25 +283,26 @@
$msg['to'] = '';
$msg['da'] = 0;
$msg['color'] = $u->info['chatColor'];
$_POST['msg'] = $filter->antimat($_POST['msg']);
//Íîðìèðóåì òèïû ñîîáùåíèé
if(preg_match("/private\[(.*?)\]/", $_POST['msg'], $msg['to']))
{
if (preg_match("/private\[(.*?)\]/", $_POST['msg'], $msg['to'])) {
$msg['to'] = $msg['to'][1];
$_POST['msg'] = str_replace('private['.$msg['to'].']','private ['.$msg['to'].']',$_POST['msg']); $msg['to'] = '';
}elseif(preg_match("/to\[(.*?)\]/", $_POST['msg'], $msg['to']))
{
$_POST['msg'] = str_replace('private[' . $msg['to'] . ']', 'private [' . $msg['to'] . ']', $_POST['msg']);
$msg['to'] = '';
} elseif (preg_match("/to\[(.*?)\]/", $_POST['msg'], $msg['to'])) {
$msg['to'] = $msg['to'][1];
$_POST['msg'] = str_replace('to['.$msg['to'].']','to ['.$msg['to'].']',$_POST['msg']); $msg['to'] = '';
$_POST['msg'] = str_replace('to[' . $msg['to'] . ']', 'to [' . $msg['to'] . ']', $_POST['msg']);
$msg['to'] = '';
}
if(preg_match("/private \[(.*?)\]/", $_POST['msg'], $msg['to']))
{
$msg['to'] = trim($msg['to']['1'],' '); $msg['type'] = 3; $_POST['msg'] = str_replace('private ['.$msg['to'].']',' ',$_POST['msg']);
}elseif(preg_match("/to \[(.*?)\]/", $_POST['msg'], $msg['to']))
{
$msg['to'] = trim($msg['to']['1'],' '); $msg['type'] = 2; $_POST['msg'] = str_replace('to ['.$msg['to'].']',' ',$_POST['msg']);
if (preg_match("/private \[(.*?)\]/", $_POST['msg'], $msg['to'])) {
$msg['to'] = trim($msg['to']['1'], ' ');
$msg['type'] = 3;
$_POST['msg'] = str_replace('private [' . $msg['to'] . ']', ' ', $_POST['msg']);
} elseif (preg_match("/to \[(.*?)\]/", $_POST['msg'], $msg['to'])) {
$msg['to'] = trim($msg['to']['1'], ' ');
$msg['type'] = 2;
$_POST['msg'] = str_replace('to [' . $msg['to'] . ']', ' ', $_POST['msg']);
}
if ($u->info['admin'] == 0) { //ÒÓÒ SPAM
if ($msg['to'] != '' && !isset($admq['id'])) {
@ -317,17 +313,15 @@
}
if (!isset($admq['id'])) {
$msg['fspam'] = $filter->spamFiltr(str_replace('òî÷êà', '.', str_replace('ðó', 'ru', $_POST['msg'])));
if($msg['fspam']!='0')
{
$msg['spam'] = 1; $msg['delete'] = 1;
if ($msg['fspam'] != '0') {
$msg['spam'] = 1;
$msg['delete'] = 1;
$r['js'] .= 'chat.sendMsg(["new","' . time() . '","6","","' . $u->info['login'] . '","<small> íàøåì ÷àòå çàïðåùàåòñÿ ñîîáùàòü ññûëêè íà àòëüòåðíàòèâíûå ïðîåêòû. Ïîâòîðíûå ïîïûòêè ìîãóò ïðèâåñòè ê áëîêèðîâêå ïåðñîíàæà.</small>","Black","1","1","0"]);';
}
if($msg['spam'] == 1 && $u->info['molch1']<time() && $u->info['admin'] == 0)
{
if ($msg['spam'] == 1 && $u->info['molch1'] < time() && $u->info['admin'] == 0) {
$mban = $u->testAction('`uid` = "' . $u->info['id'] . '" AND `time` >= ' . strtotime('now 00:00:00') . ' AND `vars` = "msg_bans" LIMIT 1', 1);
if(!isset($mban['id']))
{
if (!isset($mban['id'])) {
$u->addAction(time(), 'msg_bans', '1');
$mban['vals'] = 0;
} else {
@ -335,8 +329,7 @@
$msg['delete'] = time();
}
if($mban['vals']+1 < 2)
{
if ($mban['vals'] + 1 < 2) {
$msg['fspam'] = str_replace('%', '</b>,<b>', $msg['fspam']);
$msg['fspam'] = '<b>' . ltrim($msg['fspam'], '0</b>,<b>') . '</b>';
$r['js'] .= 'chat.sendMsg(["new","' . time() . '","6","","' . $u->info['login'] . '","<small> íàøåì ÷àòå çàïðåùàåòñÿ ñîîáùàòü ññûëêè íà àòëüòåðíàòèâíûå ïðîåêòû. Çàïðåùåííûå ñëîâà: ' . $msg['fspam'] . '. Ïðåäóïðåæäåíèÿ [' . ($mban['vals'] + 1) . '/1]</small>","Black","1","1","0"]);';
@ -359,10 +352,8 @@
$r['js'] .= 'chat.sendMsg(["new","' . time() . '","6","","' . $u->info['login'] . '","<b>Âàñ äîáàâèëè â èãíîð</b>: Âû íå ìîæåòå îòïðàâëÿòü ñîîáùåíèÿ ïåðñîíàæó &quot;' . htmlspecialchars($msg['to']) . '&quot;.","Black","1","1","0"]);';
$msg['cancel']++;
}
if($msg['type'] == 3 && $msg['to'] == 'klan')
{
if($u->info['clan']==0)
{
if ($msg['type'] == 3 && $msg['to'] == 'klan') {
if ($u->info['clan'] == 0) {
$r['js'] .= 'chat.sendMsg(["new","' . time() . '","6","","' . $u->info['login'] . '","<small>Âû íå ÿâëÿåòåñü ÷àñòüþ îäíîãî èç <b>Êëàíîâ</b> è íå ìîæåòå îáùàòüñÿ ïî ýòîìó êàíàëó.</small>","Black","1","1","0"]);';
$msg['cancel']++;
} else {
@ -370,8 +361,7 @@
$msg['da'] = 1;
}
}
if($u->info['molch1']>time())
{
if ($u->info['molch1'] > time()) {
if ($msg['to'] != '' && !isset($admq['id'])) {
$admq = mysql_fetch_array(mysql_query('SELECT `id`,`admin` FROM `users` WHERE `login` = "' . mysql_real_escape_string($msg['to']) . '" AND `admin` > 0 LIMIT 1'));
if ($msg['type'] != 3) {
@ -383,43 +373,34 @@
}
}
if($msg['cancel']==0)
{
if(is_array($msg['to']))
{
if ($msg['cancel'] == 0) {
if (is_array($msg['to'])) {
$msg['to'] = '';
}
if($msg['type']==3 && $msg['da']>0)
{
if ($msg['type'] == 3 && $msg['da'] > 0) {
$msg['type'] = -3;
}
$msw = $chat->smileText($_POST['msg'], $msg['to'], $u->info['room'], $u->info['city']);
$nosend = 0;
if($msw != false)
{
if ($msw) {
$_POST['msg'] = $msw;
$msg['to'] = '';
$msg['type'] = 21;
if($msw == 'USER IS FALSE')
{
if ($msw == 'USER IS FALSE') {
$r['js'] .= 'chat.sendMsg(["new","' . time() . '","6","","' . $u->info['login'] . '","<small>Ïåðñîíàæà íåò â äàííîé êîìíàòå.</small>","Black","1","1","0"]);';
$nosend = 1;
}
}elseif($chat->str_count($_POST['msg'],3) == '/e ')
{
} elseif ($chat->str_count($_POST['msg'], 3) == '/e ') {
$msg['type'] = 21;
$_POST['msg'] = ltrim($_POST['msg'], '/e ');
}elseif($chat->str_count($_POST['msg'],3) == '/å ')
{
} elseif ($chat->str_count($_POST['msg'], 3) == '/å ') {
$msg['type'] = 21;
$_POST['msg'] = ltrim($_POST['msg'], '/å ');
}elseif($chat->str_count($_POST['msg'],4) == ' /e ')
{
} elseif ($chat->str_count($_POST['msg'], 4) == ' /e ') {
$msg['type'] = 21;
$_POST['msg'] = ltrim($_POST['msg'], ' /e ');
}elseif($chat->str_count($_POST['msg'],4) == ' /å ')
{
} elseif ($chat->str_count($_POST['msg'], 4) == ' /å ') {
$msg['type'] = 21;
$_POST['msg'] = ltrim($_POST['msg'], ' /å ');
}
@ -476,18 +457,17 @@
if ($msg['type'] == 2 && mb_convert_case($msg['to'], MB_CASE_LOWER) == 'êîììåíòàòîð') {
if (preg_match("/àíåêäîò/i", mb_convert_case($_POST['msg'], MB_CASE_LOWER))) {
//$com_act = 0;
$text_com = '';
$sp_all = mysql_fetch_array(mysql_query('SELECT COUNT(`id`) FROM `a_com_act` WHERE `act` = "' . $com_act . '" AND `time` > "' . time() . '" LIMIT 5'));
if ($sp_all[0] > 0) {
if (rand(0, 100) < 75) {
$text_com = array(
$text_com = [
'Îòñòàíü ïîïðîøàéêà! ... Èùó àíåêäîòû, èíòåðíåò íå ìàëåíüêèé!',
'Ïîäîæäè... Ñåé÷àñ ÷òî-íèáóäü íàéäó',
'Ïî÷òè íàøåë...',
'Âîò îäèí åñòü, íî îí íå èíòåðåñíûé...',
'À ñâåò íà öåíòðàëüíîé ïëîùàäè òüìó &quot;ïèíàåò&quot;... Ýõ...'
);
];
$text_com = $text_com[rand(0, (count($text_com) - 1))];
}
} else {
@ -509,7 +489,6 @@
if ($text_com != '') {
mysql_query('INSERT INTO `chat` (`text`,`login`,`to`,`city`,`room`,`type`,`time`,`new`) VALUES ("' . $text_com . '","Êîììåíòàòîð","' . $u->info['login'] . '","' . $u->info['city'] . '","' . $u->info['room'] . '","2","' . time() . '","1")');
}
//$msg['cancel']++;
} else {
include('commentator.php');
if ($comment != '') {
@ -517,25 +496,20 @@
}
}
}
mysql_query('UPDATE `users` SET `afk` = "",`dnd` = "",`timeMain` = "' . time() . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
}
}
if( $u->info['room'] == 362 && (int)$_GET['r3'] != 1 ) {
}
//Ïîëó÷àåì ñïèñîê îíëàéí
if($_GET['r1']!=0)
{
if ($_GET['r1'] != 0) {
$sp = mysql_query('SELECT `u`.`pass`,`u`.`sex`,`s`.`dnow`,`u`.`timeMain`,`s`.`bot`,`s`.`atack`,`u`.`afk`,`u`.`dnd`,`u`.`banned`,`u`.`molch1`,`u`.`room`,`u`.`id`,`u`.`city`,`u`.`cityreg`,`u`.`online`,`u`.`align`,`u`.`clan`,`u`.`login`,`u`.`level`,`u`.`inTurnir`,`u`.`battle`,`u`.`invis`,`u`.`inUser`,`s`.`x`,`s`.`y` FROM `users` AS `u` LEFT JOIN `stats` AS `s` ON `s`.`id` = `u`.`id` WHERE ((`u`.`room` = "' . $u->info['room'] . '" AND "' . mysql_real_escape_string((int)$_GET['r3']) . '" != "1") OR ("' . mysql_real_escape_string((int)$_GET['r3']) . '" = "1" AND `pass` NOT LIKE "%saint%")) AND `mail`!="No E-mail" AND `room` != "303" ORDER BY `u`.`inUser` DESC,`u`.`online` DESC,`u`.`login` DESC LIMIT 1000');
$ar_id = 0;
$ar_lvl = 0;
$ar_all = 0;
$usl = array();
$cw = array();
$usid = array();
$usl = [];
$cw = [];
$usid = [];
while ($pl = mysql_fetch_array($sp)) {
$ysee = 1;
if ($pl['inUser'] > 0) {
@ -556,30 +530,43 @@
$ysee = 1;
}
if((int)$_GET['r3'] != 1) {
if( $u->info['dnow'] != $pl['dnow'] ) {
$ysee = 0;
}
}
if( $pl['room'] >= 362 && $pl['room'] <= 366 && (int)$_GET['r3'] != 1) {
if( $pl['x'] != $u->info['x'] || $pl['y'] != $u->info['y'] || $pl['room'] != $u->info['room']) {
$ysee = 0;
}
}
if( $usid[$pl['login']] == true ) {
if (
(
(int)$_GET['r3'] != 1 &&
$u->info['dnow'] != $pl['dnow']
) ||
(
$pl['room'] >= 362 &&
$pl['room'] <= 366 &&
(int)$_GET['r3'] != 1 &&
(
$pl['x'] != $u->info['x'] ||
$pl['y'] != $u->info['y'] ||
$pl['room'] != $u->info['room']
)
) ||
$usid[$pl['login']]
) {
$ysee = 0;
}
$usl[$pl['login']] = $pl['id'];
if( ($pl['online'] > time()-520 || $pl['inUser'] > 0) && ($pl['bot']!=1 || $pl['pass'] == '212121q') && $pl['banned'] == 0 && $ysee == 1)
{
if (
(
$pl['online'] > time() - 520 ||
$pl['inUser'] > 0
) &&
(
$pl['bot'] != 1 ||
$pl['pass'] == '212121q'
) &&
$pl['banned'] == 0 &&
$ysee == 1
) {
$usid[$pl['login']] = true;
if ($pl['invis'] != 1 && $pl['invis'] < time()) {
if($pl['clan']>0)
{
if ($pl['clan'] > 0) {
if ($u->info['clan'] > 0 && $pl['clan'] != $u->info['clan']) {
if (!isset($cw['war'][$pl['clan']][$u->info['clan']])) {
$pl['cwar'] = mysql_fetch_array(mysql_query('SELECT `id`,`type` FROM `clan_wars` WHERE
@ -602,8 +589,7 @@
}
$pl['clan'] = $pl['clan']['name_mini'];
}
if($pl['atack'] > time() || $pl['atack'] == 1 || $pl['atack'] == 2)
{
if ($pl['atack'] > time() || $pl['atack'] == 1 || $pl['atack'] == 2) {
if ($pl['atack'] != 2) {
$pl['atack'] = 1;
}
@ -628,18 +614,18 @@
$r['list'] = '{' . $r['list'] . '}';
}
function json_fix_cyr($json_str) {
function json_fix_cyr($json_str)
{
return $json_str;
}
//Ïîëó÷àåì ñîîáùåíèÿ
if(isset($_GET['mid']) && !isset($_POST['mid']))
{
if (isset($_GET['mid']) && !isset($_POST['mid'])) {
$_POST['mid'] = $_GET['mid'];
}
$r['msg'] = '';
$i = 0; $l = 0;
$i = 0;
$l = 0;
$sp = mysql_query('SELECT `nosee`,`frv`,`id`,`dn`,`active`,`invis`,`login`,`to`,`city`,`room`,`time`,`type`,`spam`,`text`,`toChat`,`color`,`typeTime`,`sound`,`global`,`delete`,`molch`,`da` FROM `chat` WHERE
(
(
@ -699,18 +685,32 @@ function json_fix_cyr($json_str) {
)
)
ORDER BY `id` ASC');
while($pl = mysql_fetch_array($sp))
{
while ($pl = mysql_fetch_array($sp)) {
if ($pl['delete'] > 0) {
$r['msg'] .= ',"m' . $i . '":["' . $pl['id'] . '","","delete","","","","","","","0","0","0","1","",""]';
}
if($pl['type'] == 6 || $pl['type'] == 8){ $pl['city'] = $u->info['city']; }
if ($pl['type'] == 6 || $pl['type'] == 8) {
$pl['city'] = $u->info['city'];
}
$see = 1;
if($pl['type'] == 8 && $u->info['admin'] == 0 && (($u->info['align'] <= 1 || $u->info['align'] >= 2) && ($u->info['align'] <= 3 || $u->info['align'] >= 4))) {
if (
$pl['type'] == 8 &&
$u->info['admin'] == 0 &&
(
(
$u->info['align'] <= 1 ||
$u->info['align'] >= 2
) &&
(
$u->info['align'] <= 3 ||
$u->info['align'] >= 4
)
)
) {
$see = 0;
}
@ -720,67 +720,116 @@ function json_fix_cyr($json_str) {
}
//Ïðîâåðêè íà äîñòóï ê ïðîñìîòðó
if((($pl['type']==3 || $pl['type']==4) && ($pl['city']==$u->info['city'] || $pl['global']==1)) || (($pl['type']==5 || $pl['type']==6 ||
if (
((
(
$pl['type']==8 && ( $u->info['admin'] > 0 || ($u->info['align'] > 1 && $u->info['align'] < 2) )
$pl['type'] == 3 ||
$pl['type'] == 4
) &&
(
$pl['city'] == $u->info['city'] ||
$pl['global'] == 1
)
) && ($pl['city']==$u->info['city'] || $pl['global']==1)) || ($pl['type']==7 && $pl['city']==$u->info['city'] && $pl['room']==$u->info['room']) || ($pl['type']==6 && ($pl['city']==$u->info['city'] || $pl['global']==1)) || $pl['type']==9 || $pl['type']==10)
{
if($pl['to']!='' && $pl['login']!=$u->info['login'] && $pl['to']!=$u->info['login'])
{
) ||
(
(
$pl['type'] == 5 ||
$pl['type'] == 6 ||
(
$pl['type'] == 8 &&
(
$u->info['admin'] > 0 ||
(
$u->info['align'] > 1 &&
$u->info['align'] < 2
)
)
)
) &&
(
$pl['city'] == $u->info['city'] ||
$pl['global'] == 1
)
) ||
(
$pl['type'] == 7 &&
$pl['city'] == $u->info['city'] &&
$pl['room'] == $u->info['room']
) ||
(
$pl['type'] == 6 &&
(
$pl['city'] == $u->info['city'] ||
$pl['global'] == 1
)
) ||
$pl['type'] == 9 ||
$pl['type'] == 10
) &&
$pl['to'] != '' &&
$pl['login'] != $u->info['login'] &&
$pl['to'] != $u->info['login']
) {
$n = 0;
$ex = explode(',', $pl['to']);
$j = 0;
while($j<count($ex))
{
if(trim($ex[$j],' ')==$u->info['login'])
{
while ($j < count($ex)) {
if (trim($ex[$j], ' ') == $u->info['login']) {
$n++;
}
$j++;
}
if($n==0)
{
if ($n == 0) {
$see = 0;
}
unset($n, $j, $ex);
}
}
//Êëàíîâîå ñîîáùåíèå (ïî âñåì ãîðîäàì)
if($pl['type']==-3 && ($pl['to']=='k'.$u->info['clan'] || $u->info['admin'] > 0 ))
{
if ($pl['type'] == -3 && ($pl['to'] == 'k' . $u->info['clan'] || $u->info['admin'] > 0)) {
$pl['type'] = 3;
if($pl['to']=='k'.$u->info['clan'])
{
if ($pl['to'] == 'k' . $u->info['clan']) {
$pl['to'] = 'klan';
}
$see = 1;
}elseif($pl['type']==-3)
{
} elseif ($pl['type'] == -3) {
$see = 0;
}
//Ñèñòåìíîå ñîîáùåíèå òîëüêî â ýòîé êîìíàòå
if($pl['type']==6 && $pl['room'] > 0 && $pl['room'] != $u->info['room'] && $pl['to']=='')
{
if (
$pl['type'] == 6 &&
$pl['room'] > 0 &&
$pl['room'] != $u->info['room'] &&
$pl['to'] == ''
) {
$see = 0;
}
//Ñèñòåìíîå ñîîáùåíèå ïî âñåìó ãîðîäó
if($pl['type']==8 && $pl['city']!=$u->info['city'] && $pl['global']==0)
{
if ($pl['type'] == 8 && $pl['city'] != $u->info['city'] && $pl['global'] == 0) {
$see = 0;
}
//Ñîîáùåíèå ñ ìîë÷àíêîé
if($pl['molch']>0)
{
if ($pl['molch'] > 0) {
$see = 0;
}
//Ñîîáùåíèå îòïðàâëåíî â äðóãîé êîìíàòå
if(($pl['type']==1 || $pl['type']==2) && ($pl['room'] != $u->info['room'] || $pl['city'] != $u->info['city']) && ($pl['global']==0 || $_COOKIE['chatCfg11']==0))
{
if (
(
$pl['type'] == 1 ||
$pl['type'] == 2
) &&
(
$pl['room'] != $u->info['room'] ||
$pl['city'] != $u->info['city']
) &&
(
$pl['global'] == 0 ||
$_COOKIE['chatCfg11'] == 0
)
) {
$see = 0;
}
@ -790,8 +839,7 @@ function json_fix_cyr($json_str) {
}
//Ãëîáàë
if($pl['global']==1 && $pl['city']==$u->info['city'] && $pl['type']!=-3)
{
if ($pl['global'] == 1 && $pl['city'] == $u->info['city'] && $pl['type'] != -3) {
$see = 1;
}
@ -809,8 +857,7 @@ function json_fix_cyr($json_str) {
if ($pl['login'] != $u->info['login'] && $pl['nosee'] != 0 && $u->info['id'] != $pl['nosee'] && $u->info['admin'] == 0 && $modr == 0) {
$see = 0;
} else {
if( $pl['nosee'] != 0 ) {
if( $pl['login'] != $u->info['login'] ) {
if ($pl['nosee'] != 0 && $pl['login'] != $u->info['login']) {
$noseein = 'ñêðûòî';
if ($u->info['id'] == $pl['nosee']) {
$noseein = 'âàø ðåôåðàë';
@ -821,7 +868,6 @@ function json_fix_cyr($json_str) {
}
}
}
}
if ($see == 1 && $pl['delete'] == 0 && $pl['login'] != '') {
@ -830,15 +876,10 @@ function json_fix_cyr($json_str) {
$see = 0;
}
unset($qix);
//unset($n,$j,$ex,$qix);
}
if($see == 1 && $pl['delete'] == 0)
{
//$pl['text'] = str_replace('"','&nbsp;',$pl['text']);
if($pl['time'] < 0)
{
if ($see == 1 && $pl['delete'] == 0) {
if ($pl['time'] < 0) {
if ($pl['to'] == '') {
$lmsch = mysql_fetch_array(mysql_query('SELECT `id` FROM `chat` ORDER BY `id` DESC LIMIT 1'));
if (isset($lmsch['id'])) {
@ -853,39 +894,28 @@ function json_fix_cyr($json_str) {
}
$pl['time'] = time();
}
if($pl['delete']>0)
{
$r['msg'] .= ',"'.$i.'":{"d":"'.$pl['id'].'"}';
}elseif($pl['spam']>0)
{
if ($pl['spam'] > 0) {
$r['msg'] .= ',"' . $i . '":{"s":"' . $pl['id'] . '"}';
} else {
$reimg = array();
if(preg_match_all("/\[img\[(.*?)\]\]\[1\]/", $pl['text'], $reimg) && ($u->info['admin']>0 || $pl['type']==5 || $pl['type']==6 || $pl['type']==10 || $pl['type']==11))
{
$reimg = [];
if (preg_match_all("/\[img\[(.*?)\]\]\[1\]/", $pl['text'], $reimg) && ($u->info['admin'] > 0 || $pl['type'] == 5 || $pl['type'] == 6 || $pl['type'] == 10 || $pl['type'] == 11)) {
$k = 0;
while($k<=count($reimg[1]))
{
while ($k <= count($reimg[1])) {
$pl['text'] = str_replace('[img[' . $reimg[1][$k] . ']][1]', '<img src=https://img.new-combats.com/i/' . $reimg[1][$k] . ' height=19>', $pl['text']);
$k++;
}
}
if(preg_match_all("/\[img\[(.*?)\]\]/", $pl['text'], $reimg) && ($u->info['admin']>0 || $pl['type']==5 || $pl['type']==6 || $pl['type']==10 || $pl['type']==11))
{
if (preg_match_all("/\[img\[(.*?)\]\]/", $pl['text'], $reimg) && ($u->info['admin'] > 0 || $pl['type'] == 5 || $pl['type'] == 6 || $pl['type'] == 10 || $pl['type'] == 11)) {
$k = 0;
while($k<=count($reimg[1]))
{
while ($k <= count($reimg[1])) {
$pl['text'] = str_replace('[img[' . $reimg[1][$k] . ']]', '<img src=https://img.new-combats.com/i/' . $reimg[1][$k] . '>', $pl['text']);
$k++;
}
}
if(preg_match_all("/item\[(.*?)\]/", $pl['text'], $reimg))
{
if (preg_match_all("/item\[(.*?)\]/", $pl['text'], $reimg)) {
$k = 0;
while($k<=count($reimg[1]))
{
while ($k <= count($reimg[1])) {
$pl['text'] = str_replace('item[' . $reimg[1][$k] . ']', '<b oncontextmenu=\"return false;\" onClick=\"alert(\'Ôóíêöèÿ âðåìåííî íåäîñòóïíà!\');\" style=\"cursor:pointer;\" class=\"itemsInfo\">Ïðåäìåò</b>', $pl['text']);
$k++;
}
@ -893,24 +923,20 @@ function json_fix_cyr($json_str) {
if (preg_match_all("/\.(?:mp3)$/i", $pl['text'], $reimg)) //ÒÓÒ àóäèî audio
{
$k = 0;
while($k<=count($reimg[1]))
{
while ($k <= count($reimg[1])) {
$pl['text'] = str_replace('item[' . $reimg[1][$k] . ']', '<b oncontextmenu=\"return false;\" onClick=\"alert(\'Ôóíêöèÿ âðåìåííî íåäîñòóïíà!\');\" style=\"cursor:pointer;\" class=\"itemsInfo\">Àóäèî çàïèñü</b>', $pl['text']);
$k++;
}
}
if(preg_match_all("/item \[(.*?)\]/", $pl['text'], $reimg))
{
if (preg_match_all("/item \[(.*?)\]/", $pl['text'], $reimg)) {
$k = 0;
while($k<=count($reimg[1]))
{
while ($k <= count($reimg[1])) {
$pl['text'] = str_replace('item [' . $reimg[1][$k] . ']', '<b oncontextmenu=\"return false;\" onClick=\"alert(\'Ôóíêöèÿ âðåìåííî íåäîñòóïíà!\');\" style=\"cursor:pointer;\" class=\"itemsInfo\">Ïðåäìåò</b>', $pl['text']);
$k++;
}
}
if($pl['type'] != 3) {
if($pl['invis'] == 1 || $pl['invis'] > time()) {
if ($pl['type'] != 3 && ($pl['invis'] == 1 || $pl['invis'] > time())) {
if ($u->info['admin'] == 0) {
$pl['login'] = '<b><i>Íåâèäèìêà</i></b>';
} else {
@ -918,7 +944,6 @@ function json_fix_cyr($json_str) {
}
}
}
if ($pl['invis'] > 0 && ($pl['type'] == 1 || $pl['type'] == 2)) {
$pl['color'] = 'Black';
@ -927,8 +952,7 @@ function json_fix_cyr($json_str) {
$r['msg'] .= ',"m' . $i . '":["' . $pl['id'] . '","' . $pl['time'] . '","' . $pl['type'] . '","' . $pl['login'] . '","' . $pl['to'] . '","' . $pl['text'] . '","' . $pl['color'] . '","' . $pl['toChat'] . '","' . $pl['typeTime'] . '","' . $pl['sound'] . '","' . $pl['global'] . '","' . $pl['molch'] . '","' . $pl['active'] . '","' . date('H:i', $pl['time']) . '","' . date('d.m.Y H:i', $pl['time']) . '","' . $pl['frv'] . '","' . $pl['invis'] . '"]';
}
}
if($l < $pl['id'])
{
if ($l < $pl['id']) {
$l = $pl['id'];
}
$i++;
@ -940,27 +964,16 @@ function json_fix_cyr($json_str) {
$r['js'] .= $rsys;
}
unset($rsys);
//Ïïðîâåðÿåì èçìåíåíèÿ ïåðñîíàæà
// if($_POST['tgfs'] == 0) {
// $tgfc = mysql_fetch_array(mysql_query('SELECT COUNT(`id`) FROM `telegram` WHERE `uid` = "'.$u->info['id'].'" AND `open` = "0" LIMIT 1'));
// if($tgfc[0]>0)
// {
// $r['js'] .= 'top.tgf_ico(1);';
// }
// }
//Ãåíåðèðóåì êëþ÷
$r['key'] = md5($u->room['name'] . '+' . $ar_id . '+' . $ar_lvl . '+' . $ar_all);
unset($ar_id, $ar_lvl);
if($_COOKIE['chatCfg12']==0)
{
if ($_COOKIE['chatCfg12'] == 0) {
$_GET['key'] = time();
}
if($r['key']==$_GET['key'])
{
if ($r['key'] == $_GET['key']) {
//Ñïèñîê îíëàéí îñòàåòñÿ íåèçìåííûì
unset($r['rn'], $r['list'], $r['key'], $r['xu']);
}elseif($_GET['r1']!=0)
{
} elseif ($_GET['r1'] != 0) {
$r['rn'] = iconv('cp1251', 'utf-8', $u->room['name']);
$r['list'] = iconv('cp1251', 'utf-8', $r['list']);
}
@ -995,21 +1008,15 @@ function json_fix_cyr($json_str) {
}
//Ïåðåêîäèðóåì ñòðîêè
if($r['js']!=NULL)
{
if ($r['js'] != null) {
$r['js'] = iconv('cp1251', 'utf-8', $r['js']);
} else {
unset($r['js']);
}
if($r['msg']!=NULL)
{
if ($r['msg'] != null) {
$r['msg'] = iconv('cp1251', 'utf-8', $r['msg']);
} else {
unset($r['msg']);
}
unset($c, $u, $db);
$r = json_encode($r);
//$r = json_fix_cyr($r);
echo $r;
unset($r);
?>
echo json_encode($r);

View File

@ -1,8 +1,8 @@
<?
define('GAME',true);
include('../_incl_data/__config.php');
include('../_incl_data/class/__db_connect.php');
require_once('../_incl_data/__config.php');
require_once('../_incl_data/class/__db_connect.php');
$p = mysql_fetch_array(mysql_query('SELECT `id`,`login`,`level`,`sex`,`clan`,`align`,`city`,`cityreg` FROM `users` WHERE `id` = "'.mysql_real_escape_string($_GET['user']).'" LIMIT 1'));