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