echo $GLOBALS['_J']['site_url'] . ('/images/xwb/xwb_' . XWB_S_VERSION . '.css');
?>
" />
<style>


	
	
</style>
</head>

<body>

<div class="bind-setting xwb-plugin">
	<p class="alert-tips">你还没有绑定新浪微博帐号!</p>
    <div class="bing-text">
    	<h4>绑定后,你将获得以下特权:</h4>
        <p>可以使用新浪微博帐号登录本站,不用担心忘记密码</p>
        <p>在本站发微博可选同步发到新浪微博,吸引更多人关注</p>
        <!-- <p>可使用新浪微博签名</p> -->
    </div>
    <a class="bind-btn" href="<?php 
echo XWB_plugin::URL('xwbAuth.login');
?>
" class="mibLoginBtn" target="_top"></a>
    <p class="txtb">还没有新浪微博帐号?<a href="http://cnrdn.com/pNj4" class="cp_more" target="_blank">30秒完成免费注册</a></p>
</div>

</body>
</html>
<link type="text/css" rel="stylesheet" href="<?php 
echo $GLOBALS['_J']['site_url'] . ('/images/xwb/xwb_' . XWB_S_VERSION . '.css');
?>
" />
<style>

	
</style>
</head>

<body>

<div class="bind-setting xwb-plugin">
	<p class="alert-tips">与新浪微博帐号绑定成功!</p>
    <div class="bing-text">
    	<h4>您现在可以:</h4>
        <p>使用新浪微博帐号登录本站,不用担心忘记密码</p>
        <p>在本站发微博可选同步发到新浪微博上,吸引更多人关注</p>
    </div>
    <p class="txtb">&nbsp;<a href="<?php 
echo XWB_plugin::URL('xwbSiteInterface.bind&share=1');
?>
"><strong>发一条微博告诉我的粉丝</strong></a>&nbsp;&nbsp;<a href="<?php 
echo XWB_plugin::URL('xwbSiteInterface.bind&skip_share=1');
?>
">或者点此进入设置页面</a>&nbsp;</p>
</div>

</body>
</html>
 function bind()
 {
     if (!XWB_plugin::pCfg('is_account_binding')) {
         XWB_plugin::showError('新浪微博绑定功能已经关闭!');
     }
     if (XWB_S_UID > 0 && XWB_plugin::isUserBinded()) {
         $xwb_user = XWB_plugin::getUser();
         $sina_id = $xwb_user->getInfo('sina_uid');
         $wb = XWB_plugin::getWB();
         $wb->is_exit_error = false;
         $sina_user_info = $wb->getUserShow($sina_id);
         if (isset($sina_user_info['error_code']) || isset($sina_user_info['error'])) {
             include XWB_P_ROOT . '/tpl/xwb_cenbind_error.tpl.php';
         } else {
             $db = XWB_plugin::getDB();
             $share = XWB_plugin::V("R:share");
             $share_msg = '';
             if ($share) {
                 $bind_info = $db->fetch_first("select * from " . XWB_S_TBPRE . "xwb_bind_info where `uid`='" . XWB_S_UID . "'");
                 $share_time = $bind_info['share_time'];
                 if (!$share_time) {
                     $share_time = time();
                     $db->query("update " . XWB_S_TBPRE . "xwb_bind_info set `share_time`='" . $share_time . "' where `uid`='" . XWB_S_UID . "'");
                     jclass('misc')->update_account_bind_info(XWB_S_UID, '', '', 1);
                     $share_msg = "<img src='" . (XWB_plugin::baseUrl() . XWB_plugin::URL('&code=enter&share_time=' . $share_time)) . "' width='0' height='0' />";
                 }
             } else {
                 /**
                  * 分享给好友显示页面
                  */
                 $skip_share = XWB_plugin::V("R:skip_share");
                 if (!$skip_share) {
                     $bind_info = $db->fetch_first("select * from " . XWB_S_TBPRE . "xwb_bind_info where `uid`='" . XWB_S_UID . "'");
                     if (!$bind_info['share_time']) {
                         include XWB_P_ROOT . '/tpl/xwb_cenbind_share.tpl.php';
                         exit;
                     }
                 }
             }
             $screen_name = $sina_user_info['screen_name'];
             $profile = XWB_plugin::O('xwbUserProfile');
             $setting = $profile->get('bind_setting', 1);
             $tojishigou = $profile->get('synctopic_tojishigou', 0);
             $reply_tojishigou = $profile->get('syncreply_tojishigou', 0);
             include XWB_P_ROOT . '/tpl/xwb_cenbind_on.tpl.php';
         }
     } else {
         include XWB_P_ROOT . '/tpl/xwb_cenbind_off.tpl.php';
     }
 }
