<%
if guestvid<>"yes" and UserLogined<>True then
call guesterror()
response.end
end if

dim vid_id,vidcat_id
dim founderr,errmsg,RsHxcms

if request.querystring("vid_id")<>"" then
    if not isInteger(request.querystring("vid_id")) then
    Response.Redirect "show_error.asp?eid=传值参数非法!"
    Response.End
    end if
	vid_id=CLng(request("vid_id"))
else
	vid_id=0
end if

if request.querystring("vidcat_id")<>"" then
  if not isInteger(request.querystring("vidcat_id")) then
    Response.Redirect "show_error.asp?eid=传值参数非法!"
    Response.End
  end if
  vidcat_id=CLng(request("vidcat_id"))
else
  vidcat_id=0
end if

if vid_id>0 then
   sql="select * from vid where vid_id="&vid_id
   set rs=server.createobject("adodb.recordset")
   rs.open sql,conn,1,3
	if rs.bof and rs.eof then
		FoundErr=True
		ErrMsg=ErrMsg & "<br><li>你要找的影视不存在，或者已经被管理员删除！</li>"
	else	
		start="网兜展示中心 - "&rs("title")&""
                vidcat_id=CLng(rs("vidcat_id"))
                rs("hits")=rs("hits")+1
		rs.update
	end if
end if

'=================================================
if FoundErr=True then
	Call HxErrMsg()
	response.end
end if

'=================================================
'过程名：main_vid
'作  用：显示影视位置导航
'参  数：无
'=================================================
sub main_vid()
if vidcat_id>0 then
  Response.Write "您的位置： <a href='index.asp'>"&webname&"</a> >> <a href='movie.asp'>网兜展示中心</a>" & vbCrLf
  sql="select * from vidcat where vidcat_id="&vidcat_id
  set rs3=conn.execute(sql)
  if rs3.eof then
  Response.Redirect "show_error.asp?eid=参数错误，找不到相关的记录!"
  Response.End
  End IF
  if rs3("sid")<>"0" then
     sql="select * from vidcat where vidcat_id="&rs3("sid")
     set rs4=conn.execute(sql)
     Response.Write " >> <a href=""vid.asp?vidcat_id="&rs4("vidcat_id")&""">"&rs4("vidcat_name")&"</a>" 
     rs4.close
     set rs4=nothing
  end if
  Response.Write " >> <a href=""vid.asp?vidcat_id="&rs3("vidcat_id")&""">"&rs3("vidcat_name")&"</a>" 
  rs3.close
  set rs3=nothing 
else
  Response.Write "您的位置： <a href='index.asp'>"&webname&"</a> >> <a href='movie.asp'>网兜展示中心</a>" & vbCrLf
end if
end sub

'=================================================
'过程名：top_vid
'作  用：热门排行
'参  数：n-调用条数,nn-显示长度
'        NewWindows-----是否新窗打开，True为是，False为否
'=================================================
sub top_vid(n,nn,NewWindows)
dim nnn
if NewWindows=True then
nnn="target='_blank'"
else
nnn=""				
end if
Response.Write "<TABLE width='100%' cellSpacing=0 cellPadding=0 border=0 align='center'>" & vbCrLf
set RsHxcms=server.createobject("adodb.recordset")
set RsHxcms=conn.execute("SELECT top "&n&" * FROM vid ORDER by hits DESC,vid_id DESC")
do while not RsHxcms.eof
Response.Write "<tr><td height=22 class=table-xia>&nbsp;<font color=#FF0000>·</font><a href='showvid.asp?vid_id="&RsHxcms("vid_id")&"' Title='影片名称："&RsHxcms("title")&"&#13&#10观看次数："&RsHxcms("hits")&"&#13&#10上传时间："&RsHxcms("dateandtime")&"' "& nnn &">"&gotTopic(RsHxcms("title"),nn)&"</a></td></tr>" & vbCrLf
RsHxcms.movenext
loop
if RsHxcms.bof and RsHxcms.eof then
Response.Write "<tr><td align='center' valign='middle'>当前没有影片！</td></tr>"
end if
RsHxcms.close
set RsHxcms=nothing
Response.Write "</TABLE>" & vbCrLf
end sub

