Example #1
0
 /**
  * @return string HTML string for the summary overview of the battle.
  */
 public function overview()
 {
     global $smarty;
     $smarty->assignByRef('pilots_a', $this->pilots['a']);
     $smarty->assignByRef('pilots_e', $this->pilots['e']);
     $pod = Ship::getByID(670);
     $smarty->assign('podpic', $pod->getImage(32));
     $smarty->assign('friendlycnt', count($this->pilots['a']));
     $smarty->assign('hostilecnt', count($this->pilots['e']));
     if ($classified) {
         $smarty->assign('system', 'Classified System');
     } else {
         if (!$this->adjacent) {
             $smarty->assign('system', $this->kill->getSolarSystemName());
         } else {
             $sysnames = array();
             foreach ($this->systems as $sys_id) {
                 $system = SolarSystem::getByID($sys_id);
                 $sysnames[] = $system->getName();
             }
             $smarty->assign('system', implode(', ', $sysnames));
         }
     }
     $smarty->assign('firstts', $this->firstts);
     $smarty->assign('lastts', $this->lastts);
     $smarty->assign('killURL', edkURI::page('kill_detail'));
     return $smarty->fetch(get_tpl('kill_related_battle_overview'));
 }
 /**
  * @return string HTML string for the summary overview of the battle.
  */
 public function overview()
 {
     global $smarty;
     $smarty->assignByRef('pilots_a', $this->pilots['a']);
     $smarty->assignByRef('pilots_e', $this->pilots['e']);
     $pod = Ship::getByID(670);
     $smarty->assign('podpic', $pod->getImage(32));
     $smarty->assign('friendlycnt', count($this->pilots['a']));
     $smarty->assign('hostilecnt', count($this->pilots['e']));
     if ($this->kill->isClassified()) {
         $smarty->assign('system', 'Classified System');
     } else {
         if (!$this->adjacent) {
             $smarty->assign('system', $this->kill->getSolarSystemName());
         } else {
             $sysnames = array();
             foreach ($this->systems as $sys_id) {
                 $system = SolarSystem::getByID($sys_id);
                 $sysnames[] = $system->getName();
             }
             $smarty->assign('system', implode(', ', $sysnames));
         }
     }
     $smarty->assign('firstts', $this->firstts);
     $smarty->assign('lastts', $this->lastts);
     $smarty->assign("battleOverviewTableTemplate", $this->templateDir . "battle_overview_table.tpl");
     return $smarty->fetch($this->templateDir . "battle_overview.tpl");
 }