Exemplo n.º 1
0
 function reverse_ids()
 {
     $sys = new EVESystem($this->system_id);
     $this->system = $sys->getName;
     $this->security = $sys->getSecurity();
     $this->region = $sys->getRegionName();
     $this->constellation = $sys->getConstellationName();
     $this->victim->reverse_ids();
     $this->killer->reverse_ids();
     foreach (array_keys($this->destroyed) as $k) {
         $this->destroyed[$k]->reverse_ids();
     }
     foreach (array_keys($this->attackers) as $k) {
         $this->attackers[$k]->reverse_ids();
     }
 }
Exemplo n.º 2
0
$results = array();
$maxct = 0;
$v = array('week' => this_week(), 'month' => this_month(), 'year' => this_year(), 'ever' => 0);
foreach (array_keys($v) as $when) {
    $data = $ft->dbh->_select_rows_as_objects("SELECT var1, {$by} AS 'val' FROM tbl:stats WHERE type = ? AND dtype = ? AND var2 = ? " . "AND {$by} > 0 ORDER BY {$by} DESC LIMIT 25", array($which, $when, $v[$when]));
    if ($data) {
        # now convert the data to something useful
        $out = array();
        $ct = 0;
        foreach ($data as $row) {
            $ct++;
            if ($which == 'pilot') {
                array_push($out, array(get_pilot_link($row->var1), $row->val));
            } elseif ($which == 'system') {
                $sys = new EVESystem($row->var1);
                array_push($out, array($sys->getLink() . ' (<span style="color: ' . security_color($sys->getSecurity()) . ';">' . security($sys->getSecurity()) . '</span>)', $row->val));
            } elseif ($which == 'corp') {
                array_push($out, array(get_corp_link($row->var1), $row->val));
            } elseif ($which == 'alliance') {
                array_push($out, array(get_alliance_link($row->var1), $row->val));
            } elseif ($which == 'region') {
                array_push($out, array(EVERegion::getLink($row->var1), $row->val));
            } elseif ($which == 'group') {
                array_push($out, array(get_group_link($row->var1), $row->val));
            } elseif ($which == 'ship') {
                array_push($out, array(get_ship_link($row->var1), $row->val));
            } elseif ($which == 'weapon') {
                array_push($out, array(get_item_link($row->var1), $row->val));
            }
        }
        if ($maxct < $ct) {