'=================================================
'过程名：best_vid
'作  用：推荐影片
'参  数：n-调用条数,nn-显示长度
'        NewWindows-----是否新窗打开，True为是，False为否
'=================================================
sub best_vid(n,nn,NewWindows)
dim nnn
if NewWindows=True then
nnn="target='_blank'"
else
nnn=""				
end if
Response.Write "<TABLE width='100%' cellSpacing=0 cellPadding=0 border=0 align='center'>" & vbCrLf
set RsHxcms=server.createobject("adodb.recordset")
set RsHxcms=conn.execute("SELECT top "&n&" * FROM vid where isbest = 1 order by vid_id desc")
do while not RsHxcms.eof
Response.Write "<tr><td height=22 class=table-xia>&nbsp;<font color=#FF0000>·</font><a href='showvid.asp?vid_id="&RsHxcms("vid_id")&"' Title='影片名称："&RsHxcms("title")&"&#13&#10观看次数："&RsHxcms("hits")&"&#13&#10上传时间："&RsHxcms("dateandtime")&"' "& nnn &">"&gotTopic(RsHxcms("title"),nn)&"</a></td></tr>" & vbCrLf
RsHxcms.movenext
loop
if RsHxcms.bof and RsHxcms.eof then
Response.Write "<tr><td align='center' valign='middle'>没有推荐影片！</td></tr>"
end if
RsHxcms.close
set RsHxcms=nothing
Response.Write "</TABLE>" & vbCrLf
end sub

'=================================================
'过程名：movie_vid
'作  用：影视调用(分类图片显示)
'参  数：num-------------调用条数
'        fontnum---------标题长度
'        classid--------一级分类调用id，0为全部
'参  数：orders---------调用方式，0为最新歌曲，1为热门影片，2为推荐影片，3为固顶影片
'        ImgWidth   ----图片宽度
'        ImgHeight  ----图片高度
'        NewWindows-----是否新窗打开，True为是，False为否
'=================================================
sub movie_vid(num,fontnum,classid,orders,ImgWidth,ImgHeight,NewWindows)
Response.Write "<TABLE width='100%' cellSpacing=5 cellPadding=0 align=center border=0><TR>" & vbCrLf
dim orders1
if orders=0 then
orders1="vid_id DESC"
elseif orders=1 then
orders1="hits desc,vid_id DESC"
elseif orders=2 then
orders1="isbest desc,vid_id desc"
elseif orders=3 then
orders1="istop desc,vid_id desc"
end if
if classid=0 then
   sql="select top "&num&" * from vid order by "&orders1&""
else
   sql="select top "&num&" * from vid where vidcat_id="&classid&" or vidcat_id in(select vidcat_id from vidcat where sid="&classid&") order by "&orders1&""
end if 
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
do while not rs.eof
dim nnn
if NewWindows=True then
   nnn="target='_blank'"
else
   nnn=""				
end if
Response.Write "<TD>"
Response.Write "<table border='0' align='center' cellpadding='6' cellspacing='1' bgcolor='#C5C5C5'>"
Response.Write "<tr><td align='center' bgcolor='#FFFFFF'><a title='影片名称："&rs("title")&"&#13&#10查看次数："&rs("hits")&"&#13&#10上传时间："&rs("dateandtime")&"' href='showvid.asp?vid_id="&rs("vid_id")&"' "& nnn &"><img border='0' src='"&rs("images")&"' width='"&ImgWidth&"' height='"&ImgHeight&"'></a></TD></TR>" & vbCrLf
Response.Write "</table><table border='0' width='92%' align='center' cellpadding='0' cellspacing='0'>" & vbCrLf
Response.Write "<tr><td><strong>影片名称：</strong><a title='影片名称："&rs("title")&"&#13&#10查看次数："&rs("hits")&"&#13&#10上传时间："&rs("dateandtime")&"' href='showvid.asp?vid_id="&rs("vid_id")&"' "& nnn &">"&gotTopic(rs("title"),fontnum)&"</a></TD></TR>" & vbCrLf
Response.Write "<tr><td><strong>推荐等级：</strong>"&Rs("filmlevel")&"</TD></TR>" & vbCrLf
Response.Write "<tr><td><strong>观看次数：</strong>"&Rs("hits")&"</TD></TR>" & vbCrLf
Response.Write "<tr><td><strong>影片简介：</strong>"&left(Rs("content"),95)&"...</TD></TR>" & vbCrLf
Response.Write "</table></TD>" & vbCrLf
rs.movenext
loop
if rs.eof and rs.bof then
Response.Write "<td align=center>暂时没有影片</td>"
end if
rs.close
set rs=nothing
Response.Write "</TR></table>" & vbCrLf
end sub

