function Party($pilotid = null) { if (is_null($pilotid)) { return; } $this->pilot_id = $pilotid; $this->char_id = get_pilot_charid($pilotid); $this->corp_id = get_pilot_corpid($pilotid); $this->alliance_id = get_corp_allianceid($this->corp_id); $this->reverse_ids(); }
function get_top10($which, $whichwhat, $what) { global $ft; $t10 = $ft->dbh->_select_rows_as_objects('SELECT * FROM tbl:favorites WHERE type = ? ' . 'AND var1 = ? AND ftype = ? ORDER BY var3 DESC LIMIT 10', array($which, $whichwhat, $what)); $out = array(); foreach ($t10 as $row) { $val = "value undefined"; if ($what == 'weapon') { $val = get_item_name($row->var2); } elseif ($what == 'pilot') { $val = get_pilot_name($row->var2) . ' [' . get_corp_ticker(get_pilot_corpid($row->var2)) . ']'; } elseif ($what == 'system') { $val = get_system_name($row->var2); } elseif ($what == 'ship_killed' || $what == 'ship_lost' || $what == 'ship_flown') { $val = get_item_name($row->var2); } array_push($out, array($val, $row->var3)); } return $out; }