求ASP代码修改--电影观看
<!--#include file="articleconn.asp"-->
<%
dim sql
dim rs
articleid=request("film2")
urlid=request("film1")
if request.cookies("userid")="" or request.cookies("password")="" or application(""&request.cookies("userid")&"")="" then
%>
-------------你没登陆,<a href=login.asp>请登陆</a>-----------
<%response.end
end if
set rs=server.createobject("adodb.recordset")
sql="select serverip,canlook,movietype,title from learning where articleid="&articleid
rs.open sql,conn,1,1
set rst=server.createobject("adodb.recordset")
sql="select money,oklook,lasthits from users where userid='"&request.cookies("userid")&"' and password='"&request.cookies("password")&"'"
rst.open sql,conn,1,3
if rs("canlook")<>0 then
if now() > rst("money") then%>
-------------你包月的时间已经到期!请重新续费--------------
<%response.end
end if
end if
serverip=rs("serverip")
if rs("canlook")>rst("oklook") then%>
----------------等级不够,请返回-------------------
<%response.end
end if
tdate=date()
if rst("lasthits")=tdate then
sql="update users set dnlook=dnlook+1,nlook=nlook+1 where userid='"&request.cookies("userid")&"' and password='"&request.cookies("password")&"'"
conn.Execute(sql)
else
conn.Execute("update users set dnlook=1,lasthits='"&tdate&"' where
userid='"&request.cookies("userid")&"' and password='"&request.cookies("password")&"'")
end if
set rst=server.createobject("adodb.recordset")
sql="select money,nlook,oklook,lasthits,dnlook from users where
userid='"&request.cookies("userid")&"' and password='"&request.cookies("password")&"'"
rst.open sql,conn,1,3
if rst("oklook")<2 then
if rst("dnlook")>4 then '每天看四集%>
---------每天只能看四集------------------
<%response.end
end if
elseif rst("oklook")<3 then
if rst("dnlook")>8 then '每天看八集%>
---------每天只能看8集------------------
<%response.end
end if
end if
set rsb=server.createobject("adodb.recordset")
rsb.open "select * from tolook",conn,1,3
rsb.addnew
rsb("title")=rs("title")
rsb("userip")=request.servervariables("remote_addr")
rsb("userid")=request.cookies("userid")
rsb("lookordown")="在线"
rsb.update
rsb.close
set rsb=nothing
response.cookies(""&urlid&"")="yes"
%>
<% if rs("movietype")="rm" then%>
------------RM播放器观看代码,略----------
<%
rs.close
set rs=nothing
rst.close
set rst=nothing
conn.close
set conn=nothing
response.end
%>
<%elseif rs("movietype")="md" then
set rst=server.createobject("adodb.recordset")
sql="select url from movieurl where id="&urlid
rst.open sql,conn,1,1
real=rst("url")
set rst=server.createobject("adodb.recordset")
sql="select * from movie where id="&serverip
rst.open sql,conn,1,1
%>
------------MD播放器观看,代码略----------
<%
rs.close
set rs=nothing
rst.close
set rst=nothing
conn.close
set conn=nothing
response.end%>
<%elseif rs("movietype")="mov" then
set rst=server.createobject("adodb.recordset")
sql="select url from movieurl where id="&urlid
rst.open sql,conn,1,1
real=rst("url")
set rst=server.createobject("adodb.recordset")
sql="select * from movie where id="&serverip
rst.open sql,conn,1,1
%>
------------MOV播放器观看,代码略----------
<%end if%>
<%
rs.close
set rs=nothing
rst.close
set rst=nothing
conn.close
set conn=nothing
%>
-------------全部结束-----
以上页面是必须成功登陆用户而且符合若干条件才能观看影片代码!
我想修改的是,没有登陆的用户进来时,系统检测帐号为空时则自动成为一个系统已经注册的用户观看!
比如userid="12321" password="111111" 这个12321帐户可以正常观看!
请高手给予帮助,谢谢!