'=================================================
'过程名：movietop_vid
'作  用：影视调用(分类图片显示)
'参  数：num-------------调用条数
'        fontnum---------标题长度
'        classid--------一级分类调用id，0为全部
'参  数：orders---------调用方式，0为最新歌曲，1为热门影片，2为推荐影片，3为固顶影片
'        ImgWidth   ----图片宽度
'        ImgHeight  ----图片高度
'        NewWindows-----是否新窗打开，True为是，False为否
'=================================================
sub movietop_vid(num,fontnum,classid,orders,ImgWidth,ImgHeight,NewWindows)
Response.Write "<TABLE width='100%' cellSpacing=5 cellPadding=0 align=center border=0><TR>" & vbCrLf
dim orders1
if orders=0 then
orders1="vid_id DESC"
elseif orders=1 then
orders1="hits desc,vid_id DESC"
elseif orders=2 then
orders1="isbest desc,vid_id desc"
elseif orders=3 then
orders1="istop desc,vid_id desc"
end if
if classid=0 then
   sql="select top "&num&" * from vid order by "&orders1&""
else
   sql="select top "&num&" * from vid where vidcat_id="&classid&" or vidcat_id in(select vidcat_id from vidcat where sid="&classid&") order by "&orders1&""
end if 
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
do while not rs.eof
dim nnn
if NewWindows=True then
   nnn="target='_blank'"
else
   nnn=""				
end if
Response.Write "<TD>"
Response.Write "<table border='0' align='center' cellpadding='3' cellspacing='1' bgcolor='#C5C5C5'>"
Response.Write "<tr><td align='center' bgcolor='#FFFFFF'><a title='影片名称："&rs("title")&"&#13&#10查看次数："&rs("hits")&"&#13&#10上传时间："&rs("dateandtime")&"' href='showvid.asp?vid_id="&rs("vid_id")&"' "& nnn &"><img border='0' src='"&rs("images")&"' width='"&ImgWidth&"' height='"&ImgHeight&"'></a></TD></TR>" & vbCrLf
Response.Write "</table><table border='0' align='center' cellpadding='0' cellspacing='0'>" & vbCrLf
Response.Write "<tr><td align='center'><a title='影片名称："&rs("title")&"&#13&#10查看次数："&rs("hits")&"&#13&#10上传时间："&rs("dateandtime")&"' href='showvid.asp?vid_id="&rs("vid_id")&"' "& nnn &">"&gotTopic(rs("title"),fontnum)&"</a></TD></TR>" & vbCrLf
Response.Write "</table></TD>" & vbCrLf
i=i+1
if i mod 5 = 0 then
Response.Write "</tr>"
end if
rs.movenext
loop
if rs.eof and rs.bof then
Response.Write "<td align=center>暂时没有影片</td>"
end if
rs.close
set rs=nothing
Response.Write "</TR></table>" & vbCrLf
end sub

'=================================================
'过程名：movieconn_vid
'作  用：影视调用(分类图片显示)
'参  数：num-------------调用条数
'        fontnum---------标题长度
'        classid--------一级分类调用id，0为全部
'参  数：orders---------调用方式，0为最新影片，1为热门影片，2为推荐影片，3为固顶影片
'        ImgWidth   ----图片宽度
'        ImgHeight  ----图片高度
'        NewWindows-----是否新窗打开，True为是，False为否
'=================================================
sub movieconn_vid(num,fontnum,classid,orders,ImgWidth,ImgHeight,NewWindows)
Response.Write "<TABLE width='100%' cellSpacing=5 cellPadding=0 align=center border=0><TR>" & vbCrLf
dim orders1
if orders=0 then
orders1="vid_id DESC"
elseif orders=1 then
orders1="hits desc,vid_id DESC"
elseif orders=2 then
orders1="isbest desc,vid_id desc"
elseif orders=3 then
orders1="istop desc,vid_id desc"
end if
if classid=0 then
   sql="select top "&num&" * from vid order by "&orders1&""
else
   sql="select top "&num&" * from vid where vidcat_id="&classid&" or vidcat_id in(select vidcat_id from vidcat where sid="&classid&") order by "&orders1&""
end if 
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
do while not rs.eof
dim nnn
if NewWindows=True then
   nnn="target='_blank'"
else
   nnn=""				
end if
Response.Write "<TD>"
Response.Write "<table border='0' align='center' cellpadding='3' cellspacing='1' bgcolor='#C5C5C5'>"
Response.Write "<tr><td align='center' bgcolor='#FFFFFF'><a title='影片名称："&rs("title")&"&#13&#10查看次数："&rs("hits")&"&#13&#10上传时间："&rs("dateandtime")&"' href='showvid.asp?vid_id="&rs("vid_id")&"' "& nnn &"><img border='0' src='"&rs("images")&"' width='"&ImgWidth&"' height='"&ImgHeight&"'></a></TD></TR>" & vbCrLf
Response.Write "</table><TD width='50%'><table border='0' align='center' cellpadding='0' cellspacing='0'>" & vbCrLf
Response.Write "<tr><td><a title='影片名称："&rs("title")&"&#13&#10查看次数："&rs("hits")&"&#13&#10上传时间："&rs("dateandtime")&"' href='showvid.asp?vid_id="&rs("vid_id")&"' "& nnn &"><strong>"&gotTopic(rs("title"),fontnum)&"</strong></a></TD></TR>" & vbCrLf
Response.Write "<tr><td><strong>简介：</strong>"&left(Rs("content"),47)&"...</TD></TR>" & vbCrLf
Response.Write "</table></TD>" & vbCrLf
i=i+1
if i mod 2 = 0 then
Response.Write "</tr>"
end if
rs.movenext
loop
if rs.eof and rs.bof then
Response.Write "<td align=center>暂时没有影片</td>"
end if
rs.close
set rs=nothing
Response.Write "</TR></table>" & vbCrLf
end sub

