本文整理汇总了PHP中XWB_plugin::deny方法的典型用法代码示例。如果您正苦于以下问题:PHP XWB_plugin::deny方法的具体用法?PHP XWB_plugin::deny怎么用?PHP XWB_plugin::deny使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XWB_plugin
的用法示例。
在下文中一共展示了XWB_plugin::deny方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: doCfg4pushback
/**
* 评论回推设置:设置和开启评论回推选项
*/
function doCfg4pushback()
{
if (!defined('XWB_S_IS_ADMIN') || !XWB_S_IS_ADMIN || !XWB_plugin::isRequestBy('POST')) {
XWB_plugin::deny('');
} elseif (!xwb_token::checkInput('p', 'pushback', true)) {
XWB_plugin::showError('令牌验证失败,请返回重试');
}
$is_pushback_open = 1;
$pushback_to_thread = intval(XWB_plugin::V('p:pushback_to_thread'));
$pushback_to_blog = intval(XWB_plugin::V('p:pushback_to_blog'));
$pushback_to_doing = intval(XWB_plugin::V('p:pushback_to_doing'));
$pushback_to_share = intval(XWB_plugin::V('p:pushback_to_share'));
if (!$pushback_to_thread && !$pushback_to_blog && !$pushback_to_doing && !$pushback_to_share) {
$is_pushback_open = 0;
}
$res = XWB_Plugin::setPCfg(array('is_pushback_open' => $is_pushback_open, 'pushback_to_thread' => $pushback_to_thread, 'pushback_to_blog' => $pushback_to_blog, 'pushback_to_doing' => $pushback_to_doing, 'pushback_to_share' => $pushback_to_share));
if (true == $res) {
$ret = array(1, '设置保存成功。');
} else {
$ret = array(0, '设置保存失败,请检查配置文件app.cfg.php是否具有可写权限?');
}
$this->_oScript('xwbSetTips', $ret);
$pushInstance = XWB_Plugin::O('pushbackCommunicator');
if (1 == $is_pushback_open) {
$pushInstance->setPushback('comment');
} else {
$pushInstance->cancelPushback();
}
}
示例2: apiCfg
/**
* api通信设置
*/
function apiCfg()
{
if (!defined('XWB_S_IS_ADMIN') || !XWB_S_IS_ADMIN) {
XWB_plugin::deny('');
}
include XWB_P_ROOT . '/tpl/api_cfg_app_set.tpl.php';
}
示例3: showError
/**
* 出现错误的时候,显示错误模板
* @param string $info 错误信息
* @param bool $deny 是否发送403 http错误?是则表示调用本类静态方法deny
* @param array $extra 其他详细信息,用于debug显示(现在暂时无用)
*/
function showError($info = '', $deny = false, $extra = array())
{
if (true == $deny) {
XWB_plugin::deny($info);
} else {
include XWB_P_ROOT . '/tpl/xwb_show_error.tpl.php';
}
exit;
}
示例4: attention
function attention()
{
if (!XWB_plugin::pCfg('is_tips_display')) {
XWB_plugin::deny('新浪微博资料页功能已经关闭!');
}
$att_id = XWB_plugin::V('g:att_id');
$wbApi = XWB_plugin::getWB();
$wbApi->is_exit_error = false;
$mySinaUid = XWB_plugin::getBindInfo('sina_uid', '');
if (empty($mySinaUid)) {
XWB_plugin::deny('你不是绑定用户,不能关注其它用户');
}
$rst = $wbApi->createFriendship($att_id);
$url = 'http:/' . '/t.sina.com.cn/' . $att_id;
XWB_plugin::redirect($url, 3);
}
示例5: doPluginCfg4ocSet
function doPluginCfg4ocSet()
{
if (!defined('XWB_S_IS_ADMIN') || !XWB_S_IS_ADMIN || !XWB_plugin::isRequestBy('POST')) {
XWB_plugin::deny('');
}
$set = (array) XWB_plugin::V('p:pluginCfg');
$newset = array();
$inputCheck = array('is_rebutton_relateUid_assoc' => array(0, 1), 'display_ow_in_forum_index' => array(0, 1));
$newset = $this->_filterInput($set, $inputCheck);
if (!XWB_plugin::setPCfg($newset)) {
$ret = array(0, '设置保存失败,请检查插件目录是否可写。');
} else {
$ret = array(1, '设置成功');
}
$this->_oScript('xwbSetTips', $ret);
}
示例6: xwbApiInterface
function xwbApiInterface()
{
if (!defined('XWB_S_IS_ADMIN') || !XWB_S_IS_ADMIN) {
XWB_plugin::deny('');
}
}