This commit is contained in:
Ivor Barhansky 2023-04-10 23:50:01 +03:00
parent f8e02fd793
commit c77107c3bf
3 changed files with 694 additions and 877 deletions

View File

@ -1610,32 +1610,14 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
public function addItem($id, $uid, $md = null, $dn = null, $mxiznos = null, $nosudba = null, $plavka = null)
{
$rt = -1;
$i = mysql_fetch_array(
mysql_query(
'SELECT `im`.`id`,`im`.`name`,`im`.`img`,`im`.`type`,`im`.`inslot`,`im`.`2h`,`im`.`2too`,`im`.`iznosMAXi`,`im`.`inRazdel`,`im`.`price1`,`im`.`price2`,`im`.`pricerep`,`im`.`magic_chance`,`im`.`info`,`im`.`massa`,`im`.`level`,`im`.`magic_inci`,`im`.`overTypei`,`im`.`group`,`im`.`group_max`,`im`.`geni`,`im`.`ts`,`im`.`srok`,`im`.`class`,`im`.`class_point`,`im`.`anti_class`,`im`.`anti_class_point`,`im`.`max_text`,`im`.`useInBattle`,`im`.`lbtl`,`im`.`lvl_itm`,`im`.`lvl_exp`,`im`.`lvl_aexp` FROM `items_main` AS `im` WHERE `im`.`id` = "' . mysql_real_escape_string(
$id
) . '" LIMIT 1'
)
);
$i = Db::getRow('select * from items_main where id = ?', [$id]);
if (isset($i['id'])) {
$d = mysql_fetch_array(
mysql_query(
'SELECT `id`,`items_id`,`data` FROM `items_main_data` WHERE `items_id` = "' . $i['id'] . '" LIMIT 1'
)
);
$d = Db::getRow('select id, items_id, data from items_main_data where items_id = ?', [$i['id']]);
//новая дата
$data = $d['data'];
if ($i['ts'] > 0) {
if ($nosudba == null) {
$ui = mysql_fetch_array(
mysql_query(
'SELECT `id`,`login` FROM `users` WHERE `id` = "' . mysql_real_escape_string(
$uid
) . '" LIMIT 1'
)
);
$data .= '|sudba=' . $ui['login'];
}
if ($i['ts'] > 0 && $nosudba == null) {
$ui = Db::getValue('select login from users where id = ?', [$uid]);
$data .= '|sudba=' . $ui;
}
if ($md != null) {
$data .= $md;
@ -1643,7 +1625,6 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
$data = $this->impStats($data);
}
//предмет с настройками из подземелья
if ($dn != null && $dn['dn_delete'] > 0) {
$i['dn_delete'] = 1;
@ -1656,25 +1637,21 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
} else {
$room = $this->info['city'];
}
$ins = mysql_query(
'INSERT INTO `items_users` (`overType`,`item_id`,`uid`,`data`,`iznosMAX`,`geniration`,`magic_inc`,`maidin`,`lastUPD`,`time_create`,`dn_delete`) VALUES (
"' . $i['overTypei'] . '",
"' . $i['id'] . '",
"' . $uid . '",
"' . $data . '",
"' . $i['iznosMAXi'] . '",
"' . $i['geni'] . '",
"' . $i['magic_inci'] . '",
"' . $room . '",
"' . time() . '",
"' . time() . '",
"' . $i['dn_delete'] . '")'
);
if ($ins) {
$rt = mysql_insert_id();
mysql_query(
'UPDATE `items_users` SET `dn_delete` = "1" WHERE `id` = "' . $rt . '" AND `data` LIKE "%dn_delete=%" LIMIT 1'
);
$args = [
$i['overTypei'],
$i['id'],
$uid,
$data,
$i['iznosMAXi'],
$i['geni'],
$i['magic_inci'],
$room,
$i['dn_delete'] ?? 0,
];
Db::sql('insert into items_users (overType, item_id, uid, data, iznosMAX, geniration, magic_inc, maidin, lastUPD, time_create, dn_delete) values (?,?,?,?,?,?,?,?,unix_timestamp(),unix_timestamp(),?)', $args);
$rt = Db::lastInsertId() ?? 0;
if ($rt !== 0) {
Db::sql('update items_users set dn_delete = 1 where id = ? and data like ?', [$rt, '%dn_delete=%']);
if ($uid == $this->info['id']) {
$this->stack($rt);
}
@ -1684,12 +1661,15 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
}
//Записываем в личное дело что предмет получен
$this->addDelo(
1, $uid,
'&quot;<font color=#C65F00>AddItems.' . $this->info['city'] . '</font>&quot;: Получен предмет &quot;<strong>' . $i['name'] . '</strong>&quot; (x1) [#' . $i['iid'] . ']. ' . $ads . '',
time(), $this->info['city'], 'AddItems.' . $this->info['city'] . '', 0, 0
1,
$uid,
'&quot;AddItems.' . $this->info['city'] . '&quot;: Получен предмет &quot;<strong>' . $i['name'] . '</strong>&quot; (x1) [#' . $i['iid'] . ']. ' . $ads . '',
time(),
$this->info['city'],
'AddItems.' . $this->info['city'] . '',
0,
0
);
} else {
$rt = 0;
}
}
return $rt;
@ -1725,7 +1705,7 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
return $bus['login_BIG'];
}
public function microLogin(int $id, int $t, int $nnz = 1): string
public function microLogin(int $id, int $t = 1, int $nnz = 1): string
{
if ($t !== 1) {
$inf['id'] = $id;
@ -4096,7 +4076,7 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
public function addDelo($type, $uid, $txt, $tm, $ct, $frm, $mo, $mi, $vvv = false)
{
return Db::sql(
'insert into users_delo (uid, dop, time, city, text, login, `delete`, ip, moneyOut, type) values (?,?,?,?,?,?,?,?,?,?)',
'insert into users_delo (uid, dop, time, city, text, login, `delete`, ip, moneyOut, type, no_right) values (?,?,?,?,?,?,?,?,?,?,?)',
[
$uid,
$vvv,
@ -4108,6 +4088,7 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
$_SERVER['HTTP_X_REAL_IP'],
$mo,
$type,
'',
]
);
}

View File

@ -1,139 +1,255 @@
<?php
/** @var $u User */
use Core\Config;
use Core\Db;
echo "
<script language='JavaScript'>
<script>
var elem = document.getElementById('se-pre-con');
elem.parentNode.removeChild(elem);
</script>
";
if(!defined('GAME'))
{
</script>";
if (!defined('GAME')) {
die();
}
if ($u->info['exp']>100000)
{
if(isset($_GET['ignore'])) {
if ($u->info['exp'] > 100000 && isset($_GET['ignore'])) {
$_POST['friendadd'] = $_GET['ignore'];
$_POST['group'] = 3;
$_POST['comment'] = 'Игнор из чата';
$_POST['sd4'] = 1;
$_POST['x'] = 4;
$_POST['y'] = 6;
$frd = mysql_fetch_array(mysql_query("SELECT id,login FROM `users` WHERE `login` = '".mysql_real_escape_string($_POST['friendadd'])."' ORDER BY `id` ASC LIMIT 1;"));
$frd20 = mysql_fetch_array(mysql_query("SELECT id,enemy,friend,notinlist,ignor FROM `friends` WHERE `user` = '".mysql_real_escape_string($u->info['id'])."' and (`friend`='".mysql_real_escape_string($frd['id'])."' or `enemy`='".mysql_real_escape_string($frd['id'])."' or `notinlist`='".mysql_real_escape_string($frd['id'])."' or `ignor`='".mysql_real_escape_string($frd['id'])."') LIMIT 1;"));
$frd = mysql_fetch_array(
mysql_query(
"SELECT id,login FROM `users` WHERE `login` = '" . mysql_real_escape_string(
$_POST['friendadd']
) . "' ORDER BY `id` LIMIT 1;"
)
);
$frd20 = mysql_fetch_array(
mysql_query(
"SELECT id,enemy,friend,notinlist,ignor FROM `friends` WHERE `user` = '" . $u->info['id'] . "' and (`friend`='" . $frd['id'] . "' or `enemy`='" . $frd['id'] . "' or `notinlist`='" . $frd['id'] . "' or `ignor`='" . $frd['id'] . "') LIMIT 1;"
)
);
if (isset($frd20['id'])) {
mysql_query('DELETE FROM `friends` WHERE `id` = "'.mysql_real_escape_string($frd20['id']).'" LIMIT 1');
mysql_query('DELETE FROM `friends` WHERE `id` = "' . $frd20['id'] . '" LIMIT 1');
if ($frd20['ignor'] == $frd['id']) {
echo"<font color=red>Персонаж был успешно удален из списка игнорирования.</font>";
echo "<span style=\"color: red; \">Персонаж был успешно удален из списка игнорирования.</span>";
echo '<script>top.iusrno["' . $_POST['friendadd'] . '"] = 0;</script>';
unset($_POST['friendadd'], $_POST['group'], $_POST['comment'], $_POST['sd4']);
}
}
}
}
$clr_fr = mysql_query('SELECT `id`,`friend`,`enemy`,`ignor` FROM `friends` WHERE `user` = "' . $u->info['id'] . '"');
while ($clr_frd = mysql_fetch_array($clr_fr)) {
if ($clr_frd['friend'] > 0) {
$usr_tst = mysql_fetch_array(mysql_query('SELECT `id`,`login` FROM `users` WHERE `id` = "'.$clr_frd['friend'].'" LIMIT 1'));
$usr_tst = mysql_fetch_array(
mysql_query('SELECT `id`,`login` FROM `users` WHERE `id` = "' . $clr_frd['friend'] . '" LIMIT 1')
);
} elseif ($clr_frd['enemy'] > 0) {
$usr_tst = mysql_fetch_array(mysql_query('SELECT `id`,`login` FROM `users` WHERE `id` = "'.$clr_frd['enemy'].'" LIMIT 1'));
$usr_tst = mysql_fetch_array(
mysql_query('SELECT `id`,`login` FROM `users` WHERE `id` = "' . $clr_frd['enemy'] . '" LIMIT 1')
);
} elseif ($clr_frd['ignor'] > 0) {
$usr_tst = mysql_fetch_array(mysql_query('SELECT `id`,`login` FROM `users` WHERE `id` = "'.$clr_frd['ignor'].'" LIMIT 1'));
$usr_tst = mysql_fetch_array(
mysql_query('SELECT `id`,`login` FROM `users` WHERE `id` = "' . $clr_frd['ignor'] . '" LIMIT 1')
);
}
if (!isset($usr_tst['id']) || $usr_tst['login'] == 'delete') {
mysql_query('DELETE FROM `friends` WHERE `id` = "' . $clr_frd['id'] . '" LIMIT 1');
}
}
$friend = mysql_fetch_array(mysql_query("SELECT * FROM `friends` WHERE `user` = '".mysql_real_escape_string($u->info['id'])."' LIMIT 1;"));
$friend = mysql_fetch_array(
mysql_query("SELECT * FROM `friends` WHERE `user` = '" . $u->info['id'] . "' LIMIT 1;")
);
$st = $u->lookStats($u->info['stats']);
$addfr = mysql_fetch_array(mysql_query("SELECT count(`id`) FROM `friends` WHERE `user` = '".mysql_real_escape_string($u->info['id'])."';"));
$addfr = mysql_fetch_array(
mysql_query("SELECT count(`id`) FROM `friends` WHERE `user` = '" . $u->info['id'] . "';")
);
$addf = 20;
if ($st['os5'] > 0) {
$addf = 20 + ($st['os5'] * 5);
}
if ($addfr[0] < $addf) {
$canadd = 'onclick=\'findlogin2("Добавить в список", "main.php?friends", "friendadd", new Array("Друзья","Враги","Не в группе","Игнорирование"), new Array())\'';
}else{$canadd = 'disabled';}
if($_POST['sd4'] && $_POST['friendadd']){
$_POST['friendadd']=htmlspecialchars($_POST['friendadd'],NULL);
if(/*preg_match("/__/",$_POST['friendadd']) ||*/ preg_match("/--/",$_POST['friendadd'])){
echo"<font color=red>Персонаж не найден.</font>";
} else {
$frd = mysql_fetch_array(mysql_query("SELECT `id`,`login` FROM `users` WHERE `login` = '".mysql_real_escape_string($_POST['friendadd'])."' LIMIT 1;"));
$canadd = 'disabled';
}
$_POST['comment']=htmlspecialchars($_POST['comment'],NULL);
$frd2 = mysql_fetch_array(mysql_query("SELECT enemy,friend,notinlist,ignor FROM `friends` WHERE `user` = '".mysql_real_escape_string($u->info['id'])."' and (`friend`='".mysql_real_escape_string($frd['id'])."' or `enemy`='".mysql_real_escape_string($frd['id'])."' or `notinlist`='".mysql_real_escape_string($frd['id'])."' or `ignor`='".mysql_real_escape_string($frd['id'])."') LIMIT 1;"));
if(!$frd['id']){echo"<font color=red>Персонаж не найден.</font>";}
elseif($frd['id']==$u->info['id']){echo"<font color=red>Себя добавить нельзя.</font>";}
elseif(preg_match("/__/",$_POST['comment']) || preg_match("/--/",$_POST['comment'])){echo"<font color=red>Введен неверный текст.</font>";}
elseif($frd2['enemy'] or $frd2['friend'] or $frd2['notinlist'] or $frd2['ignor']){
echo"<font color=red>Персонаж уже есть в вашем списке.</font>";
}
else{
if ($_POST['sd4'] && $_POST['friendadd']) {
$_POST['friendadd'] = htmlspecialchars($_POST['friendadd'], null);
if (/*preg_match("/__/",$_POST['friendadd']) ||*/
preg_match("/--/", $_POST['friendadd'])) {
echo "<span style=\"color: red; \">Персонаж не найден.</span>";
} else {
$frd = mysql_fetch_array(
mysql_query(
"SELECT `id`,`login` FROM `users` WHERE `login` = '" . mysql_real_escape_string(
$_POST['friendadd']
) . "' LIMIT 1;"
)
);
$_POST['comment'] = htmlspecialchars($_POST['comment'], null);
$frd2 = mysql_fetch_array(
mysql_query(
"SELECT enemy,friend,notinlist,ignor FROM `friends` WHERE `user` = '" . $u->info['id'] . "' and (`friend`='" . $frd['id'] . "' or `enemy`='" . $frd['id'] . "' or `notinlist`='" . $frd['id'] . "' or `ignor`='" . $frd['id'] . "') LIMIT 1;"));
if (!$frd['id']) {
echo "<span style=\"color: red; \">Персонаж не найден.</span>";
} elseif ($frd['id'] == $u->info['id']) {
echo "<span style=\"color: red; \">Себя добавить нельзя.</span>";
} elseif (preg_match("/__/", $_POST['comment']) || preg_match("/--/", $_POST['comment'])) {
echo "<span style=\"color: red; \">Введен неверный текст.</span>";
} elseif ($frd2['enemy'] or $frd2['friend'] or $frd2['notinlist'] or $frd2['ignor']) {
echo "<span style=\"color: red; \">Персонаж уже есть в вашем списке.</span>";
} else {
$lign = '';
$uign = '';
if($_POST['group']==0){$notinlist=0; $friend=$frd['id']; $enemy=0; $ignor = 0;}
elseif($_POST['group']==1){$notinlist=0; $friend=0; $enemy=$frd['id']; $ignor = 0;}
elseif($_POST['group']==3){$notinlist=0; $friend=0; $enemy=0; $ignor = $frd['id']; $lign = $frd['login']; $uign = $u->info['login']; }
else{$notinlist=$frd['id']; $friend=0; $enemy=0; $ignor = 0;}
mysql_query("INSERT INTO `friends` (`user`, `friend`, `enemy`, `notinlist`, `comment`,`ignor`,`login_ignor`,`user_ignor`) VALUES(".mysql_real_escape_string($u->info['id']).", ".mysql_real_escape_string($friend).", ".mysql_real_escape_string($enemy).", ".mysql_real_escape_string($notinlist).", '".mysql_real_escape_string($_POST['comment'])."', '".mysql_real_escape_string($ignor)."','".$lign."','".$uign."');");
if ($_POST['group'] == 0) {
$notinlist = 0;
$friend = $frd['id'];
$enemy = 0;
$ignor = 0;
} elseif ($_POST['group'] == 1) {
$notinlist = 0;
$friend = 0;
$enemy = $frd['id'];
$ignor = 0;
} elseif ($_POST['group'] == 3) {
$notinlist = 0;
$friend = 0;
$enemy = 0;
$ignor = $frd['id'];
$lign = $frd['login'];
$uign = $u->info['login'];
} else {
$notinlist = $frd['id'];
$friend = 0;
$enemy = 0;
$ignor = 0;
}
mysql_query(
"INSERT INTO `friends` (`user`, `friend`, `enemy`, `notinlist`, `comment`,`ignor`,`login_ignor`,`user_ignor`) VALUES(" . $u->info['id'] . ", " . $friend . ", " . $enemy . ", " . $notinlist . ", '" . mysql_real_escape_string($_POST['comment']) . "', '" . $ignor . "','" . $lign . "','" . $uign . "');");
echo "<font color=red>Персонаж <b>" . $_POST['friendadd'] . "</b> добавлен.</font>";
if ($ignor > 0) {
echo '<script>top.iusrno["' . $_POST['friendadd'] . '"] = 1;</script>';
}
}
}
}
if ($_GET['friendremove']) {
$_GET['friendremove']=htmlspecialchars($_GET['friendremove'],NULL);
$_GET['friendremove'] = htmlspecialchars($_GET['friendremove'], null);
if (preg_match("/__/", $_GET['friendremove']) || preg_match("/--/", $_GET['friendremove'])) {
echo"<font color=red>Персонаж не найден.</font>";
echo "<span style=\"color: red; \">Персонаж не найден.</span>";
} else {
$frd = mysql_fetch_array(mysql_query("SELECT id FROM `users` WHERE `login` = '".mysql_real_escape_string($_GET['friendremove'])."' LIMIT 1;"));
}
if(!$frd['id']){echo"<font color=red>Персонаж не найден.</font>";}
else{
$frd2 = mysql_fetch_array(mysql_query("SELECT ignor,enemy,friend,notinlist FROM `friends` WHERE `user` = '".mysql_real_escape_string($u->info['id'])."' and (`friend`='".mysql_real_escape_string($frd['id'])."' or `enemy`='".mysql_real_escape_string($frd['id'])."' or `notinlist`='".mysql_real_escape_string($frd['id'])."' or `ignor`='".mysql_real_escape_string($frd['id'])."') LIMIT 1;"));
if(!$frd2['enemy'] && !$frd2['friend'] && !$frd2['ignor'] && !$frd2['notinlist']){echo"<font color=red>Персонаж не найден в вашем списке.</font>";
$frd = mysql_fetch_array(
mysql_query(
"SELECT id FROM `users` WHERE `login` = '" . mysql_real_escape_string(
$_GET['friendremove']
) . "' LIMIT 1;"
)
);
if (!$frd['id']) {
echo "<span style=\"color: red; \">Персонаж не найден.</span>";
} else {
if($frd2['friend']>0){$per="`friend`='".$frd2['friend']."'";}
if($frd2['enemy']>0){$per="`enemy`='".$frd2['enemy']."'";}
if($frd2['notinlist']>0){$per="`notinlist`='".$frd2['notinlist']."'";}
if($frd2['ignor']>0){$per="`ignor`='".$frd2['ignor']."'";}
if(mysql_query("DELETE FROM `friends` WHERE `user`='".mysql_real_escape_string($u->info['id'])."' and ".$per.";")){echo"<font color=red>Данные контакта <b>".$_GET['friendremove']."</b> успешно удалены.</font>";echo '<script>top.iusrno["'.$frd['login'].'"] = 0;</script>';}
$frd2 = mysql_fetch_array(
mysql_query(
"SELECT ignor,enemy,friend,notinlist FROM `friends` WHERE `user` = '" . $u->info['id'] . "' and (`friend`='" . $frd['id'] . "' or `enemy`='" . $frd['id'] . "' or `notinlist`='" . $frd['id'] . "' or `ignor`='" . $frd['id'] . "') LIMIT 1;"));
if (!$frd2['enemy'] && !$frd2['friend'] && !$frd2['ignor'] && !$frd2['notinlist']) {
echo "<font color=red>Персонаж не найден в вашем списке.</font>";
} else {
$per = '';
if ($frd2['friend'] > 0) {
$per = " and `friend`='" . $frd2['friend'] . "'";
}
if ($frd2['enemy'] > 0) {
$per = " and `enemy`='" . $frd2['enemy'] . "'";
}
if ($frd2['notinlist'] > 0) {
$per = " and `notinlist`='" . $frd2['notinlist'] . "'";
}
if ($frd2['ignor'] > 0) {
$per = " and `ignor`='" . $frd2['ignor'] . "'";
}
if (mysql_query(
"DELETE FROM `friends` WHERE `user`='" . $u->info['id'] . "'" . $per . ";"
)) {
echo "<span style=\"color: red; \">Данные контакта <b>" . $_GET['friendremove'] . "</b> успешно удалены.</span>";
echo '<script>top.iusrno["' . $frd['login'] . '"] = 0;</script>';
}
}
}
}
}
if ($_POST['friendedit']) {
$_POST['friendedit']=htmlspecialchars($_POST['friendedit'],NULL);
$_POST['friendedit'] = htmlspecialchars($_POST['friendedit'], null);
if (preg_match("/__/", $_POST['friendedit']) || preg_match("/--/", $_POST['friendedit'])) {
echo "<font color=red>Персонаж не найден.</font>";
} else {
$frd = mysql_fetch_array(mysql_query("SELECT id FROM `users` WHERE `login` = '".mysql_real_escape_string($_POST['friendedit'])."' LIMIT 1;"));
$frd = mysql_fetch_array(
mysql_query(
"SELECT id FROM `users` WHERE `login` = '" . mysql_real_escape_string(
$_POST['friendedit']
) . "' LIMIT 1;"
)
);
$_POST['comment'] = htmlspecialchars($_POST['comment'], null);
if (empty($frd['id'])) {
echo "<font color=red>Персонаж не найден.</font>";
} elseif ($frd['id'] == $u->info['id']) {
echo "<font color=red>Себя отредактировать нельзя.</font>";
} elseif (preg_match("/__/", $_POST['comment']) || preg_match("/--/", $_POST['comment'])) {
echo "<font color=red>Введен неверный текст.</font>";
} else {
if ($_POST['group'] == 0) {
$notinlist = 0;
$friend = $frd['id'];
$enemy = 0;
$ignor = 0;
} elseif ($_POST['group'] == 1) {
$notinlist = 0;
$friend = 0;
$enemy = $frd['id'];
$ignor = 0;
} elseif ($_POST['group'] == 3) {
$notinlist = 0;
$friend = 0;
$enemy = 0;
$ignor = $frd['id'];
} else {
$notinlist = $frd['id'];
$friend = 0;
$enemy = 0;
$ignor = 0;
}
$frd2 = mysql_fetch_array(
mysql_query(
"SELECT ignor,enemy,friend,notinlist FROM `friends` WHERE `user` = '" . $u->info['id'] . "' and (`friend`='" . $frd['id'] . "' or `enemy`='" . $frd['id'] . "' or `notinlist`='" . $frd['id'] . "' or `ignor`='" . $frd['id'] . "') LIMIT 1;"
)
);
if (!$frd2['enemy'] && !$frd2['friend'] && !$frd2['ignor'] && !$frd2['notinlist']) {
echo "<font color=red>Персонаж не найден в вашем списке.</font>";
} else {
$per = '';
if ($frd2['friend'] > 0) {
$per = " and `friend`='" . $frd2['friend'] . "'";
}
if ($frd2['enemy'] > 0) {
$per = " and `enemy`='" . $frd2['enemy'] . "'";
}
if ($frd2['notinlist'] > 0) {
$per = " and `notinlist`='" . $frd2['notinlist'] . "'";
}
if ($frd2['ignor'] > 0) {
$per = " and `ignor`='" . $frd2['ignor'] . "'";
}
$_POST['comment']=htmlspecialchars($_POST['comment'],NULL);
if(!$frd['id']){echo"<font color=red>Персонаж не найден.</font>";}
elseif($frd['id']==$u->info['id']){echo"<font color=red>Себя отредактировать нельзя.</font>";}
elseif(preg_match("/__/",$_POST['comment']) || preg_match("/--/",$_POST['comment'])){echo"<font color=red>Введен неверный текст.</font>";}
else{
if($_POST['group']==0){$notinlist=0; $friend=$frd['id']; $enemy=0; $ignor = 0;}
elseif($_POST['group']==1){$notinlist=0; $friend=0; $enemy=$frd['id']; $ignor = 0;}
elseif($_POST['group']==3){$notinlist=0; $friend=0; $enemy=0; $ignor = $frd['id'];}
else{$notinlist=$frd['id']; $friend=0; $enemy=0; $ignor = 0;}
$frd2 = mysql_fetch_array(mysql_query("SELECT ignor,enemy,friend,notinlist FROM `friends` WHERE `user` = '".mysql_real_escape_string($u->info['id'])."' and (`friend`='".mysql_real_escape_string($frd['id'])."' or `enemy`='".mysql_real_escape_string($frd['id'])."' or `notinlist`='".mysql_real_escape_string($frd['id'])."' or `ignor`='".mysql_real_escape_string($frd['id'])."') LIMIT 1;"));
if(!$frd2['enemy'] && !$frd2['friend'] && !$frd2['ignor'] && !$frd2['notinlist']){echo"<font color=red>Персонаж не найден в вашем списке.</font>";}
else{
if($frd2['friend']>0){$per="`friend`='".mysql_real_escape_string($frd2['friend'])."'";}
if($frd2['enemy']>0){$per="`enemy`='".mysql_real_escape_string($frd2['enemy'])."'";}
if($frd2['notinlist']>0){$per="`notinlist`='".mysql_real_escape_string($frd2['notinlist'])."'";}
if($frd2['ignor']>0){$per="`ignor`='".$frd2['ignor']."'";}
$comment = $_POST['comment'];
mysql_query("UPDATE `friends` SET `friend` = '".mysql_real_escape_string($friend)."',`enemy` = '".mysql_real_escape_string($enemy)."',`notinlist` = '".mysql_real_escape_string($notinlist)."',`comment` = '".mysql_real_escape_string($comment)."',`ignor` = '".mysql_real_escape_string($ignor)."' WHERE `user`='".mysql_real_escape_string($u->info['id'])."' and $per");
mysql_query(
"UPDATE `friends` SET `friend` = '" . mysql_real_escape_string($friend) . "',`enemy` = '" . $enemy . "',`notinlist` = '" . $notinlist . "',`comment` = '" . mysql_real_escape_string($comment) . "',`ignor` = '" . $ignor . "' WHERE `user`='" . $u->info['id'] . "'$per");
echo "<font color=red>Данные контакта <b>" . $_POST['friendedit'] . "</b> успешно изменены.</font>";
if ($ignor > 0) {
echo '<script>top.iusrno["' . $frd['login'] . '"] = 1;</script>';
@ -143,6 +259,50 @@ if($_POST['friendedit']){
}
}
}
}
function printDealersOnline(): void
{
global $u;
$query = 'select id from users where (inUser > 0 or online > unix_timestamp() - 120) and (align = 50 or align2 = 50)';
$stmt = Db::getColumn($query);
if (empty($stmt)) {
echo 'Нет алхимиков онлайн.';
} else {
foreach ($stmt as $dealerId) {
echo $u->microLogin($dealerId) . '<br>';
}
}
}
function printBukmekersOnline(): void
{
global $u;
$query = 'select id from users where (inUser > 0 or online > unix_timestamp() - 120) and bukmeker = 1';
$stmt = Db::getColumn($query);
if (empty($stmt)) {
echo 'Нет букмекеров онлайн.';
} else {
foreach ($stmt as $dealerId) {
echo $u->microLogin($dealerId) . '<br>';
}
}
}
function printModeratorsOnline(): void
{
global $u;
$query = 'select id from users where (inUser > 0 or online > unix_timestamp() - 120) and (align >= 1 and align <= 2 or align >=3 and align <=4 or align2 >= 1 and align2 <= 2 or align2 >=3 and align2 <=4)';
$stmt = Db::getColumn($query);
if (empty($stmt)) {
echo 'Нет модераторов онлайн.';
} else {
foreach ($stmt as $dealerId) {
echo $u->microLogin($dealerId) . '<br>';
}
}
}
?>
<SCRIPT src='//img.new-combats.tech/js/sl2.21.js'></SCRIPT>
<SCRIPT src='//img.new-combats.tech/commoninf.js'></SCRIPT>
@ -151,8 +311,8 @@ var nlevel=0;
var from = Array('+', ' ', '#');
var to = Array('%2B', '+', '%23');
function editcontact(title, script, name, login, flogin, group, groups, subgroup, subgroups, comment)
{ var s = '<table width=250 cellspacing=1 cellpadding=0 bgcolor=CCC3AA><tr><td align=center><B>'+title+'</td><td width=20 align=right valign=top style="cursor: pointer" onclick="closehint3();"><BIG><B>x</td></tr><tr><td colspan=2>';
function editcontact(title, script, name, login, flogin, group, groups, subgroup, subgroups, comment) {
var s = '<table width=250 cellspacing=1 cellpadding=0 bgcolor=CCC3AA><tr><td align=center><B>' + title + '</td><td width=20 align=right valign=top style="cursor: pointer" onclick="closehint3();"><BIG><B>x</td></tr><tr><td colspan=2>';
s += '<form action="' + script + '" method=POST><table width=250 cellspacing=0 cellpadding=4 bgcolor=FFF6DD><tr><td align=center>';
s += '<table width=1% border=0 cellspacing=0 cellpadding=2 align=center><tr><td align=right>';
flogin = flogin.replace(/^<SCRIPT>drwfl\((.*)\)<\/SCRIPT>$/i, 'drw($1)');
@ -163,7 +323,8 @@ function editcontact(title, script, name, login, flogin, group, groups, subgroup
s += '<option value="' + i + '"' + (group == i ? ' selected' : '') + '>' + groups[i];
}
s += '</SELECT></td></tr>';
};
}
;
s += '<tr><td align=right><small><b>Комментарий:</b></small></td><td width="1%"><INPUT TYPE=text NAME="comment" VALUE="' + comment + '" style="width: 105px">&nbsp;';
s += '<INPUT type=image SRC=//img.new-combats.tech/i/b__ok.gif WIDTH=25 HEIGHT=18 ALT="Сохранить" style="border:0; vertical-align: middle"></TD></TR></TABLE><INPUT TYPE=hidden name=sd4 value=""></TD></TR></TABLE></form></td></tr></table>';
@ -174,8 +335,9 @@ document.all("hint4").style.top = document.body.scrollTop+50;
document.all("comment").focus();
Hint3Name = '';
}
function findlogin2(title, script, name, groups, subgroups)
{ var s = '<table width=270 cellspacing=1 cellpadding=0 bgcolor=CCC3AA><tr><td align=center><B>'+title+'</td><td width=20 align=right valign=top style="cursor: pointer" onclick="closehint3();"><BIG><B>x</td></tr><tr><td colspan=2>';
function findlogin2(title, script, name, groups, subgroups) {
var s = '<table width=270 cellspacing=1 cellpadding=0 bgcolor=CCC3AA><tr><td align=center><B>' + title + '</td><td width=20 align=right valign=top style="cursor: pointer" onclick="closehint3();"><BIG><B>x</td></tr><tr><td colspan=2>';
s += '<form action="' + script + '" method=POST><table width=100% cellspacing=0 cellpadding=2 bgcolor=FFF6DD><tr><td align=center>';
s += '<table width=90% cellspacing=0 cellpadding=2 align=center><tr><td align=left colspan="2">';
s += 'Укажите логин персонажа:<br><small>(можно щелкнуть по логину в чате)</small></td></tr>';
@ -186,7 +348,8 @@ for(i=0; i< groups.length; i++) {
s += '<option value="' + i + '">' + groups[i];
}
s += '</SELECT></td></tr>';
};
}
;
s += '<tr><td align=right><small><b>Комментарий:</b></small></td><td><INPUT TYPE=text NAME="comment" VALUE="" style="width:105px">&nbsp;';
s += '<INPUT type=image SRC=//img.new-combats.tech/i/b__ok.gif WIDTH=25 HEIGHT=18 ALT="Добавить контакт" style="border:0; vertical-align: middle"></TD></TR></TABLE><INPUT TYPE=hidden name=sd4 value="1"></TD></TR></TABLE></form></td></tr></table>';
@ -197,6 +360,7 @@ document.getElementById("hint4").style.top = document.body.scrollTop+50;
Hint3Name = name;
document.getElementById(name).focus();
}
function w(login, id, align, align2, klan, level, online, city, battle) {
var s = '';
if (online != "") {
@ -212,7 +376,9 @@ s+=' <IMG SRC=//img.new-combats.tech/i/align/align'+align+'.gif WIDTH=12 HEIGHT=
if (align2 != 0) {
s += ' <IMG SRC=//img.new-combats.tech/i/align/align' + align2 + '.gif WIDTH=12 HEIGHT=15>';
}
if (klan!='') {s+='<A HREF="/encicl/klan/'+klan+'.html" target=_blank><IMG SRC="//img.new-combats.tech/i/clan/'+klan+'.gif" WIDTH=24 HEIGHT=15 ALT=""></A>'}
if (klan != '') {
s += '<A HREF="/encicl/klan/' + klan + '.html" target=_blank><IMG SRC="//img.new-combats.tech/i/clan/' + klan + '.gif" WIDTH=24 HEIGHT=15 ALT=""></A>'
}
s += '<a href="javascript:void(0)" onclick="top.chat.addto(\'' + login + '\',\'to\')">' + login + '</a>[' + level + ']<a href=/info/' + id + ' target=_blank><IMG SRC=//img.new-combats.tech/i/inf.gif WIDTH=12 HEIGHT=11 ALT="Информация о персонаже"></a>&nbsp;&nbsp;&nbsp;<img src="/i/online.gif">';
s += '</td><td bgcolor=efeded nowrap>';
if (city != "") {
@ -220,8 +386,7 @@ s+="нет в этом городе";
} else {
s += online;
}
}
else {
} else {
s += '<IMG SRC="//img.new-combats.tech/i/offline.gif" WIDTH=20 HEIGHT=15 BORDER=0 ALT="Нет в клубе">';
if (city != "") {
s += '<img src="https://forum.img.new-combats.com/city/' + city + '.gif" width=17 height=15>';
@ -231,7 +396,9 @@ s+=' <IMG SRC=//img.new-combats.tech/i/align/align'+align+'.gif WIDTH=12 HEIGHT=
if (align2 != 0) {
s += ' <IMG SRC=//img.new-combats.tech/i/align/align' + align2 + '.gif WIDTH=12 HEIGHT=15>';
}
if (klan!='') {s+='<A HREF="/encicl/klan/'+klan+'.html" target=_blank><IMG SRC="//img.new-combats.tech/i/clan/'+klan+'.gif" WIDTH=24 HEIGHT=15 ALT=""></A>'}
if (klan != '') {
s += '<A HREF="/encicl/klan/' + klan + '.html" target=_blank><IMG SRC="//img.new-combats.tech/i/clan/' + klan + '.gif" WIDTH=24 HEIGHT=15 ALT=""></A>'
}
if (level) {
if (nlevel == 0) {
nlevel = 1; //s="<BR>"+s;
@ -249,6 +416,7 @@ s+='</FONT>';
}
document.write(s + '<BR>');
}
function m(login, id, align, align2, klan, level) {
var s = '';
s += '<a href="javascript:void(0)" onclick="top.chat.addto(\'' + login + '\',\'private\')"><IMG SRC=//img.new-combats.tech/i/lock.gif WIDTH=20 HEIGHT=15 ALT="Приватно"></a>';
@ -262,8 +430,8 @@ s+='<A HREF="/encicl/klan/'+klan+'.html" target=_blank><IMG SRC="//img.new-comba
s += '<a href="javascript:void(0)" onclick="top.chat.addto(\'' + login + '\',\'to\')">' + login + '</a>[' + level + ']<a href=/info/' + id + ' target=_blank><IMG SRC=//img.new-combats.tech/i/inf.gif WIDTH=12 HEIGHT=11 ALT="Информация о персонаже"></a>';
document.write(s + '<BR>');
}
function drw(name, id, level, align, align2, klan, img, sex)
{
function drw(name, id, level, align, align2, klan, img, sex) {
var s = "";
if (align != "0") s += "<A HREF='" + getalignurl(align) + "' target=_blank><IMG SRC='//img.new-combats.tech/i/align/align" + align + ".gif' WIDTH=12 HEIGHT=15 ALT=\"" + getalign(align) + "\"></A>";
if (align2 != "0") s += "<A HREF='" + getalignurl(align2) + "' target=_blank><IMG SRC='//img.new-combats.tech/i/align/align" + align2 + ".gif' WIDTH=12 HEIGHT=15 ALT=\"" + getalign(align2) + "\"></A>";
@ -276,50 +444,81 @@ if (img) s+="<A HREF='https://capitalcity.combats.com/encicl/obraz_"+(sex?"w":"m
return s;
}
</SCRIPT>
</HEAD>
<body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 bgcolor=e2e0e0>
<div id=hint4 class=ahint></div>
<TABLE cellspacing=0 cellpadding=2 width="100%">
<TR>
<TD style="vertical-align: top; "><TABLE cellspacing=0 cellpadding=2 width="100%">
<TD style="vertical-align: top; ">
<TABLE cellspacing=0 cellpadding=2 width="100%">
<TR>
<TD colspan="4" align="center"><h4>Контакты <br><br> <?=$u->microLogin($u->info['id'],1)?></h4></TD>
<TD colspan="4" align="center"><h4>Контакты <br><br> <?= $u->microLogin($u->info['id']) ?></h4>
</TD>
</TR>
<?php
$data=mysql_query("SELECT `notinlist`,`comment` FROM `friends` WHERE `user` = '".mysql_real_escape_string($u->info['id'])."' and `notinlist`>0;");
$data = mysql_query(
"SELECT `notinlist`,`comment` FROM `friends` WHERE `user` = '" . mysql_real_escape_string(
$u->info['id']
) . "' and `notinlist`>0;"
);
while ($row = mysql_fetch_array($data)) {
$us=mysql_fetch_array(mysql_query("SELECT `id`,`login`,`clan`,`level`,`align`,`align2`,`room`,`online`,`city`, `battle`,
$us = mysql_fetch_array(
mysql_query(
"SELECT `id`,`login`,`clan`,`level`,`align`,`align2`,`room`,`online`,`city`, `battle`,
(select `name_mini` from `clan` WHERE `id` = users.`clan`) as `klan`,
(select `name` from `room` WHERE `id` = users.`room`) as `room`
FROM `users` WHERE `id` = '".mysql_real_escape_string($row['notinlist'])."';"));
FROM `users` WHERE `id` = '" . mysql_real_escape_string($row['notinlist']) . "';"
)
);
//function w(login,id,align,klan,level,online, city, battle)
if ($us['online'] > (time() - 120)) {
$rrm = $us['room'];
} else {
$rrm = '';
}
if($u->info['city']==$us['city']){$us['city']='';}
if ($u->info['city'] == $us['city']) {
$us['city'] = '';
}
?>
<TR valign="top">
<TD bgcolor=efeded nowrap><SCRIPT>w('<?=$us['login']?>','<?=$us['id']?>','<?=$us['align']?>','<?=$us['align2']?>','<?=$us['klan']?>','<?=$us['level']?>','<?=$rrm?>','<?=$us['city']?>','<?=$us['battle']?>');</SCRIPT></TD>
<TD bgcolor=efeded width="40%"><small><FONT class=dsc><i><?=$row['comment']?></i></FONT></small><TD>
<TD width="1%"><INPUT type=image SRC=//img.new-combats.tech/i/b__ok.gif WIDTH=25 HEIGHT=18 ALT="Редактировать" style="float: right" onclick='editcontact("Редактирование контакта", "main.php?friends", "friendedit", "<?=$us['login']?>", "<SCRIPT>drwfl(\"<?=$us['login']?>\",<?=$us['id']?>,\"<?=$us['level']?>\",<?=$us['align']?>,<?=$us['align2']?>,\"<?=$us['klan']?>\")</SCRIPT>", "2", new Array( "Друзья","Враги","Не в группе","Игнорирование" ), "", new Array( ), "");'></TD>
<TD bgcolor=efeded nowrap>
<SCRIPT>w('<?=$us['login']?>', '<?=$us['id']?>', '<?=$us['align']?>', '<?=$us['align2']?>', '<?=$us['klan']?>', '<?=$us['level']?>', '<?=$rrm?>', '<?=$us['city']?>', '<?=$us['battle']?>');</SCRIPT>
</TD>
<TD style="background-color: #efeded; width: 40%; font-style: italic; font-size: small;" class="dsc">
<?= $row['comment'] ?>
<TD>
<TD width="1%">
<INPUT type=image SRC=//img.new-combats.tech/i/b__ok.gif WIDTH=25 HEIGHT=18
ALT="Редактировать" style="float: right"
onclick='editcontact("Редактирование контакта", "main.php?friends", "friendedit", "<?= $us['login'] ?>", "<SCRIPT>drwfl(\"<?= $us['login'] ?>\",<?= $us['id'] ?>,\"<?= $us['level'] ?>\",<?= $us['align'] ?>,<?= $us['align2'] ?>,\"<?= $us['klan'] ?>\")</SCRIPT>", "2", new Array( "Друзья","Враги","Не в группе","Игнорирование" ), "", new Array( ), "");'>
</TD>
</TR>
<?php
}
$data=mysql_query("SELECT `enemy`,`comment` FROM `friends` WHERE `user` = '".mysql_real_escape_string($u->info['id'])."' and `enemy`>0;");
$data = mysql_query(
"SELECT `enemy`,`comment` FROM `friends` WHERE `user` = '" . mysql_real_escape_string(
$u->info['id']
) . "' and `enemy`>0;"
);
$n = 0;
while ($row = mysql_fetch_array($data)) {
$us=mysql_fetch_array(mysql_query("SELECT `id`,`login`,`clan`,`level`,`align`,`align2`,`room`,`online`,`city`,
$us = mysql_fetch_array(
mysql_query(
"SELECT `id`,`login`,`clan`,`level`,`align`,`align2`,`room`,`online`,`city`,
(select `name_mini` from `clan` WHERE `id` = users.`clan`) as `klan`,
(select `name` from `room` WHERE `id` = users.`room`) as `room`
FROM `users` WHERE `id` = '".mysql_real_escape_string($row['enemy'])."';"));
if($u->info['city']==$us['city']){$us['city']='';}
FROM `users` WHERE `id` = '" . mysql_real_escape_string($row['enemy']) . "';"
)
);
if ($u->info['city'] == $us['city']) {
$us['city'] = '';
}
$n++;
if ($n == 1) {
?>
<TR>
<TD colspan="4" nowrap align="center" style="height: 40px" valign="bottom"><h4>Враги</h4></TD>
<TD colspan="4" nowrap align="center" style="height: 40px" valign="bottom"><h4>Враги</h4>
</TD>
</TR>
<?php } ?>
<TR valign="top">
@ -331,55 +530,46 @@ $rrm = $us['room'];
$rrm = '';
}
?>
<TD bgcolor=efeded nowrap><SCRIPT>w('<?=$us['login']?>','<?=$us['id']?>','<?=$us['align']?>','<?=$us['align2']?>','<?=$us['klan']?>','<?=$us['level']?>','<?=$rrm?>','<?=$us['city']?>','<?=$us['battle']?>');</SCRIPT></TD>
<TD bgcolor=efeded width="40%"><small><FONT class=dsc><i><?=$row['comment']?></i></FONT></small><TD>
<TD width="1%"><INPUT type=image SRC=//img.new-combats.tech/i/b__ok.gif WIDTH=25 HEIGHT=18 ALT="Редактировать" style="float: right" onclick='editcontact("Редактирование контакта", "main.php?friends", "friendedit", "<?=$us['login']?>", "<SCRIPT>drwfl(\"<?=$us['login']?>\",<?=$us['id']?>,\"<?=$us['level']?>\",<?=$us['align']?>,<?=$us['align2']?>,\"<?=$us['klan']?>\")</SCRIPT>", "1", new Array( "Друзья","Враги","Не в группе","Игнорирование" ), "", new Array( ), "");'></TD>
<TD bgcolor=efeded nowrap>
<SCRIPT>w('<?=$us['login']?>', '<?=$us['id']?>', '<?=$us['align']?>', '<?=$us['align2']?>', '<?=$us['klan']?>', '<?=$us['level']?>', '<?=$rrm?>', '<?=$us['city']?>', '<?=$us['battle']?>');</SCRIPT>
</TD>
<TD style="background-color: #efeded; width: 40%; font-style: italic; font-size: small;" class="dsc">
<?= $row['comment'] ?>
<TD>
<TD width="1%">
<INPUT type=image SRC=//img.new-combats.tech/i/b__ok.gif WIDTH=25 HEIGHT=18
ALT="Редактировать" style="float: right"
onclick='editcontact("Редактирование контакта", "main.php?friends", "friendedit", "<?= $us['login'] ?>", "<SCRIPT>drwfl(\"<?= $us['login'] ?>\",<?= $us['id'] ?>,\"<?= $us['level'] ?>\",<?= $us['align'] ?>,<?= $us['align2'] ?>,\"<?= $us['klan'] ?>\")</SCRIPT>", "1", new Array( "Друзья","Враги","Не в группе","Игнорирование" ), "", new Array( ), "");'>
</TD>
</TR>
<?php
}
$data=mysql_query("SELECT `friend`,`comment` FROM `friends` WHERE `user` = '".mysql_real_escape_string($u->info['id'])."' and `friend`>0;");
$i = 0;
$data = mysql_query(
"SELECT `friend`,`comment` FROM `friends` WHERE `user` = '" . mysql_real_escape_string(
$u->info['id']
) . "' and `friend`>0;"
);
while ($row = mysql_fetch_array($data)) {
$us=mysql_fetch_array(mysql_query("SELECT `id`,`login`,`clan`,`level`,`align`,`align2`,`room`,`online`,`city`,
$us = mysql_fetch_array(
mysql_query(
"SELECT `id`,`login`,`clan`,`level`,`align`,`align2`,`room`,`online`,`city`,
(select `name_mini` from `clan` WHERE `id` = users.`clan`) as `klan`,
(select `name` from `room` WHERE `id` = users.`room`) as `room`
FROM `users` WHERE `id` = '".mysql_real_escape_string($row['friend'])."' ORDER BY online DESC, login ASC;"));
if($u->info['city']==$us['city']){$us['city']='';}
FROM `users` WHERE `id` = '" . mysql_real_escape_string(
$row['friend']
) . "' ORDER BY online DESC, login ASC;"
)
);
if ($u->info['city'] == $us['city']) {
$us['city'] = '';
}
$i++;
if ($i == 1) {
?>
<TR>
<TD colspan="4" nowrap align="center" style="height: 40px" valign="bottom"><h4>Друзья</h4></TD>
</TR>
<?}?>
<TR valign="top">
<?php
//function w(login,id,align,klan,level,online, city, battle)
if ($us['online']>(time()-120)) {
$rrm = $us['room'];
}else{
$rrm = '';
}
?>
<TD bgcolor=efeded nowrap><SCRIPT>w('<?=$us['login']?>','<?=$us['id']?>','<?=$us['align']?>','<?=$us['align2']?>','<?=$us['klan']?>','<?=$us['level']?>','<?=$rrm?>','<?=$us['city']?>','<?=$us['battle']?>');</SCRIPT></TD>
<TD bgcolor=efeded width="40%"><small><FONT class=dsc><i><?=$row['comment']?></i></FONT></small><TD>
<TD width="1%"><INPUT type=image SRC=//img.new-combats.tech/i/b__ok.gif WIDTH=25 HEIGHT=18 ALT="Редактировать" style="float: right" onclick='editcontact("Редактирование контакта", "main.php?friends", "friendedit", "<?=$us['login']?>", "<SCRIPT>drwfl(\"<?=$us['login']?>\",<?=$us['id']?>,\"<?=$us['level']?>\",<?=$us['align']?>,<?=$us['align2']?>,\"<?=$us['klan']?>\")</SCRIPT>", "0", new Array( "Друзья","Враги","Не в группе","Игнорирование" ), "", new Array( ), "");'></TD>
</TR>
<?php
} $i = 0;
$data=mysql_query("SELECT `ignor`,`comment` FROM `friends` WHERE `user` = '".mysql_real_escape_string($u->info['id'])."' and `ignor`>0;");
while ($row = mysql_fetch_array($data)) {
$us=mysql_fetch_array(mysql_query("SELECT `id`,`login`,`clan`,`level`,`align`,`align2`,`room`,`online`,`city`,
(select `name_mini` from `clan` WHERE `id` = users.`clan`) as `klan`,
(select `name` from `room` WHERE `id` = users.`room`) as `room`
FROM `users` WHERE `id` = '".mysql_real_escape_string($row['ignor'])."' ORDER BY online DESC, login ASC;"));
if($u->info['city']==$us['city']){$us['city']='';}
$i++;
if($i==1){
?>
<TR>
<TD colspan="4" nowrap align="center" style="height: 40px" valign="bottom"><h4>Игнорирование</h4></TD>
<TD colspan="4" nowrap align="center" style="height: 40px" valign="bottom"><h4>Друзья</h4>
</TD>
</TR>
<?php } ?>
<TR valign="top">
@ -391,117 +581,121 @@ $rrm = $us['room'];
$rrm = '';
}
?>
<TD bgcolor=efeded nowrap><SCRIPT>w('<?=$us['login']?>','<?=$us['id']?>','<?=$us['align']?>','<?=$us['align2']?>','<?=$us['klan']?>','<?=$us['level']?>','<?=$rrm?>','<?=$us['city']?>','<?=$us['battle']?>');</SCRIPT></TD>
<TD bgcolor=efeded width="40%"><small><FONT class=dsc><i><?=$row['comment']?></i></FONT></small><TD>
<TD width="1%"><INPUT type=image SRC=//img.new-combats.tech/i/b__ok.gif WIDTH=25 HEIGHT=18 ALT="Редактировать" style="float: right" onclick='editcontact("Редактирование контакта", "main.php?friends", "friendedit", "<?=$us['login']?>", "<SCRIPT>drwfl(\"<?=$us['login']?>\",<?=$us['id']?>,\"<?=$us['level']?>\",<?=$us['align']?>,<?=$us['align2']?>,\"<?=$us['klan']?>\")</SCRIPT>", "0", new Array( "Друзья","Враги","Не в группе","Игнорирование" ), "", new Array( ), "");'></TD>
<TD bgcolor=efeded nowrap>
<SCRIPT>w('<?=$us['login']?>', '<?=$us['id']?>', '<?=$us['align']?>', '<?=$us['align2']?>', '<?=$us['klan']?>', '<?=$us['level']?>', '<?=$rrm?>', '<?=$us['city']?>', '<?=$us['battle']?>');</SCRIPT>
</TD>
<TD style="background-color: #efeded; width: 40%; font-style: italic; font-size: small;" class="dsc">
<?= $row['comment'] ?>
<TD>
<TD width="1%">
<INPUT type=image SRC=//img.new-combats.tech/i/b__ok.gif WIDTH=25 HEIGHT=18
ALT="Редактировать" style="float: right"
onclick='editcontact("Редактирование контакта", "main.php?friends", "friendedit", "<?= $us['login'] ?>", "<SCRIPT>drwfl(\"<?= $us['login'] ?>\",<?= $us['id'] ?>,\"<?= $us['level'] ?>\",<?= $us['align'] ?>,<?= $us['align2'] ?>,\"<?= $us['klan'] ?>\")</SCRIPT>", "0", new Array( "Друзья","Враги","Не в группе","Игнорирование" ), "", new Array( ), "");'>
</TD>
</TR>
<?php
}
$i = 0;
$data = mysql_query(
"SELECT `ignor`,`comment` FROM `friends` WHERE `user` = '" . mysql_real_escape_string(
$u->info['id']
) . "' and `ignor`>0;"
);
while ($row = mysql_fetch_array($data)) {
$us = mysql_fetch_array(
mysql_query(
"SELECT `id`,`login`,`clan`,`level`,`align`,`align2`,`room`,`online`,`city`,
(select `name_mini` from `clan` WHERE `id` = users.`clan`) as `klan`,
(select `name` from `room` WHERE `id` = users.`room`) as `room`
FROM `users` WHERE `id` = '" . mysql_real_escape_string(
$row['ignor']
) . "' ORDER BY online DESC, login ASC;"
)
);
if ($u->info['city'] == $us['city']) {
$us['city'] = '';
}
$i++;
if ($i == 1) {
?>
<TR>
<TD colspan="4" nowrap align="center" style="height: 40px" valign="bottom"><h4>
Игнорирование</h4></TD>
</TR>
<?php } ?>
<TR valign="top">
<?php
//function w(login,id,align,klan,level,online, city, battle)
if ($us['online'] > (time() - 120)) {
$rrm = $us['room'];
} else {
$rrm = '';
}
?>
<TD bgcolor=efeded nowrap>
<SCRIPT>w('<?=$us['login']?>', '<?=$us['id']?>', '<?=$us['align']?>', '<?=$us['align2']?>', '<?=$us['klan']?>', '<?=$us['level']?>', '<?=$rrm?>', '<?=$us['city']?>', '<?=$us['battle']?>');</SCRIPT>
</TD>
<TD style="background-color: #efeded; width: 40%; font-style: italic; font-size: small;" class="dsc">
<?= $row['comment'] ?>
<TD>
<TD width="1%">
<INPUT type=image SRC=//img.new-combats.tech/i/b__ok.gif WIDTH=25 HEIGHT=18
ALT="Редактировать" style="float: right"
onclick='editcontact("Редактирование контакта", "main.php?friends", "friendedit", "<?= $us['login'] ?>", "<SCRIPT>drwfl(\"<?= $us['login'] ?>\",<?= $us['id'] ?>,\"<?= $us['level'] ?>\",<?= $us['align'] ?>,<?= $us['align2'] ?>,\"<?= $us['klan'] ?>\")</SCRIPT>", "0", new Array( "Друзья","Враги","Не в группе","Игнорирование" ), "", new Array( ), "");'>
</TD>
</TR>
<?php
}
?>
<TR>
<TD colspan="4"><INPUT type='button' class="btn" style='width: 100px' value='Добавить' <?=$canadd?>>
<TD colspan="4">
<INPUT type='button' class="btn" style='width: 100px' value='Добавить' <?= $canadd ?>>
&nbsp;&nbsp;&nbsp;
<INPUT type='button' class="btn" style='width: 100px' value='Удалить' onclick='findlogin("Удалить из списка", "main.php?friends", "friendremove", "", 0)'></TD>
<INPUT type='button' class="btn" style='width: 100px' value='Удалить'
onclick='findlogin("Удалить из списка", "main.php?friends", "friendremove", "", 0)'>
</TD>
</TR>
</TABLE></TD>
</TABLE>
</TD>
<TD style="width: 5%; vertical-align: top; ">&nbsp;</TD>
<TD style="width: 30%; vertical-align: top; "><TABLE cellspacing=0 cellpadding=2>
<TD style="width: 30%; vertical-align: top; ">
<TABLE cellspacing=0 cellpadding=2>
<TR>
<TD style="width: 25%; vertical-align: top; text-align: right; "><INPUT type='button' class="btn" value='Обновить' style='width: 100px' onclick='location="main.php?friends=1"'>
&nbsp;<INPUT TYPE=button class="btn" value="Вернуться" style='width: 100px' onClick="location='main.php';"></TD>
<TD style="width: 25%; vertical-align: top; text-align: right; ">
<INPUT type='button' class="btn" value='Обновить' style='width: 100px'
onclick='location="main.php?friends=1"'>
&nbsp;<INPUT TYPE=button class="btn" value="Вернуться" style='width: 100px'
onClick="location='main.php';">
</TD>
</TR>
<?php
$imen = '';
if( $imen != '' ) { ?>
<TR>
<TD align=center><h4>Именинник</h4></TD>
</TR>
<TR>
<TD align=center><?=$imen?></TD>
</TR>
<?php } unset($imen); ?>
<TR>
<TD align=center><h4>Модераторы on-line</h4></TD>
</TR>
<TR>
<TD bgcolor=efeded nowrap style="text-align: left; "><table align="left">
<tr><td>
<SCRIPT>
<?php
$data=mysql_query("SELECT `id`, `login`,`level`,`align`,`align2`, `clan` FROM `users` WHERE (`inUser` > 0 OR `online` > '".(time()-120)."') AND ((align>1 and align<2 and align!=1.2) or (align>3 and align<4)) AND `city` = '".mysql_real_escape_string($u->info['city'])."' order by align asc;");
while ($row = mysql_fetch_array($data)) {
//m( login, id, align, klan, level)
echo"m('".$row['login']."','".$row['id']."','".$row['align']."','".$row['align2']."','".$row['klan']."','".$row['level']."');";
}
?>
</SCRIPT>
<?php
$chk=mysql_fetch_array(mysql_query("SELECT `id` FROM `users` WHERE `online` > '".(time()-120)."' AND ((align>1 and align<2 and align!=1.2) or (align>3 and align<4)) AND `city` = '".mysql_real_escape_string($u->info['city'])."' order by align asc;"));
if(!$chk['id']) {echo'<font color=grey>К сожалению в данный момент никого из модераторов нет в городе.</font>';}?>
</TD></tr></table></TD>
<TD bgcolor=efeded nowrap style="text-align: left; ">
<?php printModeratorsOnline(); ?>
</TD>
</TR>
<TR>
<TD align=center><h4>Дилеры</h4></TD>
</TR>
<TR>
<TD bgcolor=efeded nowrap style="text-align: left; "><table align="left">
<tr><td>
<SCRIPT>
<?php
$data=mysql_query("SELECT `id`, `login`,`level`,`align`,`align2`, `clan` FROM `users` WHERE (`inUser` > 0 OR `online` > '".(time()-120)."') AND `align`=50 AND `city` = '".mysql_real_escape_string($u->info['city'])."' order by align asc;");
while ($row = mysql_fetch_array($data)) {
//m( login, id, align, klan, level)
echo"m('".$row['login']."','".$row['id']."','".$row['align']."','".$row['align2']."','".$row['klan']."','".$row['level']."');";
}
?>
</SCRIPT>
<?php
$chk=mysql_fetch_array(mysql_query("SELECT `id` FROM `users` WHERE `online` > '".(time()-120)."' AND ((align>1 and align<2 and align!=1.2) or (align>3 and align<4)) AND `city` = '".mysql_real_escape_string($u->info['city'])."' order by align asc;"));
if(!$chk['id']) {echo'<font color=grey>К сожалению в данный момент никого из Алхимиков нет в городе.</font>';}?>
</TD></tr></table></TD>
</TR>
<TR>
<TD bgcolor=efeded nowrap style="text-align: left; "><table align="left">
<tr><td>
<SCRIPT>
<?php
$data=mysql_query("SELECT `id`, `login`,`level`,`align`,`align2`, `align2`, `clan` FROM `users` WHERE (( `align` = 50 OR `align2` = 50 ) AND `admin` = 0) order by online asc;");
while ($row = mysql_fetch_array($data)) {
//m( login, id, align, klan, level)
echo"m('".$row['login']."','".$row['id']."','".$row['align']."','".$row['align2']."','".$row['klan']."','".$row['level']."');";
}
?>
</SCRIPT>
<?php
$chk=mysql_fetch_array(mysql_query("SELECT `id` FROM `users` WHERE `online` > '".(time()-120)."' AND (( `align` = 50 OR `align2` = 50 ) AND `admin` = 0) AND `city` = '".mysql_real_escape_string($u->info['city'])."' order by align asc;"));
//if(!$chk['id']) {echo'<font color=grey>К сожалению в данный момент никого из модераторов нет в городе.</font>';}?>
</TD></tr></table></TD>
<TD bgcolor=efeded nowrap style="text-align: left; ">
<?php printDealersOnline(); ?>
</TD>
</TR>
<tr>
<TD align=center><h4>Букмекеры</h4></TD>
</TR>
<TR>
<TD bgcolor=efeded nowrap style="text-align: left; "><table align="left">
<tr><td>
<SCRIPT>
<?php
$data=mysql_query("SELECT `id`, `login`, `bukmeker`, `level`, `battle`, `online`, `city`, (select `name` from `room` WHERE `id` = users.`room`) as `room` FROM `users` WHERE `bukmeker` = '1' AND `city` = '".mysql_real_escape_string($u->info['city'])."' order by bukmeker asc;");
while ($row = mysql_fetch_array($data)) {
echo"m('".$row['login']."','".$row['id']."','".$row['align']."','".$row['align2']."','".$row['klan']."','".$row['level']."');";
}
?>
</SCRIPT>
<?php
$chk=mysql_fetch_array(mysql_query("SELECT `id`, `login`, `bukmeker`, `level`, `battle`, `online`, `city`, (select `name` from `room` WHERE `id` = users.`room`) as `room` FROM `users` WHERE `bukmeker` = '1' AND `city` = '".mysql_real_escape_string($u->info['city'])."' order by bukmeker asc;"));
if(!$chk['id']) {echo'<font color=grey>К сожалению в данный момент никого из букмекеров нет в городе.</font>';}?>
</TD></tr></table></TD>
</TR>
</TABLE></TD>
</tr>
<tr>
<TD bgcolor=efeded nowrap style="text-align: left; ">
<?php printBukmekersOnline(); ?>
</TD>
</tr>
</TABLE>
</TD>
</TR>
</TABLE>
<DIV><?=$c['counters_noFrm'];?></DIV>
</HTML>
<DIV><?= Config::get('counters_noFrm') ?></DIV>
</body>

View File

@ -1,358 +0,0 @@
<?php
if(!defined('GAME'))
{
die();
}
$friend = mysql_fetch_array(mysql_query("SELECT * FROM `friends` WHERE `user` = '".mysql_real_escape_string($u->info['id'])."' LIMIT 1;"));
if($_POST['sd4'] && $_POST['friendadd']){
$_POST['friendadd']=htmlspecialchars($_POST['friendadd'],NULL);
if(preg_match("/__/",$_POST['friendadd']) || preg_match("/--/",$_POST['friendadd'])){
echo"<font color=red>Персонаж не найден.</font>";
}else{
$frd = mysql_fetch_array(mysql_query("SELECT `id` FROM `users` WHERE `login` = '".mysql_real_escape_string($_POST['friendadd'])."' LIMIT 1;"));
}
$_POST['comment']=htmlspecialchars($_POST['comment'],NULL);
$frd2 = mysql_fetch_array(mysql_query("SELECT enemy,friend,notinlist FROM `friends` WHERE `user` = '".mysql_real_escape_string($u->info['id'])."' and (`friend`='".mysql_real_escape_string($frd['id'])."' or `enemy`='".mysql_real_escape_string($frd['id'])."' or `notinlist`='".mysql_real_escape_string($frd['id'])."') LIMIT 1;"));
if(!$frd['id']){echo"<font color=red>Персонаж не найден.</font>";}
elseif($frd['id']==$u->info['id']){echo"<font color=red>Себя добавить нельзя.</font>";}
elseif(preg_match("/__/",$_POST['comment']) || preg_match("/--/",$_POST['comment'])){echo"<font color=red>Введен неверный текст.</font>";}
elseif($frd2['enemy'] or $frd2['friend'] or $frd2['notinlist']){echo"<font color=red>Персонаж уже есть в вашем списке.</font>";}
else{
if($_POST['group']==0){$notinlist=0; $friend=$frd['id']; $enemy=0;}
elseif($_POST['group']==1){$notinlist=0; $friend=0; $enemy=$frd['id'];}
else{$notinlist=$frd['id']; $friend=0; $enemy=0;}
mysql_query("INSERT INTO `friends` (`user`, `friend`, `enemy`, `notinlist`, `comment`) VALUES(".mysql_real_escape_string($u->info['id']).", ".mysql_real_escape_string($friend).", ".mysql_real_escape_string($enemy).", ".mysql_real_escape_string($notinlist).", '".mysql_real_escape_string($_POST['comment'])."');");
echo"<font color=red>Персонаж <b>".$_POST['friendadd']."</b> добавлен.</font>";
}
}
if($_POST['friendremove']){
$_POST['friendremove']=htmlspecialchars($_POST['friendremove'],NULL);
if(preg_match("/__/",$_POST['friendremove']) || preg_match("/--/",$_POST['friendremove'])){
echo"<font color=red>Персонаж не найден.</font>";
}else{
$frd = mysql_fetch_array(mysql_query("SELECT id FROM `users` WHERE `login` = '".mysql_real_escape_string($_POST['friendremove'])."' LIMIT 1;"));
}
if(!$frd['id']){echo"<font color=red>Персонаж не найден.</font>";}
else{$frd2 = mysql_fetch_array(mysql_query("SELECT enemy,friend,notinlist FROM `friends` WHERE `user` = '".mysql_real_escape_string($u->info['id'])."' and (`friend`='".mysql_real_escape_string($frd['id'])."' or `enemy`='".mysql_real_escape_string($frd['id'])."' or `notinlist`='".mysql_real_escape_string($frd['id'])."') LIMIT 1;"));
if(!$frd2['enemy'] && !$frd2['friend'] && !$frd2['notinlist']){echo"<font color=red>Персонаж не найден в вашем списке.</font>";}else{
if($frd2['friend']>0){$per="`friend`='".$frd2['friend']."'";}
if($frd2['enemy']>0){$per="`enemy`='".$frd2['enemy']."'";}
if($frd2['notinlist']>0){$per="`notinlist`='".$frd2['notinlist']."'";}
if(mysql_query("DELETE FROM `friends` WHERE `user`='".mysql_real_escape_string($u->info['id'])."' and ".$per.";")){echo"<font color=red>Данные контакта <b>".$_POST['friendremove']."</b> успешно удалены.</font>";}
}
}
}
if($_POST['friendedit']){
$_POST['friendedit']=htmlspecialchars($_POST['friendedit'],NULL);
if(preg_match("/__/",$_POST['friendedit']) || preg_match("/--/",$_POST['friendedit'])){
echo"<font color=red>Персонаж не найден.</font>";
}else{
$frd = mysql_fetch_array(mysql_query("SELECT id FROM `users` WHERE `login` = '".mysql_real_escape_string($_POST['friendedit'])."' LIMIT 1;"));
}
$_POST['comment']=htmlspecialchars($_POST['comment'],NULL);
if(!$frd['id']){echo"<font color=red>Персонаж не найден.</font>";}
elseif($frd['id']==$u->info['id']){echo"<font color=red>Себя отредактировать нельзя.</font>";}
elseif(preg_match("/__/",$_POST['comment']) || preg_match("/--/",$_POST['comment'])){echo"<font color=red>Введен неверный текст.</font>";}
else{
if($_POST['group']==0){$notinlist=0; $friend=$frd['id']; $enemy=0;}
elseif($_POST['group']==1){$notinlist=0; $friend=0; $enemy=$frd['id'];}
else{$notinlist=$frd['id']; $friend=0; $enemy=0;}
$frd2 = mysql_fetch_array(mysql_query("SELECT enemy,friend,notinlist FROM `friends` WHERE `user` = '".mysql_real_escape_string($u->info['id'])."' and (`friend`='".mysql_real_escape_string($frd['id'])."' or `enemy`='".mysql_real_escape_string($frd['id'])."' or `notinlist`='".mysql_real_escape_string($frd['id'])."') LIMIT 1;"));
if(!$frd2['enemy'] && !$frd2['friend'] && !$frd2['notinlist']){echo"<font color=red>Персонаж не найден в вашем списке.</font>";}else{
if($frd2['friend']>0){$per="`friend`='".mysql_real_escape_string($frd2['friend'])."'";}
if($frd2['enemy']>0){$per="`enemy`='".mysql_real_escape_string($frd2['enemy'])."'";}
if($frd2['notinlist']>0){$per="`notinlist`='".mysql_real_escape_string($frd2['notinlist'])."'";}
$comment = $_POST['comment'];
mysql_query("UPDATE `friends` SET `friend` = '".mysql_real_escape_string($friend)."',`enemy` = '".mysql_real_escape_string($enemy)."',`notinlist` = '".mysql_real_escape_string($notinlist)."',`comment` = '".mysql_real_escape_string($comment)."' WHERE `user`='".mysql_real_escape_string($u->info['id'])."' and $per");
echo"<font color=red>Данные контакта <b>".$_POST['friendedit']."</b> успешно изменены.</font>";
}
}
}
?>
<HTML><HEAD>
<META Http-Equiv=Cache-Control Content=no-cache>
<meta http-equiv=PRAGMA content=NO-CACHE>
<META Http-Equiv=Expires Content=0>
<link rel=stylesheet type="text/css" href="//img.new-combats.tech/main.css">
<link href="//img.new-combats.tech/move/design3.css" rel="stylesheet" type="text/css">
<SCRIPT>
var nlevel=0;
var from = Array('+', ' ', '#');
var to = Array('%2B', '+', '%23');
function editcontact(title, script, name, login, flogin, group, groups, subgroup, subgroups, comment)
{ var s = '<table width=250 cellspacing=1 cellpadding=0 bgcolor=CCC3AA><tr><td align=center><B>'+title+'</td><td width=20 align=right valign=top style="cursor: hand" onclick="closehint3();"><BIG><B>x</td></tr><tr><td colspan=2>';
s +='<table width=250 cellspacing=0 cellpadding=4 bgcolor=FFF6DD><tr><form action="'+script+'" method=POST><td align=center>';
s +='<table width=1% border=0 cellspacing=0 cellpadding=2 align=center><tr><td align=right>';
flogin = flogin.replace( /^<SCRIPT>drwfl\((.*)\)<\/SCRIPT>$/i, 'drw($1)' );
s +='<small><b>Контакт:</b></small></td><td><INPUT TYPE=hidden NAME="'+name+'" VALUE="'+login+'">'+( flogin.match(/^drw\(/) ? eval(flogin) : flogin )+'</td></tr>';
if (groups && groups.length>0) {
s+='<tr><td align=right><small><b>Группа:</b></small></td><td align><SELECT NAME=group style="width: 140px">';
for(i=0; i< groups.length; i++) {
s+='<option value="'+i+'"'+( group == i ? ' selected' : '' ) +'>'+groups[i];
}
s+='</SELECT></td></tr>';
};
s += '<tr><td align=right><small><b>Комментарий:</b></small></td><td width="1%"><INPUT TYPE=text NAME="comment" VALUE="'+comment+'" style="width: 105px">&nbsp;';
s += '<INPUT type=image SRC=//img.new-combats.tech/i/b__ok.gif WIDTH=25 HEIGHT=18 ALT="Сохранить" style="border:0; vertical-align: middle"></TD></TR></TABLE><INPUT TYPE=hidden name=sd4 value=""></TD></FORM></TR></TABLE></td></tr></table>';
document.all("hint4").innerHTML = s;
document.all("hint4").style.visibility = "visible";
document.all("hint4").style.left = 100;
document.all("hint4").style.top = document.body.scrollTop+50;
document.all("comment").focus();
Hint3Name = '';
}
function findlogin2(title, script, name, groups, subgroups)
{ var s = '<table width=270 cellspacing=1 cellpadding=0 bgcolor=CCC3AA><tr><td align=center><B>'+title+'</td><td width=20 align=right valign=top style="cursor: hand" onclick="closehint3();"><BIG><B>x</td></tr><tr><td colspan=2>';
s +='<table width=100% cellspacing=0 cellpadding=2 bgcolor=FFF6DD><tr><form action="'+script+'" method=POST><td align=center>';
s +='<table width=90% cellspacing=0 cellpadding=2 align=center><tr><td align=left colspan="2">';
s +='Укажите логин персонажа:<br><small>(можно щелкнуть по логину в чате)</small></td></tr>';
s += '<tr><td align=right><small><b>Логин:</b></small></td><td><INPUT TYPE=text NAME="'+name+'" style="width:140px"></td></tr>';
if (groups && groups.length>0) {
s+='<tr><td align=right><small><b>Группа:</b></small></td><td width=140><SELECT NAME=group style="width:140px">';
for(i=0; i< groups.length; i++) {
s+='<option value="'+i+'">'+groups[i];
}
s+='</SELECT></td></tr>';
};
s += '<tr><td align=right><small><b>Комментарий:</b></small></td><td><INPUT TYPE=text NAME="comment" VALUE="" style="width:105px">&nbsp;';
s += '<INPUT type=image SRC=//img.new-combats.tech/i/b__ok.gif WIDTH=25 HEIGHT=18 ALT="Добавить контакт" style="border:0; vertical-align: middle"></TD></TR></TABLE><INPUT TYPE=hidden name=sd4 value="1"></TD></FORM></TR></TABLE></td></tr></table>';
document.all("hint4").innerHTML = s;
document.all("hint4").style.visibility = "visible";
document.all("hint4").style.left = 100;
document.all("hint4").style.top = document.body.scrollTop+50;
document.all(name).focus();
Hint3Name = name;
}
function w(login,id,align,klan,level,online, city, battle){
var s='';
if (online!="") {
if (city!="") {
s+='<IMG style="filter:gray()" SRC=//img.new-combats.tech/i/lock.gif WIDTH=20 HEIGHT=15 ALT="В другом городе">';
} else {
s+='<a href="javascript:top.addTo(\''+login+'\',\'private\')"><IMG SRC=//img.new-combats.tech/i/lock.gif WIDTH=20 HEIGHT=15 ALT="Приватно"'+(battle!=0?' style="filter: invert()"':'')+'></a>';
}
if (city!="") {
s+='<img src="//img.new-combats.tech/misc/forum/fo'+city+'.gif" width=17 height=15>';
}
s+=' <IMG SRC=//img.new-combats.tech/i/align/align'+align+'.gif WIDTH=12 HEIGHT=15>';
if (klan!='') {s+='<A HREF="/encicl/klan/'+klan+'.html" target=_blank><IMG SRC="//img.new-combats.tech/i/clan/'+klan+'.gif" WIDTH=24 HEIGHT=15 ALT=""></A>'}
s+='<a href="javascript:top.addTo(\''+login+'\',\'to\');">'+login+'</a>['+level+']<a href=/info/'+id+' target=_blank><IMG SRC=//img.new-combats.tech/i/inf_.gif WIDTH=12 HEIGHT=11 ALT="Информация о персонаже"></a>';
s+='</td><td bgcolor=efeded nowrap>';
if (city!="") {
s+="нет в этом городе";
} else {
s+=online;
}
}
else {
s+='<IMG SRC="//img.new-combats.tech/i/offline.gif" WIDTH=20 HEIGHT=15 BORDER=0 ALT="Нет в клубе">';
if (city!="") {
s+='<img src="//img.new-combats.tech/misc/forum/fo'+city+'.gif" width=17 height=15>';
}
if (align == "") align="0";
s+=' <IMG SRC=//img.new-combats.tech/i/align/align'+align+'.gif WIDTH=12 HEIGHT=15>';
if (klan!='') {s+='<A HREF="/encicl/klan/'+klan+'.html" target=_blank><IMG SRC="//img.new-combats.tech/i/clan/'+klan+'.gif" WIDTH=24 HEIGHT=15 ALT=""></A>'}
if (level) {
if (nlevel==0) {
nlevel=1; //s="<BR>"+s;
}
s+='<FONT color=gray><b>'+login+'</b>['+level+']<a href=/info/'+id+' target=_blank><IMG SRC=//img.new-combats.tech/inf_dis.gif WIDTH=12 HEIGHT=11 ALT="Информация о персонаже"></a></td><td bgcolor=efeded nowrap>Нет в клубе';
} else {
if (nlevel==1) {
nlevel=2; //s="<BR>"+s;
}
mlogin = login;
for(var i=0;i<from.length;++i) while(mlogin.indexOf(from[i])>=0) mlogin= mlogin.replace(from[i],to[i]);
s+='<FONT color=gray><i>'+login+'</i> <a href=/info/'+mlogin+' target=_blank><IMG SRC=//img.new-combats.tech/inf_dis.gif WIDTH=12 HEIGHT=11 ALT="Информация о персонаже"></a></td><td bgcolor=efeded nowrap>нет в этом городе';
}
s+='</FONT>';
}
document.write(s+'<BR>');
}
function m(login,id,align,klan,level){
var s='';
s+='<a href="javascript:top.addTo(\''+login+'\',\'private\')"><IMG SRC=//img.new-combats.tech/i/lock.gif WIDTH=20 HEIGHT=15 ALT="Приватно"></a>';
s+=' <IMG SRC=//img.new-combats.tech/i/align/align'+align+'.gif WIDTH=12 HEIGHT=15>';
if (klan!='') {
s+='<A HREF="/encicl/klan/'+klan+'.html" target=_blank><IMG SRC="//img.new-combats.tech/i/clan/'+klan+'.gif" WIDTH=24 HEIGHT=15 ALT=""></A>'
}
s+='<a href="javascript:top.addTo(\''+login+'\',\'to\');">'+login+'</a>['+level+']<a href=/info/'+id+' target=_blank><IMG SRC=//img.new-combats.tech/i/inf_.gif WIDTH=12 HEIGHT=11 ALT="Информация о персонаже"></a>';
document.write(s+'<BR>');
}
function drw(name, id, level, align, klan, img, sex)
{
var s="";
if (align!="0") s+="<A HREF='"+getalignurl(align)+"' target=_blank><IMG SRC='//img.new-combats.tech/i/align/align"+align+".gif' WIDTH=12 HEIGHT=15 ALT=\""+getalign(align)+"\"></A>";
if (klan) s+="<A HREF='claninfo/"+klan+"' target=_blank><IMG SRC='//img.new-combats.tech/i/clan/"+klan+".gif' WIDTH=24 HEIGHT=15 ALT=''></A>";
s+="<B>"+name+"</B>";
if (level!=-1) s+=" ["+level+"]";
if (id!=-1 && !img) s+="<A HREF='/info/"+id+"' target='_blank'><IMG SRC=//img.new-combats.tech/i/inf_.gif WIDTH=12 HEIGHT=11 ALT='Инф. о "+name+"'></A>";
if (img) s+="<A HREF='/encicl/obraz_"+(sex?"w":"m")+"1.html?l="+img+"' target='_blank'><IMG SRC=//img.new-combats.tech/i/inf_.gif WIDTH=12 HEIGHT=11 ALT='Образ "+name+"'></A>";
return s;
}
</SCRIPT>
</HEAD>
<body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 bgcolor=e2e0e0>
<div id=hint4 class=ahint></div>
<TABLE cellspacing=0 cellpadding=2 width="100%">
<TR>
<TD style="vertical-align: top; "><TABLE cellspacing=0 cellpadding=2 width="100%">
<TR>
<TD colspan="4" align="center"><h4>Контакты</h4></TD>
</TR>
<?php
$data=mysql_query("SELECT `notinlist`,`comment` FROM `friends` WHERE `user` = '".mysql_real_escape_string($u->info['id'])."' and `notinlist`>0;");
while ($row = mysql_fetch_array($data)) {
$us=mysql_fetch_array(mysql_query("SELECT `id`,`login`,`clan`,`level`,`align`,`room`,`online`,`city`,
(select `name_mini` from `clan` WHERE `id` = users.`clan`) as `klan`,
(select `name` from `room` WHERE `id` = users.`room`) as `room`
FROM `users` WHERE `id` = '".mysql_real_escape_string($row['notinlist'])."';"));?>
<TR valign="top">
<TD bgcolor=efeded nowrap>
<?php
//function w(login,id,align,klan,level,online, city, battle)
if ($us['online']>(time()-120)) {
$rrm = $us['room'];
}else{
$rrm = '';
}
?>
<SCRIPT>w('<?=$us['login']?>','<?=$us['id']?>','<?=$us['align']?>','<?=$us['klan']?>','<?=$us['level']?>','<?=$rrm?>','','<?$us['battle']?>');</SCRIPT></TD>
<TD bgcolor=efeded width="40%"><small><FONT class=dsc><i><?=$row['comment']?></i></FONT></small><TD>
<TD width="1%"><INPUT type=image SRC=//img.new-combats.tech/i/b__ok.gif WIDTH=25 HEIGHT=18 ALT="Редактировать" style="float: right" onclick='editcontact("Редактирование контакта", "main.php?friends", "friendedit", "<?=$us['login']?>", "<SCRIPT>drwfl(\"<?=$us['login']?>\",<?=$row['notinlist']?>,\"<?=$us['level']?>\",0,\"<?=$us['klan']?>\")</SCRIPT>", "2", new Array( "Друзья","Враги","Не в группе" ), "", new Array( ), "<?=$row['comment']?>");'></TD>
</TR>
<?php
}
$data=mysql_query("SELECT `enemy`,`comment` FROM `friends` WHERE `user` = '".mysql_real_escape_string($u->info['id'])."' and `enemy`>0;");
while ($row = mysql_fetch_array($data)) {
$us=mysql_fetch_array(mysql_query("SELECT `id`,`login`,`clan`,`level`,`align`,`room`,`online`,`city`,
(select `name_mini` from `clan` WHERE `id` = users.`clan`) as `klan`,
(select `name` from `room` WHERE `id` = users.`room`) as `room`
FROM `users` WHERE `id` = '".mysql_real_escape_string($row['enemy'])."';"));
$n++;
if($n==1){
?>
<TR>
<TD colspan="4" nowrap align="center" style="height: 40px" valign="bottom"><h4>Враги</h4></TD>
</TR>
<?}?>
<TR valign="top">
<TD bgcolor=efeded nowrap>
<?php
//function w(login,id,align,klan,level,online, city, battle)
if ($us['online']>(time()-120)) {
$rrm = $us['room'];
}else{
$rrm = '';
}
?>
<SCRIPT>w('<?=$us['login']?>','<?=$us['id']?>','<?=$us['align']?>','<?=$us['klan']?>','<?=$us['level']?>','<?=$rrm?>','','<?$us['battle']?>');</SCRIPT></TD>
<TD bgcolor=efeded width="40%"><small><FONT class=dsc><i><?=$row['comment']?></i></FONT></small><TD>
<TD width="1%"><INPUT type=image SRC=//img.new-combats.tech/i/b__ok.gif WIDTH=25 HEIGHT=18 ALT="Редактировать" style="float: right" onclick='editcontact("Редактирование контакта", "main.php?friends", "friendedit", "<?=$us['login']?>", "<SCRIPT>drwfl(\"<?=$us['login']?>\",<?=$row['enemy']?>,\"<?=$us['level']?>\",0,\"<?=$us['klan']?>\")</SCRIPT>", "1", new Array( "Друзья","Враги","Не в группе" ), "", new Array( ), "<?=$row['comment']?>");'></TD>
</TR>
<?php
}
$data=mysql_query("SELECT `friend`,`comment` FROM `friends` WHERE `user` = '".mysql_real_escape_string($u->info['id'])."' and `friend`>0;");
while ($row = mysql_fetch_array($data)) {
$us=mysql_fetch_array(mysql_query("SELECT `id`,`login`,`clan`,`level`,`align`,`room`,`online`,`city`,
(select `name_mini` from `clan` WHERE `id` = users.`clan`) as `klan`,
(select `name` from `room` WHERE `id` = users.`room`) as `room`
FROM `users` WHERE `id` = '".mysql_real_escape_string($row['friend'])."' ORDER BY online DESC, login ASC;"));
$i++;
if($i==1){
?>
<TR>
<TD colspan="4" nowrap align="center" style="height: 40px" valign="bottom"><h4>Друзья</h4></TD>
</TR>
<?}?>
<TR valign="top">
<TD bgcolor=efeded nowrap>
<?php
//function w(login,id,align,klan,level,online, city, battle)
if ($us['online']>(time()-120)) {
$rrm = $us['room'];
}else{
$rrm = '';
}
?>
<SCRIPT>w('<?=$us['login']?>','<?=$us['id']?>','<?=$us['align']?>','<?=$us['klan']?>','<?=$us['level']?>','<?=$rrm?>','','<?$us['battle']?>');</SCRIPT></TD>
<TD bgcolor=efeded width="40%"><small><FONT class=dsc><i><?=$row['comment']?></i></FONT></small><TD>
<TD width="1%"><INPUT type=image SRC=//img.new-combats.tech/i/b__ok.gif WIDTH=25 HEIGHT=18 ALT="Редактировать" style="float: right" onclick='editcontact("Редактирование контакта", "main.php?friends", "friendedit", "<?=$us['login']?>", "<SCRIPT>drwfl(\"<?=$us['login']?>\",<?=$row['friend']?>,\"<?=$us['level']?>\",0,\"<?=$us['klan']?>\")</SCRIPT>", "7", new Array( "Друзья","Враги","Не в группе" ), "", new Array( ), "<?=$row['comment']?>");'></TD>
</TR>
<?php
}
?>
<TR>
<TD colspan="4"><INPUT type='button' style='width: 100px' value='Добавить' onclick='findlogin2("Добавить в список", "main.php?friends", "friendadd", new Array("Друзья","Враги","Не в группе"), new Array())'>
&nbsp;&nbsp;&nbsp;
<INPUT type='button' style='width: 100px' value='Удалить' onclick='findlogin("Удалить из списка", "main.php?friends", "friendremove", "", 0)'></TD>
</TR>
</TABLE></TD>
<TD style="width: 5%; vertical-align: top; ">&nbsp;</TD>
<TD style="width: 30%; vertical-align: top; "><TABLE cellspacing=0 cellpadding=2>
<TR>
<TD style="width: 25%; vertical-align: top; text-align: right; "><INPUT type='button' value='Обновить' style='width: 75px' onclick='location="main.php?friends"'>
&nbsp;<INPUT TYPE=button value="Вернуться" style='width: 75px' onclick='location="main.php"'></TD>
</TR>
<TR>
<TD align=center><h4>Модераторы on-line</h4></TD>
</TR>
<TR>
<TD bgcolor=efeded nowrap style="text-align: left; "><table align="left">
<tr><td>
<SCRIPT>
<?php
$data=mysql_query("SELECT `id`, `login`, `level`, `align`, `clan` FROM `users` WHERE `online` > '".(time()-120)."' AND ((align>1 and align<2 and align!=1.2) or (align>3 and align<4)) AND `city` = '".mysql_real_escape_string($u->info['city'])."' order by align asc;");
while ($row = mysql_fetch_array($data)) {
//m( login, id, align, klan, level)
echo"m('".$row['login']."','".$row['id']."','".$row['align']."','".$row['klan']."','".$row['level']."');";
}
?>
</SCRIPT>
<?php
$chk=mysql_fetch_array(mysql_query("SELECT `id` FROM `users` WHERE `online` > '".(time()-120)."' AND ((align>1 and align<2 and align!=1.2) or (align>3 and align<4)) AND `city` = '".mysql_real_escape_string($u->info['city'])."' order by align asc;"));
if(!$chk['id']) {echo'<font color=grey>К сожалению в данный момент никого из модераторов нет в городе.</font>';}?>
</TD></tr></table></TD>
</TR>
<TR>
<TD style="text-align: left; "><small>Уважаемые Игроки!<BR>Для более быстрого и эффективного решения Вашей проблемы просьба обращаться к тем паладинам или тарманам, ники которых находятся вверху списка «Модераторы on-line».
<BR>Цените свое и чужое время!<BR>P.S. не пишите всем модераторам сразу и воздержитесь от вопросов стажерам - они находятся в процессе получения знаний
</small></div></TD>
</TR>
</TABLE></TD>
</TR>
</TABLE>
<!--Тут рейтинг-->
</HTML>