95 lines
5.5 KiB
C#
95 lines
5.5 KiB
C#
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 = "<p align=\"center\"><embed id=\"video1\" allowfullscreen=\"true\" allowscriptaccess=\"never\" loop=\"false\" menu=\"true\" play=\"true\" swLiveConnect=\"true\" src=\"http://player.youku.com/player.php/sid/" + model.Paths.Replace("http://v.youku.com/v_show/id_", "").Replace(".html", "") + "/v.swf\" quality=\"high\" width=\"650\" height=\"500\" align=\"middle\" type=\"application/x-shockwave-flash\"></embed></p>" + model.Content;
|
|
//model.Content = "<p align=\"center\"><embed src=\" http://static.youku.com/v1.0.0149/v/swf/qplayer_rtmp.swf?VideoIDS=" + model.Paths.Replace("http://v.youku.com/v_show/id_", "").Replace(".html", "") + "&winType=adshow&isAutoPlay=true\" quality=\"high\" width=\"600\" height=\"480\" align=\"middle\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\"></embed></p>" + model.Content;
|
|
//model.Content = "<p align=\"center\"><embed type=\"application/x-shockwave-flash\" src=\"http://static.youku.com/v1.0.0223/v/swf/player.swf?VideoIDS=" + model.Paths.Replace("http://v.youku.com/v_show/id_", "").Replace(".html", "") + "\" width=\"600\" height=\"500\" bgcolor=\"#FFFFFF\" quality=\"high\" allowfullscreen=\"true\" wmode=\"opaque\" allowscriptaccess=\"always\" flashvars=\"ShowId=0&Cp=authorized&THX=on&Tid=0&isAutoPlay=true&Version=/v1.0.0751&show_ce=0&winType=interior&showloop=false\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"></embed></p>" + model.Content;
|
|
model.Content = "<p align=\"center\"><embed src=\"http://static.youku.com/v1.0.0149/v/swf/loader.swf?VideoIDS=" + model.Paths.Replace("http://v.youku.com/v_show/id_", "").Replace(".html", "") + "&winType=adshow&isAutoPlay=true\" quality=\"high\" width=\"600\" height=\"500\" align=\"middle\" allowScriptAccess=\"never\" allowNetworking=\"internal\" allowfullscreen=\"true\" autostart=\"0\" type=\"application/x-shockwave-flash\"></embed></p>" + 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();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |