论坛: 网吧专题 标题: 架设电影服务器遇到的问题,高手请进,急!在线等! 复制本贴地址    
作者: lds124 [lds124]    论坛用户   登录
本人没学过ASP,现电影服务器已经做好,只等网站程序修改好了就可以看了。但是遇到一个问题,就是一定要注册才能看电影,请高手帮我修改好,可以不用注册就可以直接观看。请看下面代码:
<!--#include file="articleconn.asp"-->
<!--#include file="IP.asp"-->
<% Response.Expires=0
  dim sql
  dim rs
  articleid=request("film2")
  urlid=request("film1")
  if articleid="" or urlid="" then
  response.write"<script>alert('你这是在干什么呀,不嫌累吗?\n\n\n找过来找过去,怎么也是找不着,哈哈!\n\n\n不用浪费你的宝贵时间拉,还是赶快联系管理员吧!');</Script><script Language=Javascript>location.href = 'index.asp';</script>"
  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
  serverip=rs("serverip")
  okip=Request.Servervariables("HTTP_X_FORWARDED_FOR")
If okip="" Then okip=Request.Servervariables("REMOTE_ADDR")
set rst8=server.createobject("adodb.recordset")
sql="select okip,testok,endtimes from okip where okip='"&okip&"'"
rst8.open sql,conn,1,1
if rst8.eof and rst8.bof then
  if request.cookies("userid")="" or request.cookies("password")="" then
  %>
