⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 play.asp

📁 仿雅虎论坛静态生成html版 后台管理:admin/admin.asp 用户名:admin 密码:admin TOP/top.htm 顶部模板 left.htm 左边树形菜单模板
💻 ASP
字号:
<html>
<head>
  <title>播放窗口</title>
  <style type="text/css">
	 .quote{margin:0px 0px;border:1px solid #CCCCCC;padding:0px; background:#cccccc;}
	  TD {FONT-SIZE: 9pt; FONT-FAMILY: "宋体", "Arial", "Times New Roman"}
  </style>
</head>
<body leftMargin=0 topMargin=0 marginheight="0" marginwidth="0" class="quote"  oncontextmenu="window.event.returnValue=false" ondragstart="window.event.returnValue=false" onselectstart="event.returnValue=false" Onload="show_secs()">
<!--#include file="../conn.asp"-->
<script>
function movetocenter()
{
var h=document.body.clientHeight;
var w=document.body.clientWidth;
window.moveTo((screen.availWidth-w)/2,(screen.availHeight-h)/2);
}
//延时,以准确获得相关参数。
setTimeout("movetocenter()",100);
</script>

<%
IDx=Request.QueryString("ID")
Set rs = Server.CreateObject("ADODB.Recordset")
sql="SELECT top 1 * from DownFile where ID="&IDx&" "
rs.open sql,conn,1,1

IF rs.bof and rs.eof then
   Response.write "参数有误!!!!!"
   rs.close
Else
  lx=rs("lx")
  ks=rs("YyPt")
  tj=rs("TJ")
  tjnum=rs("TJNum")
  dress=rs("PlayDress")
  username=Request.Cookies("username")
  user=rs("user")
  rs.close
  
  Set rs = Server.CreateObject("ADODB.Recordset")
  sql="SELECT top 1 * from 用户资料 where 用户名='"&username&"' "
  rs.open sql,conn,1,3
  if not(rs.BOF and rs.EOF) then
      play=1
      select case tj
      case "支付金钱"
          if rs("金钱")<cint(tjnum) then
              Response.Write "金钱不足"
              play=0
          else
              rs("金钱")=rs("金钱")-cint(tjnum)
              rs.Update
              rs.Close
              conn.execute("update 用户资料 set 金钱=金钱+"&tjnum&" where 用户名='"&User&"' ")'登陆后要处理的帐号数据
              play=1
          end if
      case "声望限止"
          if rs("声望")<cint(tjnum) then
              Response.Write "声望不足"
              play=0
          end if
      case "积分限止"
          if rs("积分")<cint(tjnum) then
              Response.Write "积分不足"
              play=0
          end if
      case "经验限止"
          if rs("经验")<cint(tjnum) then
              Response.Write "经验不足"
              play=0
          end if
      case "帖子数限止"
          if (rs("主题数")+rs("回帖数"))<cint(tjnum) then
              Response.Write "帖子数不足"
              play=0
          end if
      end select
  else
      Response.Write "你尚未登陆"
      play=0
  end if
  
  if lx=1 and play=1 then
    Response.Write "<form name=fm0 onSubmit=0>"
    if ks="RealPlay" then
        Response.Write "<OBJECT classid=clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA id=RAOCX width=500 height=350><PARAM NAME=SRC VALUE="&dress&"><PARAM NAME=CONSOLE VALUE=Clip1><PARAM NAME=CONTROLS VALUE=imagewindow><PARAM NAME=AUTOSTART VALUE=true></OBJECT><br><OBJECT classid=CLSID:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA height=32 id=video2 width=500><PARAM NAME=SRC VALUE="&dress&"><PARAM NAME=AUTOSTART VALUE=-1><PARAM NAME=CONTROLS VALUE=controlpanel><PARAM NAME=CONSOLE VALUE=Clip1></OBJECT>"
        %><input type="text" name="time_spent" size="5" onFocus="this.blur()" style="border-style: groove; border-width: 1; background-color: #EEEEEE">
          <input type="button" onclick="if (document.RAOCX.GetPlayState()==3) document.RAOCX.SetFullScreen()" value="全屏显示  ESC返回" style="border-style: ridge; border-width: 1" id=button2 name=button2><%
    end if
    
    if ks="MediaPlay" then
        %><object align=middle classid=CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95 id=phxx width=500 height=380 name="msplayer"><param name=ShowStatusBar value=-1><param name=Filename value=<%=dress%>><embed type=application/x-oleobject codebase=http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701 flename=mp src=<%=dress%> width=500 height=380></embed></object>
          <input type="text" name="time_spent" size="5" onFocus="this.blur()" style="border-style: groove; border-width: 1; background-color: #EEEEEE">
          <input type=button value="全屏播放  ESC返回" onclick="msplayer.DisplaySize=3;"><%
    end if
    
    if ks="QuickTime" then
        %><embed src=<%=dress%> width="500" height="380" autoplay="true" loop="false" controller=true playeveryframe=false cache=false scale=TOFIT bgcolor=#000000 kioskmode=false targetcache=false pluginspage="http://www.apple.com/quicktime/"><%
    end if
    Response.Write "</form>"
  end if
  
  if lx=2 and play=1 then
    if ks="RealPlay" then
        Response.Write "<OBJECT classid=CLSID:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA height=32 id=video2 width=300><PARAM NAME=SRC VALUE="&dress&"><PARAM NAME=AUTOSTART VALUE=-1><PARAM NAME=CONTROLS VALUE=controlpanel><PARAM NAME=CONSOLE VALUE=Clip1></OBJECT>"
    end if
    
    if ks="MediaPlay" then
       %><embed width="300" height="32" src=<%=dress%>><%
    end if
  end if
  
  if play=0 then Response.Write "<form name=fm0><input type=hidden name=time_spent></form>" end if
  
End IF
%>

<script language="JAVASCRIPT">
<!-- Begin
var ap_name = navigator.appName;
var ap_vinfo = navigator.appVersion;
var ap_ver = parseFloat(ap_vinfo.substring(0,ap_vinfo.indexOf('(')));

var time_start = new Date();
var clock_start = time_start.getTime();
var dl_ok=false;


function init ()
{
if(ap_name=="Netscape" && ap_ver>=3.0)
dl_ok=true;
return true;
}

function get_time_spent ()
{
var time_now = new Date();
return((time_now.getTime() - clock_start)/1000);
}

function show_secs () 
{
var i_total_secs = Math.round(get_time_spent());
var i_secs_spent = i_total_secs % 60;
var i_mins_spent = Math.round((i_total_secs-30)/60);
var s_secs_spent = "" + ((i_secs_spent>9) ? i_secs_spent : "0" + i_secs_spent);
var s_mins_spent = "" + ((i_mins_spent>9) ? i_mins_spent : "0" + i_mins_spent);
document.fm0.time_spent.value = s_mins_spent + ":" + s_secs_spent;
window.setTimeout('show_secs()',1000);
}
init();
window.setTimeout('show_secs()',1);
//  End -->
</script>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -