<h4>分享后再关注一下,是一种美德</h4>
                    <dl>
                    <dt><a href="<?php 
    echo XWB_plugin::getWeiboProfileLink($owbUserRs['id']);
    ?>
" target="_blank"><img src="<?php 
    echo isset($owbUserRs['local_image_url']) ? $owbUserRs['local_image_url'] : XWB_plugin::getPluginUrl('images/bgimg/0.gif');
    ?>
"  /></a></dt>
                    <dd class="info">
                    	<h5><?php 
    echo $owbUserRs['screen_name'];
    ?>
</h5>
                        <p class="adr"><span><a target="_blank" href="<?php 
    echo XWB_plugin::getEntryURL('xwbSiteInterface.attention', "att_id={$owbUserRs['id']}&" . XWB_TOKEN_NAME . "=" . FORMHASH);
    ?>
">加关注</a></span></p>
                    </dd>
                    </dl>
                </div>
                <?php 
}
?>
                
            </div>
            

            
            
            
 /**
  * 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::getEntryURL($mRoute);
             header("Location: " . $url);
             break;
         case 3:
             header("Location: " . $mRoute);
             break;
         default:
             trigger_error("Error redirect type: [ {$mRoute} ] ", E_USER_ERROR);
             break;
     }
     exit;
 }
#unbound .kaiser_sina_con-r h4				{ padding:0 16px 0 0; font-size:12px; font-weight:normal; color:#999; line-height:24px; overflow:hidden; float:left;}
#unbound .kaiser_sina_con-r a				{ width:131px; height:24px; background:none; overflow:hidden; float:left;}
#unbound .kaiser_sina_con-r p				{ width:700px; margin-left:0; margin-top:10px; display:inline; font-size:12px; font-weight:normal; color:#999; line-height:16px; overflow:hidden; float:left;}
</style>
</head>
<body>
    <div id="unbound" class="set-wrap">
    	<!--h3>新浪微博绑定设置</h3-->
        <div class="main kaiser_sina_main">
        	<div class="con-l kaiser_sina_con-l">
                <div class="binding"></div>
            </div> 
            <div class="con-r kaiser_sina_con-r">
				<h4>点击按钮,立刻绑定新浪帐号</h4>
                <a class="binding-btn binding-w" href="javascript:void(0)" onclick="window.top.location='<?php 
echo XWB_plugin::getEntryURL('xwbAuth.login');
?>
'"><img src="template/we54/images/kaiser_sina_bangding_button.png" /></a>
                <p>绑定以后就可以把帖子、回帖同步发到新浪微博上啦,无需记住本站的帐号和密码,随时使用新浪帐号密码轻松登录</p>
            </div>
        </div>
        <?php 
if ($_GET['ac'] == 'plugin') {
    ?>
			<?php 
    if (XWB_S_UID > 0 && !empty($huwbUserRs)) {
        ?>
            <div class="active-s1">
                <h4>他们已经绑定微博了,你还不行动?</h4>
                <?php 
        foreach ($huwbUserRs as $value) {
	<div class="bing-text">
            <?php 
if ('api' == $errorType) {
    ?>
				<p>服务器无法连接到新浪微博API服务器;或新浪微博API服务器无响应。</p>
				<p>稍候一下,然后重新打开此页面;如果此错误信息重复出现,<strong>请联系网站管理员处理。</strong></p>
			<?php 
} elseif ('file' == $errorType) {
    ?>
				<p>请确保拥有权限,无法创建数据缓存文件。</p>
			<?php 
}
?>
    </div>
    
    <div class="setting-box">
        <form id="unbindFrm" action="<?php 
echo XWB_plugin::getEntryURL('xwbSiteInterface.unbind');
?>
" method="post" target="xwbSiteRegister" >
			<h3>解除绑定</h3>
			<div class="xwb-plugin-btn"><input type="button" class="button" value="解除绑定" onclick="xwb_unbind();return false;" ></div>
			<p class="tips"></p>
		</form>
    </div>
    
</div>
<iframe src="" name="xwbSiteRegister" frameborder="0" height="0" width="0"></iframe>
</body>
</html>
                        <?php 
}
?>
                    </div>
                </div>
                
                <div class="serch-results">
                    <ul id="serchResultsUl"></ul>
                </div>
                
            </div>
            
            <div class="wrap-inner">
            	<h3 class="main-title">其它相关设置</h3>
            	<form action="<?php 
echo XWB_plugin::getEntryURL("xwbSiteInterface.doPluginCfg4ocSet");
?>
" id="siteRegFrom"  method="post" target="xwbHideFrame">
            	<input type="hidden" name="<?php 
echo XWB_TOKEN_NAME;
?>
" value="<?php 
echo $tokenhash;
?>
" />
            		<ul>
                    	<li>
                    		<label for="part90">
                        		<input class="chk" id="part90" name="pluginCfg[is_rebutton_relateUid_assoc]" type="checkbox" value="1" <?php 
echo XWB_plugin::pCfg('is_rebutton_relateUid_assoc') ? 'checked="checked"' : '';
?>
                        <input name="registerBt1" type="button" onclick="submitForm('siteRegFrom')" id="registerBt1" value="" class="xwd-real-btn-zh" />
                    </span>
                    <em>已经有<?php 
echo XWB_S_TITLE;
?>
账号?</em>
                    <a href="javascript:void(function(){})" onclick="forTurn('bind')" tabindex="-1">绑定我的账号</a>
                </td>
            </tr>
        </table>
    </form>
</div>

<div id="bindBox" class="xwb-plugin-form" style="display:none;">
    <form action="<?php 
echo XWB_plugin::getEntryURL("xwbSiteInterface.doBindAtNotLog");
?>
" id="siteBindFrom"  method="post" target="xwbSiteRegister"  >
        <table class="xwb-plugin-table xwb-table-zh">
            <tr class="xwb-plugin-tr-error">
                <td colspan="3">
                    <em id="bindErrorTips" class="xwb-plugin-error" style="display:none;"></em>
                </td>
            </tr>
            <tr class="xwb-plugin-tr">
                <td class="xwb-plugin-td-msg xwb-td-msg-zh"><label for="siteBindName"> 用户名:</label></td>
                <td class="xwb-plugin-td-input">
                    <input type="text" name="siteBindName" id="siteBindName" class="xwb-plugin-input-a" value="" />
                </td>
                <!-- <td rowspan="4" class="xwb-plugin-td-right-msg">
                    还没有<?php 
 /**
  * Exchange the request token and secret for an access token and
  * secret, to sign API calls.
  *
  * @return array  
  */
 function getAccessToken($oauth_verifier = FALSE, $oauth_token = false, $useType = 'string')
 {
     $parameters = array();
     $parameters["client_id"] = XWB_APP_KEY;
     $parameters["client_secret"] = XWB_APP_SECRET_KEY;
     $parameters["grant_type"] = "authorization_code";
     $parameters["code"] = XWB_plugin::V('r:code');
     $parameters["redirect_uri"] = XWB_plugin::getEntryURL('xwbAuth.authCallBack');
     $token = $this->oAuthRequest($this->accessTokenURL(), 'POST', $parameters, true);
     $token['oauth_token'] = $token['access_token'];
     $token['oauth_token_secret'] = "";
     return $token;
 }
 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::getEntryURL('xwbAuth.authCallBack'));
     $sess->setOAuthKey($keys, false);
     return rtrim($aurl, '&');
 }
                    <h4>分享后再关注一下,是一种美德</h4>
                    <dl>
                    <dt><a href="<?php 
    echo XWB_plugin::getWeiboProfileLink($owbUserRs['id']);
    ?>
