本文整理汇总了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();