From e5d14473dba3599a05bb0d55f2da8044d25ab074 Mon Sep 17 00:00:00 2001 From: lopar Date: Sun, 4 Mar 2018 00:54:41 +0200 Subject: [PATCH] nick3() and partially nick7() functions replaced by nick class --- _unused-files/arch_.php | 12 +++--- _unused-files/hellround.php | 2 +- boloto.php | 4 +- c_haos.php | 6 +-- clan_castle.php | 16 ++++---- clan_log.php | 2 +- classes/battle_new.class.php | 8 ++-- classturnir.php | 12 +++--- cronjobs/cron.php | 18 ++++----- cronjobs/cron_bots_battle.php | 4 +- elka.php | 2 +- forest.php | 2 +- forum.php | 45 +++------------------- functions.php | 28 +------------- give.php | 2 +- gotzamok.php | 2 +- hell.php | 2 +- inf.php | 2 +- labirint(1).php | 4 +- labirint(2).php | 4 +- labirint.php | 4 +- magic/attack.php | 4 +- magic/attack_t.php | 2 +- magic/attackk.php | 2 +- magic/attackk_close.php | 2 +- magic/attackk_open.php | 2 +- magic/battack.php | 2 +- magic/brat.php | 2 +- magic/cityattack.php | 4 +- magic/cpattack.php | 2 +- magic/eattack.php | 2 +- magic/ebattack.php | 2 +- magic/usability_klan/attack.php | 4 +- magic/usability_klan/attack_blood.php | 4 +- magic/usability_user/attack.php | 4 +- magic/usability_user/attack_blood.php | 4 +- magic/usability_vip/attack.php | 6 +-- magic/usability_vip/attack_blood.php | 4 +- magic/usability_vip/pers_blood.php | 4 +- magic/vampir.php | 2 +- startpodzemel.php | 2 +- tower.php | 2 +- towerin.php | 10 ++--- wall_build.php | 2 +- zamok.php | 2 +- zayavka.php | 54 +++++++++++++-------------- 46 files changed, 125 insertions(+), 186 deletions(-) diff --git a/_unused-files/arch_.php b/_unused-files/arch_.php index d449534..101e2f2 100644 --- a/_unused-files/arch_.php +++ b/_unused-files/arch_.php @@ -84,9 +84,9 @@ while(1) { mysql_query("UPDATE `users` SET `money` = `money`+400 WHERE `login` = '".$pay[0]."';"); addchp ('Внимание! Архивариус передал вам 400.00 кр. ','{[]}'.$pay[0].'{[]}'); exec("echo \"[PAYMENT] obnal to ".$us['id']."\" >> /var/log/arch.log"); - mysql_query('UPDATE `deztow_turnir` SET `log` = CONCAT(`log`,\''."".date("d.m.y H:i")." ".nick3($us['id'])." обналичил чек на 400 кр.
".'\') WHERE `active` = TRUE'); + mysql_query('UPDATE `deztow_turnir` SET `log` = CONCAT(`log`,\''."".date("d.m.y H:i")." ".nick::id($us['id'])->full(1)." обналичил чек на 400 кр.
".'\') WHERE `active` = TRUE'); } else { - mysql_query('UPDATE `deztow_turnir` SET `log` = CONCAT(`log`,\''."".date("d.m.y H:i")." ".nick3(233)." в ярости накинулся на ".nick3($us['id']).".
".'\') WHERE `active` = TRUE'); + mysql_query('UPDATE `deztow_turnir` SET `log` = CONCAT(`log`,\''."".date("d.m.y H:i")." ".nick::id(233)->full(1)." в ярости накинулся на ".nick::id($us['id'])->full(1).".
".'\') WHERE `active` = TRUE'); // начинаем бой mysql_query("INSERT INTO `bots` (`name`,`prototype`,`battle`,`hp`) values ('Архивариус','233','','".$arch['hp']."');"); $bot = mysql_insert_id(); @@ -109,7 +109,7 @@ while(1) { chgrp ("../backup/logs/battle".$id.".txt" , "www-data" ); exec("echo \"".date("Y-m-d H:i:s")."[PAYMENT] aggression to ".$jert['id']."\" >> /var/log/arch.log"); mysql_query("UPDATE users SET `battle` ={$id},`zayavka`=0 WHERE `id` = {$jert['id']}"); - mysql_query('UPDATE `deztow_turnir` SET `log` = CONCAT(`log`,\''."".date("d.m.y H:i")." ".nick3($bot)." напал на ".nick3($jert['id'])." завязался бой »»
".'\') WHERE `active` = TRUE'); + mysql_query('UPDATE `deztow_turnir` SET `log` = CONCAT(`log`,\''."".date("d.m.y H:i")." ".nick::id($bot)->full(1)." напал на ".nick::id($jert['id'])->full(1)." завязался бой »»
".'\') WHERE `active` = TRUE'); $archa['battle'] = $id; } @@ -141,7 +141,7 @@ while(1) { exec("echo \"".date("Y-m-d H:i:s")."[AGRESSION] in battle to ".$jert['id']."\" >> /var/log/arch.log"); mysql_query('UPDATE `battle` SET `teams` = \''.serialize($battle).'\', `t'.$ttt.'`=CONCAT(`t'.$ttt.'`,\';'.$bot.'\') WHERE `id` = '.$jert['battle'].' ;'); mysql_query("UPDATE bots SET `battle` =".$jert['battle']." WHERE `id`= ".$bot); - mysql_query('UPDATE `deztow_turnir` SET `log` = CONCAT(`log`,\''."".date("d.m.y H:i")." ".nick3($bot)." вмешался в поединок »»
".'\') WHERE `active` = TRUE;'); + mysql_query('UPDATE `deztow_turnir` SET `log` = CONCAT(`log`,\''."".date("d.m.y H:i")." ".nick::id($bot)->full(1)." вмешался в поединок »»
".'\') WHERE `active` = TRUE;'); }else { // начинаем бой @@ -171,7 +171,7 @@ while(1) { // создаем лог - $rr = "".nick3($bot)." и ".nick3($jert['id']).""; + $rr = "".nick::id($bot)->full(1)." и ".nick::id($jert['id'])->full(1).""; addlog($id,"Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу.
"); //chmod("/backup/logs/battle".$id.".txt",766); @@ -179,7 +179,7 @@ while(1) { chgrp ("../backup/logs/battle".$id.".txt" , "www-data" ); mysql_query("UPDATE users SET `battle` ={$id},`zayavka`=0 WHERE `id` = {$jert['id']}"); - mysql_query('UPDATE `deztow_turnir` SET `log` = CONCAT(`log`,\''."".date("d.m.y H:i")." ".nick3($bot)." напал на ".nick3($jert['id'])." завязался бой »»
".'\') WHERE `active` = TRUE'); + mysql_query('UPDATE `deztow_turnir` SET `log` = CONCAT(`log`,\''."".date("d.m.y H:i")." ".nick::id($bot)->full(1)." напал на ".nick::id($jert['id'])->full(1)." завязался бой »»
".'\') WHERE `active` = TRUE'); } } } diff --git a/_unused-files/hellround.php b/_unused-files/hellround.php index 1dd0692..bd18742 100644 --- a/_unused-files/hellround.php +++ b/_unused-files/hellround.php @@ -104,7 +104,7 @@ //$rr = "".nick3($user['id'])." и ".nick3($bot).""; //mysql_query("INSERT INTO `logs` (`id`,`log`) VALUES('{$id}','Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу.
');"); - addlog($id,"Часы показывали ".date("Y.m.d H.i").", когда ".nick3($poh['owner'])." вышел на битву с Адом...
"); + addlog($id,"Часы показывали ".date("Y.m.d H.i").", когда ".nick::id($poh['owner'])->full(1)." вышел на битву с Адом...
"); chown ("backup/logs/battle".$id.".txt" , "www-data" ); chgrp ("backup/logs/battle".$id.".txt" , "www-data" ); diff --git a/boloto.php b/boloto.php index 052cc1f..048995c 100644 --- a/boloto.php +++ b/boloto.php @@ -279,7 +279,7 @@ mysql_query("INSERT INTO `bots` (`name`,`prototype`,`battle`,`hp`) values ('".my mysql_query("UPDATE `bots` SET `battle` = '".mysql_real_escape_string($id)."' WHERE `id` = '".mysql_real_escape_string($bot)."' LIMIT 1;"); // создаем лог - $rr = "".nick3($user['id'])." и ".nick3($bot).""; + $rr = "".nick::id($user['id'])->full(1)." и ".nick::id($bot)->full(1).""; //mysql_query("INSERT INTO `logs` (`id`,`log`) VALUES('{$id}','Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу.
');"); addlog($id,"Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу.
"); @@ -331,7 +331,7 @@ mysql_query("INSERT INTO `bots` (`name`,`prototype`,`battle`,`hp`) values ('".my mysql_query("UPDATE `bots` SET `battle` = '".mysql_real_escape_string($id)."' WHERE `id` = '".mysql_real_escape_string($bot)."' LIMIT 1;"); // создаем лог - $rr = "".nick3($user['id'])." и ".nick3($bot).""; + $rr = "".nick::id($user['id'])->full(1)." и ".nick::id($bot)->full(1).""; //mysql_query("INSERT INTO `logs` (`id`,`log`) VALUES('{$id}','Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу.
');"); addlog($id,"Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу.
"); diff --git a/c_haos.php b/c_haos.php index f270c3a..081dff7 100644 --- a/c_haos.php +++ b/c_haos.php @@ -191,7 +191,7 @@ elseif ($in_haos['status']==0) if($cit_haos_pl['players']!='') { foreach(explode(";",$cit_haos_pl['players']) as $ch_p) - echo(nick3($ch_p).","); + echo(nick::id($ch_p)->full(1).","); echo('Пароль:'); } @@ -208,7 +208,7 @@ elseif ($in_haos['status']==0) if(strlen($cit_haos_pl['players'])>1) { foreach(explode(";",$cit_haos_pl['players']) as $ch_p) - echo(nick3($ch_p).","); + echo(nick::id($ch_p)->full(1).","); echo('Пароль:'); } else echo(' (Создать новую группу)'); @@ -239,7 +239,7 @@ elseif ($in_haos['status']==1) echo("
"); $cit_haos_pl=mysql_fetch_array(mysql_query("SELECT * FROM `cit_haos_var` WHERE `group`='".$in_haos['group']."' LIMIT 1;")); foreach(explode(";",$cit_haos_pl['players']) as $ch_p) - echo(nick3($ch_p)."
"); + echo(nick::id($ch_p)->full(1)."
"); echo(""); } diff --git a/clan_castle.php b/clan_castle.php index 66f269e..db39730 100644 --- a/clan_castle.php +++ b/clan_castle.php @@ -237,15 +237,15 @@ elseif(($ccd+90+900)<=time()) foreach( $at_t as $k=>$v ) { if ($k!=0) { $rr.=", "; $rrc.=", "; } - $rr .= nick3($v); - $rrc .= nick7($v); + $rr .= nick::id($v)->full(1); + $rrc .= nick::id($v)->short(); addchp ('Внимание! Ваш бой начался!
\'; top.frames[\'main\'].location=\'fbattle.php\'; var z = \' ','{[]}'.nick7 ($v).'{[]}'); } $rr .= " и "; $rrc .= " и "; foreach( $bots as $k=>$v ) { if ($k!=0) { $rr.=", "; $rrc.=", ";} - $rr .= nick3($v); - $rrc .= nick7($v); + $rr .= nick::id($v)->full(1); + $rrc .= nick::id($v)->short(); } $rr .= ""; addch ("Поединок между ".$rrc." начался. ",$user['room']); @@ -289,15 +289,15 @@ elseif(($ccd+90+900)<=time()) foreach( $at_t as $k=>$v ) { if ($k!=0) { $rr.=", "; $rrc.=", "; } - $rr .= nick3($v); - $rrc .= nick7($v); + $rr .= nick::id($v)->full(1); + $rrc .= nick::id($v)->short(); addchp ('Внимание! Ваш бой начался!
\'; top.frames[\'main\'].location=\'fbattle.php\'; var z = \' ','{[]}'.nick7 ($v).'{[]}'); } $rr .= " и "; $rrc .= " и "; foreach( $ow_t as $k=>$v ) { if ($k!=0) { $rr.=", "; $rrc.=", ";} - $rr .= nick3($v); - $rrc .= nick7($v); + $rr .= nick::id($v)->full(1); + $rrc .= nick::id($v)->short(); addchp ('Внимание! Ваш бой начался!
\'; top.frames[\'main\'].location=\'fbattle.php\'; var z = \' ','{[]}'.nick7 ($v).'{[]}'); } $rr .= "
"; diff --git a/clan_log.php b/clan_log.php index 76206a2..c477380 100644 --- a/clan_log.php +++ b/clan_log.php @@ -46,7 +46,7 @@ if($clan_acces[6][0] == 1) { $pp = ""; $dop = 'Екр.'; } $it['date'] = date('d.m.y h:i', $it['time']); - $it['login'] = nick3($it['user_id']); + $it['login'] = nick::id($it['user_id'])->full(1); $it['coms'] = ' Комментарий : '.$it['comment'].''; $t .= "".$pp."  ".$it['date']." ".$it['login']."".$it['coms']."".$it['suma']." $dop"; } diff --git a/classes/battle_new.class.php b/classes/battle_new.class.php index f493986..12301bb 100644 --- a/classes/battle_new.class.php +++ b/classes/battle_new.class.php @@ -1248,13 +1248,13 @@ class fbattle // оцениваем игроков //$cost1 =0; $cost2 =0; $kula4ka = 0; $t2c =0; $t1c =0; $lvs1=0; $lvs2=0; $bxp = 0; foreach ($this->t1 as $k => $v) { - $nks1[] = nick7($v); - $nks1hist[] = nick3($v); + $nks1[] = nick::id($v)->short(); + $nks1hist[] = nick::id($v)->full(1); } $lvs1 = $lvs1 / ($t1c + 1); foreach ($this->t2 as $k => $v) { - $nks2[] = nick7($v); - $nks2hist[] = nick3($v); + $nks2[] = nick::id($v)->short(); + $nks2hist[] = nick::id($v)->full(1); } // тима победителей diff --git a/classturnir.php b/classturnir.php index 95f5319..6d6b7e1 100644 --- a/classturnir.php +++ b/classturnir.php @@ -155,7 +155,7 @@ class TTournament { // кидаем в бой mysql_query("UPDATE `users` SET `battle` = {$id} WHERE `id` = ".$user1." OR `id` = ".$user2); // создаем лог - $rr = "".nick3($user['id'])." и ".nick3($jert['id']).""; + $rr = "".nick::id($user['id'])->full(1)." и ".nick::id($jert['id'])->full(1).""; addch ("Бой между ".nick7($user['id'])." и ".nick7($jert['id'])." начался. ",$user['room']); addlog($id,"Часы показывали ".date("Y.m.d H.i").", когда ".$rr." решили выяснить кто из них сильнее. (турнир)
"); return $id; @@ -199,7 +199,7 @@ class TTournament { mysql_query("delete from turnirbattle where id=".$res['id']); } if($win==3){ - echo nick3($res['userid'])." против ".nick3($res['userid1']); + echo nick::id($res['userid'])->full(1)." против ".nick::id($res['useridl'])->full(1); } } } @@ -389,9 +389,9 @@ class TTournament { addchp ('Внимание!Вы выбыли из турнира
','{[]}'.nick7 ($res['userid']).'{[]}'); addchp ('Внимание!Ваш противник отказался от боя. Техническая победа.
','{[]}'.nick7 ($res['userid1']).'{[]}'); } - else echo "
противник ".nick3($res['userid1'])."(поражений-".$looseL1[0].")
"; + else echo "
противник ".nick::id($res['useridl'])->full(1)."(поражений-".$looseL1[0].")
"; } - else echo "
противник ".nick3($res['userid1'])."(поражений-".$looseL1[0].")
"; + else echo "
противник ".nick::id($res['useridl'])->full(1)."(поражений-".$looseL1[0].")
"; } else echo "Ожидаем противника"; } @@ -405,9 +405,9 @@ class TTournament { addchp ('Внимание!Вы выбыли из турнира
','{[]}'.nick7 ($res['userid1']).'{[]}'); addchp ('Внимание!Ваш противник отказался от боя. Техническая победа.
','{[]}'.nick7 ($res['userid']).'{[]}'); } - else echo "
противник ".nick3($res['userid'])."(поражений-".$looseL[0].")
"; + else echo "
противник ".nick::id($res['userid'])->full(1)."(поражений-".$looseL[0].")
"; } - else echo "
противник ".nick3($res['userid'])."(поражений-".$looseL[0].")
"; + else echo "
противник ".nick::id($res['userid'])->full(1)."(поражений-".$looseL[0].")
"; } else echo "Ожидаем противника"; } diff --git a/cronjobs/cron.php b/cronjobs/cron.php index 168e66e..286bdc7 100644 --- a/cronjobs/cron.php +++ b/cronjobs/cron.php @@ -198,16 +198,16 @@ function startbattle($id, $zay, $r) { foreach($z['team1'] as $k => $v) { if($k != 0) { $rr .= ", "; } - $rr .= nick3($v); - file_get_contents('http://capitalcity.old-dark.ru/chats.php?id=7&user='.$v); + $rr .= nick::id($v)->full(1); + file_get_contents(GAMEDOMAIN.'/chats.php?id=7&user='.$v); } $rr .= "
и "; foreach($z['team2'] as $k => $v) { if($k != 0) { $rr .= ", "; } - $rr .= nick3($v); - file_get_contents('http://capitalcity.old-dark.ru/chats.php?id=7&user='.$v); + $rr .= nick::id($v)->full(1); + file_get_contents(GAMEDOMAIN.'/chats.php?id=7&user='.$v); } $rr .= ""; @@ -314,7 +314,7 @@ if($st_ar['value'] <= time()) { mysql_query("INSERT INTO `battle` (`id`, `coment`, `teams`, `time_m`, `timeout`, `type`, `status`, `t1`, `t2`, `to1`, `to2`, `blood`, `aren_of`) VALUES (NULL, '', '".serialize($teams)."', '".time()."', '3', '1', '0', '".$dark['id_at']."', '".$light['id_at']."', '".time()."', '".time()."', '1', '1')"); $id = mysql_insert_id(); mysql_query("UPDATE `bots` SET `battle` = {$id} WHERE (`id` = {$dark['id_at']} OR `id` = {$light['id_at']}) LIMIT 2"); - $rr = "".nick3($dark['id_at'])." и ".nick3($light['id_at']).""; + $rr = "".nick::id($dark['id_at'])->full(1)." и ".nick::id($light['id_at'])->full(1).""; addlog($id, "Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу.
"); mysql_query("UPDATE `users` SET `battle` = {$id}, `zayavka` = 0 WHERE (`id` = {$dark['id']} OR `id` = {$light['id']}) LIMIT 2"); file_get_contents('http://capitalcity.old-dark.ru/chats.php?id=2'); @@ -438,7 +438,7 @@ if(date("z-H-i") == date("z-H-i", $turnirstart['value'])) $urs[$row['owner']] = $rum; $i++; if($i > 1) { $lors .= ", "; } - $lors .= nick3($row['owner']); + $lors .= nick::id($row['owner'])->full(1); } undressall(233); @@ -457,9 +457,9 @@ if(date("z-H-i") == date("z-H-i", $turnirstart['value'])) mysql_query("UPDATE `online` SET `room` = '".$rums."', `date` = '999999999999' WHERE `id` = '235' LIMIT 1"); echo mysql_error(); $i++; - $lors .= ", ".nick3(233); - $lors .= ", ".nick3(234); - $lors .= ", ".nick3(235); + $lors .= ", ".nick::id(233)->full(1); + $lors .= ", ".nick::id(234)->full(1); + $lors .= ", ".nick::id(235)->full(1); $lors .= ltrim(",", $lors); mysql_query("TRUNCATE TABLE `deztow_items`"); diff --git a/cronjobs/cron_bots_battle.php b/cronjobs/cron_bots_battle.php index 98cccab..7b7f42d 100644 --- a/cronjobs/cron_bots_battle.php +++ b/cronjobs/cron_bots_battle.php @@ -293,12 +293,12 @@ class fbattle { foreach($this->t1 as $k => $v) { $nks1[] = nick7($v); - $nks1hist[] = nick3($v); + $nks1hist[] = nick::id($v)->full(1); } foreach($this->t2 as $k => $v) { $nks2[] = nick7($v); - $nks2hist[] = nick3($v); + $nks2hist[] = nick::id($v)->full(1); } if(in_array($ss[0], $this->t1)) { diff --git a/elka.php b/elka.php index ca66a83..63f6167 100644 --- a/elka.php +++ b/elka.php @@ -45,7 +45,7 @@ mysql_query("UPDATE `users` SET `podarokAD` = 1 WHERE `id` = '{$_SESSION['uid']}' LIMIT 1;"); } if ($_POST['comment']) { - mysql_query('INSERT INTO `elka` (`who`,`date`,`text`) values (\''.nick3 ($user['id']).'\',\''.date("d.m.Y H:i").'\',\''.strip_tags($_POST['comment']).'\');'); + mysql_query('INSERT INTO `elka` (`who`,`date`,`text`) values (\''.nick::id($user['id'])->full(1).'\',\''.date("d.m.Y H:i").'\',\''.strip_tags($_POST['comment']).'\');'); } diff --git a/forest.php b/forest.php index b0d401f..564e04d 100644 --- a/forest.php +++ b/forest.php @@ -56,7 +56,7 @@ if($rand < 15 && $user['battle'] == 0) { mysql_query("INSERT INTO `battle`(`teams`, `timeout`, `type`, `status`, `t1`, `t2`, `to1`, `to2`) VALUES ('".serialize($teams)."', '3', '1', '0', '".$user['id']."', '".$bot."', '".time()."', '".time()."')"); $id = mysql_insert_id(); mysql_query("UPDATE `bots` SET `battle` = {$id} WHERE `id` = {$bot} LIMIT 1"); - $rr = "".nick3($user['id'])." и ".nick3($bot).""; + $rr = "".nick::id($user['id'])->full(1)." и ".nick::id($bot)->full(1).""; addlog($id,"Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу.
"); mysql_query("UPDATE `users` SET `battle` = {$id}, `zayavka` = 0 WHERE `id` = '".$user['id']."' LIMIT 1"); addchp ('Внимание! На вас напал "'.$bots[$rbot].'". ','{[]}'.nick7 ($user["id"]).'{[]}'); diff --git a/forum.php b/forum.php index 7e0aef7..737e0e3 100644 --- a/forum.php +++ b/forum.php @@ -24,41 +24,8 @@ if (($user['align'] >= 1.98 && $user['align'] <= 1.99) || $user['admin'] == 1 || } $edit = ''; - -function nick3($id) -{ - $user = mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `id` = '" . mysql_real_escape_string($id) . "' LIMIT 1")); - $mm = ''; - if (isset($user['id'])) { - if ($user['baned'] == 1) { - $mm .= ''; - } - if ($user['align'] > 0) { - $mm .= ''; - } - if ($user['klan'] != '') { - $mm .= ' '; - } - $mm .= '' . $user['login'] . ''; - - $mm .= ' [' . $user['level'] . ']'; - - } - return $mm; -} - -function ClanImage($clan_id) -{ - $clanimg = mysql_fetch_assoc(mysql_query("SELECT `short` FROM `clans` WHERE `id` = '{$clan_id}' LIMIT 1")); - if ($clanimg['short']) { - $clanimg = $clanimg['short']; - } else { - $clanimg = "1x1"; - } - return $clanimg; -} - $search = ''; + if (isset($_GET['do']) && $_GET['do'] != "search" && $_GET['do'] != "my_topics" && $_GET['do'] != "my_comments" && $_GET['do'] != "open" && $_GET['do'] != "close" && $_GET['do'] != "fix" && $_GET['do'] != "unfix") { echo ''; } elseif (isset($_GET['do']) && $_GET['do'] == "search") { @@ -120,7 +87,7 @@ if (isset($_GET['topic']) && is_numeric($_GET['topic']) && $_GET['topic'] == 228 if (!$user['id']) { echo "Не авторизованы
"; } else { - echo "Игрок : " . nick3($user['id']) . "
"; + echo "Игрок : " . nick::id($user['id'])->full(1) . "
"; } ?>
@@ -381,7 +348,7 @@ if (isset($_GET['topic']) && is_numeric($_GET['topic']) && $_GET['topic'] == 228 if ($user['invis'] == 1) { $userPost = 'Невидимка'; } else { - $userPost = nick3($user['id']); + $userPost = nick::id($user['id'])->full(1); } if ($dostupPal == true) { $text1 = $text1; @@ -417,7 +384,7 @@ if (isset($_GET['topic']) && is_numeric($_GET['topic']) && $_GET['topic'] == 228 if ($user['invis'] == 1) { $userPost = 'Невидимка'; } else { - $userPost = nick3($user['id']); + $userPost = nick::id($user['id'])->full(1); } if ($dostupPal == false) { @@ -464,7 +431,7 @@ if (isset($_GET['topic']) && is_numeric($_GET['topic']) && $_GET['topic'] == 228 if ($user['invis'] == 1) { mysql_query("UPDATE `forum` SET `text` = CONCAT(`text`,'
Невидимка: " . mysql_real_escape_string($_GET['cpr']) . "') WHERE `id` = '" . mysql_real_escape_string($_GET['com']) . "' LIMIT 1"); } else { - mysql_query("UPDATE `forum` SET `text` = CONCAT(`text`,'
" . mysql_real_escape_string(nick3($user['id'])) . ": " . mysql_real_escape_string($_GET['cpr']) . "') WHERE `id` = '" . mysql_real_escape_string($_GET['com']) . "' LIMIT 1"); + mysql_query("UPDATE `forum` SET `text` = CONCAT(`text`,'
" . mysql_real_escape_string(nick::id($user['id'])->full(1)) . ": " . mysql_real_escape_string($_GET['cpr']) . "') WHERE `id` = '" . mysql_real_escape_string($_GET['com']) . "' LIMIT 1"); } echo ""; exit(); @@ -472,7 +439,7 @@ if (isset($_GET['topic']) && is_numeric($_GET['topic']) && $_GET['topic'] == 228 if (isset($_GET['do']) && $dostupPal == true) { if ($user['align'] >= 1.7 && $user['align'] < 2) { - $palclose = 'паладином ' . nick3($user['id']); + $palclose = 'паладином ' . nick::id($user['id'])->full(1); } elseif ((int)$user['admin'] == 1) { $palclose = 'Администрацией'; } diff --git a/functions.php b/functions.php index 7da51bb..6c339f3 100644 --- a/functions.php +++ b/functions.php @@ -310,9 +310,9 @@ function battlewithbot($b, $name = '', $time = 3, $blood = 1, $group = 1, $battl mysql_query("UPDATE `users` SET `battle` = {$battleid} WHERE `id` = {$user1['id']} LIMIT 1"); if ($user1['invis'] == 1) { - $rr = "невидимка и " . nick3($botid1) . ""; + $rr = "невидимка и " . nick::id($botid1)->full(1) . ""; } else { - $rr = "" . nick3($user1['id']) . " и " . nick3($botid1) . ""; + $rr = "" . nick::id($user1['id'])->full(1) . " и " . nick::id($botid1)->full(1) . ""; } addlog($battleid, "Часы показывали " . date("Y.m.d H.i") . ", когда " . $rr . " бросили вызов друг другу.
" . ($others ? "$others
" : "")); if (!$noredir) { @@ -1492,30 +1492,6 @@ function nick($user) return $r; } -function nick3($id) -{ - $user = mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `id` = '{$id}' LIMIT 1")); - - if (isset($user['id'])) { - $effect = mysql_fetch_array(mysql_query("SELECT `time` FROM `effects` WHERE `owner` = '{$id}' AND `type` = '1022' LIMIT 1")); - if ($effect && $id < _BOTSEPARATOR_) { - $user['login'] = 'невидимка'; - $user['level'] = '??'; - $user['id'] = '??'; - $user['align'] = '0'; - $user['klan'] = '0'; - } - if ($user['align'] > 0) { - $mm .= " 0 ? $user['align'] : "0") . ".gif\" />"; - } - if ($user['klan'] > 0) { - $mm .= ''; - } - $mm .= "{$user['login']} [{$user['level']}]"; - } - return $mm; -} - function nick4($id, $st) { $user = mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `id` = '{$id}' LIMIT 1")); diff --git a/give.php b/give.php index 70b8c16..ad5ae73 100644 --- a/give.php +++ b/give.php @@ -274,7 +274,7 @@ function reloadit() { ';
'.nick3($komu['id']).'';// '; +echo 'К кому передавать:'.nick::id($komu['id'])->full(1).'';// '; ?>

- Положил: ".nick3($it['owner'])."
"; + Положил: ".nick::id($it['owner'])->full(1)."
"; ?> "; + echo "  ".$i.". ".nick::id($f[0])->full(1)."
"; } ?>
diff --git a/inf.php b/inf.php index 53a6b02..b4c66e6 100644 --- a/inf.php +++ b/inf.php @@ -179,7 +179,7 @@ if ($okld == 1) { if ($okdop == 1) { echo "

Возможные мульты

"; $iplog = db::c()->query('SELECT idperslater FROM delo_multi WHERE idpersnow = ?i GROUP BY idperslater ASC', $user['id']); - while ($row_iplog = $iplog->fetch_assoc()) echo nick3($row_iplog['idperslater']) . " "; + while ($row_iplog = $iplog->fetch_assoc()) echo nick::id($row_iplog['idperslater'])->full() . " "; echo "

Дополнительные сведения

"; diff --git a/labirint(1).php b/labirint(1).php index 2a972a4..34d0ba9 100644 --- a/labirint(1).php +++ b/labirint(1).php @@ -217,7 +217,7 @@ if($user['room'] == 1052) { $bts = explode(';', $bot_ids); $is = 0; while($is <= count($bts)) { - $nicks .= nick3($bts[$is]).', '; + $nicks .= nick::id($bts[$is])->full(1).', '; $i_d .= $bts[$is].', '; $is++; } @@ -227,7 +227,7 @@ if($user['room'] == 1052) { if($user1['invis'] == 1) { $rr = "невидимка и ".$nicks.""; } else { - $rr = "".nick3($user['id'])." и ".$nicks.""; + $rr = "".nick::id($user['id'])->full(1)." и ".$nicks.""; } if(!mysql_query("UPDATE `bots` SET `battle` = {$id} WHERE ".$who."")) { die('Error #1'.$who); } diff --git a/labirint(2).php b/labirint(2).php index 52918e3..aa14412 100644 --- a/labirint(2).php +++ b/labirint(2).php @@ -217,7 +217,7 @@ if($user['room'] == 1052) { $bts = explode(';', $bot_ids); $is = 0; while($is <= count($bts)) { - $nicks .= nick3($bts[$is]).', '; + $nicks .= nick::id($bts[$is])->full(1).', '; $i_d .= $bts[$is].', '; $is++; } @@ -227,7 +227,7 @@ if($user['room'] == 1052) { if($user1['invis'] == 1) { $rr = "невидимка и ".$nicks.""; } else { - $rr = "".nick3($user['id'])." и ".$nicks.""; + $rr = "".nick::id($user['id'])->full(1)." и ".$nicks.""; } if(!mysql_query("UPDATE `bots` SET `battle` = {$id} WHERE ".$who."")) { die('Error #1'.$who); } diff --git a/labirint.php b/labirint.php index 35d5b9a..2d98d82 100644 --- a/labirint.php +++ b/labirint.php @@ -217,7 +217,7 @@ if($user['room'] == 1052) { $bts = explode(';', $bot_ids); $is = 0; while($is <= count($bts)) { - $nicks .= nick3($bts[$is]).', '; + $nicks .= nick::id($bts[$is])->full(1).', '; $i_d .= $bts[$is].', '; $is++; } @@ -227,7 +227,7 @@ if($user['room'] == 1052) { if($user1['invis'] == 1) { $rr = "невидимка и ".$nicks.""; } else { - $rr = "".nick3($user['id'])." и ".$nicks.""; + $rr = "".nick::id($user['id'])->full(1)." и ".$nicks.""; } if(!mysql_query("UPDATE `bots` SET `battle` = {$id} WHERE ".$who."")) { die('Error #1'.$who); } diff --git a/magic/attack.php b/magic/attack.php index 8b2b49a..fec604b 100644 --- a/magic/attack.php +++ b/magic/attack.php @@ -157,8 +157,8 @@ if ($user['battle'] > 0) { // создаем лог - $rr = "".nick3($user['id'])." и ".nick3($jert['id']).""; - addch ("Бой между ".nick7($user['id'])." и ".nick7($jert['id'])." начался. ",$user['room']); + $rr = "".nick::id($user['id'])->full(1)." и ".nick::id($jert['id'])->full(1).""; + addch ("Бой между ".nick::id($user['id'])->short()." и ".nick::id($jert['id'])->short()." начался. ",$user['room']); //mysql_query("INSERT INTO `logs` (`id`,`log`) VALUES('{$id}',"Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу.
"); diff --git a/magic/attack_t.php b/magic/attack_t.php index d67dec6..4213599 100644 --- a/magic/attack_t.php +++ b/magic/attack_t.php @@ -174,7 +174,7 @@ elseif (!$us['online']) { // создаем лог - $rr = "".nick3($user['id'])." и ".nick3($jert['id']).""; + $rr = "".nick::id($user['id'])->full(1)." и ".nick::id($jert['id'])->full(1).""; addch ("Бой между ".nick7($user['id'])." и ".nick7($jert['id'])." начался. ",$user['room']); //mysql_query("INSERT INTO `logs` (`id`,`log`) VALUES('{$id}','Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу.
');"); diff --git a/magic/attackk.php b/magic/attackk.php index 5c57b87..6d872b6 100644 --- a/magic/attackk.php +++ b/magic/attackk.php @@ -166,7 +166,7 @@ elseif (!$us['online']) { // создаем лог - $rr = "".nick3($user['id'])." и ".nick3($jert['id']).""; + $rr = "".nick::id($user['id'])->full(1)." и ".nick::id($jert['id'])->full(1).""; addch ("Бой между ".nick7($user['id'])." и ".nick7($jert['id'])." начался. ",$user['room']); //mysql_query("INSERT INTO `logs` (`id`,`log`) VALUES('{$id}',"Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу.
"); diff --git a/magic/attackk_close.php b/magic/attackk_close.php index e140d54..8a8ebe4 100644 --- a/magic/attackk_close.php +++ b/magic/attackk_close.php @@ -132,7 +132,7 @@ elseif (!$us['online']) { // создаем лог - $rr = "".nick3($user['id'])." и ".nick3($jert['id']).""; + $rr = "".nick::id($user['id'])->full(1)." и ".nick::id($jert['id'])->full(1).""; addch ("Бой между ".nick7($user['id'])." и ".nick7($jert['id'])." начался. ",$user['room']); //mysql_query("INSERT INTO `logs` (`id`,`log`) VALUES('{$id}',"Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу.
"); diff --git a/magic/attackk_open.php b/magic/attackk_open.php index dc88a03..ffc03c1 100644 --- a/magic/attackk_open.php +++ b/magic/attackk_open.php @@ -132,7 +132,7 @@ if ($user['battle'] > 0) { // создаем лог - $rr = "".nick3($user['id'])." и ".nick3($jert['id']).""; + $rr = "".nick::id($user['id'])->full(1)." и ".nick::id($jert['id'])->full(1).""; addch ("Бой между ".nick7($user['id'])." и ".nick7($jert['id'])." начался. ",$user['room']); //mysql_query("INSERT INTO `logs` (`id`,`log`) VALUES('{$id}',"Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу.
"); diff --git a/magic/battack.php b/magic/battack.php index 8c10424..ac76bf9 100644 --- a/magic/battack.php +++ b/magic/battack.php @@ -174,7 +174,7 @@ elseif (!$us['online']) { // создаем лог - $rr = "".nick3($user['id'])." и ".nick3($jert['id']).""; + $rr = "".nick::id($user['id'])->full(1)." и ".nick::id($jert['id'])->full(1).""; addch ("Бой между ".nick7($user['id'])." и ".nick7($jert['id'])." начался. ",$user['room']); //mysql_query("INSERT INTO `logs` (`id`,`log`) VALUES('{$id}','Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу.
');"); diff --git a/magic/brat.php b/magic/brat.php index 419de44..c8b7772 100644 --- a/magic/brat.php +++ b/magic/brat.php @@ -141,7 +141,7 @@ elseif ($user['zayavka'] > 0) { // создаем лог - $rr = "".nick3($user['id'])." и ".nick3($jert['id']).""; + $rr = "".nick::id($user['id'])->full(1)." и ".nick::id($jert['id'])->full(1).""; addch ("Бой между ".nick7($user['id'])." и ".nick7($jert['id'])." начался. ",$user['room']); //mysql_query("INSERT INTO `logs` (`id`,`log`) VALUES('{$id}',"Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу.
"); diff --git a/magic/cityattack.php b/magic/cityattack.php index 71c3836..cfc73f7 100644 --- a/magic/cityattack.php +++ b/magic/cityattack.php @@ -152,14 +152,14 @@ elseif ($owntravma['id'] && !$us['battle']) { // создаем лог - $rr = "".nick3($user['id'])." и ".nick3($jert['id']).""; + $rr = "".nick::id($user['id'])->full(1)." и ".nick::id($jert['id'])->full(1).""; addch ("Бой между ".nick7($user['id'])." и ".nick7($jert['id'])." начался. ",$user['room']); //mysql_query("INSERT INTO `logs` (`id`,`log`) VALUES('{$id}',"Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу.
"); mysql_query("UPDATE users SET `battle` ={$id},`zayavka`=0 WHERE `id`= {$user['id']} OR `id` = {$jert['id']}"); if($us['login']=="Общий Враг"){$jert['id']=3954;} - $rr = "".nick3($user['id'])." и ".nick3($jert['id']).""; + $rr = "".nick::id($user['id'])->full(1)." и ".nick::id($jert['id'])->full(1).""; addlog($id,"Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу.
"); if($jert['id'] && $user['id'] && $jert['id']<999999){ diff --git a/magic/cpattack.php b/magic/cpattack.php index 5f84907..04f26c0 100644 --- a/magic/cpattack.php +++ b/magic/cpattack.php @@ -174,7 +174,7 @@ elseif (!$us['online']) { // создаем лог - $rr = "".nick3($user['id'])." и ".nick3($jert['id']).""; + $rr = "".nick::id($user['id'])->full(1)." и ".nick::id($jert['id'])->full(1).""; addch ("Бой между ".nick7($user['id'])." и ".nick7($jert['id'])." начался. ",$user['room']); //mysql_query("INSERT INTO `logs` (`id`,`log`) VALUES('{$id}','Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу.
');"); diff --git a/magic/eattack.php b/magic/eattack.php index b16e80c..f557548 100644 --- a/magic/eattack.php +++ b/magic/eattack.php @@ -181,7 +181,7 @@ $outok=1; // создаем лог - $rr = "".nick3($user['id'])." и ".nick3($jert['id']).""; + $rr = "".nick::id($user['id'])->full(1)." и ".nick::id($jert['id'])->full(1).""; addch ("Бой между ".nick7($user['id'])." и ".nick7($jert['id'])." начался. ",$user['room']); //mysql_query("INSERT INTO `logs` (`id`,`log`) VALUES('{$id}','Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу.
');"); diff --git a/magic/ebattack.php b/magic/ebattack.php index 6571482..8d6cbc0 100644 --- a/magic/ebattack.php +++ b/magic/ebattack.php @@ -181,7 +181,7 @@ $outok=1; // создаем лог - $rr = "".nick3($user['id'])." и ".nick3($jert['id']).""; + $rr = "".nick::id($user['id'])->full(1)." и ".nick::id($jert['id'])->full(1).""; addch ("Бой между ".nick7($user['id'])." и ".nick7($jert['id'])." начался. ",$user['room']); //mysql_query("INSERT INTO `logs` (`id`,`log`) VALUES('{$id}','Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу.
');"); diff --git a/magic/usability_klan/attack.php b/magic/usability_klan/attack.php index f15863b..622d01a 100644 --- a/magic/usability_klan/attack.php +++ b/magic/usability_klan/attack.php @@ -119,9 +119,9 @@ if($vip['attack'] <= 0) { mysql_query("UPDATE `users` SET `battle` = {$id} WHERE `id` = {$jert['id']} LIMIT 1"); } - if($user['invis'] == 1) { $ld = 'невидимка'; } else { $ld = nick3($user['id']); } + $ld = nick::id($user['id'])->full(1); if($user['invis'] == 1) { $lds = 'невидимка'; } else { $lds = nick7($user['id']); } - $rr = "".$ld." и ".nick3($jert['id']).""; + $rr = "".$ld." и ".nick::id($jert['id'])->full(1).""; addch("Бой между ".$lds." и ".nick7($jert['id'])." начался.", $user['room']); addlog($id, "Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу.
"); mysql_query("UPDATE users SET `battle` = {$id},`zayavka`=0 WHERE `id`= {$user['id']} OR `id` = {$jert['id']}"); diff --git a/magic/usability_klan/attack_blood.php b/magic/usability_klan/attack_blood.php index 855934d..59e117b 100644 --- a/magic/usability_klan/attack_blood.php +++ b/magic/usability_klan/attack_blood.php @@ -119,9 +119,9 @@ if($vip['bloodattack'] <= 0) { mysql_query("UPDATE `users` SET `battle` = {$id} WHERE `id` = {$jert['id']} LIMIT 1"); } - if($user['invis'] == 1) { $ld = 'невидимка'; } else { $ld = nick3($user['id']); } + $ld = nick::id($user['id'])->full(1); if($user['invis'] == 1) { $lds = 'невидимка'; } else { $lds = nick7($user['id']); } - $rr = "".$ld." и ".nick3($jert['id']).""; + $rr = "".$ld." и ".nick::id($jert['id'])->full(1).""; addch("Бой между ".$lds." и ".nick7($jert['id'])." начался.", $user['room']); addlog($id, "Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу.
"); mysql_query("UPDATE users SET `battle` ={$id},`zayavka`=0 WHERE `id`= {$user['id']} OR `id` = {$jert['id']}"); diff --git a/magic/usability_user/attack.php b/magic/usability_user/attack.php index 61bc609..2c79249 100644 --- a/magic/usability_user/attack.php +++ b/magic/usability_user/attack.php @@ -119,9 +119,9 @@ if($vip['attack'] <= 0) { mysql_query("UPDATE `users` SET `battle` = {$id} WHERE `id` = {$jert['id']} LIMIT 1"); } - if($user['invis'] == 1) { $ld = 'невидимка'; } else { $ld = nick3($user['id']); } + $ld = nick::id($user['id'])->full(1); if($user['invis'] == 1) { $lds = 'невидимка'; } else { $lds = nick7($user['id']); } - $rr = "".$ld." и ".nick3($jert['id']).""; + $rr = "".$ld." и ".nick::id($jert['id'])->full(1).""; addch("Бой между ".$lds." и ".nick7($jert['id'])." начался.", $user['room']); addlog($id, "Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу.
"); mysql_query("UPDATE users SET `battle` = {$id},`zayavka`=0 WHERE `id`= {$user['id']} OR `id` = {$jert['id']}"); diff --git a/magic/usability_user/attack_blood.php b/magic/usability_user/attack_blood.php index 75ff3b6..75c2693 100644 --- a/magic/usability_user/attack_blood.php +++ b/magic/usability_user/attack_blood.php @@ -119,9 +119,9 @@ if($vip['bloodattack'] <= 0) { mysql_query("UPDATE `users` SET `battle` = {$id} WHERE `id` = {$jert['id']} LIMIT 1"); } - if($user['invis'] == 1) { $ld = 'невидимка'; } else { $ld = nick3($user['id']); } + $ld = nick::id($user['id'])->full(1); if($user['invis'] == 1) { $lds = 'невидимка'; } else { $lds = nick7($user['id']); } - $rr = "".$ld." и ".nick3($jert['id']).""; + $rr = "".$ld." и ".nick::id($jert['id'])->full(1).""; addch("Бой между ".$lds." и ".nick7($jert['id'])." начался.", $user['room']); addlog($id, "Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу.
"); mysql_query("UPDATE users SET `battle` ={$id},`zayavka`=0 WHERE `id`= {$user['id']} OR `id` = {$jert['id']}"); diff --git a/magic/usability_vip/attack.php b/magic/usability_vip/attack.php index 907766c..0fe91b2 100644 --- a/magic/usability_vip/attack.php +++ b/magic/usability_vip/attack.php @@ -118,10 +118,10 @@ if($vip['attack'] <= 0) { } else { mysql_query("UPDATE `users` SET `battle` = {$id} WHERE `id` = {$jert['id']} LIMIT 1"); } - - if($user['invis'] == 1) { $ld = 'невидимка'; } else { $ld = nick3($user['id']); } + + $ld = nick::id($user['id'])->full(1); if($user['invis'] == 1) { $lds = 'невидимка'; } else { $lds = nick7($user['id']); } - $rr = "".$ld." и ".nick3($jert['id']).""; + $rr = "".$ld." и ".nick::id($jert['id'])->full(1).""; addch("Бой между ".$lds." и ".nick7($jert['id'])." начался.", $user['room']); addlog($id, "Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу.
"); mysql_query("UPDATE users SET `battle` = {$id},`zayavka`=0 WHERE `id`= {$user['id']} OR `id` = {$jert['id']}"); diff --git a/magic/usability_vip/attack_blood.php b/magic/usability_vip/attack_blood.php index c127107..737dd01 100644 --- a/magic/usability_vip/attack_blood.php +++ b/magic/usability_vip/attack_blood.php @@ -118,9 +118,9 @@ if($vip['bloodattack'] <= 0) { mysql_query("UPDATE `users` SET `battle` = {$id} WHERE `id` = {$jert['id']} LIMIT 1"); } - if($user['invis'] == 1) { $ld = 'невидимка'; } else { $ld = nick3($user['id']); } + $ld = nick::id($user['id'])->full(1); if($user['invis'] == 1) { $lds = 'невидимка'; } else { $lds = nick7($user['id']); } - $rr = "".$ld." и ".nick3($jert['id']).""; + $rr = "".$ld." и ".nick::id($jert['id'])->full(1).""; addch("Бой между ".$lds." и ".nick7($jert['id'])." начался.", $user['room']); addlog($id, "Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу.
"); mysql_query("UPDATE users SET `battle` ={$id},`zayavka`=0 WHERE `id`= {$user['id']} OR `id` = {$jert['id']}"); diff --git a/magic/usability_vip/pers_blood.php b/magic/usability_vip/pers_blood.php index e2af730..2551c87 100644 --- a/magic/usability_vip/pers_blood.php +++ b/magic/usability_vip/pers_blood.php @@ -112,9 +112,9 @@ if($vip['pers_attack'] <= 0) { mysql_query("UPDATE `users` SET `battle` = {$id} WHERE `id` = {$jert['id']} LIMIT 1"); } - if($user['invis'] == 1) { $ld = 'невидимка'; } else { $ld = nick3($user['id']); } + $ld = nick::id($user['id'])->full(1); if($user['invis'] == 1) { $lds = 'невидимка'; } else { $lds = nick7($user['id']); } - $rr = "".$ld." и ".nick3($jert['id']).""; + $rr = "".$ld." и ".nick::id($jert['id'])->full(1).""; addch("Бой между ".$lds." и ".nick7($jert['id'])." начался.", $user['room']); addlog($id, "Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу.
"); mysql_query("UPDATE users SET `battle` ={$id},`zayavka`=0 WHERE `id`= {$user['id']} OR `id` = {$jert['id']}"); diff --git a/magic/vampir.php b/magic/vampir.php index 01380bb..78ae1f4 100644 --- a/magic/vampir.php +++ b/magic/vampir.php @@ -123,7 +123,7 @@ if ($user['battle'] > 0) { } // создаем лог - $rr = "".nick3($user['id'])." и ".nick3($us['id']).""; + $rr = "".nick::id($user['id'])->full(1)." и ".nick::id($us['id'])->full(1).""; addch ("Бой между ".nick7($user['id'])." и ".nick7($us['id'])." начался. ",$user['room']); //mysql_query("INSERT INTO `logs` (`id`,`log`) VALUES('{$id}','Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу.
');"); diff --git a/startpodzemel.php b/startpodzemel.php index 626c0ce..5fb9a19 100644 --- a/startpodzemel.php +++ b/startpodzemel.php @@ -75,7 +75,7 @@ $id = mysql_insert_id(); // апдейтим бота mysql_query("UPDATE `bots` SET `battle` = {$id} WHERE `id` = {$bot} LIMIT 1;"); // создаем лог -$rr = "".nick3($user['id'])." и ".nick3($bot).""; +$rr = "".nick::id($user['id'])->full(1)." и ".nick::id($bot)->full(1).""; addlog($id,"Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу.
"); mysql_query("UPDATE users SET `battle` ={$id},`zayavka`=0 WHERE `id`= {$user['id']};"); diff --git a/tower.php b/tower.php index da8baf6..a80e016 100644 --- a/tower.php +++ b/tower.php @@ -135,7 +135,7 @@ $bania->get_fond(); while($in = mysql_fetch_array($lss)) { $i++; if($i > 1) { $lors .= ", "; } - $lors .= nick3($in[0]); + $lors .= nick::id($in[0])->full(1); $lors .= ltrim(",", $lors); } if($lors == '') { diff --git a/towerin.php b/towerin.php index 72d5846..9b8cb7a 100644 --- a/towerin.php +++ b/towerin.php @@ -135,7 +135,7 @@ if($_POST['attack']) { addlog($jert['battle'], ''.date("H:i").' '.nick5($user['id'], "B".$ttt).' вмешался в поединок!
'); mysql_query('UPDATE `battle` SET `teams` = \''.serialize($battle).'\', `t'.$ttt.'` = CONCAT(`t'.$ttt.'`,\';'.$user['id'].'\'), `to'.$ttt.'` = \''.time().'\', `to'.$ttt2.'` = \''.(time()-1).'\' WHERE `id` = "'.$jert['battle'].'" LIMIT 1'); mysql_query("UPDATE `users` SET `battle` = '".$jert['battle']."', `zayavka` = 0 WHERE `id` = '".$user['id']."' LIMIT 1"); - mysql_query('UPDATE `deztow_turnir` SET `log` = CONCAT(`log`,\''."".date("d.m.y H:i")." ".nick3($user['id'])." вмешался в поединок против ".nick3($jert['id'])." »»
".'\') WHERE `active` = TRUE LIMIT 1'); + mysql_query('UPDATE `deztow_turnir` SET `log` = CONCAT(`log`,\''."".date("d.m.y H:i")." ".nick::id($user['id'])->full(1)." вмешался в поединок против ".nick::id($jert['id'])->full(1)." »»
".'\') WHERE `active` = TRUE LIMIT 1'); header("Location: fbattle.php"); } else { if($bot) { @@ -156,11 +156,11 @@ if($_POST['attack']) { mysql_query("UPDATE `users` SET `battle` = {$id} WHERE `id` = {$jert['id']} LIMIT 1"); } - $rr = "".nick3($user['id'])." и ".nick3($jert['id']).""; + $rr = "".nick::id($user['id'])->full(1)." и ".nick::id($jert['id'])->full(1).""; addch("".nick7($user['id'])." , применив магию нападения, внезапно напал на ".nick7($jert['id']).".", $user['room']); addlog($id, "Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу.
"); mysql_query("UPDATE `users` SET `battle` = {$id}, `zayavka` = 0 WHERE (`id` = {$user['id']} OR `id` = {$jert['id']})"); - mysql_query('UPDATE `deztow_turnir` SET `log` = CONCAT(`log`,\''."".date("d.m.y H:i")." ".nick3($user['id'])." напал на ".nick3($jert['id'])." завязался бой »»
".'\') WHERE `active` = TRUE LIMIT 1'); + mysql_query('UPDATE `deztow_turnir` SET `log` = CONCAT(`log`,\''."".date("d.m.y H:i")." ".nick::id($user['id'])->full(1)." напал на ".nick::id($jert['id'])->full(1)." завязался бой »»
".'\') WHERE `active` = TRUE LIMIT 1'); header("Location: fbattle.php"); } } else { @@ -220,7 +220,7 @@ while($u = mysql_fetch_array($list)) { mysql_query("UPDATE `users` SET `in_tower` = 0, `room` = '31' WHERE `id` = '".$u['id']."'"); mysql_query("UPDATE `online` SET `room` = '31' WHERE `id` = '".$u['id']."'"); - mysql_query('UPDATE `deztow_turnir` SET `log` = CONCAT(`log`,\''."".date("d.m.y H:i")." ".nick3($u['id'])." повержен и выбывает из турнира
".'\') WHERE `active` = TRUE LIMIT 1'); + mysql_query('UPDATE `deztow_turnir` SET `log` = CONCAT(`log`,\''."".date("d.m.y H:i")." ".nick::id($u['id'])->full(1)." повержен и выбывает из турнира
".'\') WHERE `active` = TRUE LIMIT 1'); addchp('Внимание! Вы выбыли из турнира Башни Смерти.', '{[]}'.$u['login'].'{[]}'); header('Location: tower.php'); } @@ -246,7 +246,7 @@ if(($kol_pl+$ls) < 2 && ($tur_data['start_time']+60) <= time()) { mysql_query("UPDATE `users` SET `money` = (`money`+'".$tur['coin']."'), `in_tower` = 0, `room` = 31 WHERE `id` = '".$user['id']."' LIMIT 1"); mysql_query("UPDATE `online` SET `room` = 31 WHERE `id` = '".$user['id']."' LIMIT 1"); - mysql_query('UPDATE `deztow_turnir` SET `winner` = \''.$user['id'].'\', `winnerlog` = \''.nick3($user['id']).'\', `endtime` = \''.time().'\', `active` = FALSE, `log` = CONCAT(`log`,\''."".date("d.m.y H:i")." Турнир завершен. Победитель : ".nick3($user['id'])." Приз : ".$tur['coin']." кр.
".'\') WHERE `active` = TRUE LIMIT 1'); + mysql_query('UPDATE `deztow_turnir` SET `winner` = \''.$user['id'].'\', `winnerlog` = \''.nick::id($user['id'])->full(1).'\', `endtime` = \''.time().'\', `active` = FALSE, `log` = CONCAT(`log`,\''."".date("d.m.y H:i")." Турнир завершен. Победитель : ".nick::id($user['id'])->full(1)." Приз : ".$tur['coin']." кр.
".'\') WHERE `active` = TRUE LIMIT 1'); addchp('Внимание! Поздравляем! Вы победитель турнира Башни смерти! Получаете '.$tur['coin'].' кр.', '{[]}'.$user['login'].'{[]}'); AddChatSystem('Внимание! Битва в Башне Смерти завершена. Победитель : '.$user['login'].' ['.$user['level'].']'); if($tur['art'] == 1) { $bs_art = 0; } else { $bs_art = 0; } #1 diff --git a/wall_build.php b/wall_build.php index 2b878df..337e609 100644 --- a/wall_build.php +++ b/wall_build.php @@ -510,7 +510,7 @@ $_POST['digstart']=0; mysql_query("UPDATE `bots` SET `battle` = {$id} WHERE `id` = {$bot} LIMIT 1;"); // создаем лог - $rr = "".nick3($user['id'])." и ".nick3($bot).""; + $rr = "".nick::id($user['id'])->full(1)." и ".nick::id($bot)->full(1).""; addlog($id,"Часы показывали ".date("Y.m.d H.i").", когда ".$rr." сошлись в поединке.
"); diff --git a/zamok.php b/zamok.php index 8a6f661..c420745 100644 --- a/zamok.php +++ b/zamok.php @@ -311,7 +311,7 @@ $polno = unserialize($klan['vozm']); } echo "

- Положил:
" . nick3($it['owner']) . "
"; + Положил:
" . nick::id($it['owner'])->full(1) . "
"; ?> забрать
diff --git a/zayavka.php b/zayavka.php index fe13f1d..c2d1935 100644 --- a/zayavka.php +++ b/zayavka.php @@ -223,13 +223,13 @@ class zayavka { $rr = "{$row['podan']} "; foreach($row['team1'] as $k => $v) { - $rr .= nick3($v); + $rr .= nick::id($v)->full(1); } if($row['team2']) { $rr .= " против "; foreach($row['team2'] as $k => $v) { - $rr .= nick3($v); + $rr .= nick::id($v)->full(1); } } @@ -261,14 +261,14 @@ class zayavka { $rr = "{$row['podan']} {$row['t1c']}({$range1}) ("; foreach($row['team1'] as $k => $v) { if($k != 0) { $rr .= ", "; } - $rr .= nick3($v); + $rr .= nick::id($v)->full(1); } $rr .= ") против {$row['t2c']}({$range2})("; foreach($row['team2'] as $k => $v) { if($k != 0) { $rr .= ", "; } - $rr .= nick3($v); + $rr .= nick::id($v)->full(1); } if(count($row['team2']) ==0) { $rr .= "группа не набрана"; } @@ -306,24 +306,20 @@ class zayavka { $rr = "{$row['podan']} ("; if($row['bots'] == '7') { - $rr .= nick3(10962); $rr .= ", "; - $rr .= nick3(10964); $rr .= ", "; - $rr .= nick3(10965); $rr .= ", "; - } elseif($row['bots'] == '8') { - $rr .= nick3(10124); $rr .= ", "; - $rr .= nick3(10125); $rr .= ", "; - $rr .= nick3(10126); $rr .= ", "; - } elseif($row['bots'] == '13') { - $rr .= nick3(10124); $rr .= ", "; - $rr .= nick3(10125); $rr .= ", "; - $rr .= nick3(10126); $rr .= ", "; + $rr .= nick::id(10962)->full(1); $rr .= ", "; + $rr .= nick::id(10964)->full(1); $rr .= ", "; + $rr .= nick::id(10965)->full(1); $rr .= ", "; + } elseif($row['bots'] == '8' || $row['bots'] == '13') { + $rr .= nick::id(10124)->full(1); $rr .= ", "; + $rr .= nick::id(10125)->full(1); $rr .= ", "; + $rr .= nick::id(10126)->full(1); $rr .= ", "; } foreach($row['team1'] as $k => $v) { if($k != 0) { $rr .= ", "; } - $rr .= nick3($v); + $rr .= nick::id($v)->full(1); } if(count($row['team1']) == 0 && $row['bots'] == 0) { $rr.= "группа не набрана"; } @@ -506,7 +502,7 @@ class zayavka { foreach($z['team1'] as $k => $v) { if($k != 0) { $rr .= ", "; } - $rr .= nick3($v); + $rr .= nick::id($v)->full(1); addchp('Внимание! Ваш бой начался!
\'; top.frames[\'main\'].location=\'fbattle.php\'; var z = \' ', '{[]}'.nick7($v).'{[]}'); } @@ -514,7 +510,7 @@ class zayavka { foreach($z['team2'] as $k => $v) { if($k != 0) { $rr .= ", "; } - $rr .= nick3($v); + $rr .= nick::id($v)->full(1); addchp('Внимание! Ваш бой начался!
\'; top.frames[\'main\'].location=\'fbattle.php\'; var z = \' ', '{[]}'.nick7($v).'{[]}'); } @@ -635,11 +631,11 @@ if ($_REQUEST['level'] == 'begin') { if($_POST['cansel']) { $z = $zay->getlist(1,null,$user['zayavka']); echo $zay->delteam (2,$z[$user['zayavka']]['team2'][0], $user['zayavka'], 1); - addchp ('Внимание! '.nick3($user['id']).' отказался от поединка. ','{[]}'.nick7 ($z[$user['zayavka']]['team2'][0]).'{[]}'); + addchp ('Внимание! '.nick::id($user['id'])->full(1).' отказался от поединка. ','{[]}'.nick7 ($z[$user['zayavka']]['team2'][0]).'{[]}'); } if($_POST['confirm2']) { $z = $zay->getlist(1,null,$_REQUEST['gocombat']); - addchp ('Внимание! '.nick3($user['id']).' принял заявку, нужно принять вызов или отказать. ','{[]}'.nick7 ($z[$_REQUEST['gocombat']]['team1'][0]).'{[]}'); + addchp ('Внимание! '.nick::id($user['id'])->full(1).' принял заявку, нужно принять вызов или отказать. ','{[]}'.nick7 ($z[$_REQUEST['gocombat']]['team1'][0]).'{[]}'); echo $zay->addteam (2,$user['id'], $_REQUEST['gocombat'], 1); die(""); } @@ -659,7 +655,7 @@ if ($_REQUEST['level'] == 'begin') { } if( $zay->ustatus($user['id'])==1 ) { if(count($z[$user['zayavka']]['team2'])>0){ - echo "Внимание! ".nick3($z[$user['zayavka']]['team2'][0])." принял заявку на бой, нужно отказать или принять вызов. "; + echo "Внимание! ".nick::id($z[$user['zayavka']]['team2'][0])->full(1)." принял заявку на бой, нужно отказать или принять вызов. "; } else { if ($z[$user['zayavka']]['level'] == 1) @@ -691,7 +687,7 @@ if ($_REQUEST['level'] == 'begin') { $id = mysql_insert_id(); mysql_query("INSERT INTO `logs` (`id`,`log`) VALUES('{$id}','Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу.
');"); mysql_query("UPDATE `bots` SET `battle` = {$id} WHERE `id` = {$bot} LIMIT 1;"); - $rr = "".nick3($user['id'])." и ".nick3($bot).""; + $rr = "".nick::id($user['id'])->full(1)." и ".nick::id($bot)->full(1).""; addlog($id,"Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу.
"); mysql_query("UPDATE users SET `battle` ={$id},`zayavka`=0 WHERE `id`= {$user['id']};"); @@ -740,20 +736,20 @@ if ($_REQUEST['level'] == 'fiz') { } if($_POST['back2']) { $z = $zay->getlist(2,null,$user['zayavka']); - addchp ('Внимание! '.nick3($user['id']).' отозвал заявку.','{[]}'.nick7 ($z[$user['zayavka']]['team1'][0]).'{[]}'); + addchp ('Внимание! '.nick::id($user['id'])->full(1).' отозвал заявку.','{[]}'.nick7 ($z[$user['zayavka']]['team1'][0]).'{[]}'); echo $zay->delteam (2,$user['id'], $user['zayavka'], 2); } if($_POST['cansel']) { $z = $zay->getlist(2,null,$user['zayavka']); echo $zay->delteam (2,$z[$user['zayavka']]['team2'][0], $user['zayavka'], 2); - addchp ('Внимание! '.nick3($user['id']).' отказался от поединка.','{[]}'.nick7 ($z[$user['zayavka']]['team2'][0]).'{[]}'); + addchp ('Внимание! '.nick::id($user['id'])->full(1).' отказался от поединка.','{[]}'.nick7 ($z[$user['zayavka']]['team2'][0]).'{[]}'); } if($_POST['confirm2'] && !$user['zayavka']) { $z = $zay->getlist(2,null,$_REQUEST['gocombat']); $toper = $z[$_REQUEST['gocombat']]['team1'][0]; $toper = mysql_fetch_array(mysql_query("SELECT `klan` FROM `users` WHERE `id`='{$toper}' LIMIT 1;")); if($user['klan'] != $toper['klan'] || $user['klan']==''){ - addchp ('Внимание! '.nick3($user['id']).' принял заявку, нужно принять вызов или отказать. ','{[]}'.nick7 ($z[$_REQUEST['gocombat']]['team1'][0]).'{[]}'); + addchp ('Внимание! '.nick::id($user['id'])->full(1).' принял заявку, нужно принять вызов или отказать. ','{[]}'.nick7 ($z[$_REQUEST['gocombat']]['team1'][0]).'{[]}'); } echo $zay->addteam (2,$user['id'], $_REQUEST['gocombat'], 2); echo "
Ожидаем подтверждения боя. "; @@ -769,7 +765,7 @@ if ($_REQUEST['level'] == 'fiz') { $z = $zay->getlist(2,null,$user['zayavka']); if( $zay->ustatus($user['id'])==1 ) { if(count($z[$user['zayavka']]['team2'])>0){ - echo "Внимание! ".nick3($z[$user['zayavka']]['team2'][0])." принял заявку на бой, нужно отказать или принять вызов. "; + echo "Внимание! ".nick::id($z[$user['zayavka']]['team2'][0])->full(1)." принял заявку на бой, нужно отказать или принять вызов. "; } else { if ($z[$user['zayavka']]['level'] == 2) { @@ -799,7 +795,7 @@ if ($_REQUEST['level'] == 'fiz') { $id = mysql_insert_id(); mysql_query("UPDATE `bots` SET `battle` = {$id} WHERE `id` = {$bot} LIMIT 1"); - $rr = "".nick3($user['id'])." и ".nick3($bot).""; + $rr = "".nick::id($user['id'])->full(1)." и ".nick::id($bot)->full(1).""; addlog($id,"Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу.
"); mysql_query("UPDATE users SET `battle` ={$id},`zayavka`=0 WHERE `id`= {$user['id']};"); die(""); @@ -914,12 +910,12 @@ if ($_REQUEST['level'] == 'group') {
'; foreach( $z[$_POST['gocombat']]['team1'] as $k=>$v ) { if ($k!=0) $rr.="
"; - echo nick3($v); + echo nick::id($v)->full(1); } echo '
'; foreach( $z[$_POST['gocombat']]['team2'] as $k=>$v ) { if ($k!=0) $rr.="
"; - echo nick3($v); + echo nick::id($v)->full(1); } echo '