<script language="JavaScript">
<!--
function checkinput()
{
if (document.search.userid.value=="")
{
alert("请输入用户名!");
document.search.userid.focus();
return false;
}

        if (document.search.password.value=="")
{
alert("请输入密码!");
document.search.password.focus();
return false;
}
        if (document.search.validateCode.value=="")
{
alert("请输入验证码!");
document.search.validateCode.focus();
return false;
}
return true;
}
-->
</script>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>用户登录</title>
<style><!--body, td, p, li, input, select{FONT-SIZE: 9pt; font-family:宋体; COLOR: #ffffff; font-family:Arial}

.fontshadow { width:100%; filter:dropshadow(color=#ffffff,offx=1,offy=1);}

A:link{COLOR: #ffffff; text-decoration: none;}
A:visited{COLOR: #ffffff; text-decoration: none;}
A:Active{color : #ffffff; TEXT-DECORATION: none;}
A:hover{color: #ffffff; TEXT-DECORATION: none;}

A.a1:link{COLOR: #000000; TEXT-DECORATION: none;}
A.a1:visited{COLOR: #000000; TEXT-DECORATION: none;}
A.a1:Active{color : #000000; TEXT-DECORATION: none;}
A.a1:hover{color : #000000; TEXT-DECORATION: none;}

A.a2:link{COLOR: #1B409B; TEXT-DECORATION: none;}
A.a2:visited{COLOR: #1B409B; TEXT-DECORATION: none;}
A.a2:Active{color : #1B409B; TEXT-DECORATION: none;}
A.a2:A:hover{color: #1B409B;T EXT-DECORATION: none;}

.L17{line-height:170%}
.L18{line-height:180%}
.L20{line-height:200%}
--></style>
</head>

<body bgcolor="#0F0DAE" text="0" leftmargin="0">
  <table border="0" cellspacing="0" align=center style="border-collapse: collapse" bordercolor="#111111" width="359" id="AutoNumber1" cellpadding="0">
  <TR>
    <TD align="center" class="title">
    <img border="0" src="images/login-top.jpg" width="359" height="85"></TD>
  </TR>
  <TR>
    <TD valign="top" background="images/login-bg.jpg"  > <table width="90%" border="0" align="center">
              <FORM method=post name=loginform action="userpass.asp"
              onsubmit="if (!formcheck()) return false;">
              <TBODY>
<TR>
                <TD align="center" height=35><FONT
                  color=#3b591b class="fontshadow"></FONT></TD>
                <TD align="left" height=35><FONT
                  color=#3b591b class="fontshadow"><b>用 户 登 录</b></FONT></TD>
                </TR>
              <TR>
                <TD align=right height=25 width="40%"><FONT
                  color=#3b591b class="fontshadow">用户名:</FONT></TD>
                <TD width="65%"><INPUT name=userid
                  onfocus=javascript:this.select(); style="border: 1px solid #3655AA; font-size:9pt;color:#000000"" size=14></TD></TR>
              <TR>
                <TD align=right height=13 width="40%"><FONT
                  color=#3b591b class="fontshadow">密 码:</FONT></TD>
                <TD><INPUT name=password
                  onfocus=javascript:this.select(); style="border: 1px solid #3655AA; font-size:9pt;color:#000000"" size=14 type=password></TD></TR>
              <TR>
                        <TR>
                <TD align=middle colSpan=2 height=25><input type="image" name="Submit" src="images/index-denglu.gif" width="62" height="18">&nbsp;&nbsp
                      <a href="reguser.asp" target=_blank>
  <img border="0" src="images/index-zhuce.gif" width="62" height="18"></a></TD></TR>            </form>
      </table></TD>
  </TR>
  <tr>
    <td><img border="0" src="images/login-bottom.gif" width="359" height="28"></td>
  </tr>
</TABLE>
</body>
</html>
<%response.end
  end if
  set rs=server.createobject("adodb.recordset")
  sql="select serverip,canlook,movietype,title,count from learning where articleid="&articleid
  rs.open sql,conn,1,1
  set rst=server.createobject("adodb.recordset")
  sql="select money,oklook,lasthits,usercount,baoyue from users where userid='"&request.cookies("userid")&"' and password='"&request.cookies("password")&"'"
  rst.open sql,conn,1,3

if rst("baoyue")=1 then

  if rs("canlook")<>0 then
  if now() > rst("money") then

%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>系 统 提 示</title>
<style><!--body, td, p, li, input, select{FONT-SIZE: 9pt; font-family:宋体; COLOR: #ffffff; font-family:Arial}

.fontshadow { width:100%; filter:dropshadow(color=#ffffff,offx=1,offy=1);}

A:link{COLOR: #ffffff; text-decoration: none;}
A:visited{COLOR: #ffffff; text-decoration: none;}
A:Active{color : #ffffff; TEXT-DECORATION: none;}
A:hover{color: #ffffff; TEXT-DECORATION: none;}

A.a1:link{COLOR: #000000; TEXT-DECORATION: none;}
A.a1:visited{COLOR: #000000; TEXT-DECORATION: none;}
A.a1:Active{color : #000000; TEXT-DECORATION: none;}
A.a1:hover{color : #000000; TEXT-DECORATION: none;}

A.a2:link{COLOR: #1B409B; TEXT-DECORATION: none;}
A.a2:visited{COLOR: #1B409B; TEXT-DECORATION: none;}
A.a2:Active{color : #1B409B; TEXT-DECORATION: none;}
A.a2:A:hover{color: #1B409B;T EXT-DECORATION: none;}

.L17{line-height:170%}
.L18{line-height:180%}
.L20{line-height:200%}
--></style>
</head>

<body bgcolor="#0F0DAE" text="0" leftmargin="0">
  <table border="0" cellspacing="0" align=center style="border-collapse: collapse" bordercolor="#111111" width="359" id="AutoNumber1" cellpadding="0">
  <TR>
    <TD align="center" class="title">
    <img border="0" src="images/login-top.jpg" width="359" height="85"></TD>
  </TR>
  <TR>
    <TD valign="top" background="images/login-bg.jpg"  >
<table width="90%" border="0" align="center">
<tbody>
<TR>
                <TD align="center" height=35><FONT color=#000000 class="fontshadow"><b>系 统 提 示</b></FONT></TD>
                </TR>
                    <tr>
                        <td align=right width="105%" height=76>
                        <p align="center"><FONT color=#000000 class="fontshadow">你没有包月或者你包月的时间已经到期!</td>
                      </tr>
                      <</table></TD>
  </TR>
  <tr>
    <td><img border="0" src="images/login-bottom.gif" width="359" height="28"></td>
  </tr>
</TABLE>
</body>
</html>
<%response.end
    end if
  end if
  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,baoyue,usercount from users where userid='"&request.cookies("userid")&"' and password='"&request.cookies("password")&"'"
  rst.open sql,conn,1,3
 
  if rst("baoyue")=0 then

    set rsb00=server.createobject("adodb.recordset")
rsb00.open "select * from tolook where title='"&rs("title")&"' and userid='"&request.cookies("userid")&"'",conn,1,3

set rsb02=server.createobject("adodb.recordset")
rsb02.open "select * from tolook where title='"&rs("title")&"' and userid='"&request.cookies("userid")&"'",conn,1,3

do while not rsb02.eof
i=i+1
rsb02.movenext
loop

    if rsb00.eof and rsb00.bof and rst("usercount")<rs("count") then

 
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>系 统 提 示</title>
<style><!--body, td, p, li, input, select{FONT-SIZE: 9pt; font-family:宋体; COLOR: #ffffff; font-family:Arial}

.fontshadow { width:100%; filter:dropshadow(color=#ffffff,offx=1,offy=1);}

A:link{COLOR: #ffffff; text-decoration: none;}
A:visited{COLOR: #ffffff; text-decoration: none;}
A:Active{color : #ffffff; TEXT-DECORATION: none;}
A:hover{color: #ffffff; TEXT-DECORATION: none;}

A.a1:link{COLOR: #000000; TEXT-DECORATION: none;}
A.a1:visited{COLOR: #000000; TEXT-DECORATION: none;}
A.a1:Active{color : #000000; TEXT-DECORATION: none;}
A.a1:hover{color : #000000; TEXT-DECORATION: none;}

A.a2:link{COLOR: #1B409B; TEXT-DECORATION: none;}
A.a2:visited{COLOR: #1B409B; TEXT-DECORATION: none;}
A.a2:Active{color : #1B409B; TEXT-DECORATION: none;}
A.a2:A:hover{color: #1B409B;T EXT-DECORATION: none;}

.L17{line-height:170%}
.L18{line-height:180%}
.L20{line-height:200%}
--></style>
</head>

<body bgcolor="#0F0DAE" text="0" leftmargin="0">
  <table border="0" cellspacing="0" align=center style="border-collapse: collapse" bordercolor="#111111" width="359" id="AutoNumber1" cellpadding="0">
  <TR>
    <TD align="center" class="title">
    <img border="0" src="images/login-top.jpg" width="359" height="85"></TD>
  </TR>
  <TR>
    <TD valign="top" background="images/login-bg.jpg"  >
<table width="90%" border="0" align="center">
<tbody>
<TR>
                <TD align="center" height=35><FONT color=#000000 class="fontshadow"><b>系 统 提 示</b></FONT></TD>
                </TR>
                      <tr>
                        <td align=right width="105%" height=76>
                        <p align="center"><FONT color=#000000 class="fontshadow">你 点 数 不 够 哦 !</td>
                      </tr>
</table></TD>
  </TR>
  <tr>
    <td><img border="0" src="images/login-bottom.gif" width="359" height="28"></td>
  </tr>
</TABLE>
</body>
</html>
  <%
  response.end
  end if

set rsb01=server.createobject("adodb.recordset")
rsb01.open "select * from tolook where title='"&rs("title")&"' and userid='"&request.cookies("userid")&"'",conn,1,3
    if  rsb01.eof and rsb01.bof or i>4 then

sql="update users set usercount=usercount-'"&rs("count")&"' where userid='"&request.cookies("userid")&"' and password='"&request.cookies("password")&"'"
  conn.Execute(sql)

  end if
  end if
  rst.close
set rst=nothing
  else
  response.cookies("userid")=rst8("testok")
  if now()>rst8("endtimes") then
  response.write"该网吧使用已经到期,请续费。"
  response.end
  end if
  set rst8=nothing
  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("looktime")=Now()
  rsb("lookordown")="在线"
  rsb.update
  rsb.close
  set rsb=nothing
  response.cookies(""&urlid&"")="yes"
  %>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>【<%=rs("title")%>】如果始终在连接状态或者出现人证对话框,可关掉播放窗口重新点播!-</title>
<link href="css/style.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#000000" scroll="no" marginwidth="0" leftmargin="0" topmargin="0" oncontextmenu="window.event.returnValue=false" ondragstart="window.event.returnValue=false" onselectstart="event.returnValue=false">
<script language="JavaScript">
function click(e) {
if (document.all) {
if (event.button==2||event.button==3) {
oncontextmenu='return false';
}
}
if (document.layers) {
if (e.which == 3) {
oncontextmenu='return false';
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;
document.oncontextmenu = new Function("return false;")
</script>
    <% if rs("movietype")="rm" then%>
<table width="100%" height="100%" border="1" cellpadding="0" cellspacing="0">
  <tr>
    <td align="center">
<script LANGUAGE="javaScript">             
var ERR_NonePlayer="播放器提示您:  在线人数已超过300人 请稍后在观看 ";
var ERR_FileNotFind="播放器提示您:  在线人数已超过300人 请稍后在观看 ";
var ERR_NotLocateServer="播放器提示您:  在线人数已超过300人 请稍后在观看 ";
var ERR_UnkownError="播放器提示您:  在线人数已超过300人 请稍后在观看 ";
      </script>
      <script LANGUAGE="VBScript">                                   
on error resume next
RealPlayerG2 = (NOT IsNull(CreateObject("rmocx.RealPlayer G2 Control")))\n');
RealPlayer5 = (NOT IsNull(CreateObject("RealPlayer.RealPlayer(tm) ActiveX Control (32-bit)")))
RealPlayer4 = (NOT IsNull(CreateObject("RealVideo.RealVideo(tm) ActiveX Control (32-bit)")))
if not RealPlayerG2 and RealPlayer5 and RealPlayer4 then
if MsgBox("您的浏览器无法自动下载最新的浏览器插件,是否要下载播放器来播放?", vbYesNo) = vbYes then
window.location = "http://www.i-movie.cn/tools/RealOnePlayer2GOLD.exe"
end if
end if

Sub player_OnBuffering(lFlags,lPercentage)
if (lPercentage=100) then
StartPlay=false
if (FirstPlay) then
FirstPlay=false
end if
exit sub
end if
End Sub
Sub player_OnErrorMessage(uSeverity, uRMACode, uUserCode, pUserString, pMoreInfoURL, pErrorString)
select case player.GetLastErrorRMACode()
case -2147221496
window.alert(ERR_FileNotFind)
case -2147221433,-2147221428,-2147221417,-2147217468
window.alert(ERR_NotLocateServer)
case else
window.alert(ERR_UnkownError)
end select
End Sub
      </script>
<object width="100%" height="100%" name="RP1" id="player" classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA">
        <param name="AUTOSTART" value="-1">
        <param name="SHUFFLE" value="0">
        <param name="PREFETCH" value="0">
        <param name="NOLABELS" value="0">
        <param name="CONTROLS" value="Imagewindow">
        <param name="CONSOLE" value="clip1">
        <param name="LOOP" value="0">
        <param name="NUMLOOP" value="0">
        <param name="CENTER" value="1">
        <param name="MAINTAINASPECT" value="1">
        <param name="BACKGROUNDCOLOR" value="#000000">
        </object></td>
  </tr>
  <tr>
    <td height="60">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
        <td align="center" bgcolor="#000000"> <table  border=1 cellpadding=0 cellspacing=0 width="100%">
                <td width="50"><img src="images/ctrl-fullscreen.gif" alt="如果你窗口播放效果不好,请改用全屏方式播放。" width="50" height="30" border="0" onClick="document.RP1.SetFullScreen()"></td>
            <td> <object classid=clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA height=30 id="RP2"  name="RP2" width=100%>
                <param name="_ExtentX" value="4657">
                <param name="_ExtentY" value="794">
                <param name="AUTOSTART" value="-1">
                <param name="SRC" value="govodurl.asp?urlid=<%=urlid%>&amp;serverip=<%=serverip%>">
                <param name="SHUFFLE" value="0">
                <param name="PREFETCH" value="0">
                <param name="NOLABELS" value="-1">
                <param name="CONTROLS" value="ControlPanel">
                <param name="CONSOLE" value="clip1">
                <param name="LOOP" value="0">
                <param name="NUMLOOP" value="0">
                <param name="CENTER" value="0">
                <param name="MAINTAINASPECT" value="0">
                <param name="BACKGROUNDCOLOR" value="#000000">
                </object></td>
            </tr>
          </table>
          </td>
        </tr>
        <tr>
          <td align="center" bgcolor="#000000"><object classid=clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA height=30 id="RP3"  name="RP3" width=100%>
              <param name="_ExtentX" value="4657">
              <param name="_ExtentY" value="794">
              <param name="AUTOSTART" value="-1">
              <param name="SHUFFLE" value="0">
              <param name="PREFETCH" value="0">
              <param name="NOLABELS" value="-1">
              <param name="CONTROLS" value="StatusBar">
              <param name="CONSOLE" value="clip1">
              <param name="LOOP" value="0">
              <param name="NUMLOOP" value="0">
              <param name="CENTER" value="0">
              <param name="MAINTAINASPECT" value="0">
              <param name="BACKGROUNDCOLOR" value="#000000">
              </object>
<script language="javascript">
player.SetEnableContextMenu(false);
player.SetWantErrors(true);
      </script>
</td>
        </tr>
      </table>
    <%
      rs.close
set rst=nothing
conn.close
set conn=nothing
      response.end
      %>
      </td>
    </tr>
  <%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
    %>
<script language="JavaScript">
function click(e) {
if (document.all) {
if (event.button==2||event.button==3) {
oncontextmenu='return false';
}
}
if (document.layers) {
if (e.which == 3) {
oncontextmenu='return false';
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;
document.oncontextmenu = new Function("return false;")
</script>
<table width="100%" height="100%" border="1" cellpadding="0" cellspacing="0">
  <tr>
    <td align="center">
        <object id="MediaPlayer1" style="left: 0px; top: 0px" type="application/x-oleobject" height="100%" standby="Loading Media Player components..." width="100%" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" codebasr="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" name="msplayer">
        <param name="AutoStart" value="-1">
        <param name="ShowStatusBar" value="-1">
        <PARAM NAME='enableContextMenu' value='false'>
        <param name="Filename" value="<%=rst("ipsip")%><%=real%>">
        </object></td>
        </tr>
      </table>
<%
      rs.close
set rs=nothing
rst.close
set rst=nothing
conn.close
set conn=nothing
      response.end%>
    <%end if%>
  </table>
  </center>
</div>
</body>
</body>
</html>






</body>
</html>

地主 发表时间: 05-03-31 22:41

论坛: 网吧专题

20CN网络安全小组版权所有
Copyright © 2000-2010 20CN Security Group. All Rights Reserved.
论坛程序编写:NetDemon

粤ICP备05087286号