本文整理匯總了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('');
}
}