'=================================================
'过程名：moviefl_vid
'作  用：首页影片调用
'参  数：num-------------调用条数
'        fontnum---------标题长度
'        classid---------一级分类调用id，0为全部
'        NewWindows------是否新窗打开，True为是，False为否
'=================================================
sub moviefl_vid(num,fontnum,classid,NewWindows)
Response.Write "<TABLE width='100%' cellSpacing=0 cellPadding=0 align=center border=0>" & vbCrLf
if classid=0 then
   sql="select top "&num&" * from vid order by vid_id DESC"
else
   sql="select top "&num&" * from vid where vidcat_id="&classid&" or vidcat_id in(select vidcat_id from vidcat where sid="&classid&") order by vid_id DESC"			
end if 
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
do while not rs.eof
dim nnn
if NewWindows=True then
   nnn="target='_blank'"
else
   nnn=""				
end if
Response.Write "<TD align=right class=table-xia width='10%'>" & vbCrLf
Response.Write "<TABLE width='100%' cellSpacing=0 cellPadding=0 border=0>" & vbCrLf
Response.Write "<tr><td align='center' bgcolor='#FFFFFF'><a title='影片名称："&rs("title")&"&#13&#10查看次数："&rs("hits")&"&#13&#10上传时间："&rs("dateandtime")&"' href='showvid.asp?vid_id="&rs("vid_id")&"' "& nnn &">"&gotTopic(rs("title"),fontnum)&"</a></TD></TR>" & vbCrLf
Response.Write "</table></TD>" & vbCrLf
i=i+1
if i mod 8 = 0 then
Response.Write "</tr>"
end if
rs.movenext
loop
if rs.eof and rs.bof then
Response.Write "<td align=center>暂时没有影片</td>"
end if
rs.close
set rs=nothing
Response.Write "</TR></table>" & vbCrLf
end sub

'=================================================
'过程名：class_vid
'作  用：影片分类——纵排
'参  数：无
'=================================================
sub class_vid()
dim i
Response.Write "<TABLE width='100%' cellSpacing=0 cellPadding=0 border=0 align='center'>" & vbCrLf
sql="select * from vidcat where sid=0"
set rs1=conn.execute(sql)
do while not rs1.eof
response.write "<tr><td>" & vbCrLf
if request("vidcat_id")=cstr(rs1("vidcat_id")) then
response.write "&nbsp;<font color=""#FF0000"">·"&rs1("vidcat_name")&"</font>" & vbCrLf
else
response.write "&nbsp;<font color=""#FF0000"">·</font><a href='vid.asp?vidcat_id="&rs1("vidcat_id")&"'>"&rs1("vidcat_name")&"</a>" & vbCrLf
end if
response.write "</td><td>&nbsp;</td></tr><tr>" & vbCrLf
sql="select * from vidcat where sid="&rs1("vidcat_id") 
set rs2=server.createobject("adodb.recordset")
rs2.open sql,conn,1,1
i=0
do while not rs2.eof
response.write "<td width=""50%"">" & vbCrLf
if request("vidcat_id")=cstr(rs2("vidcat_id")) then
response.write "&nbsp;&nbsp;&nbsp;<font color=""#FF0000"">├ "&rs2("vidcat_name")&"</a></font>" & vbCrLf
else
response.write "&nbsp;&nbsp;&nbsp;<a href='vid.asp?vidcat_id="&rs2("vidcat_id")&"'>├ "&rs2("vidcat_name")&"</a>" & vbCrLf
end if
response.write "</td>" & vbCrLf
if i=1 then response.write "</tr><tr>" & vbCrLf
if i>1 then 
		i=1
	else
		i=i+1
	end if
rs2.movenext
loop
rs1.movenext
loop
rs2.close
set rs2=nothing
rs1.close
set rs1=nothing
Response.Write "</TABLE>" & vbCrLf
end sub

