當前位置: 首頁>>代碼示例>>PHP>>正文


PHP box::generate方法代碼示例

本文整理匯總了PHP中box::generate方法的典型用法代碼示例。如果您正苦於以下問題:PHP box::generate方法的具體用法?PHP box::generate怎麽用?PHP box::generate使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在box的用法示例。


在下文中一共展示了box::generate方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: display

 function display()
 {
     $statusBox = new box("EVE Status");
     $statusApi = new API_ServerStatus();
     if ($statusApi->fetchXML()) {
         if ($statusApi->getserverOpen()) {
             $statusBox->addOption("caption", "EVE Server is <span><strong><font color=green>ONLINE</font></strong></span>");
             $statusBox->addOption("caption", "Players Online: " . $statusApi->getOnlinePlayers());
         } else {
             $statusBox->addOption("caption", "EVE Server is <span><strong><font color=red>OFFLINE</font></strong></span>");
         }
     } else {
         $statusBox->addOption("caption", "EVE Server is <span><strong><font color=red>UNKNOWN</font></strong></span>");
         $statusBox->addOption("caption", "Players Online: Unknown");
         $statusBox->addOption("caption", "EVE API is <span><strong><font color=red>DOWN</font></strong></span>");
     }
     if (config::get("show_clock")) {
         $statusBox->addOption("caption", "EVE Time:  <span><strong><font color=orange>" . gmdate("H:i") . "</font></strong></span>");
     }
     return $statusBox->generate();
 }
開發者ID:biow0lf,項目名稱:evedev-kb,代碼行數:21,代碼來源:class.serverstatus.php

示例2: menu

 /**
  * 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();
 }
開發者ID:biow0lf,項目名稱:evedev-kb,代碼行數:18,代碼來源:cc_detail.php

示例3: basename

    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();
開發者ID:Salvoxia,項目名稱:fleet_battles_mod,代碼行數:31,代碼來源:battles.php


注:本文中的box::generate方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。