当前位置: 首页>>代码示例>>PHP>>正文


PHP Access::pageFix方法代码示例

本文整理汇总了PHP中Access::pageFix方法的典型用法代码示例。如果您正苦于以下问题:PHP Access::pageFix方法的具体用法?PHP Access::pageFix怎么用?PHP Access::pageFix使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Access的用法示例。


在下文中一共展示了Access::pageFix方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: main


//.........这里部分代码省略.........
                 Access::sendMessage(dgettext('access', 'Shortcut deleted'), 'shortcuts');
                 break;
             case 'shortcuts':
                 PHPWS_Core::initModClass('access', 'Forms.php');
                 $title = dgettext('access', 'Shortcuts');
                 $content = Access_Forms::shortcuts();
                 break;
             case 'post_shortcut_list':
                 $message = NULL;
                 $result = Access::postShortcutList();
                 if (PHPWS_Error::isError($result)) {
                     $message = dgettext('access', 'An error occurred.') . ' ' . dgettext('access', 'Please check your logs.');
                 }
                 Access::sendMessage($message, 'shortcuts');
                 break;
             case 'edit_shortcut':
                 PHPWS_Core::initModClass('access', 'Forms.php');
                 echo Access_Forms::shortcut_menu();
                 exit;
                 break;
             case 'post_shortcut':
                 PHPWS_Core::initModClass('access', 'Shortcut.php');
                 $sch_id = filter_input(INPUT_POST, 'sch_id', FILTER_SANITIZE_NUMBER_INT);
                 if ($sch_id) {
                     $shortcut = new Access_Shortcut($sch_id);
                 } else {
                     $shortcut = new Access_Shortcut();
                 }
                 try {
                     $shortcut->postShortcut();
                     $shortcut->save();
                     $json['keyword'] = $shortcut->keyword;
                     $json['error'] = 0;
                 } catch (\Exception $e) {
                     $json['message'] = $e->getMessage();
                     $json['error'] = 1;
                 }
                 echo json_encode($json);
                 exit;
                 break;
             case 'htaccess':
                 if (Current_User::isDeity()) {
                     $title = dgettext('access', 'htaccess');
                     $content = Access::htaccess();
                 } else {
                     Current_User::disallow();
                 }
                 break;
             case 'add_rewritebase':
                 if (Current_User::isDeity()) {
                     Access::addRewriteBase();
                     PHPWS_Core::goBack();
                 } else {
                     Current_User::disallow();
                 }
                 break;
             case 'add_forward':
                 if (Current_User::isDeity()) {
                     Access::addForward();
                     PHPWS_Core::goBack();
                 } else {
                     Current_User::disallow();
                 }
                 break;
             case 'remove_forward':
                 if (Current_User::isDeity()) {
                     Access::removeForward();
                     PHPWS_Core::goBack();
                 } else {
                     Current_User::disallow();
                 }
                 break;
             case 'menu_fix':
                 Access::menuFix();
                 PHPWS_Core::goBack();
                 break;
             case 'page_fix':
                 Access::pageFix();
                 PHPWS_Core::goBack();
                 break;
             case 'autoforward_on':
                 PHPWS_Settings::set('access', 'forward_ids', 1);
                 PHPWS_Settings::save('access');
                 PHPWS_Core::goBack();
                 break;
             case 'autoforward_off':
                 PHPWS_Settings::set('access', 'forward_ids', 0);
                 PHPWS_Settings::save('access');
                 PHPWS_Core::goBack();
                 break;
         }
     }
     $tpl['TITLE'] = $title;
     $tpl['MESSAGE'] = $message;
     $tpl['CONTENT'] = $content;
     $main = PHPWS_Template::process($tpl, 'access', 'main.tpl');
     $panel->setContent($main);
     $finalPanel = $panel->display();
     Layout::add(PHPWS_ControlPanel::display($finalPanel));
 }
开发者ID:HaldunA,项目名称:phpwebsite,代码行数:101,代码来源:Access.php


注:本文中的Access::pageFix方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。