本文整理匯總了PHP中TemplateManager::getAllGameserverTemplates方法的典型用法代碼示例。如果您正苦於以下問題:PHP TemplateManager::getAllGameserverTemplates方法的具體用法?PHP TemplateManager::getAllGameserverTemplates怎麽用?PHP TemplateManager::getAllGameserverTemplates使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類TemplateManager
的用法示例。
在下文中一共展示了TemplateManager::getAllGameserverTemplates方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: Page
*/
include "../core.php";
// Admin Check
$user = UserManager::getLocalUser();
if (!$user->isAdmin()) {
PageManager::displayErrorPage("access");
return;
}
$page = new Page($smarty, "modals/AdminGameserverAdd.tpl");
// Users
$c = UserManager::getAllUsers();
if ($c === false) {
$page->assign("t_Report", Reporting::info("There are no users yet. Try <a href='" . Core::GetConfig("dirRoot") . "Customer'>adding one</a>."));
} else {
$page->assign("customerArrayData", $c);
}
// Templates
$c = TemplateManager::getAllGameserverTemplates();
if ($c == false) {
$page->assign("t_Report", Reporting::info("There are no not gameserver templates yet. Try <a href='" . Core::GetConfig("dirRoot") . "Templates'>adding one</a>."));
} else {
$page->assign("templateArrayData", $c);
}
// Physical Servers
$c = PhysicalServerManager::getAllPhysicalServer();
if ($c === false) {
$page->assign("t_Report", Reporting::info("There are no servers yet. Try <a href='" . Core::GetConfig("dirRoot") . "Server'>adding one</a>."));
} else {
$page->assign("serverArrayData", $c);
}
$page->display();