using System;
using System.Web;
using System.Web.UI;
using BoyunBase;
using SiteCore;

public partial class Part_OnlineQQ : System.Web.UI.UserControl
{
    protected void Page_Load( object sender, EventArgs e )
    {
        try {
            if( IsPostBack ) return;

            PartAccess pAcs = new PartAccess( this );
            if( !pAcs.IsReady ) return;

            string qqNum = pAcs.Settings["QQNum"];
            string url = "tencent://message/?uin=" + qqNum + "&Site=1&Menu=yes";    // QQ 临时会话代码
            lnkQQ.HRef = url;

            string pt = pAcs.Parames["partTemplate"];
            string imgurl = "http://wpa.qq.com/pa?p=" + pt + ":" + qqNum + ":1";  // QQ 在线图片路径
            imgQQ.Src = imgurl;

        } catch( Exception ex ) {
            Todo.DebugOut( "加载 Part_OnlineQQ 出现异常：" + ex.Message );
        }
    }
}
