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


PHP WCFACP::getMenu方法代碼示例

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


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

示例1: show

 /**
  * @see Page::show()
  */
 public function show()
 {
     // enable menu item
     WCFACP::getMenu()->setActiveMenuItem('wot.acp.menu.link.game.fleet.search');
     $this->readCache();
     parent::show();
 }
開發者ID:sonicmaster,項目名稱:RPG,代碼行數:10,代碼來源:FleetSearchForm.class.php

示例2: show

 /**
  * @see Page::show()
  */
 public function show()
 {
     // enable menu item
     WCFACP::getMenu()->setActiveMenuItem('wcf.acp.menu.link.admintools.spider');
     // show page
     parent::show();
 }
開發者ID:Maggan22,項目名稱:wbb3addons,代碼行數:10,代碼來源:AdminToolsSpiderListPage.class.php

示例3: execute

 /**
  * @see Action::execute()
  */
 public function execute()
 {
     AbstractAction::execute();
     // check permission
     WCF::getUser()->checkPermission('admin.user.canBanUser');
     if (count($this->userIDs) > 0) {
         // check permission
         $sql = "SELECT\tDISTINCT groupID\n\t\t\t\tFROM\twcf" . WCF_N . "_user_to_groups\n\t\t\t\tWHERE\tuserID IN (" . implode(',', $this->userIDs) . ")";
         $result = WCF::getDB()->sendQuery($sql);
         while ($row = WCF::getDB()->fetchArray($result)) {
             if (!Group::isAccessibleGroup($row['groupID'])) {
                 throw new PermissionDeniedException();
             }
         }
         // update user
         $sql = "UPDATE\twcf" . WCF_N . "_user\n\t\t\t\tSET\tbanned = 0\n\t\t\t\tWHERE\tuserID IN (" . implode(',', $this->userIDs) . ")";
         WCF::getDB()->sendQuery($sql);
         // unmark users
         UserEditor::unmarkAll();
         // reset sessions
         Session::resetSessions($this->userIDs);
     }
     $this->executed();
     if (!empty($this->url)) {
         HeaderUtil::redirect($this->url);
     } else {
         // set active menu item
         WCFACP::getMenu()->setActiveMenuItem('wcf.acp.menu.link.user.management');
         // show succes message
         WCF::getTPL()->assign('message', 'wcf.acp.user.unban.success');
         WCF::getTPL()->display('success');
     }
     exit;
 }
開發者ID:joaocustodio,項目名稱:EmuDevstore-1,代碼行數:37,代碼來源:UserUnbanAction.class.php

示例4: show

 /**
  * @see Page::show()
  */
 public function show()
 {
     // enable menu item
     if (!empty($this->activeMenuItem)) {
         WCFACP::getMenu()->setActiveMenuItem($this->activeMenuItem);
     }
     parent::show();
 }
開發者ID:CaribeSoy,項目名稱:contest-wcf,代碼行數:11,代碼來源:ACPForm.class.php

示例5: show

 /**
  * @see Page::show()
  */
 public function show()
 {
     // enable menu item
     WCFACP::getMenu()->setActiveMenuItem('wcf.acp.menu.link.package.server.view');
     // check permission.
     WCF::getUser()->checkPermission('admin.system.package.canEditServer');
     parent::show();
 }
開發者ID:CaribeSoy,項目名稱:contest-wcf,代碼行數:11,代碼來源:UpdateServerListPage.class.php

示例6: show

 /**
  * @see Page::show()
  */
 public function show()
 {
     // enable menu item
     WCFACP::getMenu()->setActiveMenuItem('wcf.acp.menu.link.style.view');
     // check permission
     WCF::getUser()->checkPermission(array('admin.style.canEditStyle', 'admin.style.canDeleteStyle', 'admin.style.canExportStyle'));
     parent::show();
 }
開發者ID:joaocustodio,項目名稱:EmuDevstore-1,代碼行數:11,代碼來源:StyleListPage.class.php

