示例#1
0
 function reverse_ids()
 {
     if (!is_null($this->pilot_id)) {
         $this->pilot = get_pilot_name($this->pilot_id);
     }
     if (!is_null($this->alliance_id)) {
         $this->alliance = get_alliance_name($this->alliance_id);
     }
     if (!is_null($this->corp_id)) {
         $this->corp = get_corp_name($this->corp_id);
         $this->corp_ticker = get_corp_ticker($this->corp_id, 1);
     }
     if (!is_null($this->ship_id)) {
         $this->ship = get_item_name($this->ship_id);
     }
     if (!is_null($this->group_id)) {
         $this->group = get_group_name($this->group_id);
     }
     if (!is_null($this->weapon_id)) {
         $this->weapon = get_item_name($this->weapon_id);
     }
 }
示例#2
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;
}
示例#3
0
        $id = get_pilot_id_fuzzy($what);
        if (is_array($id)) {
            # okay, show the list
            $list = array();
            foreach ($id as $cid) {
                array_push($list, "<a href='/search.php?{$querystring}&oid={$cid}'>" . get_pilot_name($cid) . "</a>");
            }
            $ft->assign('list', $list);
            return $ft->errorpage('Found multiple pilots.  Please select one below.', 'search');
        }
        if ($what && !$id) {
            return $ft->errorpage('The pilot does not seem valid.  Have they ever shown up on this killboard?', 'search');
        }
    }
    $what = get_pilot_name($id);
    $term = 'pilot <strong>' . get_pilot_name($id) . '</strong>';
    $col = 'pilotid';
} elseif ($whatis == 'corp') {
    if (is_null($id)) {
        $id = get_corp_id_fuzzy($what);
        if (is_array($id)) {
            # okay, show the list
            $list = array();
            foreach ($id as $cid) {
                array_push($list, "<a href='/search.php?{$querystring}&oid={$cid}'>" . get_corp_name($cid) . "</a>");
            }
            $ft->assign('list', $list);
            return $ft->errorpage('Found multiple corporations.  Please select one below.', 'search');
        }
        if ($what && !$id) {
            return $ft->errorpage('The corporation does not seem valid.  Have they ever shown up on this killboard?', 'search');
if (is_null($plex)) {
    return $ft->igberrorpage('Sorry, that complex was not found.');
}
# validate their id
$schedid = $_GET['schedid'] + 0;
$run = load_run_schedid($id, $schedid);
if (!$run) {
    return $ft->igberrorpage('Sorry, that run was not found.');
}
# store output here
$out = "<center><b><font color='#ffff00'>Plexer - The Complex Scheduler</font></b><br />";
$out .= "<font color='#ff0000'><b>{$plex->name}</b> in <b>{$plex->system}</b> rated <b>{$plex->rating}/10</b></font><br />";
$out .= "[ <a href='{$_WEB_URL}/'>Back to Top</a> ] [ <a href='{$_WEB_URL}/igb-showcomplex.php?id={$id}'>Back to Complex</a> ]";
$out .= "</center><br />";
# dump the information
$info = array("Complex" => "<a href='{$_WEB_URL}/igb-showcomplex.php?id={$id}'>{$plex->name}</a> (" . $plex->rating . "/10)", "System" => $plex->system . " (" . $plex->region . ")", "1" => "-", "Date" => stddate(slot_to_date($run->dayid)), "Name" => get_complex_slot_name($id, $run->slotid), "Description" => get_complex_slot_desc($id, $run->slotid), "2" => "-", "Reserved for corp" => get_corp_name($run->corpid), "Reserved by pilot" => get_pilot_name($run->pilotid), "3" => "-", "Was ran at" => is_null($run->ranattime) ? "not run yet" : stddate($run->ranattime));
foreach ($info as $k => $v) {
    if ($v == "-") {
        $out .= "<br />";
        continue;
    }
    $out .= " &bull; <font color='#ffff00'>{$k}:</font> {$v}<br />";
}
# set some flags
$is_corp_mgr = $run->corpid == get_corp_id($ft->eve->CorpName) ? 1 : 0;
$is_site_mgr = $obj->manager();
$is_mgr = $is_corp_mgr || $is_site_mgr;
# now give them some commands
if ($is_mgr) {
    $out .= "<br />";
    if (is_null($run->ranattime)) {
示例#5
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 = ?)');
    array_push($bind, $pilotid, $pilotid);
    array_push($args, "pilotid={$pilotid}");
    array_push($message, "involving pilot <strong>" . get_pilot_name($pilotid) . "</strong>");
}
# reassign the args
$a = implode('&', $args);
$ft->assign('args', $a);
# and criteria messaging
$m = implode(' and ', $message);
# show the last 50 somethings
$ft->message('Recent activity ' . $m . '.');
$ft->title('Recent Activity');
# now do the select
$crit = implode(' AND ', $criteria);
# now prepare the page
$ids = $ft->dbh->_select_column("SELECT killid FROM tbl:summary WHERE {$crit} AND type = 'kill' ORDER BY killtime DESC LIMIT 25", $bind);
$kills = load_kills_by_id($ids, 0, 0);
$ft->assign('kills', $kills);
<?php

$comments = get_comments($schedid);
foreach ($comments as $comment) {
    $pilot = get_pilot_name($comment->pilotid);
    $content = preg_replace('/\\r?\\n/', '<br />', $comment->content);
    $content = preg_replace('/</', '&lt;', $content);
    $out .= "<font color='yellow'>Comment by <font color='red'>{$pilot}</font> at <font color='red'>";
    $out .= $comment->leftdate . "</font>...</font><br />{$content}<br /><br />";
}
# add a comment plz
$out .= "<form method='post' action='igb-postcomment.php'>";
$out .= "<input type='hidden' name='id' value='{$id}' />";
$out .= "<input type='hidden' name='schedid' value='{$schedid}' />";
$out .= "Add Comment:<br /><textarea name='comment' rows='3' cols='50'></textarea>";
$out .= "<br /><input type='submit' value='Add Comment' /></form>";