Esempio n. 1
0
    return $html = $tkbox->generate();
}
// add filter toggling script
$jsDir = config::get("cfg_kbhost") . '/mods/' . basename(dirname(__FILE__)) . '/js/';
$page->addHeader("<script type=\"text/javascript\" src=\"" . $jsDir . "toggleFilter.js\"></script>");
switch ($_GET['view']) {
    case '':
        echo "<!-- MOD VERSION -->\n";
        $battlelist = new BattleList();
        $page->setTitle('Fleet Battles');
        $table = new BattleListTable($battlelist);
        // pagination only available for cached battles and non-filtered results
        if (config::get('fleet_battles_mod_cache') && !isset($_POST["filter"])) {
            $table->setPageSplit(config::get('killcount') * 2);
            $pagesplitter = new PageSplitter($table->getCount(), config::get('killcount') * 2);
            $pagesplit = $pagesplitter->generate();
            $html .= $pagesplit . $table->generate() . $pagesplit . $table->getStatsHtml();
        } else {
            $html .= $table->generate() . $table->getStatsHtml();
        }
        break;
}
$menubox = new box('Menu');
$menubox->setIcon('menu-item.gif');
$menubox->addOption('link', 'Fleet Battles', edkURI::page('battles'));
$page->addContext($menubox->generate());
if (config::get('fleet_battles_mod_cache')) {
    $page->addContext(toplists($table->getFilterArgumentsWhereSql()));
}
$page->setContent($html);
$page->generate();
Esempio n. 2
0
 /**
  * Build the menu.
  *
  *  Add all preset options to the menu.
  */
 function menu()
 {
     $menubox = new box("Menu");
     $menubox->setIcon("menu-item.gif");
     foreach ($this->menuOptions as $options) {
         if (isset($options[2])) {
             $menubox->addOption($options[0], $options[1], $options[2]);
         } else {
             $menubox->addOption($options[0], $options[1]);
         }
     }
     return $menubox->generate();
 }
Esempio n. 3
0
        $qry2->execute($sql2) or die($qry2->getErrorMsg());
        while ($row2 = $qry2->getRow()) {
            $region = $row2['reg_id'];
        }
    } else {
        $region = $region_set;
        $region_nav = '&region_id=' . $region_set;
    }
    if ($i % 2) {
        $html .= '<tr >';
    }
    if ($region != 0) {
        $html .= ' 	<td align="center"><img src="?a=map&mode=activity&size=350&region_id=' . $region . '&month=' . $i . '&year=' . $year . '" /></td>';
    } else {
        $html .= ' 	<td align="center"><img src="?a=map&mode=na&size=250" width="350" height="350"></td>';
    }
    if ($i % 2) {
    } else {
        $html .= '</tr >';
    }
    $region = 0;
}
$html .= '</table>	';
$page->setContent($html);
$menubox = new box("Menu");
$menubox->setIcon("menu-item.gif");
$menubox->addOption("caption", "Navigation");
$menubox->addOption("link", "Previous Year", edkURI::page('map_year') . "&y=" . $pyear . $region_nav);
$menubox->addOption("link", "Next Year", edkURI::page('map_year') . "&y=" . $nyear . $region_nav);
$page->addContext($menubox->generate());
$page->generate();