private function execQuery() { $this->qry = DBFactory::getDBQuery(); $query = "SELECT * FROM kb3_navigation WHERE nav_type = '{$this->type}'"; if (Killboard::hasCampaigns() == false) { $query .= " AND url NOT LIKE '?a=campaigns'"; } if (config::get('public_losses')) { $query .= " AND url NOT LIKE '?a=losses'"; } if (!config::get('show_standings')) { $query .= " AND url NOT LIKE '?a=standings'"; } if (config::get('public_stats') == 'remove') { $query .= " AND url NOT LIKE '?a=self_detail'"; } $query .= " AND (page = '" . $this->page . "' OR page = 'ALL_PAGES') AND hidden = 0"; $query .= " AND KBSITE = '" . $this->site . "' ORDER BY posnr"; $this->qry->execute($query); // If no navigation table was found then make one. if (!$this->qry->recordCount()) { $this->check_navigationtable(); $this->qry->execute($query); } }
function campaigns() { // Display campaigns, if any. if (Killboard::hasCampaigns(true)) { $html = ''; $html .= "<div class=\"kb-campaigns-header\">Active campaigns</div>"; $list = new ContractList(); $list->setActive("yes"); $list->setCampaigns(true); $table = new ContractListTable($list); $html .= $table->generate(); return $html; } }
/** * Returns HTML string for campaigns, if any. * @return string HTML string for campaigns, if any */ function campaigns() { // Display campaigns, if any. if (Killboard::hasCampaigns(true) && $this->isCurrentPeriod()) { $html = "<div class='kb-campaigns-header'>Active campaigns</div>"; $list = new ContractList(); $list->setActive("yes"); $table = new ContractListTable($list); $html .= $table->generate(); return $html; } }