Esempio n. 4
0
                <td colspan="3">
                    <em id="regErrorTips" class="xwb-plugin-error" style="display:none;"></em>
                </td>
            </tr>
        </table>
    </form>
    
    <?php 
}
?>
    
</div>

<div id="bindBox" class="xwb-plugin-form" style="display:none;">
    <form action="<?php 
echo XWB_plugin::URL("xwbSiteInterface.doBindAtNotLog");
?>
" id="siteBindFrom"  method="post" target="xwbSiteRegister"  >
		<input type="hidden" name="FORMHASH" value="<?php 
echo FORMHASH;
?>
" />
        <table class="xwb-plugin-table">
            <tr class="xwb-plugin-tr">
                <td class="xwb-plugin-td-msg"><label for="bindPwd">帐号昵称:</label></td>
                <td class="xwb-plugin-td-input">
                    <input type="text" name="siteBindName"	id="siteBindName" class="xwb-plugin-input-a" value="" />
                    <br />请输入您在 <?php 
echo XWB_S_TITLE;
?>
 的昵称
Esempio n. 5
0
/**
 * 加载新浪微博的底部信息
 */
function jsg_sina_footer()
{
    $tipsType = $GLOBALS['xwb_tips_type'];
    $site_uid = XWB_S_UID;
    $sina_uid = XWB_plugin::getBindInfo("sina_uid");
    $siteVer = XWB_S_VERSION;
    $siteName = str_replace("'", "\\'", $GLOBALS['_J']['config']['site_name']);
    $pName = CURSCRIPT . '_' . CURMODULE;
    $regUrl = XWB_plugin::URL("xwbSiteInterface.reg");
    $setUrl = XWB_plugin::URL("xwbSiteInterface.bind");
    $bindUrl = XWB_plugin::URL("xwbSiteInterface.bind");
    $signerUrl = XWB_plugin::URL("xwbSiteInterface.signer");
    $authUrl = XWB_plugin::URL("xwbAuth.login");
    $getTipsUrl = XWB_plugin::URL("xwbSiteInterface.getTips");
    $attentionUrl = XWB_plugin::URL("xwbSiteInterface.attention");
    $wbxUrl = XWB_plugin::pCfg("wbx_url");
    $xwb_loadScript1 = $GLOBALS['_J']['site_url'] . '/images/xwb/dlg.js';
    $xwb_loadScript2 = $GLOBALS['_J']['site_url'] . '/images/xwb/xwb.js';
    $xwb_css_base = $GLOBALS['_J']['site_url'] . '/images/xwb/xwb_base.css';
    $xwb_css_append = $GLOBALS['_J']['site_url'] . ('/images/xwb/xwb_' . XWB_S_VERSION . '.css');
    $return = <<<EOF
<script language="javascript">
var _xwb_cfg_data ={
\ttipsType:\t'{$tipsType}',site_uid:\t'{$site_uid}',sina_uid:\t'{$sina_uid}',
\tsiteVer:\t'{$siteVer}',siteName:\t'{$siteName}',pName:'{$pName}',
\tregUrl:\t\t'{$regUrl}',
\tsetUrl:\t\t'{$setUrl}',
\tbindUrl:\t'{$bindUrl}',
\tsignerUrl:\t'{$signerUrl}',
\tauthUrl:\t'{$authUrl}',
\tgetTipsUrl:\t'{$getTipsUrl}',
\tattentionUrl:\t'{$attentionUrl}',
\twbxUrl:\t\t'{$wbxUrl}'
};

function xwb_loadScript(file, charset){
\tvar script = document.createElement('SCRIPT');
\tscript.type = 'text/javascript'; script.charset = charset; script.src = file;
\tdocument.getElementsByTagName('HEAD')[0].appendChild(script);
}
xwb_loadScript("{$xwb_loadScript1}", "UTF-8");
xwb_loadScript("{$xwb_loadScript2}", "UTF-8");
</script>
<link href="{$xwb_css_base}" rel="stylesheet" type="text/css" />
<link href="{$xwb_css_append}" rel="stylesheet" type="text/css" />

EOF;
    /*
    $sess = XWB_plugin::getUser();
    $xwb_statInfo = $sess->getStat();
    foreach( $xwb_statInfo as $k => $stat ){
    	$xwb_statType = isset($stat['xt']) ? (string)$stat['xt'] : 'unknown';
    	$return .= XWB_plugin::statUrl( $xwb_statType, $stat, true );
    }
    
    if( !empty($xwb_statInfo) ){
    	$sess->clearStat();
    }
    */
    return $return;
}
    if ($reply_tojishigou == 0) {
        ?>
 checked="checked" <?php 
    }
    ?>
 />否</label></div>
        </div>
        <?php 
}
?>
        <span class="xwb-plugin-btn"><input type="submit" class="button" value="保存设置"></span>
        </form>
    </div>
    <div class="setting-box">
        <form id="unbindFrm" action="<?php 
