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 UUN;
using System.Data.SqlClient;
using System.IO;
using System.Text;

public partial class Admin_BiaoQianShuoMing : System.Web.UI.Page
{
    private 访问 访问;
    protected void Page_Load(object sender, EventArgs e)
    {
        访问 = new 访问(this.Context);
        访问.开始处理("标签说明", "网站后台", "标签说明", new 访问.回调委托(ZhiXing));
        访问.关闭连接();
    }

    private void ZhiXing()
    {
        访问.验证管理员();

        String 标签数据 = Request.QueryString["f"];
        int ID = Convert.ToInt32(Request.QueryString["ID"]);

        /*
        String 标签组, 标签;
        获取标签(标签数据, out 标签组, out 标签);
        
        SqlCommand 语句 = new SqlCommand("SELECT * FROM [" + 程序.数据表前缀 + "模板_标签] WHERE [标签组]=@标签组 AND [标签名称]=@标签名称", 访问.连接);
        语句.Parameters.Add("@标签组", SqlDbType.NVarChar).Value = 标签组;
        语句.Parameters.Add("@标签名称", SqlDbType.NVarChar).Value = 标签;

        Hashtable 模板标签 = 常用.SQL_获取(语句);

        if (模板标签 == null)
            throw new Exception("模板标签不存在");*/
        设置 模板标签 = new 设置(File.ReadAllText(Server.MapPath("~/Data/TemplateData/Tag/" + 标签数据.Replace("/", "-") + "/" + ID + ".xml"), Encoding.UTF8));


        Label1.Text = (模板标签["标签代码"].ToString());
    }

    private void 获取标签(String 标签数据, out String 标签组, out String 标签)
    {
        标签组 = 标签数据.Substring(0, 标签数据.LastIndexOf('/'));
        标签 = 标签数据.Substring(标签数据.LastIndexOf('/') + 1);
    }
}