'=================================================
'过程名：class1_vid
'作  用：影片分类——横排
'参  数：无
'=================================================
sub class1_vid()
sql="select * from vidcat where sid=0"
set rs1=conn.execute(sql)
do while not rs1.eof
if request("vidcat_id")=cstr(rs1("vidcat_id")) then
else
response.write "<a href='vid.asp?vidcat_id="&rs1("vidcat_id")&"'></a>"
end if
sql="select * from vidcat where sid="&rs1("vidcat_id") 
set rs2=server.createobject("adodb.recordset")
rs2.open sql,conn,1,1
do while not rs2.eof
if request("vidcat_id")=cstr(rs2("vidcat_id")) then
response.write "&nbsp;<font color=""#FF0000"">·"&rs2("vidcat_name")&"</a></font>"
else
response.write "&nbsp;·<a href='vid.asp?vidcat_id="&rs2("vidcat_id")&"'>"&rs2("vidcat_name")&"</a>"
end if
rs2.movenext
loop
rs1.movenext
loop
rs2.close
set rs2=nothing
rs1.close
set rs1=nothing
end sub

'=================================================
'过程名：search_vid
'作  用：显示影片搜索表单
'参  数：无
'=================================================
sub search_vid()
Response.Write "<form name='form2' method='post' action='vid.asp'><div align=center><input type='radio' name='select' value='title' checked>影片名称&nbsp;<input type='radio' name='select' value='dog'>领衔主演<BR><input type='radio' name='select' value='content'>剧情简介&nbsp;<input type='radio' name='select' value='review'>影视评论<br><input type='text' name='keyword'  size='15' value='搜索关键字' maxlength='50' onfocus=""this.value=''"" class='input'>&nbsp;<input type='submit' name='search'  value='搜索' onmouseover=""this.className='boton'"" onmouseout=""this.className='botoff'""></div></form>" & vbCrLf
end sub

'=================================================
'过程名：displayList_vid
'作  用：带分页功能的影片列表—图片显示
'参  数：nn-标题长度,popvidnum-热门点击数,Hxperpage-每页显示条数
'        ImgWidth   ----图片宽度
'        ImgHeight  ----图片高度
'        NewWindows-----是否新窗打开，True为是，False为否
'=================================================
sub displayList_vid(nn,Hxperpage,ImgWidth,ImgHeight,NewWindows)
dim nnn
if NewWindows=True then
nnn="target='_blank'"
else
nnn=""				
end if
Dim CurPage,Url_Add
Url_Add="?"
If Request.QueryString("Page")<>"" Then
   Curpage=Request.QueryString("Page")
   If IsInteger(Curpage)=False Then Curpage=1
Else
   Curpage=1
End If
if request("keyword")<>"" then
  if instr(request("keyword"),"'")>0 then
    Response.Write "<script language=javascript>alert('搜索参数非法');javascript:history.back();</script>"
    Response.End
  end if
end if
dim mtyid,hx01,hx66010
mtyid=cint(vidcat_id)
set hx01=conn.execute("select vidcat_id,vidcat_name,sid from vidcat order by vidcat_id")
do while not hx01.eof
if mtyid=hx01("sid") then
hx66010=hx66010+" or vidcat_id="&hx01("vidcat_id") '显示页所需变量vid.asp
end if
hx01.movenext
loop
hx01.close
set hx01=nothing
if request.querystring("vidcat_id")<>"" then
   sql="select * from vid where vidcat_id="&vidcat_id&hx66010&" order by istop desc,vid_id DESC"
   Url_Add=Url_Add&"vidcat_id="&vidcat_id&"&"
elseif request("keyword")<>"" and (request("select")="title" or request("select")="dog" or request("select")="content" or request("select")="review") then
   sql="select * from vid where "&request("select")&" like '%"&Jencode(checkspace(request("keyword")))&"%'order by istop desc,vid_id DESC"
   Url_Add=Url_Add&"select="&request("select")&"&keyword="&Server.URLEncode(request("keyword"))&"&"
else
sql="select * from vid order by istop desc,vid_id DESC"
end if
set RsHxcms=server.createobject("adodb.recordset")
RsHxcms.open sql,conn,1,1
Response.Write "<table width='95%' border='1' align='center' cellspacing='0' cellpadding='0' bgcolor='#FFFFFF' bordercolor='#f0f0f0' style='border-collapse: collapse'>" & vbCrLf
Response.Write "<tr>" & vbCrLf
Response.Write "<td height=30 colSpan=3><FONT color=#b70000>&nbsp;<B>·</B></FONT>"
if request("vidcat_id")<> "" then
Response.Write "本分类共有"
elseif request("select")<>"" then
Response.Write "共搜索到"
else
Response.Write "当前共有"
end if
Response.Write "<span>"&RsHxcms.recordcount&"</span>个影片</td>" & vbCrLf
Response.Write "</tr>" & vbCrLf
if not RsHxcms.eof then
   Dim Hx_Nums,MultiPages,i
   RsHxcms.PageSize=Hxperpage
   RsHxcms.AbsolutePage=CurPage
   Hx_Nums=RsHxcms.RecordCount
   MultiPages="<tr><td colspan=""3"" height='28' align=""center"">"&MultiPage(Hx_Nums,Hxperpage,CurPage,Url_Add)&"</td></tr>"
