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


PHP XWB_plugin::redirect方法代码示例

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


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

示例1: 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);
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:16,代码来源:xwbSiteInterface.mod.php

示例2: _showBinging

 /**
  * 根据在首页中显示的浮层显示对应的操作(内部函数,被authCallback最后调用)
  * 所有跟站点相关的对接,必须放到_showBinging
  * @param string $tipsType 类型
  * @uses showmessage(dz函数)
  */
 function _showBinging($tipsType)
 {
     global $_G;
     $sess = XWB_plugin::getUser();
     $referer = $sess->getInfo('referer');
     if (empty($referer)) {
         $referer = 'index.php';
     }
     //用于启动浮层
     $GLOBALS['xwb_tips_type'] = $tipsType;
     //不完美解决方案
     if (0 != $_G['config']['output']['forceheader'] && 'UTF8' != XWB_S_CHARSET) {
         @header("Content-type: text/html; charset=" . $_G['config']['output']['charset']);
     }
     if ('autoLogin' == $tipsType) {
         $_G['cookie'][$this->_getBindCookiesName((int) $_G['uid'])] = 99999;
         //仅为了不显示绑定按钮
         $_G['username'] = empty($_G['username']) ? 'SinaAPIUser' : $_G['username'];
         if ($_G['setting']['allowsynlogin'] && 0 < $_G['uid']) {
             loaducenter();
             $ucsynlogin = $_G['setting']['allowsynlogin'] ? uc_user_synlogin($_G['uid']) : '';
             $param = array('username' => $_G['username'], 'uid' => $_G['uid'], 'usergroup' => '');
             showmessage('login_succeed', $referer, $param, array('showdialog' => 1, 'locationtime' => true, 'extrajs' => $ucsynlogin));
         } else {
             showmessage('login_succeed', $referer, array('username' => $_G['username'], 'uid' => 0, 'usergroup' => ''));
         }
     } elseif ('siteuserNotExist' == $tipsType) {
         showmessage(XWB_plugin::L('xwb_site_user_not_exist'), '', array(), array(), 1);
     } elseif ('reg' == $tipsType) {
         showmessage(XWB_plugin::L('xwb_process_binding', 'openReg4dx'), null, array(), array(), 1);
     } elseif ('hasBinded' == $tipsType) {
         showmessage(XWB_plugin::L('xwb_process_binding', 'hasBind'), null, array(), array(), 1);
         //直接跳转到bind页面
     } else {
         if (version_compare(XWB_S_VERSION, '2', '>=')) {
             $pluginid = 'sina_xweibo_x2';
         } else {
             $pluginid = 'sina_xweibo';
         }
         XWB_plugin::redirect(XWB_plugin::siteUrl(0) . 'home.php?mod=spacecp&ac=plugin&id=' . $pluginid . ':home_binding', 3);
     }
 }
开发者ID:Jaedeok-seol,项目名称:discuz_template,代码行数:48,代码来源:xwbAuth.mod.php

示例3: attention

 function attention()
 {
     $att_id = strval(XWB_plugin::V('g:att_id'));
     if (!is_numeric($att_id)) {
         XWB_plugin::showError('要关注的用户参数错误!');
     }
     $mySinaUid = XWB_plugin::getBindInfo('sina_uid', '');
     if (empty($mySinaUid)) {
         XWB_plugin::redirect('xwbSiteInterface.bind', 2);
     }
     $wbApi = XWB_plugin::getWB();
     $wbApi->is_exit_error = false;
     $rst = $wbApi->createFriendship($att_id);
     $url = XWB_plugin::getWeiboProfileLink($att_id);
     XWB_plugin::redirect($url, 3);
 }
开发者ID:chibimiku,项目名称:xweibo_for_discuz_x2_php7,代码行数:16,代码来源:xwbSiteInterface.mod.php

示例4: _showBinging

 /**
  * 根据在首页中显示的浮层显示对应的操作(内部函数,被authCallback最后调用)
  * 所有跟站点相关的对接,必须放到_showBinging
  * @param string $tipsType 类型
  * @uses showmessage(dz函数)
  */
 function _showBinging($tipsType)
 {
     //用于启动浮层
     $GLOBALS['xwb_tips_type'] = $tipsType;
     //不完美解决方案
     if ('UTF-8' != strtoupper($GLOBALS['_J']['config']['charset'])) {
         @header("Content-type: text/html; charset=utf-8");
     }
     if ('autoLogin' == $tipsType) {
         $synlogin_result = '';
         if (true === UCENTER) {
             //加载Ucenter客户端文件
             include_once ROOT_PATH . './api/uc_client/client.php';
             $ucuid = (int) $GLOBALS['_J']['config']['login_user']['ucuid'];
             if ($ucuid > 0) {
                 $synlogin_result = uc_user_synlogin($ucuid);
             }
         }
         //直接跳转到首页
         jsg_showmessage("登录成功{$synlogin_result}", $this->redirect_to, 5);
     } elseif ('siteuserNotExist' == $tipsType) {
         jsg_showmessage(XWB_plugin::L('xwb_site_user_not_exist'));
     } elseif ('reg' == $tipsType) {
         jsg_showmessage(XWB_plugin::L('xwb_process_binding', 'openReg4jsg'));
     } elseif ('hasBinded' == $tipsType) {
         jsg_showmessage(XWB_plugin::L('xwb_process_binding', 'hasBind'));
         //直接跳转到bind页面
     } else {
         XWB_plugin::redirect(XWB_plugin::siteUrl(0) . 'index.php?mod=account&code=sina', 3);
     }
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:37,代码来源:xwbAuth.mod.php


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