<!--#include file="../inc/conn.asp" -->

<% 
 '===========================================================================================
	'软件名称：126 cms 视频影视管理系统
	'程序版权：126电影               '咨询QQ：479025
	'开发作者：magicblack(479025)    '官方网站：http://www.126oo.com/
	'Copyright (C) 2009 - ... 126oo.com  All Rights Reserved.
	'郑重声明:
	'    1、免费版本请在程序首页保留版权信息，并做上本站LOGO友情连接,商业版本无此要求;
	'    2、任何个人或组织不得以盈利为目的发布,修改,本软件及其他副本上一切关于版权的信息；
	'    3、126电影保留此软件的法律追究权利；
'==========================================================================================
%>

<%
    Dim ID,ID1,ID2,currentviewid
	if app_viewtype=0 Then
		ID = Request.ServerVariables("QUERY_STRING") 
		ID1 = Replace(ID,"."&app_htmlSuffix&"","")
		ID2 = Split(ID1,"-")
		currentviewid= ID2(0)
	else 
		response.Redirect("../index.asp")
	end if
	
	If not isNum(currentviewid) then
	  ShowMsg "请勿传递非法参数！","../index.asp"
	end if
	
Dim rs : Set rs = Database.GetRecordDetail("tbl_datas","D_ID=" & currentviewid)  
if rs.eof then ShowMsg "找不到此ID的影片!","../index.asp"
currenttypeid =  rs("d_type")

	Dim Filepath : Filepath= app_installdir&"template/"&app_templatedir&"/"&app_htmldir&"/view.html"

	TemplateOBJ.html = CacheOBJ.loadFileOnCache("template_",Filepath)
	TemplateOBJ.replaceLabel()
	
	TemplateOBJ.html = replace(TemplateOBJ.html,"[movieinfo:id]",rs("d_id"))
	TemplateOBJ.html = replace(TemplateOBJ.html,"[movieinfo:typeid]",rs("d_type"))
	TemplateOBJ.html = replace(TemplateOBJ.html,"[movieinfo:name]",getData(rs("d_name")))
	TemplateOBJ.html = replace(TemplateOBJ.html,"[movieinfo:colorname]",getColorName(getData(rs("d_name")),getData(rs("d_color"))))
	
	Dim d_pic
	d_pic = getData(rs("d_pic"))
	if inStr(d_pic,"http://") <=0 then d_pic = app_installdir&getData(rs("d_pic"))
	
	TemplateOBJ.html = replace(TemplateOBJ.html,"[movieinfo:pic]",d_pic)
	TemplateOBJ.html = replace(TemplateOBJ.html,"[movieinfo:starring]",getKeywordsList(getData(rs("d_starring")),"&nbsp;"))
	TemplateOBJ.html = replace(TemplateOBJ.html,"[movieinfo:directed]",getData(rs("d_directed")))
	TemplateOBJ.html = replace(TemplateOBJ.html,"[movieinfo:hit]","<script type=""text/javascript"" language=""javascript"" src="""&app_installdir&"inc/service.asp?action=hit&id="&rs("d_id")&"""></script>")
	TemplateOBJ.html = replace(TemplateOBJ.html,"[movieinfo:des]",getData(rs("D_Content")))
	TemplateOBJ.html = replace(TemplateOBJ.html,"[movieinfo:time]",getData(rs("d_AddTime")))
	TemplateOBJ.html = replace(TemplateOBJ.html,"[movieinfo:level]",rs("D_Level"))
	TemplateOBJ.html = replace(TemplateOBJ.html,"[movieinfo:state]",getData(rs("D_state")))
	TemplateOBJ.html = replace(TemplateOBJ.html,"[movieinfo:year]",getData(rs("D_year")))
	TemplateOBJ.html = replace(TemplateOBJ.html,"[movieinfo:source1]",getData(rs("D_Source1")))
	TemplateOBJ.html = replace(TemplateOBJ.html,"[movieinfo:source2]",getData(rs("D_Source2")))
	TemplateOBJ.html = replace(TemplateOBJ.html,"[movieinfo:stint]",getData(rs("D_Stint")))
	
	
	
	TemplateOBJ.html = replace(TemplateOBJ.html,"[movieinfo:playurl1]",getPlayUrlList(1,getData(rs("D_PlayUrl1")),rs("d_id")))
	TemplateOBJ.html = replace(TemplateOBJ.html,"[movieinfo:playurl2]",getPlayUrlList(2,getData(rs("D_PlayUrl2")),rs("d_id")))
	
	TemplateOBJ.html = replace(TemplateOBJ.html,"[movieinfo:link]",getViewLink(rs("d_type"),rs("d_id")))
	TemplateOBJ.html = replace(TemplateOBJ.html,"[movieinfo:typelink]",getTypeLink(rs("d_type")))
	
	TemplateOBJ.html = replace(TemplateOBJ.html,"[movieinfo:typename]",getDicName("tbl_type","t_name","t_id",rs("d_type")))
	TemplateOBJ.html = replace(TemplateOBJ.html,"[movieinfo:language]",getDicName("Tbl_Language","l_name","l_id",rs("D_Language")))
	TemplateOBJ.html = replace(TemplateOBJ.html,"[movieinfo:area]",getDicName("Tbl_Area","a_name","a_id",rs("D_Area")))
	
	TemplateOBJ.replaceComment(currentviewid)
	
	Database.C(rs)
	response.Write TemplateOBJ.html
	
%>