Фиксим список паладинов.
This commit is contained in:
parent
c374797862
commit
667fd98d4e
295
ch.php
295
ch.php
@ -1,48 +1,96 @@
|
|||||||
<?php
|
<?php
|
||||||
session_start();
|
session_start();
|
||||||
header("Cache-Control: no-cache");
|
header("Cache-Control: no-cache");
|
||||||
if(!isset($_SESSION['uid'])) { echo "<script>top.window.location='index.php'</script>"; die(); }
|
if (!isset($_SESSION['uid'])) {
|
||||||
|
echo "<script>top.window.location='index.php'</script>";
|
||||||
|
die();
|
||||||
|
}
|
||||||
include_once 'config.php';
|
include_once 'config.php';
|
||||||
include_once 'functions.php';
|
include_once 'functions.php';
|
||||||
|
|
||||||
$user = db::c()->query('SELECT * FROM `users` WHERE `id` = ?i', $_SESSION['uid'])->fetch_assoc();
|
$user = db::c()->query('SELECT * FROM `users` WHERE `id` = ?i', $_SESSION['uid'])->fetch_assoc();
|
||||||
db::c()->query('UPDATE `online` SET `real_time` = ?i WHERE `id` = ?i', time(), $user['id']);
|
db::c()->query('UPDATE `online` SET `real_time` = ?i WHERE `id` = ?i', time(), $user['id']);
|
||||||
|
|
||||||
function tolink($buf) {
|
//function tolink($buf) /*Штука, убивающая чужие ссылки*/
|
||||||
$x = explode(" ", $buf);
|
//{
|
||||||
$newbuf = '';
|
// $x = explode(" ", $buf);
|
||||||
for($j = 0; $j < count($x); $j++) {
|
// $newbuf = '';
|
||||||
if(preg_match("/(http:\\/\\/)?([a-z_0-9-.]+\\.oldcombats+\\.org(([ \"'>\r\n\t])|(\\/([^ \"'>\r\n\t]*)?)))/", $x[$j], $ok)) {
|
// for ($j = 0; $j < count($x); $j++) {
|
||||||
$newbuf .= str_replace($ok[2],"<small><a href=http://$ok[2] target=_blank ><i>[Внутреняя ссылка]</i></a></small>", str_replace("http://", "", $x[$j]))." ";
|
// if (preg_match("/(http:\\/\\/)?([a-z_0-9-.]+\\.oldcombats+\\.org(([ \"'>\r\n\t])|(\\/([^ \"'>\r\n\t]*)?)))/", $x[$j], $ok)) {
|
||||||
} else {
|
// $newbuf .= str_replace($ok[2], "<small><a href=http://$ok[2] target=_blank ><i>[Внутреняя ссылка]</i></a></small>", str_replace("http://", "", $x[$j])) . " ";
|
||||||
$newbuf .= $x[$j]." ";
|
// } else {
|
||||||
}
|
// $newbuf .= $x[$j] . " ";
|
||||||
}
|
// }
|
||||||
return $newbuf;
|
// }
|
||||||
}
|
// return $newbuf;
|
||||||
|
//}
|
||||||
|
|
||||||
if (isset($_GET['online']) && $_GET['online'] != null) {
|
if (isset($_GET['online']) && $_GET['online'] != null) {
|
||||||
if($_GET['room'] && (int)$_GET['room'] < 500) { $user['room'] = (int)$_GET['room']; }
|
if ($_GET['room'] && (int)$_GET['room'] < 500) {
|
||||||
if($_GET['chview'] == 2) {
|
$user['room'] = (int)$_GET['room'];
|
||||||
$data = mysql_query('SELECT `align`, `u`.`id`, `klan`, `action`, `level`, `login`, `u`.`battle` AS `in_battle`, `o`.`date`, `u`.`invis`, (SELECT `id` FROM `effects` WHERE `type` = 2 AND `owner` = `u`.`id` LIMIT 1) AS `slp`, (SELECT `id` FROM `effects` WHERE (`type` = 11 OR `type` = 12 OR `type` = 13 OR `type` = 14) AND `owner` = `u`.`id` LIMIT 1) AS `trv`, `deal` FROM `online` AS `o`, `users` AS `u` WHERE `o`.`id` = `u`.`id` AND (`o`.`date` >= '.(time()-90).' OR `u`.`in_tower` = 1) AND `u`.`id` IN (SELECT `friend` FROM `friends` WHERE `user` = "'.$user['id'].'" AND `friend` > 0) ORDER by `u`.`login`');
|
}
|
||||||
$ttl = "<font style=\"color: #8f0000; font-size: 10pt;\"><b>Друзья онлайн (".mysql_num_rows($data).")</b></font>";
|
if ($_GET['chview'] == 5) {
|
||||||
$ch1 = '_passive'; $ch2 = '_active'; $ch3 = '_passive'; $ch4 = '_passive'; $ch5 = '_passive';
|
$data = mysql_query('
|
||||||
} elseif($_GET['chview'] == 3) {
|
SELECT
|
||||||
$data = mysql_query('SELECT `align`, `u`.`id`, `klan`, `action`, `level`, `login`, `u`.`battle` AS `in_battle`, `o`.`date`, `u`.`invis`, (SELECT `id` FROM `effects` WHERE `type` = 2 AND `owner` = `u`.`id` LIMIT 1) AS `slp`, (SELECT `id` FROM `effects` WHERE (`type` = 11 OR `type` = 12 OR `type` = 13 OR `type` = 14) AND `owner` = `u`.`id` LIMIT 1) AS `trv`, `deal` FROM `online` AS `o`, `users` AS `u` WHERE `o`.`id` = `u`.`id` AND (`o`.`date` >= '.(time()-90).' OR `u`.`in_tower` = 1) AND ((`u`.`align` > 1 AND `u`.`align` < 2) OR `u`.`align` = 2.99) ORDER by `u`.`login`');
|
`align`,
|
||||||
$ttl = "<font style=\"color: #8f0000; font-size: 10pt;\"><b>Паладины онлайн (".mysql_num_rows($data).")</b></font>";
|
`u`.`id`,
|
||||||
$ch1 = '_passive'; $ch2 = '_passive'; $ch3 = '_active'; $ch4 = '_passive'; $ch5 = '_passive';
|
`klan`,
|
||||||
} elseif($_GET['chview'] == 4) {
|
`action`,
|
||||||
$data = mysql_query('SELECT `align`, `u`.`id`, `klan`, `action`, `level`, `login`, `u`.`battle` AS `in_battle`, `o`.`date`, `u`.`invis`, (SELECT `id` FROM `effects` WHERE `type` = 2 AND `owner` = `u`.`id` LIMIT 1) AS `slp`, (SELECT `id` FROM `effects` WHERE (`type` = 11 OR `type` = 12 OR `type` = 13 OR `type` = 14) AND `owner` = `u`.`id` LIMIT 1) AS `trv`, `deal` FROM `online` AS `o`, `users` AS `u` WHERE `o`.`id` = `u`.`id` AND (`o`.`date` >= '.(time()-90).' OR `u`.`in_tower` = 1) AND (`u`.`deal` > 0 OR `u`.`align` = 2.99) ORDER by `u`.`login`');
|
`level`,
|
||||||
$ttl = "<font style=\"color: #8f0000; font-size: 10pt;\"><b>Алхимики онлайн (".mysql_num_rows($data).")</b></font>";
|
`login`,
|
||||||
$ch1 = '_passive'; $ch2 = '_passive'; $ch3 = '_passive'; $ch4 = '_active'; $ch5 = '_passive';
|
`u`.`battle` AS `in_battle`,
|
||||||
} elseif($_GET['chview'] == 5) {
|
`o`.`date`,
|
||||||
$data = mysql_query('SELECT `align`, `u`.`id`, `klan`, `action`, `level`, `login`, `u`.`battle` AS `in_battle`, `o`.`date`, `u`.`invis`, (SELECT `id` FROM `effects` WHERE `type` = 2 AND `owner` = `u`.`id` LIMIT 1) AS `slp`, (SELECT `id` FROM `effects` WHERE (`type` = 11 OR `type` = 12 OR `type` = 13 OR `type` = 14) AND `owner` = `u`.`id` LIMIT 1) AS `trv`, `deal` FROM `online` AS `o`, `users` AS `u` WHERE `o`.`id` = `u`.`id` AND (`o`.`date` >= '.(time()-90).' OR `u`.`in_tower` = 1) AND `u`.`klan` = "'.$user['klan'].'" ORDER by `u`.`login`');
|
`u`.`invis`,
|
||||||
$ttl = "<font style=\"color: #8f0000; font-size: 10pt;\"><b>Соклановцы онлайн (".mysql_num_rows($data).")</b></font>";
|
(SELECT `id` FROM `effects` WHERE `type` = 2 AND `owner` = `u`.`id` LIMIT 1) AS `slp`,
|
||||||
$ch1 = '_passive'; $ch2 = '_passive'; $ch3 = '_passive'; $ch4 = '_passive'; $ch5 = '_active';
|
(SELECT `id` FROM `effects` WHERE (`type` = 11 OR `type` = 12 OR `type` = 13 OR `type` = 14) AND `owner` = `u`.`id` LIMIT 1) AS `trv`,
|
||||||
|
`deal`
|
||||||
|
FROM
|
||||||
|
`online` AS `o`,
|
||||||
|
`users` AS `u`
|
||||||
|
WHERE
|
||||||
|
`o`.`id` = `u`.`id` AND
|
||||||
|
(`o`.`date` >= ' . (time() - 90) . ' OR `u`.`in_tower` = 1) AND
|
||||||
|
`u`.`klan` = "' . $user['klan'] . '"
|
||||||
|
ORDER BY
|
||||||
|
`u`.`login`
|
||||||
|
');
|
||||||
|
$ttl = "<span style=\"color: #8f0000; font-size: 10pt;\"><b>Соклановцы онлайн (" . mysql_num_rows($data) . ")</b></span>";
|
||||||
|
$ch1 = '_passive';
|
||||||
|
$ch2 = '_passive';
|
||||||
|
$ch3 = '_passive';
|
||||||
|
$ch4 = '_passive';
|
||||||
|
$ch5 = '_active';
|
||||||
} elseif ($user['caveleader'] > 0) {
|
} elseif ($user['caveleader'] > 0) {
|
||||||
$data = mysql_query('SELECT `align`, `u`.`id`, `klan`, `level`, `login`, `u`.`battle` AS `in_battle`, `o`.`date`, `u`.`invis`, (SELECT `id` FROM `effects` WHERE `type` = 2 AND `owner` = `u`.`id` LIMIT 1) AS `slp`, (SELECT `id` FROM `effects` WHERE (`type` = 11 OR `type` = 12 OR `type` = 13 OR `type` = 14) AND `owner` = `u`.`id` LIMIT 1) AS `trv`, `deal` FROM `online` AS `o`, `users` AS `u` WHERE `o`.`id` = `u`.`id` AND (`o`.`date` >= '.(time()-90).' OR `u`.`in_tower` = 1) AND `o`.`room` = "'.$user['room'].'" AND `u`.`caveleader` = "'.$user['caveleader'].'" ORDER by `u`.`login`');
|
$data = mysql_query('
|
||||||
$ttl = "<font style=\"color: #8f0000; font-size: 10pt;\"><b>".$rooms[$user['room']]." (".mysql_num_rows($data).")</b></font>";
|
SELECT
|
||||||
$ch1 = '_active'; $ch2 = '_passive'; $ch3 = '_passive'; $ch4 = '_passive'; $ch5 = '_passive';
|
`align`,
|
||||||
|
`u`.`id`,
|
||||||
|
`klan`,
|
||||||
|
`level`,
|
||||||
|
`login`,
|
||||||
|
`u`.`battle` AS `in_battle`,
|
||||||
|
`o`.`date`,
|
||||||
|
`u`.`invis`,
|
||||||
|
(SELECT `id` FROM `effects` WHERE `type` = 2 AND `owner` = `u`.`id` LIMIT 1) AS `slp`,
|
||||||
|
(SELECT `id` FROM `effects` WHERE (`type` = 11 OR `type` = 12 OR `type` = 13 OR `type` = 14) AND `owner` = `u`.`id` LIMIT 1) AS `trv`,
|
||||||
|
`deal`
|
||||||
|
FROM
|
||||||
|
`online` AS `o`,
|
||||||
|
`users` AS `u`
|
||||||
|
WHERE
|
||||||
|
`o`.`id` = `u`.`id` AND
|
||||||
|
(`o`.`date` >= ' . (time() - 90) . ' OR `u`.`in_tower` = 1) AND
|
||||||
|
`o`.`room` = "' . $user['room'] . '" AND
|
||||||
|
`u`.`caveleader` = "' . $user['caveleader'] . '"
|
||||||
|
ORDER BY
|
||||||
|
`u`.`login`
|
||||||
|
');
|
||||||
|
$ttl = "<span style=\"color: #8f0000; font-size: 10pt;\"><b>" . $rooms[$user['room']] . " (" . mysql_num_rows($data) . ")</b></span>";
|
||||||
|
$ch1 = '_active';
|
||||||
|
$ch2 = '_passive';
|
||||||
|
$ch3 = '_passive';
|
||||||
|
$ch4 = '_passive';
|
||||||
|
$ch5 = '_passive';
|
||||||
} elseif ($user['room'] == 760) {
|
} elseif ($user['room'] == 760) {
|
||||||
$forest = mysql_fetch_array(mysql_query('SELECT `id`, `room`, `time`, `user`, `data` FROM `forest` WHERE `user` = "' . $user['id'] . '" LIMIT 1'));
|
$forest = mysql_fetch_array(mysql_query('SELECT `id`, `room`, `time`, `user`, `data` FROM `forest` WHERE `user` = "' . $user['id'] . '" LIMIT 1'));
|
||||||
$sp = mysql_query('SELECT `id`, `room`, `user` FROM `forest` WHERE `room` = "' . $forest['room'] . '"');
|
$sp = mysql_query('SELECT `id`, `room`, `user` FROM `forest` WHERE `room` = "' . $forest['room'] . '"');
|
||||||
@ -53,16 +101,68 @@ if(isset($_GET['online']) && $_GET['online'] != null) {
|
|||||||
if ($uss != '') {
|
if ($uss != '') {
|
||||||
$uss = ltrim($uss, ', ');
|
$uss = ltrim($uss, ', ');
|
||||||
}
|
}
|
||||||
$data = mysql_query('SELECT `align`, `u`.`id`, `klan`, `action`, `level`, `login`, `u`.`battle` AS `in_battle`, `o`.`date`, `u`.`invis`, (SELECT `id` FROM `effects` WHERE `type` = 2 AND `owner` = `u`.`id` LIMIT 1) AS `slp`, (SELECT `id` FROM `effects` WHERE (`type` = 11 OR `type` = 12 OR `type` = 13 OR `type` = 14) AND `owner` = `u`.`id` LIMIT 1) AS `trv`, `deal` FROM `online` AS `o`, `users` AS `u` WHERE `o`.`id` = `u`.`id` AND (`o`.`date` >= '.(time()-90).' OR `u`.`in_tower` = 1) AND `u`.`id` IN ('.$uss.') ORDER by `u`.`login`');
|
$data = mysql_query('
|
||||||
$ttl = "<font style=\"color: #8f0000; font-size: 10pt;\"><b>".$var_map[$forest['room']]." (".mysql_num_rows($data).")</b></font>";
|
SELECT
|
||||||
$ch1 = '_active'; $ch2 = '_passive'; $ch3 = '_passive'; $ch4 = '_passive'; $ch5 = '_passive';
|
`align`,
|
||||||
|
`u`.`id`,
|
||||||
|
`klan`,
|
||||||
|
`action`,
|
||||||
|
`level`,
|
||||||
|
`login`,
|
||||||
|
`u`.`battle` AS `in_battle`,
|
||||||
|
`o`.`date`,
|
||||||
|
`u`.`invis`,
|
||||||
|
(SELECT `id` FROM `effects` WHERE `type` = 2 AND `owner` = `u`.`id` LIMIT 1) AS `slp`,
|
||||||
|
(SELECT `id` FROM `effects` WHERE (`type` = 11 OR `type` = 12 OR `type` = 13 OR `type` = 14) AND `owner` = `u`.`id` LIMIT 1) AS `trv`,
|
||||||
|
`deal`
|
||||||
|
FROM
|
||||||
|
`online` AS `o`,
|
||||||
|
`users` AS `u`
|
||||||
|
WHERE
|
||||||
|
`o`.`id` = `u`.`id` AND
|
||||||
|
(`o`.`date` >= ' . (time() - 90) . ' OR `u`.`in_tower` = 1) AND
|
||||||
|
`u`.`id` IN (' . $uss . ')
|
||||||
|
ORDER BY
|
||||||
|
`u`.`login`
|
||||||
|
');
|
||||||
|
$ttl = "<span style=\"color: #8f0000; font-size: 10pt;\"><b>" . $var_map[$forest['room']] . " (" . mysql_num_rows($data) . ")</b></span>";
|
||||||
|
$ch1 = '_active';
|
||||||
|
$ch2 = '_passive';
|
||||||
|
$ch3 = '_passive';
|
||||||
|
$ch4 = '_passive';
|
||||||
|
$ch5 = '_passive';
|
||||||
} else {
|
} else {
|
||||||
$data = mysql_query('SELECT `align`, `u`.`id`, `klan`, `action`, `level`, `login`, `u`.`battle` AS `in_battle`, `o`.`date`, `u`.`invis`, (SELECT `id` FROM `effects` WHERE `type` = 2 AND `owner` = `u`.`id` LIMIT 1) AS `slp`, (SELECT `id` FROM `effects` WHERE (`type` = 11 OR `type` = 12 OR `type` = 13 OR `type` = 14) AND `owner` = `u`.`id` LIMIT 1) AS `trv`, `deal` FROM `online` AS `o`, `users` AS `u` WHERE `o`.`id` = `u`.`id` AND (`o`.`date` >= '.(time()-90).' OR `u`.`in_tower` = 1) AND `o`.`room` = "'.$user['room'].'" ORDER by `u`.`login`');
|
$data = mysql_query('
|
||||||
$ttl = "<font style=\"color: #8f0000; font-size: 10pt;\"><b>".$rooms[$user['room']]." (".mysql_num_rows($data).")</b></font>";
|
SELECT
|
||||||
$ch1 = '_active'; $ch2 = '_passive'; $ch3 = '_passive'; $ch4 = '_passive'; $ch5 = '_passive';
|
`align`,
|
||||||
|
`u`.`id`,
|
||||||
|
`klan`,
|
||||||
|
`action`,
|
||||||
|
`level`,
|
||||||
|
`login`,
|
||||||
|
`u`.`battle` AS `in_battle`,
|
||||||
|
`o`.`date`,
|
||||||
|
`u`.`invis`,
|
||||||
|
(SELECT `id` FROM `effects` WHERE `type` = 2 AND `owner` = `u`.`id` LIMIT 1) AS `slp`,
|
||||||
|
(SELECT `id` FROM `effects` WHERE (`type` = 11 OR `type` = 12 OR `type` = 13 OR `type` = 14) AND `owner` = `u`.`id` LIMIT 1) AS `trv`,
|
||||||
|
`deal`
|
||||||
|
FROM
|
||||||
|
`online` AS `o`,
|
||||||
|
`users` AS `u`
|
||||||
|
WHERE
|
||||||
|
`o`.`id` = `u`.`id` AND
|
||||||
|
(`o`.`date` >= ' . (time() - 90) . ' OR `u`.`in_tower` = 1) AND
|
||||||
|
`o`.`room` = "' . $user['room'] . '"
|
||||||
|
ORDER BY
|
||||||
|
`u`.`login`
|
||||||
|
');
|
||||||
|
$ttl = "<span style=\"color: #8f0000; font-size: 10pt;\"><b>" . $rooms[$user['room']] . " (" . mysql_num_rows($data) . ")</b></span>";
|
||||||
|
$ch1 = '_active';
|
||||||
|
$ch2 = '_passive';
|
||||||
|
$ch3 = '_passive';
|
||||||
|
$ch4 = '_passive';
|
||||||
|
$ch5 = '_passive';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
@ -88,20 +188,40 @@ function hideshow() {
|
|||||||
document.getElementById("mmoves").style.visibility = 'hidden';
|
document.getElementById("mmoves").style.visibility = 'hidden';
|
||||||
}
|
}
|
||||||
|
|
||||||
function w(name, id, in_battle, align, klan, act, level, slp, trv, deal, name2, battle) {
|
function w(name, id, in_battle, align, klan, act, level, slp, trv, deal, name2) {
|
||||||
if (align.length>0) {align='<img src="i/align_'+align+'.gif" title="Склонность персонажа" width=12 height=15>';}
|
if (align.length > 0) {
|
||||||
if(deal>0) {style = 'color: chocolate;';}
|
align = '<img src="i/align_' + align + '.gif" title="Склонность персонажа" width=12 height=15>';
|
||||||
else if(id == 10022) {style = 'color: red;';}
|
}
|
||||||
else {style='';}
|
if (deal > 0) {
|
||||||
|
style = 'color: chocolate;';
|
||||||
|
}
|
||||||
|
else if (id == 10022) {
|
||||||
|
style = 'color: red;';
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
style = '';
|
||||||
|
}
|
||||||
if (!name2) name2 = name;
|
if (!name2) name2 = name;
|
||||||
if (klan.length>0) {klan='<img src="i/klan/'+klan+'.gif" title="'+klan+'">';}
|
if (klan.length > 0) {
|
||||||
|
klan = '<img src="i/klan/' + klan + '.gif" title="' + klan + '">';
|
||||||
|
}
|
||||||
document.write('<A HREF="javascript:top.AddToPrivate(\'' + name + '\', top.CtrlPress)" target=refreshed><img src="i/');
|
document.write('<A HREF="javascript:top.AddToPrivate(\'' + name + '\', top.CtrlPress)" target=refreshed><img src="i/');
|
||||||
if (in_battle>0) { document.write('lock2.gif'); } else {document.write('lock.gif'); }
|
if (in_battle > 0) {
|
||||||
|
document.write('lock2.gif');
|
||||||
|
} else {
|
||||||
|
document.write('lock.gif');
|
||||||
|
}
|
||||||
document.write('" title="Приват"></A>' + align + '<a href="(\'' + name + '\',true)"></a>' + klan + '' + act + '<a href="javascript:top.AddTo(\'' + name + '\')" target=refreshed style=\'' + style + '\'>' + name2 + '</a>[' + level + ']<a href="inf.php?' + id + '" target=_blank title="Инф. о ' + name + '">' + '<IMG SRC="i/inf.gif" WIDTH=12 HEIGHT=11 BORDER=0 ALT="Инф. о ' + name + '"></a>');
|
document.write('" title="Приват"></A>' + align + '<a href="(\'' + name + '\',true)"></a>' + klan + '' + act + '<a href="javascript:top.AddTo(\'' + name + '\')" target=refreshed style=\'' + style + '\'>' + name2 + '</a>[' + level + ']<a href="inf.php?' + id + '" target=_blank title="Инф. о ' + name + '">' + '<IMG SRC="i/inf.gif" WIDTH=12 HEIGHT=11 BORDER=0 ALT="Инф. о ' + name + '"></a>');
|
||||||
|
|
||||||
if (slp>0) { document.write(' <IMG SRC="i/sleep2.gif" WIDTH=24 HEIGHT=15 BORDER=0 ALT="Наложено заклятие молчания">'); }
|
if (slp > 0) {
|
||||||
if (trv>0) { document.write(' <IMG SRC="i/travma2.gif" WIDTH=24 HEIGHT=15 BORDER=0 ALT="Инвалидность">'); }
|
document.write(' <IMG SRC="i/sleep2.gif" WIDTH=24 HEIGHT=15 BORDER=0 ALT="Наложено заклятие молчания">');
|
||||||
if (in_battle>0) { document.write(' <IMG SRC="i/b.jpg" WIDTH=15 HEIGHT=15 BORDER=0 title="Персонаж в поединке"></a>'); }
|
}
|
||||||
|
if (trv > 0) {
|
||||||
|
document.write(' <IMG SRC="i/travma2.gif" WIDTH=24 HEIGHT=15 BORDER=0 ALT="Инвалидность">');
|
||||||
|
}
|
||||||
|
if (in_battle > 0) {
|
||||||
|
document.write(' <IMG SRC="i/b.jpg" WIDTH=15 HEIGHT=15 BORDER=0 title="Персонаж в поединке"></a>');
|
||||||
|
}
|
||||||
document.write('<BR>');
|
document.write('<BR>');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -110,31 +230,38 @@ top.rld();
|
|||||||
|
|
||||||
<title><?= $rooms[$user['room']], ' (', mysql_num_rows($data) ?>)</title>
|
<title><?= $rooms[$user['room']], ' (', mysql_num_rows($data) ?>)</title>
|
||||||
</head>
|
</head>
|
||||||
<body style="margin: 0px; padding: 0px; background: #EEEEEE;" onscroll="top.myscroll()" onload="document.body.scrollTop=top.OnlineOldPosition">
|
<body style="margin: 0px; padding: 0px; background: #EEEEEE;" onscroll="top.myscroll()"
|
||||||
|
onload="document.body.scrollTop=top.OnlineOldPosition">
|
||||||
|
|
||||||
<? if ($user['first'] != 99) { ?>
|
<? if ($user['first'] != 99) { ?>
|
||||||
<center><div id="mini_qsst" onclick="top.frames['main'].location.href='kwest.php';" style="cursor: pointer; display: block;"><img src="i/bot_q/mini_wm1.png" width="35" height="35" /></div></center>
|
<center>
|
||||||
|
<div id="mini_qsst" onclick="top.frames['main'].location.href='kwest.php';"
|
||||||
|
style="cursor: pointer; display: block;"><img src="i/bot_q/mini_wm1.png"></div>
|
||||||
|
</center>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
|
|
||||||
<center>
|
<center>
|
||||||
<? if (!$_GET['rms']) { ?>
|
<? if (!$_GET['rms']) { ?>
|
||||||
<div id="fixednew" style="position: fixed; margin: 0px; padding: 0px; z-index: 9; width: 100%; text-align: center; overflow: auto;">
|
<div id="fixednew"
|
||||||
|
style="position: fixed; margin: 0px; padding: 0px; z-index: 9; width: 100%; text-align: center; overflow: auto;">
|
||||||
<table border="0" cellpadding="0" cellspacing="0">
|
<table border="0" cellpadding="0" cellspacing="0">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td><img align="left" onclick="this.src='i/buttons/ch1_passive.jpg'; location.href='ch.php?online='+Math.random();" src="i/buttons/ch1<?=$ch1;?>.jpg" /></td>
|
<td><img align="left"
|
||||||
<td><img align="left" title="Друзья" style="cursor: pointer;" onclick="this.src='i/buttons/ch1_passive.jpg'; location.href='ch.php?online='+Math.random()+'&chview=2';" src="i/buttons/ch2<?=$ch2;?>.jpg" /></td>
|
onclick="this.src='i/buttons/ch1_passive.jpg'; location.href='ch.php?online='+Math.random();"
|
||||||
<td><img align="left" title="Паладины" style="cursor: pointer;" onclick="location.href='ch.php?online='+Math.random()+'&chview=3';" src="i/buttons/ch3<?=$ch3;?>.jpg" /></td>
|
src="i/buttons/ch1<?= $ch1; ?>.jpg"/></td>
|
||||||
<td><img align="left" title="Дилеры" style="cursor: pointer;" onclick="location.href='ch.php?online='+Math.random()+'&chview=4';" src="i/buttons/ch4<?=$ch4;?>.jpg" /></td>
|
|
||||||
<? if (!empty($user['klan'])) { ?>
|
<? if (!empty($user['klan'])) { ?>
|
||||||
<td><img align="left" title="Соклановцы" style="cursor: pointer;" onclick="location.href='ch.php?online='+Math.random()+'&chview=5';" src="i/buttons/ch5<?=$ch5;?>.jpg" /></td>
|
<td><img align="left" title="Соклановцы" style="cursor: pointer;"
|
||||||
|
onclick="location.href='ch.php?online='+Math.random()+'&chview=5';"
|
||||||
|
src="i/buttons/ch5<?= $ch5; ?>.jpg"/></td>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div><br/><br/><br/>
|
</div><br/><br/><br/>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
<div id="mmoves" style="background-color: #FFFFCC; visibility:hidden; overflow: visible; position: absolute; border-color: #666666; border-style: solid; border-width: 0px; padding: 0px; white-space: nowrap; display: block; vertical-align: middle; word-wrap: break-word;"></div>
|
<div id="mmoves"
|
||||||
|
style="background-color: #FFFFCC; visibility:hidden; overflow: visible; position: absolute; border-color: #666666; border-style: solid; border-width: 0px; padding: 0px; white-space: nowrap; display: block; vertical-align: middle; word-wrap: break-word;"></div>
|
||||||
<?
|
<?
|
||||||
if (!$_GET['room']) {
|
if (!$_GET['room']) {
|
||||||
if (!isset($_GET['chview']) || $_GET['chview'] == 1) {
|
if (!isset($_GET['chview']) || $_GET['chview'] == 1) {
|
||||||
@ -146,22 +273,29 @@ if(!$_GET['room']) {
|
|||||||
?>
|
?>
|
||||||
<? echo '<br />' . $ttl . '<br />'; ?>
|
<? echo '<br />' . $ttl . '<br />'; ?>
|
||||||
</center>
|
</center>
|
||||||
<table border=0><tr><td nowrap>
|
<table border=0>
|
||||||
|
<tr>
|
||||||
|
<td nowrap>
|
||||||
<script>
|
<script>
|
||||||
<?php
|
<?php
|
||||||
while ($row = mysql_fetch_array($data)) {
|
while ($row = mysql_fetch_array($data)) {
|
||||||
if($row['in_battle'] > 0) { $in_battle = 1; } else { $in_battle = 0; }
|
if ($row['in_battle'] > 0) {
|
||||||
if($row['invis'] > 0 && $row['id'] == $_SESSION['uid']) { $row['login2'] = $row['login']."</a> (невидимка)"; }
|
$in_battle = 1;
|
||||||
|
} else {
|
||||||
|
$in_battle = 0;
|
||||||
|
}
|
||||||
|
if ($row['invis'] > 0 && $row['id'] == $_SESSION['uid']) {
|
||||||
|
$row['login2'] = $row['login'] . "</a> (невидимка)";
|
||||||
|
}
|
||||||
if ($row['invis'] == 0 || $row['id'] == $_SESSION['uid']) {
|
if ($row['invis'] == 0 || $row['id'] == $_SESSION['uid']) {
|
||||||
# if($row['id'] == 10022) { $row['align'] = 0; $row['klan'] = 0; $row['level'] = '??'; } //Потом вернём. Мешает отладке. Ins.
|
|
||||||
if (!empty($row['action'])) {
|
if (!empty($row['action'])) {
|
||||||
$rrr = $row['action'];
|
$rrr = $row['action'];
|
||||||
$act = explode("<>:<>", $rrr);
|
$act = explode("<>:<>", $rrr);
|
||||||
$aa = htmlspecialchars(stripslashes_deep($act[1]));
|
$aa = htmlspecialchars(stripslashes_deep($act[1]));
|
||||||
$aa = eregi_replace("/afk ", "", $aa);
|
$aa = preg_replace("/afk ","", $aa)
|
||||||
$aa = eregi_replace("/dnd ", "", $aa);
|
$aa = preg_replace("/dnd ", "", $aa);
|
||||||
$aa = eregi_replace("/buy ", "", $aa);
|
$aa = preg_replace("/buy ", "", $aa);
|
||||||
$aa = eregi_replace("/sell ", "", $aa);
|
$aa = preg_replace("/sell ", "", $aa);
|
||||||
$act_line = " <span onmouseover=\"fastshow(\'$aa\')\" onmouseout=\"hideshow()\"><b><small>{$act[0]}</small></b></span> ";
|
$act_line = " <span onmouseover=\"fastshow(\'$aa\')\" onmouseout=\"hideshow()\"><b><small>{$act[0]}</small></b></span> ";
|
||||||
} else $act_line = '';
|
} else $act_line = '';
|
||||||
echo 'w(\'', $row['login'], '\',', $row['id'], ',', $in_battle, ',\'', $row['align'], '\',\'' . ClanImage($row['klan']) . '\', \'' . $act_line . '\',\'', $row['level'], '\',\'', $row['slp'], '\',\'', $row['trv'], '\',\'', (int)$row['deal'], '\',\'', $row['login2'], '\');';
|
echo 'w(\'', $row['login'], '\',', $row['id'], ',', $in_battle, ',\'', $row['align'], '\',\'' . ClanImage($row['klan']) . '\', \'' . $act_line . '\',\'', $row['level'], '\',\'', $row['slp'], '\',\'', $row['trv'], '\',\'', (int)$row['deal'], '\',\'', $row['login2'], '\');';
|
||||||
@ -169,7 +303,9 @@ if(!$_GET['room']) {
|
|||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</script>
|
</script>
|
||||||
</td></tr></table>
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
<?php
|
<?php
|
||||||
if (!$_GET['room']) {
|
if (!$_GET['room']) {
|
||||||
?>
|
?>
|
||||||
@ -178,8 +314,7 @@ if (!$_GET['room']) {
|
|||||||
<?php
|
<?php
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
}
|
} elseif (@$_GET['show'] != null) {
|
||||||
elseif (@$_GET['show'] != null) {
|
|
||||||
if ($_SESSION['sid'] != $user['sid']) {
|
if ($_SESSION['sid'] != $user['sid']) {
|
||||||
$_SESSION['uid'] = null;
|
$_SESSION['uid'] = null;
|
||||||
die ("<script>top.location.href='index.php';</script>");
|
die ("<script>top.location.href='index.php';</script>");
|
||||||
@ -209,8 +344,7 @@ if (!$_GET['room']) {
|
|||||||
$ks++;
|
$ks++;
|
||||||
$lastpost = $math[1];
|
$lastpost = $math[1];
|
||||||
}
|
}
|
||||||
}
|
} elseif (@$math[2] == '!sys2all!!' && @$math[1] >= @$user['chattime']) {
|
||||||
elseif (@$math[2] == '!sys2all!!' && @$math[1] >= @$user['chattime']) {
|
|
||||||
echo "top.frames['chat'].document.all(\"mes\").innerHTML += '<span class=date>" . date("H:i", $math[1]) . "</span> " . $math[3] . " <BR>';";
|
echo "top.frames['chat'].document.all(\"mes\").innerHTML += '<span class=date>" . date("H:i", $math[1]) . "</span> " . $math[3] . " <BR>';";
|
||||||
echo "top.frames['chat'].document.all(\"mes_system\").innerHTML += '<span class=date>" . date("H:i", $math[1]) . "</span> " . $math[3] . "<BR>';";
|
echo "top.frames['chat'].document.all(\"mes_system\").innerHTML += '<span class=date>" . date("H:i", $math[1]) . "</span> " . $math[3] . "<BR>';";
|
||||||
echo "top.show_new(\"wtab5\");";
|
echo "top.show_new(\"wtab5\");";
|
||||||
@ -273,7 +407,9 @@ if (!$_GET['room']) {
|
|||||||
$sssss = "top.frames['chat'].document.all(\"mes\").innerHTML += '<span class=date2>" . date("H:i", $math[1]) . "</span> [<a href=\'javascript:top.AddTo(\"{$math[2]}\")\'><span oncontextmenu=\'return OpenMenu(event," . $user['level'] . ")\'>{$math[2]}</span></a>] " . $math[3] . "<BR>';";
|
$sssss = "top.frames['chat'].document.all(\"mes\").innerHTML += '<span class=date2>" . date("H:i", $math[1]) . "</span> [<a href=\'javascript:top.AddTo(\"{$math[2]}\")\'><span oncontextmenu=\'return OpenMenu(event," . $user['level'] . ")\'>{$math[2]}</span></a>] " . $math[3] . "<BR>';";
|
||||||
echo "top.frames['chat'].document.all(\"mes_private\").innerHTML += '<span class=date2>" . date("H:i", $math[1]) . "</span> [<a href=\'javascript:top.AddTo(\"{$math[2]}\")\'><span oncontextmenu=\'return OpenMenu(event," . $user['level'] . ")\'>{$math[2]}</span></a>] " . $math[3] . " <BR>';";
|
echo "top.frames['chat'].document.all(\"mes_private\").innerHTML += '<span class=date2>" . date("H:i", $math[1]) . "</span> [<a href=\'javascript:top.AddTo(\"{$math[2]}\")\'><span oncontextmenu=\'return OpenMenu(event," . $user['level'] . ")\'>{$math[2]}</span></a>] " . $math[3] . " <BR>';";
|
||||||
|
|
||||||
if ($sound == true) { $sssss .= "top.soundD();"; }
|
if ($sound == true) {
|
||||||
|
$sssss .= "top.soundD();";
|
||||||
|
}
|
||||||
echo $sssss;
|
echo $sssss;
|
||||||
$ks++;
|
$ks++;
|
||||||
$lastpost = $math[1];
|
$lastpost = $math[1];
|
||||||
@ -293,7 +429,9 @@ if (!$_GET['room']) {
|
|||||||
$sssss = "top.frames['chat'].document.all(\"mes\").innerHTML += '<span class=date2>" . date("H:i", $math[1]) . "</span> [<a href=\'javascript:top.AddTo(\"{$math[2]}\")\'><span oncontextmenu=\'return OpenMenu(event," . $user['level'] . ")\'>{$math[2]}</span></a>] " . $math[3] . "<BR>';";
|
$sssss = "top.frames['chat'].document.all(\"mes\").innerHTML += '<span class=date2>" . date("H:i", $math[1]) . "</span> [<a href=\'javascript:top.AddTo(\"{$math[2]}\")\'><span oncontextmenu=\'return OpenMenu(event," . $user['level'] . ")\'>{$math[2]}</span></a>] " . $math[3] . "<BR>';";
|
||||||
$sssss .= "top.frames['chat'].document.all(\"mes_private\").innerHTML += '<span class=date2>" . date("H:i", $math[1]) . "</span> [<a href=\'javascript:top.AddTo(\"{$math[2]}\")\'><span oncontextmenu=\'return OpenMenu(event," . $user['level'] . ")\'>{$math[2]}</span></a>] " . $math[3] . "<BR>';";
|
$sssss .= "top.frames['chat'].document.all(\"mes_private\").innerHTML += '<span class=date2>" . date("H:i", $math[1]) . "</span> [<a href=\'javascript:top.AddTo(\"{$math[2]}\")\'><span oncontextmenu=\'return OpenMenu(event," . $user['level'] . ")\'>{$math[2]}</span></a>] " . $math[3] . "<BR>';";
|
||||||
|
|
||||||
if ($sound == true) { $sssss .= "top.soundD();"; }
|
if ($sound == true) {
|
||||||
|
$sssss .= "top.soundD();";
|
||||||
|
}
|
||||||
echo $sssss;
|
echo $sssss;
|
||||||
$ks++;
|
$ks++;
|
||||||
$lastpost = $math[1];
|
$lastpost = $math[1];
|
||||||
@ -323,9 +461,7 @@ if (!$_GET['room']) {
|
|||||||
echo "</script><script>top.srld();</script>";
|
echo "</script><script>top.srld();</script>";
|
||||||
mysql_query("UPDATE `online` SET `date` = " . time() . " WHERE `id` = {$user['id']} LIMIT 1");
|
mysql_query("UPDATE `online` SET `date` = " . time() . " WHERE `id` = {$user['id']} LIMIT 1");
|
||||||
die();
|
die();
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
if (strpos($_GET['text'], "private") !== FALSE && $user['level'] < 1) {
|
if (strpos($_GET['text'], "private") !== FALSE && $user['level'] < 1) {
|
||||||
preg_match_all("/\[(.*)\]/U", $_GET['text'], $matches);
|
preg_match_all("/\[(.*)\]/U", $_GET['text'], $matches);
|
||||||
for ($ii = 0; $ii < count($matches[1]); $ii++) {
|
for ($ii = 0; $ii < count($matches[1]); $ii++) {
|
||||||
@ -569,11 +705,8 @@ if (!$_GET['room']) {
|
|||||||
addchp($commas[rand(0, count($commas) - 1)], "Комментатор");
|
addchp($commas[rand(0, count($commas) - 1)], "Комментатор");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
die ("<script>top.CLR1(); top.RefreshChat();</script>");
|
die ("<script>top.CLR1(); top.RefreshChat();</script>");
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
52
palklan.php
52
palklan.php
@ -1,41 +1,33 @@
|
|||||||
<?php
|
<?php
|
||||||
ob_start("ob_gzhandler");
|
|
||||||
session_start();
|
|
||||||
include "config.php";
|
|
||||||
include "functions.php";
|
|
||||||
|
|
||||||
$data = mysql_query("SELECT `id`, `login`, `status`, `level`, `room`, `align`, (select `id` from `online` WHERE `date` >= ".(time()-60)." AND `id` = users.`id`) as `online` FROM `users` WHERE `align` > 1 and `align` < 2 order by align desc, login asc ;");
|
|
||||||
|
|
||||||
if ($_SESSION['uid'] == null) header("Location: index.php");
|
if ($_SESSION['uid'] == null) header("Location: index.php");
|
||||||
?>
|
session_start();
|
||||||
<HTML><HEAD>
|
include_once "config.php";
|
||||||
<link rel=stylesheet type="text/css" href="css/main.css">
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<META Http-Equiv=Cache-Control Content="no-cache, max-age=0, must-revalidate, no-store">
|
|
||||||
<meta http-equiv=PRAGMA content=NO-CACHE>
|
|
||||||
<META Http-Equiv=Expires Content=0>
|
|
||||||
</HEAD>
|
|
||||||
|
|
||||||
<body leftmargin=5 topmargin=5 marginwidth=0 marginheight=0 bgcolor=#d4d4d4>
|
function showpals(){
|
||||||
<div style="text-align: right; width: 95%;"><button onclick="location.href='main.php';">Вернуться</button></div>
|
$timer = time() - 60;
|
||||||
|
$data = db::c()->query('SELECT `login`,`status`,`align`,`room`,(select `id` from `online` WHERE `date` >= ?i AND `id` = users.`id`) AS `online` FROM `users` WHERE `align` = 1 ORDER BY `login` ASC', $timer)->fetch_assoc();
|
||||||
<div style="width: 600px; margin: 0 auto;">
|
while ($data) {
|
||||||
<h3><A HREF="javascript:top.AddToPrivate('pal', top.CtrlPress)" target=refreshed><img src="i/lock.gif" width=20 height=15></A> Паладины</h3>
|
if (!empty($data['online'])) {
|
||||||
<?
|
echo '<A HREF="javascript:top.AddToPrivate(\'',$data['login'],'\', top.CtrlPress)" target=refreshed><img src="i/lock.gif" width=20 height=15></A>';
|
||||||
while ($row = mysql_fetch_array($data)) {
|
echo $data['align'].$data['login']." — ".$data['status']." — <em>".$data['room']."</em><br>";
|
||||||
if (!empty($row['online'])) {
|
|
||||||
echo '<A HREF="javascript:top.AddToPrivate(\'',$row['login'],'\', top.CtrlPress)" target=refreshed><img src="i/lock.gif" width=20 height=15></A>';
|
|
||||||
nick2($row['id']);
|
|
||||||
$rrm = $rooms[$row['room']];
|
|
||||||
echo ' - ',$row['status'],' - <i>',$rrm,'</i><BR>';
|
|
||||||
} else {
|
} else {
|
||||||
echo '<img src="i/lock1.gif" width=20 height=15>';
|
echo '<img src="i/lock1.gif" width=20 height=15>';
|
||||||
nick2($row['id']);
|
echo $data['align'].$data['login']." — ".$data['status']." — <small><em>персонаж не в клубе</em></small><br>";
|
||||||
echo ' - ',$row['status'],' - <i><small><font color=gray>персонаж не в клубе</font></small></i><BR>';
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
<!doctype html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<link rel=stylesheet href="css/main.css">
|
||||||
|
<meta charset="utf-8">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div style="text-align: right; width: 95%;"><button onclick="location.href='main.php';">Вернуться</button></div>
|
||||||
|
<div style="width: 600px; margin: 0 auto;">
|
||||||
|
<h3><A HREF="javascript:top.AddToPrivate('pal', top.CtrlPress)" target=refreshed><img src="i/lock.gif" width=20 height=15></A> Паладины</h3>
|
||||||
|
<?php showpals()?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
Loading…
x
Reference in New Issue
Block a user