$groupid = $_GET['groupid']; $allianceid = $_GET['allianceid']; $weaponid = $_GET['weaponid']; if (!$weaponid) { $weaponid = $_GET['itemid']; } # now, let's build this up $criteria = array(); $bind = array(); $args = array(); $message = array(); if (is_numeric($systemid) && $systemid > 0) { array_push($criteria, 'systemid = ?'); array_push($bind, $systemid); array_push($args, "systemid={$systemid}"); array_push($message, "in <strong>" . EVESystem::getName($systemid) . "</strong>"); } if (is_numeric($weaponid) && $weaponid > 0) { array_push($criteria, 'weaponid = ?'); array_push($bind, $weaponid); array_push($args, "weaponid={$weaponid}"); array_push($message, "with a <strong>" . get_item_name($weaponid) . "</strong>"); } if (is_numeric($regionid) && $regionid > 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 = ?)');
<?php require_once 'lib/fortissimo.php'; require_once 'lib/EVESystem.php'; $test = new EVESystem(30003808); echo "got {$test} - " . $test->getName() . " - " . $test->getConstellationName() . " - " . $test->getRegionName() . " <br />"; echo "okay new test - " . EVESystem::getName(30003808) . "<br />"; echo "if those are both Grispire, you're golden <tt>:)</tt><br />"; echo "test again - " . $test->getId() . " should be 30003808<br />"; echo "this should be too - " . EVESystem::getId('Grispire') . "<br />";
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 = EVESystem::getName($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; }