using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml;
using System.Text;
public partial class usercontrol_bottom : System.Web.UI.UserControl
{
    BasePage s = null;
    protected void Page_Load(object sender, EventArgs e)
    {
        s = (BasePage)this.Page;
        si=s.getSiteInfo();
        GetLink();
    }public SiteInfo si = null;
    void GetLink()
    {
        try
        {

            XmlDocument doc = new XmlDocument();
            doc.Load(Server.MapPath(s.XmlLink));
            XmlNodeList list = doc.SelectNodes("/Links/link[@LinkType='1']");
            StringBuilder sb = new StringBuilder();
            sb.Append("<span style=\"font-weight:bold;\">友情连接</span>");
            foreach (XmlNode node in list)
            {
                sb.AppendFormat("<li><a target=\"_blank\" href=\"{0}\" title=\"{1}\">{2}</a></li>", node.Attributes["siteUrl"].Value, node.Attributes["siteDesc"].Value, node.Attributes["siteName"].Value);
            }
            this.linkYQ.InnerHtml = sb.ToString();
        }
        catch (Exception ex)
        {
            this.linkYQ.InnerHtml =  Server.HtmlEncode(ex.Message);
        }
    }
}