Do Until RsHxcms.EOF OR i=Hxperpage
if RsHxcms("istop")="1" then      
folder="<img src=""img/1.gif"" title=固顶影片>"       
else
folder="<img src=""img/4.gif"" title=普通影片>"       
end if      
if RsHxcms("istop")="0" then      
if RsHxcms("isbest")=1 then
folder="<img src=""img/2.gif"" title=推荐影片>"
elseif RsHxcms("hits")>=popvidnum then
folder="<img src=""img/3.gif"" title=热门影片>"      
else
folder="<img src=""img/4.gif"" title=普通影片>"       
end if      
end if      
Response.Write "<tr>" & vbCrLf
Response.Write "<td colspan=3 height='10'></td>"
Response.Write "</tr>" & vbCrLf
Response.Write "<tr>" & vbCrLf
Response.Write "<td colspan=3 height=25>"
Response.Write "<table width='100%' border='0'>" & vbCrLf
Response.Write "<tr>" & vbCrLf
Response.Write "<TD width='15' align=Center>"&folder&"</TD>"
Response.Write "<td width='*'><a href='showvid.asp?vid_id="&RsHxcms("vid_id")&"'><font color='#ff0000'><B>"&RsHxcms("title")&"</B></font></a></td>"
Response.Write "<td width='140' align='right'>"&RsHxcms("dateandtime")&"&nbsp;&nbsp;</td>"
Response.Write "</tr>" & vbCrLf
Response.Write "</table>" & vbCrLf
Response.Write "</td></tr>" & vbCrLf
Response.Write "<tr>" & vbCrLf
Response.Write "<td rowspan='5' align='center' width='110'><a href='showvid.asp?vid_id="&RsHxcms("vid_id")&"' "& nnn &"><img src="&RsHxcms("images")&" width='"&ImgWidth&"' height='"&ImgHeight&"' border='0' alt='点击进入'></a></td>"
Response.Write "<td width='80' height='22' align=Center>领衔主演</td>"
Response.Write "<td width='400' height='22'>&nbsp;&nbsp;"&left(RsHxcms("dog"),20)&"</td>"
Response.Write "</tr>" & vbCrLf
Response.Write "<tr>" & vbCrLf
Response.Write "<td height='22' align=Center>影片格式</td>"
Response.Write "<td height='22'>&nbsp;&nbsp;"&RsHxcms("runsystem")&"</td>"
Response.Write "</tr>" & vbCrLf
Response.Write "<tr>" & vbCrLf 
Response.Write "<td height='22' align=Center>观看次数</td>"
Response.Write "<td height='22'>&nbsp;&nbsp;"&RsHxcms("hits")&"</td>"
Response.Write "</tr>" & vbCrLf
Response.Write "<tr>" & vbCrLf 
Response.Write "<td height='22' align=Center>推荐等级</td>"
Response.Write "<td height='22'>&nbsp;&nbsp;"&RsHxcms("filmlevel")&"</td>"
Response.Write "</tr>" & vbCrLf
Response.Write "<tr>" & vbCrLf 
Response.Write "<td height='40' align=Center>剧情简介</td>"
Response.Write "<td height='40'>&nbsp;&nbsp;"&left(RsHxcms("content"),100)&"...</td>"
Response.Write "</tr>" & vbCrLf
i=i+1
RsHxcms.movenext
loop
else
if RsHxcms.eof and RsHxcms.bof then
Response.Write "<tr align='center'>" & vbCrLf
Response.Write "<td align=middle height='60' colSpan=3>"
if request("vidcat_id")<> "" then
Response.Write "该分类暂时没有影片"
elseif request("keyword")<>"" then
Response.Write "没有找到包含[<b><font color=red>"&request("keyword")&"</font></b>]的影片！"
else
Response.Write "没有任何影片，请管理员到后台添加！"
end if
Response.Write "</td></tr>" & vbCrLf
end if
end if
Response.Write(MultiPages)
Response.Write "</table>" & vbCrLf
RsHxcms.close
set RsHxcms=nothing
end sub

'=================================================
'过程名：content_vid
'作  用：显示影片标题、内容
'参  数：无
'=================================================
sub content_vid()
if request.querystring("vid_id")="" then
  Response.Write "<script language=javascript>alert('请指定操作的对象！');javascript:history.back();</script>"
  Response.End
