using System; using System.Collections.Generic; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace Mtxfw.VipSite { public partial class Article : System.Web.UI.Page { public String MenuName = String.Empty, ParentID = String.Empty; public Mtxfw.DAL.Article daoArt = new Mtxfw.DAL.Article(); public Mtxfw.Utility.Config config = new Mtxfw.Utility.Config(""); public String value = String.Empty; public int gtype = 0; protected void Page_Load(object sender, EventArgs e) { string hostname = Request.Url.Host; if (!IsPostBack) { String GetID = Request.QueryString["ID"]; if (!String.IsNullOrEmpty(GetID) && Mtxfw.Utility.Tools.HasInt(GetID)) { Int32 ID = int.Parse(Request.QueryString["ID"]); Mtxfw.Model.Article model = daoArt.GetModel(ID); Page.Title = model.Title + " - " + config.webName; MenuName = model.Title; Lit_Time.Text = model.AddTime.ToString(); if (model.Paths != "") { if (model.Paths.IndexOf("http://v.youku.com/v_show/id_") != -1) { //model.Content = "

" + model.Content; //model.Content = "

" + model.Content; //model.Content = "

" + model.Content; model.Content = "

" + model.Content; } } Lit_Content.Text = model.Content; int ParentID = model.ParentID; if (ParentID == 20) { if (!String.IsNullOrEmpty(Request.QueryString["s"])) { if (model.Title.IndexOf("回复:") == -1) { daoArt.UpdateuSel("Seef", 1, ID); } } else { if (String.IsNullOrEmpty(Request.QueryString["t"])) { daoArt.UpdateuSel("Seef", 1, ID); } } } Page.Title = MenuName + " - " + config.webName; Page.MetaDescription = MenuName + " - " + config.webName; Page.MetaKeywords = MenuName + "," + config.webName; Mtxfw.Model.Article MinModel = daoArt.GetMinModel(gtype, ID, ParentID); Mtxfw.Model.Article MaxModel = daoArt.GetMaxModel(gtype, ID, ParentID); if (MinModel != null) { Hy_Min.NavigateUrl = "/Article.aspx?ID=" + MinModel.id.ToString(); Hy_Min.Text = MinModel.Title; } else { Hy_Min.Enabled = false; Hy_Min.Text = "没有了"; } if (MaxModel != null) { Hy_Max.NavigateUrl = "/Article.aspx?ID=" + MaxModel.id.ToString(); Hy_Max.Text = MaxModel.Title; } else { Hy_Max.Enabled = false; Hy_Max.Text = "没有了"; } } else { Response.StatusCode = 404; Response.End(); } } } } }