query('UPDATE `online` SET `real_time` = ?i WHERE `id` = ?i', time(), $u->i()['id']); if (isset($_GET['online']) && $_GET['online'] != null) { if ($_GET['room'] && (int)$_GET['room'] < 500) { $user->room = (int)$_GET['room']; } if ($u->i()['caveleader'] > 0) { $data = db::c()->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` 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` = "' . $u->i()['room'] . '" AND `u`.`caveleader` = "' . $u->i()['caveleader'] . '" ORDER BY `u`.`login` '); $ttl = "" . $rooms[$user->room] . " (" . mysql_num_rows($data) . ")"; $ch1 = '_active'; $ch2 = '_passive'; $ch3 = '_passive'; $ch4 = '_passive'; $ch5 = '_passive'; } elseif ($user->room == 760) { $forest = db::c()->query('SELECT `id`, `room`, `time`, `user`, `data` FROM `forest` WHERE `user` = "' . $user['id'] . '" LIMIT 1')->fetch_assoc(); $sp = db::c()->query('SELECT `id`, `room`, `user` FROM `forest` WHERE `room` = "' . $forest['room'] . '"'); while ($pl = $sp->fetch_assoc()) { $uss .= ', '; $uss .= $pl['user']; } if ($uss != '') { $uss = ltrim($uss, ', '); } $data = db::c()->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` 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 = "" . $var_map[$forest['room']] . " (" . mysql_num_rows($data) . ")"; $ch1 = '_active'; $ch2 = '_passive'; $ch3 = '_passive'; $ch4 = '_passive'; $ch5 = '_passive'; } else { $data = db::c()->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` 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 = "" . $rooms[$user->room] . " (" . mysql_num_rows($data) . ")"; $ch1 = '_active'; $ch2 = '_passive'; $ch3 = '_passive'; $ch4 = '_passive'; $ch5 = '_passive'; } Template::header(sprintf('%s (%s)', $rooms[$user->room], mysql_num_rows($data))); ?>
if (!empty($user['klan'])) { ?> | } ?> |