else
  if not isInteger(request.querystring("vid_id")) then
    Response.Write "<script language=javascript>alert('参数非法！');javascript:history.back();</script>"
    Response.End
  end if
end if
if rs("Grade")="0" then
hx66Grade="游客身份"
elseif rs("Grade")="1" then
hx66Grade="会员身份"       
elseif rs("Grade")="2" then
hx66Grade="VIP身份"       
end if
Response.Write "<table width=""100%""  border=""1"" align=""center"" cellspacing=""0"" cellpadding=""3"" bgcolor=""#FFFFFF"" bordercolor=""#f0f0f0"" style=""border-collapse: collapse"">" & vbCrLf
Response.Write "<tr>" & vbCrLf 
Response.Write "<td width='100%' colspan=3 align='center' HEIGHT=30><font color=#ff6600><b>"&rs("title")&"</b></font></td>"
Response.Write "</tr>" & vbCrLf 
Response.Write "<tr>" & vbCrLf 
Response.Write "<td height='25' align='center' width='13%'>加入时间</td>"
Response.Write "<td width='57%'>&nbsp;"&rs("dateandtime")&"</td>"
Response.Write "<td rowspan='7' align='center' width='200'>"
if rs("images")<>"http://eove.cn" then
Response.Write "<a href='"&rs("images")&"' title='"&rs("images")&"' target=_blank><img src='"&rs("images")&"' border='0' valign='center'></a>" & vbCrLf
else
Response.Write "<img src='img/nopic.gif' border='0' valign='center'>" & vbCrLf
end if
Response.Write "</td>"
Response.Write "</tr>" & vbCrLf
Response.Write "<tr>" & vbCrLf 
Response.Write "<td height='25' align='center'>领衔主演</td>"
Response.Write "<td>&nbsp;"&rs("dog")&"</td>"
Response.Write "</tr>" & vbCrLf
Response.Write "<tr>" & vbCrLf 
Response.Write "<td height='25' align='center'>影片格式</td>"
Response.Write "<td>&nbsp;"&rs("runsystem")&"</td>"
Response.Write "</tr>" & vbCrLf
Response.Write "<tr>" & vbCrLf 
Response.Write "<td height='25' align='center'>浏览次数</td>"
Response.Write "<td>&nbsp;"&rs("hits")&"</td>"
Response.Write "</tr>" & vbCrLf
Response.Write "<tr>" & vbCrLf 
Response.Write "<td height='25' align='center'>推荐程度</td>"
Response.Write "<td>&nbsp;"&rs("filmlevel")&"</td>"
Response.Write "</tr>" & vbCrLf
Response.Write "<tr>" & vbCrLf 
Response.Write "<td height='25' align='center'>观看权限</td>"
Response.Write "<td>&nbsp;<font color=red>"&hx66Grade&"</font></td>"
Response.Write "</tr>" & vbCrLf
Response.Write "<tr>" & vbCrLf 
Response.Write "<td height='25' align='center'>观看花费</td>"
Response.Write "<td>&nbsp;<font color=red>"&rs("points")&"</font> " &moneyname& "/集</td>"
Response.Write "</tr>" & vbCrLf
Response.Write "<tr>" & vbCrLf 
Response.Write "<td width='100%' colspan=3 style=""display:block;padding:0px 10px;LINE-HEIGHT: 180%"">&nbsp;&nbsp;&nbsp;&nbsp;<b>剧情简介：</b><br>&nbsp;&nbsp;&nbsp;&nbsp;"&formatStr(autourl(rs("content")))&"</td>"
Response.Write "</tr>" & vbCrLf 
if UserLogined<>True then 
    Grade=0
else 
    Grade=Hx66_Grade+1
