function attack_get($id) { if (!is_numeric($id)) { return; } return selectsqlline("select *,(access_time < unix_timestamp()) as isopen from attack where attid = {$id}"); }
/** * @return array * @desc Liefert den Trackingbuffer * @private */ function _get() { $tracking = array(); $result = selectsqlline("select backtracking from useronline where uid = " . $this->uid); if ($result['backtracking']) { $tracking = split("\n", $result['backtracking']); } return $tracking; }
function user_fleet_bynum($id, $num) { Assert::isId($id); Assert::isNumeric($num); return selectsqlline("\n select u.uid,uf.*,fs.fsid,fs.arrival,fs.return_flight,fs.returntime,fs.status,fs.tgala,fs.tpos,fs.orbittime from \n user u\n left join user_fleet uf on (uf.gala = u.gala and uf.pos = u.pos)\n left join fleet f on (f.fid = uf.fid)\n left join fleet_status fs on (fs.fid = uf.fid)\n where \n u.uid = {$id} AND uf.fleetnum = {$num}\n "); }
function fleetstatus_get($fsid) { if (!$fsid || !is_numeric($fsid)) { return false; } return selectsqlline("\n select fs.*,s.nick,f.*,u.uid\n from fleet_status fs\n left join scans s on (s.gala = fs.gala and s.pos = fs.pos)\n left join user u on (u.gala = fs.gala and u.pos = fs.pos)\n left join fleet f on (f.fid = fs.fid)\n where fs.fsid = {$fsid}\n "); }
function bot_get_bylogin($login, $password) { return selectsqlline("select * from ircbots where login = '******' AND password = '******'"); }
function getScanById($sid, $attackscans = false) { if (!$attackscans) { $where = " AND (a.access_time is null or a.access_time < unix_timestamp())"; } return selectsqlline("\n select s.*,a.attid,a.owner,at.closed,u.uid,u.gala as atter_gala,u.pos as atter_pos,u.nick as atter_nick,(a.access_time is null or a.access_time < unix_timestamp()) as isopen\n from scans s\n left join attack_target at on (at.sid = s.sid)\n left join attack_atter aa on (aa.sid = s.sid)\n left join user u on (u.uid = aa.uid)\n left join attack a on (a.attid = at.attid)\n where s.sid = {$sid} {$where}\n "); }