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


PHP TemplateManager::existsByFolderNameAndVersion方法代碼示例

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


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

示例1: Template

     if (!isset($_GET['folder'])) {
         $errors[] = "No script directory was given.";
     } else {
         if (empty($_GET['folder'])) {
             $errors[] = "The script directory is empty.";
         }
     }
     if (!isset($_GET['vers'])) {
         $errors[] = "No script directory was given.";
     } else {
         if (empty($_GET['vers'])) {
             $errors[] = "The script directory is empty.";
         }
     }
     if (count($errors) == 0) {
         if (TemplateManager::existsByFolderNameAndVersion($_GET['folder'], $_GET['vers'])) {
             $errors[] = "The script is already installed in this version.";
         }
     }
     if (count($errors) == 0) {
         Core::addTask(TASK_TEMPLATES_INSTALL_FROM_REMOTE, $_GET['folder']);
         $page->assign("t_Report", Reporting::success("The Script will be installed in a few moments..."));
     } else {
         $page->assign("t_Report", Reporting::error(Utils::buildErrorString($errors)));
     }
 } else {
     if ("RemoveScript" == $do) {
         if (!empty($_GET['id'])) {
             if (TemplateManager::existsById($_GET['id'])) {
                 $t = new Template($_GET['id']);
                 if ($t->isInstalledOnAnyServer() != 0) {
開發者ID:xerox8521,項目名稱:FS-Gamepanel,代碼行數:31,代碼來源:templates.php


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