function killList() { if (isset($this->viewList[$this->view])) { return call_user_func_array($this->viewList[$this->view], array(&$this)); } global $smarty; $klist = new KillList(); $klist->setOrdered(true); // We'll be needing comment counts so set the killlist to retrieve them if (config::get('comments_count')) { $klist->setCountComments(true); } // We'll be needing involved counts so set the killlist to retrieve them if (config::get('killlist_involved')) { $klist->setCountInvolved(true); } // Set time limit to 1 day. $klist->setStartDate($this->period . " 00:00"); $klist->setEndDate($this->period . " 23:59"); // Select between kills, losses or both. if ($this->view == 'combined' || $this->view == '' && $this->showcombined) { involved::load($klist, 'combined'); } elseif ($this->view == 'losses') { involved::load($klist, 'loss'); } else { involved::load($klist, 'kill'); } if ($this->scl_id) { $klist->addVictimShipClass($this->scl_id); } else { $klist->setPodsNoobShips(config::get('podnoobs')); } $table = new KillListTable($klist); if ($this->showcombined) { $table->setCombined(true); } $html = $table->generate(); return $html; }
/** * Return the main killlists * @global Smarty $smarty * @return string HTML string for killlist tables */ function killList() { if (isset($this->viewList[$this->view])) { return call_user_func_array($this->viewList[$this->view], array(&$this)); } global $smarty; $klist = new KillList(); $klist->setOrdered(true); // We'll be needing comment counts so set the killlist to retrieve them if (config::get('comments_count')) { $klist->setCountComments(true); } // We'll be needing involved counts so set the killlist to retrieve them if (config::get('killlist_involved')) { $klist->setCountInvolved(true); } // Select between kills, losses or both. if ($this->view == 'combined' || $this->view == '' && $this->showcombined) { involved::load($klist, 'combined'); } else { if ($this->view == 'losses') { involved::load($klist, 'loss'); } else { involved::load($klist, 'kill'); } } if ($this->scl_id) { $klist->addVictimShipClass($this->scl_id); } else { $klist->setPodsNoobShips(config::get('podnoobs')); } // If no week is set then show the most recent kills. Otherwise // show all kills for the week using the page splitter. if (config::get("cfg_fillhome") && !$this->dateSet) { $klist->setLimit(config::get('killcount')); $table = new KillListTable($klist); if ($this->showcombined) { $table->setCombined(true); } $table->setLimit(config::get('killcount')); $html = $table->generate(); } else { $this->loadTime($klist); //$klist->setWeek($this->week); //$klist->setYear($this->year); $klist->setPageSplit(config::get('killcount')); //$pagesplitter = new PageSplitter($klist->getCount(), config::get('killcount')); $table = new KillListTable($klist); if ($this->showcombined) { $table->setCombined(true); } //$pagesplit = $pagesplitter->generate(); //$html = $pagesplit.$table->generate().$pagesplit; $html = $table->generate(); } return $html; }