* @package EDK */ define('MPATH', dirname(__FILE__) . "/"); $im = imagecreatefrompng(MPATH . 'default.png'); $red = imagecolorallocate($im, 255, 10, 10); $orange = imagecolorallocate($im, 150, 120, 20); $blue = imagecolorallocate($im, 0, 0, 200); $white = imagecolorallocate($im, 255, 255, 255); $black = imagecolorallocate($im, 0, 0, 0); $grey_trans = imagecolorallocatealpha($im, 50, 50, 50, 50); $greyred_trans = imagecolorallocatealpha($im, 50, 10, 10, 50); $name = $pilot->getName(); $list = new KillList(); $list->setOrdered(true); $list->setLimit(1); $list->setPodsNoobships(false); $list->addInvolvedPilot($pilot); $kill = $list->getKill(); // corp $box = imagettfbbox(10, 0, MPATH . 'GUNSHIP2.TTF', $corp->getName()); $width = $box[4]; imagettftext($im, 10, 0, 319 - $width, 71, $black, MPATH . 'GUNSHIP2.TTF', $corp->getName()); imagettftext($im, 10, 0, 318 - $width, 70, $red, MPATH . 'GUNSHIP2.TTF', $corp->getName()); // player $box = imagettfbbox(16, 0, MPATH . 'GUNSHIP2.TTF', $name); $width = $box[4]; imagettftext($im, 16, 0, 319 - $width, 91, $black, MPATH . 'GUNSHIP2.TTF', $name); imagettftext($im, 16, 0, 318 - $width, 90, $red, MPATH . 'GUNSHIP2.TTF', $name); // time, victim, victim corp and ship killed imagettftext($im, 11, 0, 39, 16, $black, MPATH . 'spaceage.ttf', $kill->getTimeStamp()); imagettftext($im, 11, 0, 38, 15, $white, MPATH . 'spaceage.ttf', $kill->getTimeStamp());
/** * Build the killlists that are needed for the options selected. */ function killList() { global $smarty; if (isset($this->viewList[$this->view])) { return call_user_func_array($this->viewList[$this->view], array(&$this)); } $scl_id = (int) edkURI::getArg('scl_id'); switch ($this->view) { case "kills": $list = new KillList(); $list->setOrdered(true); $list->addInvolvedPilot($this->pilot); if ($scl_id) { $list->addVictimShipClass($scl_id); } $list->setPageSplit(config::get('killcount')); $pagesplitter = new PageSplitter($list->getCount(), config::get('killcount')); $table = new KillListTable($list); $smarty->assign('splitter', $pagesplitter->generate()); $smarty->assign('kills', $table->generate()); return $smarty->fetch(get_tpl('detail_kl_kills')); break; case "losses": $list = new KillList(); $list->setOrdered(true); $list->addVictimPilot($this->pilot); if ($scl_id) { $list->addVictimShipClass($scl_id); } else { $list->setPodsNoobships(config::get('podnoobs')); } $list->setPageSplit(config::get('killcount')); $pagesplitter = new PageSplitter($list->getCount(), config::get('killcount')); $table = new KillListTable($list); $smarty->assign('splitter', $pagesplitter->generate()); $smarty->assign('losses', $table->generate()); return $smarty->fetch(get_tpl('detail_kl_losses')); break; case "ships_weapons": $shiplist = new TopList_Ship(); $shiplist->addInvolvedPilot($this->pilot); $shiplisttable = new TopTable_Ship($shiplist); $smarty->assign('ships', $shiplisttable->generate()); $weaponlist = new TopList_Weapon(); $weaponlist->addInvolvedPilot($this->pilot); $weaponlisttable = new TopTable_Weapon($weaponlist); $smarty->assign('weapons', $weaponlisttable->generate()); return $smarty->fetch(get_tpl('detail_kl_ships_weapons')); break; case 'history': $pltsum = new pilotSummary($this->plt_id); $smarty->assign('title', Language::get('history')); $smarty->assign('summary', $pltsum->getMonthlySummary()); return $smarty->fetch(get_tpl('detail_history')); break; default: $list = new KillList(); $list->setOrdered(true); if (config::get('comments_count')) { $list->setCountComments(true); } if (config::get('killlist_involved')) { $list->setCountInvolved(true); } $list->setLimit(10); $list->addInvolvedPilot($this->pilot); if ($scl_id) { $list->addVictimShipClass($scl_id); } else { $list->setPodsNoobships(config::get('podnoobs')); } $table = new KillListTable($list); $smarty->assign('kills', $table->generate()); $list = new KillList(); $list->setOrdered(true); if (config::get('comments_count')) { $list->setCountComments(true); } if (config::get('killlist_involved')) { $list->setCountInvolved(true); } $list->setLimit(10); $list->addVictimPilot($this->pilot); if ($scl_id) { $list->addVictimShipClass($scl_id); } else { $list->setPodsNoobships(config::get('podnoobs')); } $table = new KillListTable($list); $smarty->assign('losses', $table->generate()); return $smarty->fetch(get_tpl('detail_kl_default')); break; } return $html; }