echo XWB_plugin::URL('xwbSiteInterface.unbind');
?>
" method="post" target="xwbSiteRegister" >
			<input type="hidden" name="FORMHASH" value="<?php 
echo FORMHASH;
?>
" />
			<p>您已绑定新浪微博帐号昵称为:<a target="_blank" href="http://weibo.com/u/<?php 
echo $sina_id;
?>
"><?php 
echo $screen_name;
?>
</a></p>
			<div onclick="parent.XWBcontrol.confirm({msg:'你确认要解除与新浪帐号的绑定吗?',onok:function(){ document.getElementById('unbindFrm').submit(); var self = this; setTimeout(function(){ self.close(); parent.XWBcontrol.close('bind');}, 100); }})" class="xwb-plugin-btn"><input type="button" class="button" value="解除绑定"></div>
			<p class="tips">解除绑定后,您将无法使用新浪微博帐号登录本站</p>
Esempio n. 7
0
 function _getOAuthUrl()
 {
     static $aurl = null;
     if (!empty($aurl)) {
         return $aurl;
     }
     $sess = XWB_plugin::getUser();
     $sess->clearToken();
     $wbApi = XWB_plugin::getWB();
     $keys = $wbApi->getRequestToken();
     if (!isset($keys['oauth_token']) || !isset($keys['oauth_token_secret'])) {
         $api_error_origin = isset($keys['error']) ? $keys['error'] : 'UNKNOWN ERROR. MAYBE SERVER CAN NOT CONNECT TO SINA API SERVER';
         $api_error = isset($keys['error_CN']) && !empty($keys['error_CN']) && 'null' != $keys['error_CN'] ? $keys['error_CN'] : '';
         XWB_plugin::LOG("[WEIBO CLASS]\t[ERROR]\t#{$wbApi->req_error_count}\t{$api_error}\t{$wbApi->last_req_url}\tERROR ARRAY:\r\n" . print_r($keys, 1));
         XWB_plugin::showError("服务器获取Request Token失败;请稍候再试。<br />错误原因:{$api_error}[{$api_error_origin}]");
     }
     //print_r($keys);
     $aurl = $wbApi->getAuthorizeURL($keys['oauth_token'], false, XWB_plugin::baseUrl() . XWB_plugin::URL('xwbAuth.authCallBack'));
     //echo  XWB_plugin::baseUrl().XWB_plugin::URL('xwbAuth.authCallBack')."\n";
     $sess->setOAuthKey($keys, false);
     return rtrim($aurl, '&');
     //."&from=xweibo&xtype=1";
 }
Esempio n. 8
0
 /**
  * XWB_plugin::redirect($mRoute,$type=1);
  * 重定向 并退出程序
  * @param string $mRoute
  * @param int $type 1 : 默认 , 内部模块跳转 ,2 : 给定模块路由,通过浏览器跳转 ,3 : 给定URL
  * @return null 调用该函数,程序将自动退出。
  */
 function redirect($mRoute, $type = 1)
 {
     switch ($type) {
         case 1:
             XWB_plugin::M($mRoute);
             break;
         case 2:
             //Note: HTTP/1.1 requires an absolute URI as argument to » Location: including the scheme, hostname and absolute path, but some clients accept relative URIs
             $url = XWB_plugin::baseUrl() . XWB_plugin::URL($mRoute);
             @header("Location: " . $url);
             break;
         case 3:
             @header("Location: " . $mRoute);
             break;
         default:
             trigger_error("Error redirect type: [ {$mRoute} ] ", E_USER_ERROR);
             break;
     }
     exit;
 }
Esempio n. 9
0
&url=<?php 
echo urlencode($shareData['url']);
?>
&title=<?php 
echo urlencode($shareData['title']);
?>
&source=&sourceUrl=&%20content=gb2312&pic=">换个帐号?</a></span>
        </div>
    </div>
    <!-- /顶部 LOGO -->
    <div class="reg_main">
    	<b class="bg_regTop">&nbsp;</b>
        <b class="bg_deco_b">&nbsp;</b>
        <div class="reg_pub">
            <form id="shareForm" action="<?php 
echo XWB_plugin::URL("xwbSiteInterface.doShare");
?>
" method="POST">
			<input type="hidden" name="FORMHASH" value="<?php 
echo FORMHASH;
?>
" />
        	<div class="notice">
            	<h2><img src="<?php 
echo $GLOBALS['_J']['site_url'] . '/images/xwb/shareimg/transparent.gif';
?>
" class="wbIcon iconMsg" alt="" title=""/>转发到我的微博,顺便说点什么吧</h2>
              <span id="txt_count_msg">还可以输入<em>140</em>字</span>
            </div>
            <div class="inputTxt">
            	<textarea cols="20" rows="5" id="fw_content" name="message"><?php