📄 downfilm.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="HMconnection.asp"-->
<!--#include file="ImageFile.asp"-->
<%
Sub chkLevel(filmGrade)
if session("username")="" or session("grade")="" or session("grade")<filmGrade then
response.Write("<script language='javascript'>alert('对不起,您没有登陆或没有权利观看此片!!');window.close();</script>")
response.End
end if
end Sub
Dim downRS,downSQL,filmGrade,filmID
filmGrade=cint(trim(request.QueryString("grade")))
filmID=trim(request.QueryString("id"))
chkLevel (filmGrade)
set downRS=server.createobject("adodb.recordset")
downSQL="select * from film where id="&filmID
downRS.open downSQL,conn,1,3
if not downRS.EOF then
filmGrade=trim(downRS("grade"))
downRS("hits")=downRS("hits")+1
downRS("monthhits")=downRS("monthhits")+1
downRS("weekhits")=downRS("weekhits")+1
downRS.update
select case filmGrade
case 0
msg="所有人(免费)"
case 1
msg="本站会员"
case 2
msg="VIP会员"
end select
Dim typeRS1,filmtype,typeUrl
set typeRS1=server.createobject("adodb.recordset")
typeRS1.open "select * from Type where typeid="&trim(downRS("typeid")),conn,1,1
filmtype=trim(typeRS1("type"))
typeUrl=trim(typeRS1("WebSite"))
typeRS1.close
set typeRS1=nothing
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>影片下载播放</title>
<link href="http://127.0.0.1/newmovie/images/CNFNOT.ICO" rel="shortcut icon">
<link rel="stylesheet" href="style/style.css" type="text/css">
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" BACKGROUND="style/background-extender.gif">
<br style="line-height:5px;">
<table width="480" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#CCCCCC">
<tr>
<td height="25" align="center" valign="middle">||| <font color="#FF0000"><%=downRS("title")%></font> |||</td>
</tr>
</table>
<table cellspacing=1 cellpadding=3 width="480" bgcolor=#cccccc border=0 height="320" align="center">
<tbody>
<tr valign=top bgcolor=#fbfbfb>
<td align=center noWrap width=71> <font color="#990000">影片名称:</font></td>
<td width=197> <%=downRS("title")%></td>
<td width=190 rowspan=12 valign="middle"> <div align="center"><img src="<%if downRS("imagesname")="" then
moviefile="filmpic/defaut2.jpg"
else moviefile=FIfile(trim(downRS("imagefile")))&trim(downRS("imagesname"))
end if%><%=moviefile%>" width="151" height="214" border="0"></div></td>
</tr>
<tr valign=top bgcolor=#fbfbfb>
<td valign=center noWrap width=71> <div align="center"><font color="#990000">主要演员:
</font></div></td>
<td valign=center width="197"> <%=downRS("mainactors")%></td>
</tr>
<tr valign=top bgcolor=#fbfbfb>
<td align="center" valign=middle noWrap><font color="#990000">电影导演:</font></td>
<td valign=center> <%=downRS("directors")%></td>
</tr>
<tr valign=top bgcolor=#fbfbfb>
<td align=center valign="middle" noWrap><font color="#990000">出品公司:</font></td>
<td valign=center> <%=downRS("productor")%></td>
</tr>
<tr valign=top bgcolor=#fbfbfb>
<td align=center noWrap valign="middle"><font color="#990000">电影产地:</font></td>
<td valign=center> <%=downRS("madein")%></td>
</tr>
<tr align=top bgcolor=#fbfbfb>
<td align=center noWrap valign="middle"><font color="#990000">电影类型:</font></td>
<td> <%=filmtype%></td>
</tr>
<tr align=top bgcolor=#fbfbfb>
<td align=center noWrap><font color="#990000">堞片来源:</font></td>
<td> <%=downRS("madeBy")%></td>
</tr>
<tr align=top bgcolor=#fbfbfb>
<td align=center noWrap width=71><font color="#990000">开放范围:</font></td>
<td width="197"> <%=msg%></td>
</tr>
<tr valign=top bgcolor=#fbfbfb>
<td align=center width="71"> <font color="#990000">影片质量: </font></td>
<td width="197"> <%=downRS("runsystem")%> <%=downRS("quality")%></td>
</tr>
<tr valign=top bgcolor=#fbfbfb>
<td valign=center width="71"> <div align="center"><font color="#990000">观看次数:
</font></div></td>
<td valign=center width="197"> <%=downRS("hits")%></td>
</tr>
<tr valign=top bgcolor=#fbfbfb>
<td valign=center width="71"> <div align="center"><font color="#990000">添加日期:
</font></div></td>
<td valign=center width="197"><font color="#FF9900"><font color="#993300"> <%=downRS("dateandtime")%></font></font></td>
</tr>
<tr valign=top bgcolor=#fbfbfb>
<td align=center width="71" height="33" valign="middle"><font color="#990000">推荐程度:</font>
</td>
<td width="197" valign="middle"> <img name="filmArray" src="Filmarray/<%=downRS("filmlevel")%>.gif" alt="评级图片">
<%if downRS("best") = true then response.write " <font color=red>强烈推荐</font> "%></td>
</tr>
<tr valign=top bgcolor=#fbfbfb>
<td align=center valign="middle"><font color="#990000">下载地址:</font> </td>
<td colspan="2" valign="middle"> <%Dim filmRS2,i,dizhi,j
set filmRS2=server.createobject("adodb.recordset")
filmRS2.open "select * from fimlURL where filmid="&filmID,conn,1,1
j=1
if not (filmRS2.bof and filmRS2.eof) then
for i=trim(filmRS2("FilmStart")) to trim(filmRS2("Filmcount"))
dizhi="<a href='"&typeUrl&trim(filmRS2("filmFile"))&""
if i<10 then
dizhi=dizhi&trim(filmRS2("FilmName"))&i&trim(filmRS2("FilmExtent"))&"'>第0"&i&"集</a> "
else
dizhi=dizhi&trim(filmRS2("FilmName"))&i&trim(filmRS2("FilmExtent"))&"'>第"&i&"集</a> "
end if
response.Write(dizhi)
if (j Mod 9)=0 then response.Write("<br> ")
j=j+1
next
else
response.Write("对不起,数据库出错或暂时没影片!")
end if
%>
</td>
</tr>
</tbody>
</table>
</body>
</html>
<%
'将该影片存入该用户观看列表
dim payRS1,userdRS
set payRS1= server.createobject("adodb.recordset")
set userdRS= server.createobject("adodb.recordset")
payRS1.open "select pricepoit,usedPoit,paymethod,id,Regtime from user where UserName='"&session("username")&"'",conn,1,3
userdRS.open "select * from useDeteil where filmID="&downRS("id")&" and userID="&payRS1("id"),conn,1,3
if payRS1("paymethod")<>1 and userdRS.eof then
if payRS1("paymethod")<>1 and payRS1("pricepoit")<downRS("filmprice") then
filmRS2.close
set filmRS2=nothing
payRS1.close
set payRS1=nothing
downRS.close
set downRS=nothing
set conn=nothing
response.Redirect("nomoney.asp")
response.End()
end if
payRS1("usedPoit")=payRS1("usedPoit")+downRS("filmprice")
payRS1("pricepoit")=payRS1("pricepoit")-downRS("filmprice")
payRS1.update
userdRS.addnew
userdRS("userID")=payRS1("id")
userdRS("filmID")=downRS("id")
userdRS("filmName")=downRS("title")
userdRS("filmPrice")=downRS("filmprice")
userdRS.update
elseif payRS1("paymethod")=1 and userdRS.eof then
if payRS1("Regtime")<now() then
filmRS2.close
set filmRS2=nothing
payRS1.close
set payRS1=nothing
downRS.close
set downRS=nothing
set conn=nothing
response.Redirect("nomoney.asp")
response.End()
end if
userdRS.addnew
userdRS("userID")=payRS1("id")
userdRS("filmID")=downRS("id")
userdRS("filmName")=downRS("title")
userdRS("filmPrice")=downRS("filmprice")
userdRS.update
end if
'关闭数据库连接
userdRS.close
set userdRS=nothing
filmRS2.close
set filmRS2=nothing
payRS1.close
set payRS1=nothing
downRS.close
set downRS=nothing
set conn=nothing
else
response.Write("<script language='javascript'>alert('对不起,数据出错!!');window.close;</script>")
end if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -