/**
  * 根据发送过来的数据,组装出已经转码的、要插入对应数据库的回帖内容
  *
  * @param array $data API发送过来的数据
  * @return string 要插入的回帖内容(已经转码)
  */
 function _createContent($data)
 {
     //转换为论坛所需要的字符集
     if (empty($data['nick'])) {
         $data['nick'] = '回推';
     }
     $nickname = XWB_plugin::convertEncoding((string) $data['nick'], 'UTF-8', XWB_S_CHARSET);
     $content = XWB_plugin::convertEncoding((string) $data['text'], 'UTF-8', XWB_S_CHARSET);
     //DZ函数
     $content = dhtmlspecialchars($content);
     $content = $this->_replaceSinaUrlToUBB($content);
     $content = $this->_filterContent($content);
     if (empty($content)) {
         return '';
     }
     if (isset($data['pic']) && !empty($data['pic'])) {
         $content .= "\n\n" . '[img]http://ww3.sinaimg.cn/large/' . $data['pic'] . '.jpg[/img]';
     }
     $content = $content . "\n\n" . '[img]' . XWB_plugin::getPluginUrl('images/bgimg/icon_logo.png') . '[/img] ' . '[size=2][color=gray]' . '[url=' . XWB_plugin::getWeiboProfileLink($data['uid']) . ']' . XWB_plugin::L('xwb_reply_from_2', $nickname) . '[/url][/color][/size]';
     return $content;
 }
    }
    ?>
                    	</p>
                    <?php 
}
?>
                </div>
                
                <?php 
if (!empty($owbUserRs)) {
    ?>
                <div class="attention">
                    <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>
            ?>
                <div class="users">
                    <a href="<?php 
            echo XWB_plugin::getWeiboProfileLink($value['sina_uid']);
            ?>
" target="_blank"><?php 
            echo $value['avatar'];
            ?>
</a>
                    <div class="user-info">
                        <p><?php 
            echo XWB_plugin::convertEncoding($value['username'], XWB_S_CHARSET, 'UTF-8');
            ?>
</p>
                        <a class="addfollow-btn" href="<?php 
            echo XWB_plugin::getWeiboProfileLink($value['sina_uid']);
            ?>
" target="_blank"></a>
                        <a class="already-addfollow-btn hidden" href="javascript:void(0)#"></a>
                    </div>
                </div>
                <?php 
        }
        ?>
            </div>
            <?php 
    }
    ?>
        <?php 
}
?>
 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);
 }
 /**
  * 根据发送过来的数据,组装出已经转码的、要插入对应数据库的回帖内容
  *
  * @param array $data API发送过来的数据
  * @return string 要插入的回帖内容(已经转码)
  */
 function _createContent($data)
 {
     //转换为论坛所需要的字符集
     if (empty($data['nick'])) {
         $data['nick'] = '回推';
     }
     $nickname = XWB_plugin::convertEncoding((string) $data['nick'], 'UTF-8', XWB_S_CHARSET);
     $content = XWB_plugin::convertEncoding((string) $data['text'], 'UTF-8', XWB_S_CHARSET);
     //DZ函数
     $content = dhtmlspecialchars($content);
     $content = $this->_replaceSinaUrlToHTML($content);
     $content = $this->_filterContent($content);
     if (empty($content)) {
         return '';
     }
     if (isset($data['pic']) && !empty($data['pic'])) {
         $content .= "<br />" . '<img src="chttp://ww3.sinaimg.cn/large/' . $data['pic'] . '.jpg" />';
     }
     $content = '<img src="' . XWB_plugin::getPluginUrl('images/bgimg/icon_logo.png') . '" />' . $nickname . '(<a href="' . XWB_plugin::getWeiboProfileLink($data['uid']) . '" target="_blank">' . XWB_plugin::L('xwb_weibo') . '</a>): ' . $content;
     return $content;
 }
?>
" rel="stylesheet" type="text/css" />
</head>
<body>

<div class="reg_wrap">
	<!-- 顶部 LOGO -->
	<div class="TopName">
        <div class="logo"></div>
        <a href="<?php 
echo XWB_plugin::getWeiboProfileLink($rst['id']);
?>
" target="_blank" class="logoLink"></a>
        <div class="op">
        	<span>你正在使用 <a href="<?php 
echo XWB_plugin::getWeiboProfileLink($rst['id']);
?>
" target="_blank"  class="userID"><?php 
echo $rst['screen_name'];
?>
</a> 帐号</span>
            <span class="line">|</span>
            <span><a href="http://v.t.sina.com.cn/share/sharechg.php?appkey=<?php 
echo XWB_APP_KEY;
?>
&url=<?php 
echo urlencode($shareData['url']);
?>
&title=<?php 
echo urlencode($shareData['title']);
?>
    	<div class="sign-skin-setting" id="skin-list" onclick="checkSkin(event, this)">
        	<a href="javascript:void(0)"><span class="skin-01"></span></a>
            <a href="javascript:void(0)"><span class="skin-02"></span></a>
            <a href="javascript:void(0)"><span class="skin-03"></span></a>
            <a href="javascript:void(0)"><span class="skin-04"></span></a>
            <a href="javascript:void(0)"><span class="skin-05"></span></a>
            <a href="javascript:void(0)"><span class="skin-06 sign-setting-bg"></span></a>
            <a href="javascript:void(0)"><span class="skin-07 sign-setting-bg"></span></a>
            <a href="javascript:void(0)"><span class="skin-08 sign-setting-bg"></span></a>
            <a href="javascript:void(0)"><span class="skin-09 sign-setting-bg"></span></a>
            <a href="javascript:void(0)"><span class="skin-10 sign-setting-bg"></span></a>
        </div>
        <h3>效果预览</h3>
        <div class="sign-skin-preview">
            <a href="<?php 
echo XWB_plugin::getWeiboProfileLink(XWB_plugin::getBindInfo('sina_uid'));
?>
" target="_blank" id="view_img_wr">
                <img border="0" alt="" src="" id="view_img">
            </a>
            <div class="sign-skin-loading hidden" id="view_img_load"><p>正在加载,请稍候...</p></div>
        </div>
        <div class="btn-area">
        	<span class="xwb-plugin-btn"><input type="submit" value="取消" onclick="parent.XWBcontrol.close('signer');" class="button"></span>
        	<span class="xwb-plugin-btn"><input type="submit" value="确定" onclick="parent.XWBcontrol.profile.onSignerDlgOk(gUid, gSkinNum, keyStr)" class="button"></span>
        </div>
    </div>
    <script type="text/javascript">
        var gUid = "<?php 
echo $myid;
?>