end if
Response.Write "<tr>" & vbCrLf
Response.Write "<td height='25' align='center'>在线观看</td>"
Response.Write "<td colspan=3>"
%>
<script language="javascript">
function popwin(id,path)
{  window.open("player.asp?id="+id+"&see="+path,"","height=430,width=480,resizable=no,scrollbars=no,status=no,toolbar=no,menubar=no,location=no");
}
</script>
<%
if Grade>=RS("Grade") and Hx66_points>=rs("points") then
if rs("runsystem")<>rm then
dim filmurl,url,line
url ="SELECT * FROM vidurl WHERE filmid = "&rs("vid_id")&" ORDER BY id "
Set filmurl = Server.CreateObject("ADODB.Recordset")
filmurl.open url,Conn,3,1
if filmurl.eof then
response.write "没有影片提供观看"
elseif filmurl.recordcount=1 then
response.write " <a href='javascript:popwin("&filmurl("id")&",1)'><b>全集</b></a>"
elseif filmurl.recordcount=2 then
response.write " <a href='javascript:popwin("&filmurl("id")&",1)'><b>上集</b></a>"
filmurl.movenext
response.write " <a href='javascript:popwin("&filmurl("id")&",2)'><b>下集</b></a>"
elseif filmurl.recordcount=3 then
response.write " <a href='javascript:popwin("&filmurl("id")&",1)'><b>上集</b></a>"
filmurl.movenext
response.write " <a href='javascript:popwin("&filmurl("id")&",2)'><b>中集</b></a>"
filmurl.movenext
response.write " <a href='javascript:popwin("&filmurl("id")&",3)'><b>下集</b></a>"
else
do while not filmurl.eof
for line=1 to 15
if len(filmurl("no"))=1 then
response.write " <a href='javascript:popwin("&filmurl("id")&",0)'>[0"&filmurl("no") & "]</a>"
else
response.write " <a href='javascript:popwin("&filmurl("id")&",0)'>["&filmurl("no") & "]</a>"
end if
filmurl.movenext
if filmurl.eof then exit do
next
response.write "<br>" & vbCrLf
loop
filmurl.close
set filmurl=nothing
end if
end if
elseif Grade<RS("Grade") then
Response.Write "<font color=red>对不起，不能观看此影片，请注册后再观看影片！</font>" & vbCrLf
elseif Hx66_points<rs("points") then
Response.Write "<font color=red>你的点数不足(你当前点数为：" &Hx66_points& ")，无法观看此影片。请与我们联系进行充值。</font>" & vbCrLf
end if
Response.Write "</td>"
Response.Write "</tr>" & vbCrLf
Response.Write "</table>" & vbCrLf
end sub

'=================================================
'过程名：contextual_vid
'作  用：显示影片上下片
'参  数：无
'=================================================
sub contextual_vid()
set RelationArt = conn.execute("select top 1 vid_id,title from vid where vid_id<"&request.querystring("vid_id")&" order by dateandtime desc")
IF RelationArt.eof and relationArt.bof Then
Response.Write "<font color=red>·上个影片：</font>已经没有了<BR> " & vbCrLf    
else
Response.Write "<font color=red>·上个影片：</font><a href=""showvid.asp?vid_id=" & RelationArt(0) & """>" & relationArt(1) & "</a><BR>"   
end if   
Set RelationArt=Nothing
set RelationArt = conn.execute("select top 1 vid_id,title from vid where vid_id>"&request.querystring("vid_id")&" order by vid_id")
IF RelationArt.eof and relationArt.bof Then
Response.Write "<font color=red>·下个影片：</font>已经没有了"   
else
Response.Write "<font color=red>·下个影片：</font><a href=""showvid.asp?vid_id=" & RelationArt(0) & """>" & relationArt(1) & "</a></td>" & vbCrLf  
end if  
RelationArt.close
Set RelationArt=Nothing 
end sub

'=================================================
'过程名：review_vid
'作  用：显示相关影片评论
'参  数：n-显示条数；point_vid-评论开关,1-开启，0-关闭
'=================================================
sub review_vid(n)
dim temp,i,j
if point_vid="1" then
Response.Write "<table align=""center"" width=""98%"" cellspacing=""0"" cellpadding=""0"" style=""word-break:break-all;table-layout:fixed;text-align:left"">" & vbCrLf
if rs("review")<>"" then
temp=split(Trim(rs("review")),"|")
if n>=ubound(temp) then
j=ubound(temp)
else
j=n
end if
for i=1 to j
Response.Write "<tr><td style=""display:block;padding:0px 10px;LINE-HEIGHT: 180%"">"& temp(i) &"</td></tr>"
next
else
Response.Write "<tr><td style=""display:block;padding:0px 10px;LINE-HEIGHT: 180%"">当前没有评论</td></tr>"
end if
Response.Write "<tr><td align=""right"">相关评论<font color=#CC0000> "&rs("reviewcount")&" </font>篇，当前显示最新的<font color=#CC0000> "&n&" </font>篇。&nbsp;&nbsp;<a href=""view.asp?action=vid&vid_id="&rs("vid_id")&"""> [查看更多评论] [发表我的评论]</a>&nbsp;&nbsp;</td></tr>"
Response.Write "</table>"
elseif point_vid="0" then
Response.Write "<table width=""100%"" cellpadding=""5"" cellspacing=""0"" border=""0"">"
Response.Write "<tr><td  align=""center"">【影视评论已关闭】"
Response.Write "</td></tr>"
Response.Write "</table>"
End If
rs.close
set rs=nothing
end sub
%>