示例7: show

 /**
  * @see Page::show()
  */
 public function show()
 {
     // enable menu item
     WCFACP::getMenu()->setActiveMenuItem('wcf.acp.menu.link.user.rank.view');
     // check permission
     WCF::getUser()->checkPermission(array('admin.user.rank.canEditRank', 'admin.user.rank.canDeleteRank'));
     parent::show();
 }
開發者ID:joaocustodio,項目名稱:EmuDevstore-1,代碼行數:11,代碼來源:UserRankListPage.class.php

示例8: show

 /**
  * @see Page::show()
  */
 public function show()
 {
     // set active menu item.
     WCFACP::getMenu()->setActiveMenuItem('wcf.acp.menu.link.admintools.cronjobs');
     // check permission
     WCF::getUser()->checkPermission(array('admin.system.cronjobs.canEditCronjob', 'admin.system.cronjobs.canDeleteCronjob', 'admin.system.cronjobs.canEnableDisableCronjob'));
     SortablePage::show();
 }
開發者ID:Maggan22,項目名稱:wbb3addons,代碼行數:11,代碼來源:AdminToolsCronjobsListPage.class.php

示例9: show

 /**
  * @see Page::show()
  */
 public function show()
 {
     // permission
     WCF::getUser()->checkPermission('admin.system.adminTools.canView');
     // enable menu item
     WCFACP::getMenu()->setActiveMenuItem('wcf.acp.menu.link.adminTools');
     // show page
     parent::show();
 }
開發者ID:Maggan22,項目名稱:wbb3addons,代碼行數:12,代碼來源:AdminToolsLinkPage.class.php

示例10: show

 /**
  * @see	Page::show()
  */
 public function show()
 {
     // check module option
     if (!MODULE_CMSSTATISTICS) {
         throw new IllegalLinkException();
     }
     // enable menu entry
     WCFACP::getMenu()->setActiveMenuItem('wcf.acp.menu.link.content.host.statistics');
     parent::show();
 }
開發者ID:Evil-Co-Legacy,項目名稱:Evil-Co.de-CMS,代碼行數:13,代碼來源:CMSStatisticsPage.class.php

示例11: show

 /**
  * @see Page::show()
  */
 public function show()
 {
     // set active menu item
     WCFACP::getMenu()->setActiveMenuItem('wcf.acp.menu.link.autoupdate');
     // check permission
     WCF::getUser()->checkPermission('admin.system.package.canUpdatePackage');
     // check master password
     WCFACP::checkMasterPassword();
     parent::show();
 }
開發者ID:CaribeSoy,項目名稱:contest-wcf,代碼行數:13,代碼來源:PackageAutoUpdateListPage.class.php

示例12: execute

 /**
  * @see Action::execute()
  */
 public function execute()
 {
     AbstractAction::execute();
     // check permission
     WCF::getUser()->checkPermission('admin.user.canEnableUser');
     if (count($this->userIDs) > 0) {
         // check permission
         $sql = "SELECT\tDISTINCT groupID\n\t\t\t\tFROM\twcf" . WCF_N . "_user_to_groups\n\t\t\t\tWHERE\tuserID IN (" . implode(',', $this->userIDs) . ")";
         $result = WCF::getDB()->sendQuery($sql);
         while ($row = WCF::getDB()->fetchArray($result)) {
             if (!Group::isAccessibleGroup($row['groupID'])) {
                 throw new PermissionDeniedException();
             }
         }
         // update groups
         $sql = "DELETE FROM\twcf" . WCF_N . "_user_to_groups\n\t\t\t\tWHERE\t\tuserID IN (" . implode(',', $this->userIDs) . ")\n\t\t\t\t\t\tAND groupID <> " . Group::getGroupIdByType(Group::EVERYONE);
         WCF::getDB()->sendQuery($sql);
         $sql = "INSERT IGNORE INTO\twcf" . WCF_N . "_user_to_groups\n\t\t\t\t\t\t\t(userID, groupID)\n\t\t\t\tVALUES\t\t\t(" . implode(', ' . Group::getGroupIdByType(Group::GUESTS) . '),(', $this->userIDs) . ", '" . Group::getGroupIdByType(Group::GUESTS) . "')";
         WCF::getDB()->sendQuery($sql);
         // update activation code
         foreach ($this->userIDs as $userID) {
             $sql = "UPDATE\twcf" . WCF_N . "_user\n\t\t\t\t\tSET\tactivationCode = " . UserRegistrationUtil::getActivationCode() . "\n\t\t\t\t\tWHERE\tuserID = " . $userID;
             WCF::getDB()->sendQuery($sql);
         }
         // unmark users
         UserEditor::unmarkAll();
         // reset sessions
         Session::resetSessions($this->userIDs);
     }
     $this->executed();
     if (!empty($this->url)) {
         HeaderUtil::redirect($this->url);
     } else {
         // set active menu item
         WCFACP::getMenu()->setActiveMenuItem('wcf.acp.menu.link.user.management');
         // show succes message
         WCF::getTPL()->assign('message', 'wcf.acp.user.disable.success');
         WCF::getTPL()->display('success');
     }
     exit;
 }
開發者ID:joaocustodio,項目名稱:EmuDevstore-1,代碼行數:44,代碼來源:UserDisableAction.class.php

示例13: checkDependencies

 /**
  * Checks whether this package is required by other packages.
  * If so than a template will be displayed to warn the user that 
  * a further uninstallation will uninstall also the dependent packages 
  */
 public static function checkDependencies()
 {
     $packageID = 0;
     if (isset($_REQUEST['activePackageID'])) {
         $packageID = intval($_REQUEST['activePackageID']);
     }
     // get packages info
     try {
         // create object of uninstalling package
         $package = new Package($packageID);
     } catch (SystemException $e) {
         throw new IllegalLinkException();
     }
     // can not uninstall wcf package.
     if ($package->getPackage() == 'com.woltlab.wcf') {
         throw new IllegalLinkException();
     }
     $dependentPackages = array();
     if ($package->isRequired()) {
         // get packages that requires this package
         $dependentPackages = self::getPackageDependencies($package->getPackageID());
         $uninstallAvailable = true;
         foreach ($dependentPackages as $dependentPackage) {
             if ($dependentPackage['packageID'] == PACKAGE_ID) {
                 $uninstallAvailable = false;
                 break;
             }
         }
         // show uninstall dependencies template
         if (!isset($_POST['send']) && count($dependentPackages)) {
             WCFACP::getMenu()->setActiveMenuItem('wcf.acp.menu.link.package');
             // show delete requirements sure template
             WCF::getTPL()->assign(array('packageObj' => $package, 'dependentPackages' => $dependentPackages, 'activePackageID' => $packageID, 'uninstallAvailable' => $uninstallAvailable));
             WCF::getTPL()->display('packageUninstallationDependencies');
             exit;
         } else {
             if (!$uninstallAvailable) {
                 throw new IllegalLinkException();
             }
             self::addQueueEntries($package, $dependentPackages);
         }
     }
     // no dependencies. add this package to queue
     self::addQueueEntries($package);
 }
開發者ID:CaribeSoy,項目名稱:contest-wcf,代碼行數:50,代碼來源:PackageUninstallation.class.php

示例14: show

 /**
  * @see Page::show()
  */
 public function show()
 {
     WCF::getUser()->checkPermission('admin.general.attachmentManager.canView');
     // enable menu item
     WCFACP::getMenu()->setActiveMenuItem('wcf.acp.menu.link.attachmentManager');
     WCF::getSession()->register('showThumbnails', $this->showThumbnails);
     WCF::getSession()->register('showOnlyMessageType', $this->showOnlyMessageType);
     WCF::getSession()->register('showOnlyFileType', $this->showOnlyFileType);
     WCF::getSession()->register('showOnlyImages', $this->showOnlyImages);
     // show form
     parent::show();
 }
開發者ID:Maggan22,項目名稱:wbb3addons,代碼行數:15,代碼來源:AttachmentManagerAcpPage.class.php

示例15: show

 public function show()
 {
     // enable menu item
     WCFACP::getMenu()->setActiveMenuItem('bash.acp.menu.link.content.servers.list');
     parent::show();
 }
開發者ID:Evil-Co-Legacy,項目名稱:Bash-Database,代碼行數:6,代碼來源:ServerListPage.class.php


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