Beispiel #1
0
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;
}
Beispiel #2
0
 function ticker_link()
 {
     if ($this->corp_id && $this->corp) {
         global $_WEB_URL;
         if (!$this->corp_ticker) {
             $this->corp_ticker = get_corp_ticker($this->corp_id);
             $ticker = $this->corp_ticker;
             if (!$this->corp_ticker) {
                 $ticker = "????";
             } else {
                 # we actually got one, so we should nuke the cache for this kill
                 # FIXME HOW
             }
         } else {
             $ticker = $this->corp_ticker;
         }
         $url = "{$_WEB_URL}/show.php?corpid=" . $this->corp_id;
         return "<a href='{$url}'>" . $ticker . "</a>";
     }
 }
Beispiel #3
0
    array_push($criteria, 'regionid = ?');
    array_push($bind, $regionid);
    array_push($args, "regionid={$regionid}");
    array_push($message, "in <strong>" . EVERegion::getName($regionid) . "</strong>");
}
if (is_numeric($groupid) && $groupid > 0) {
    array_push($criteria, '(v_groupid = ? OR k_groupid = ?)');
    array_push($bind, $groupid, $groupid);
    array_push($args, "groupid={$groupid}");
    array_push($message, "by group <strong>" . get_group_name($groupid) . "</strong>");
}
if (is_numeric($corpid) && $corpid > 0) {
    array_push($criteria, '(v_corpid = ? OR k_corpid = ?)');
    array_push($bind, $corpid, $corpid);
    array_push($args, "corpid={$corpid}");
    array_push($message, "by corp <strong>" . get_corp_name($corpid) . " [" . get_corp_ticker($corpid) . "]</strong>");
}
if (is_numeric($allianceid) && $allianceid > 0) {
    array_push($criteria, '(v_allianceid = ? OR k_allianceid = ?)');
    array_push($bind, $allianceid, $allianceid);
    array_push($args, "allianceid={$allianceid}");
    array_push($message, "by alliance <strong>" . get_alliance_name($allianceid) . "</strong>");
}
if (is_numeric($shipid) && $shipid > 0) {
    array_push($criteria, '(v_shipid = ? OR k_shipid = ?)');
    array_push($bind, $shipid, $shipid);
    array_push($args, "shipid={$shipid}");
    array_push($message, "with a <strong>" . get_item_name($shipid) . "</strong>");
}
if (is_numeric($pilotid) && $pilotid > 0) {
    array_push($criteria, '(v_pilotid = ? OR k_pilotid = ?)');