" target="_blank"><img src="<?php 
    echo isset($owbUserRs['local_image_url']) ? $owbUserRs['local_image_url'] : XWB_plugin::getPluginUrl('images/bgimg/0.gif');
    ?>
"  /></a></dt>
                    <dd class="info">
                    	<h5><?php 
    echo $owbUserRs['screen_name'];
    ?>
</h5>
                        <p class="adr"><span><a target="_blank" href="<?php 
    echo XWB_plugin::getEntryURL('xwbSiteInterface.attention', "att_id={$owbUserRs['id']}");
    ?>
">加关注</a></span></p>
                    </dd>
                    </dl>
                </div>
                <?php 
}
?>
                
            </div>
            

            
            
            
                        <div class="user-info">
                            <p><?php 
            echo XWB_plugin::convertEncoding($value['username'], XWB_S_CHARSET, 'UTF-8');
            ?>
</p>
                            <?php 
            if ($value['sina_uid'] != $domain) {
                ?>
                                <?php 
                if ($isBind) {
                    ?>
                                <a id="huFriend" class="addfollow-btn <?php 
                    echo TRUE === $value['friends'] ? 'hidden' : '';
                    ?>
" target="_blank" href="<?php 
                    echo XWB_plugin::getEntryURL('xwbSiteInterface.attention', "att_id={$value['sina_uid']}&" . XWB_TOKEN_NAME . "=" . FORMHASH);
                    ?>
" onclick="setFriend(this)"></a>
                                <?php 
                } else {
                    ?>
                                <a class="addfollow-btn" href="<?php 
                    echo XWB_plugin::getWeiboProfileLink($value['sina_uid']);
                    ?>
"></a>
                                <?php 
                }
                ?>
                                <a id="huFriend_ed" class="already-addfollow-btn <?php 
                echo TRUE !== $value['friends'] ? 'hidden' : '';
                ?>
 /**
  * 分享到按钮位置
  * @return string
  */
 function viewthread_useraction_output()
 {
     global $_G;
     $return = '';
     if (false == $this->_start_xweibo(true) || !XWB_plugin::pCfg('is_rebutton_display')) {
         return $return;
     }
     $this->_parse_postlist_in_viewthread();
     if (XWB_S_UID < 1 || !XWB_plugin::isUserBinded()) {
         //没有绑定状态下,调用sina自己的转发按钮
         $link = tpl_sina_xweibo_x2::get_sina_share_link($this->viewthread_subject);
         //$link = "javascript:void((function(s,d,e){try{}catch(e){}var f='http://v.t.sina.com.cn/share/share.php?',u=d.location.href,p=['url=',e(u),'&title=',e(d.title),'&appkey=444463273'].join('');function a(){if(!window.open([f,p].join(''),'mb', ['toolbar=0,status=0,resizable=1,width=620,height=450,left=',(s.width- 620)/2,',top=',(s.height-450)/2].join('')))u.href=[f,p].join('');}; if(/Firefox/.test(navigator.userAgent)){setTimeout(a,0)}else{a()}}) (screen,document,encodeURIComponent));";
     } else {
         $tid = isset($_G['gp_tid']) ? (int) $_G['gp_tid'] : 0;
         $link = XWB_plugin::getEntryURL('xwbSiteInterface.share', array('tid' => $tid));
         $link = "javascript:void( window.open('" . urlencode($link) . "', '', 'toolbar=0,status=0,resizable=1,width=680,height=500') );";
     }
     include template($this->pluginid . ':share_button_viewthread');
     return $return;
 }
            }
        },
        failure : function() {
            $id('loading').innerHTML = '';
            popShow(rst[1], 'error');
        }
    });
}
</script>
</head>
<body>
    <div id="comment_back" class="set-wrap push-div-height">
    	<div class="wrap-inner">
        	<h3 class="main-title">评论回推设置</h3>
            <form action="<?php 
echo XWB_plugin::getEntryURL("pushbackInterface.doCfg4pushback");
?>
" id="siteRegFrom"  method="post" target="xwbHideFrame">
            	<ul>
                	<li>
                		<a id="not-set-authkey-link" class="binding-btn back-on <?php 
if (1 == $isOpen) {
    ?>
hidden<?php 
}
?>
" href="#" onclick="xwbSetPushbackAuthKey();return false;"><span>开启评论回流</span></a>
                    	<a id="has-set-authkey-link"  class="binding-btn back-off <?php 
if (0 == $isOpen) {
    ?>
hidden<?php 
&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::getEntryURL("xwbSiteInterface.doShare");
?>
" method="post">
        	<div class="notice">
            	<h2><img src="<?php 
echo XWB_plugin::getPluginUrl('images/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 
echo htmlspecialchars($shareData['message']) . ' ';
?>
</textarea>
            	<dl>
                        <div class="user-info">
                            <p><?php 
        echo XWB_plugin::convertEncoding($value['username'], XWB_S_CHARSET, 'UTF-8');
        ?>
</p>
                            <?php 
        if ($value['sina_uid'] != $domain) {
            ?>
                                <?php 
            if ($isBind) {
                ?>
                                <a id="huFriend" class="addfollow-btn <?php 
                echo TRUE === $value['friends'] ? 'hidden' : '';
                ?>
" target="_blank" href="<?php 
                echo XWB_plugin::getEntryURL('xwbSiteInterface.attention', "att_id={$value['sina_uid']}");
                ?>
" onclick="setFriend(this)"></a>
                                <?php 
            } else {
                ?>
                                <a class="addfollow-btn" href="<?php 
                echo XWB_plugin::getWeiboProfileLink($value['sina_uid']);
                ?>
"></a>
                                <?php 
            }
            ?>
                                <a id="huFriend_ed" class="already-addfollow-btn <?php 
            echo TRUE !== $value['friends'] ? 'hidden' : '';
            ?>
             action.style.top = parseInt((sz.height - dsz.height)/2 + getScroll().top) + 'px';
        }

        function ensure(){
            $id('popMsg').className='pop-win win-w fixed-pop hidden';
            if(docScrollHeight) parent.document.getElementById("frame_content").height  = docScrollHeight;
        }
    </script>
    </head>

    <body>
        <div id="comment_back" class="set-wrap push-div-height">
            <div class="wrap-inner">
                <h3 class="main-title">与xweibo通信 </h3>
                <form action="<?php 
echo XWB_plugin::getEntryURL("xwbApiInterface.apiCfg");
?>
" id="apiFrom"  method="post">
                    <ul>
                        <li>
                        	<p>如果你安装了Xweibo,可以通过设置共享双方账号绑定关系和内容的互推。<a href="http://x.weibo.com" target="_blank">我要了解下Xweibo</a></p>
                            <p>在开始设置之前请先确定:</p>
                            <p>1、你的xweibo和xweibo for Discuz 插件使用的是同一个appkey;</p>
                            <p>2、你的论坛所使用的程序是Discuz 6.0-7.2或者DiscuzX1.5;</p>
                            <p>3、你所装的xweibo版本是1.2或者以上的;</p>
                            <p>4、你所装的xweibo for Discuz 插件版本在2.0或以上;</p>
                        </li>
                        <li>
                            <?php 
if (XWB_plugin::pCfg('switch_to_xweibo')) {
    ?>
 /**
  * 分享到按钮位置
  * @return string
  */
 function viewthread_useraction_output()
 {
     global $_G;
     $return = '';
     if (false == $this->_start_xweibo(true) || !XWB_plugin::pCfg('is_rebutton_display')) {
         return $return;
     }
     $this->_parse_postlist_in_viewthread();
     if (XWB_S_UID < 1 || !XWB_plugin::isUserBinded()) {
         //没有绑定状态下,调用sina自己的转发按钮
         $link = tpl_sina_xweibo_x2::get_sina_share_link($this->viewthread_subject);
     } else {
         $tid = isset($_G['gp_tid']) ? (int) $_G['gp_tid'] : 0;
         $link = XWB_plugin::getEntryURL('xwbSiteInterface.share', array('tid' => $tid));
         $link = "javascript:void( window.open('" . urlencode($link) . "', '', 'toolbar=0,status=0,resizable=1,width=680,height=500') );";
     }
     include template($this->pluginid . ':share_button_viewthread');
     return $return;
 }