回复:(cyyu_ryh)应该在限制的时间内把你要播放的电...
不好意思,可能是我没说清楚,现附上全码,请高手帮忙!急啊!
<!--#include file="conn.asp"-->
<%
see=request("s")
id=request("id")
set rs=server.createobject("adodb.recordset")
sql="select * from movie where id="&id
rs.open sql,conn,1,1
select case see
case 1
real=rs("movie1")
case 2
real=rs("movie2")
case 3
real=rs("movie3")
case 4
real=rs("movie4")
case 5
real=rs("movie5")
case 6
real=rs("movie6")
case 7
real=rs("movie7")
case 8
real=rs("movie8")
case 9
real=rs("movie9")
case 10
real=rs("movie10")
case 11
real=rs("movie11")
case 12
real=rs("movie12")
case 13
real=rs("movie13")
case 14
real=rs("movie14")
case 15
real=rs("movie15")
case 16
real=rs("movie16")
case 17
real=rs("movie17")
case 18
real=rs("movie18")
case 19
real=rs("movie19")
case 20
real=rs("movie20")
case 21
real=rs("movie21")
case 22
real=rs("movie22")
case 23
real=rs("movie23")
case 24
real=rs("movie24")
case 25
real=rs("movie25")
case 26
real=rs("movie26")
case 27
real=rs("movie27")
case 28
real=rs("movie28")
case 29
real=rs("movie29")
case 30
real=rs("movie30")
case 31
real=rs("movie31")
case 32
real=rs("movie32")
case 33
real=rs("movie33")
case 34
real=rs("movie34")
case 35
real=rs("movie35")
case 36
real=rs("movie36")
case 37
real=rs("movie37")
case 38
real=rs("movie38")
case 39
real=rs("movie39")
case 40
real=rs("movie40")
case 41
real=rs("movie41")
case 42
real=rs("movie42")
case 43
real=rs("movie43")
case 44
real=rs("movie44")
case 45
real=rs("movie45")
case 46
real=rs("movie46")
case 47
real=rs("movie47")
case 48
real=rs("movie48")
case 49
real=rs("movie49")
end select
%>
<HTML><HEAD><TITLE>电影播放器</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<link rel="stylesheet" href="../css/web.css">
<style>
.zt{
color:#F35406;
font-size:12px;
}
</style>
<script language="JavaScript" src="../css/fade.js"></script>
<style type="text/css">
<!--
td { font-size: 12px; line-height: 17px }
body { font-size: 12px; line-height: 17px }
p { margin-top: 1px; margin-bottom: 1px }
a:link { text-decoration: none; color: black }
a:visited { text-decoration: none; color: black }
a:active { text-decoration: none }
a:hover { text-decoration: underline; color: red }
.style2 {
color: #FF9900;
font-weight: bold;
}
.STYLE3 {color: #FF0000}
-->
</style>
<SCRIPT>
//加入页面保护
function rf()
{return false; }
document.oncontextmenu = rf
function keydown()
{if(event.ctrlKey ==true || event.keyCode ==78 || event.shiftKey ==true){return false;} }
document.onkeydown =keydown
function drag()
{return false;}
document.ondragstart=drag
function stopmouse(e) {
if (navigator.appName == 'Netscape' && (e.which == 3 || e.which == 2))
return false;
else if
(navigator.appName == 'Microsoft Internet Explorer' && (event.button == 2 || event.button == 3)) {
alert("欢迎你的观赏--谢谢");
return false;
}
return true;
}
document.onmousedown=stopmouse;
if (document.layers)
window.captureEvents(Event.MOUSEDOWN);
window.onmousedown=stopmouse;
</SCRIPT>
</head>
<body marginwidth="0" leftmargin="0" topmargin="0" bgcolor="#000000">
<script language="javaScript">
<!--
var day = new Date( ); time = day.getHours( );
if ((time>=8) && (time<11))
{
alert('8:00-11:00 好好工作吆!');
window.close();
}
else if ((time>=14) && (time<16))
{
alert('14:00-16:00 好好工作吆!');
window.close();
}
//--->
</script>
<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>
<table border="0" cellspacing="0" width="100%" cellpadding="0">
<tr>
<td width="100%" align="center">
<% if rs("movietype")="rm" then%>
<table border="0" cellspacing="0" style="border-collapse: collapse" width="460" id="AutoNumber1" bgcolor="#F0F0F0" cellpadding="0" align="center" height="10">
<tr align="center">
<td height="20" colspan="3" background="../images/menu_bg.jpg"><span class="STYLE3">一张一弛,工作之余欢迎您观看精彩影片,祝愉快!</span> </td>
</tr>
<tr>
<td width="283" height="1" align="center" background="../images/menu_bg.jpg">您现在观看的是---《<%=rs("name")%>》</td>
<form name="fm0" onSubmit="0">
<td width="42" height="1" bgcolor="#E0E0E0"> <input type="text" name="time_spent" size="5" onFocus="this.blur()" style="border-style: groove; border-width: 1; background-color: #EEEEEE"></td>
</form>
<td width="52" height="1" bgcolor="#E0E0E0"> <input type="button" onClick="if (document.player.GetPlayState()==3) document.player.SetFullScreen()" name value="全屏播放" style="border-style: ridge; border-width: 1">
</tr>
</table>
<object id="player" name="player" classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" width="458" height="300">
<param name="AUTOSTART" value="-1">
<param name="SRC" value="<%=real%>">
<param name="CONTROLS" value="Imagewindow">
<param name="CONSOLE" value="clip1">
<param name="SHUFFLE" value="0">
<param name="PREFETCH" value="0">
<param name="NOLABELS" value="0">
<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>
<br>
<object ID="RP2" CLASSID="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" WIDTH="460" HEIGHT="60">
<param name="AUTOSTART" value="-1">
<param name="SRC" value="<%=real%>">
<PARAM NAME=CONTROLS VALUE=ControlPanel,StatusBar>
<param name="CONSOLE" value="clip1">
<param name="SHUFFLE" value="0">
<param name="PREFETCH" value="0">
<param name="NOLABELS" value="0">
<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>
<%elseif rs("movietype")="mms" then %>
<table border="0" cellspacing="0" style="border-collapse: collapse" width="460" id="AutoNumber1" bgcolor="#F0F0F0" cellpadding="0" align="center" height="10">
<tr>
<form name="fm0" onSubmit="0">
<td width="42" height="1" bgcolor="#E0E0E0">
<input type="text" name="time_spent" size="5" onFocus="this.blur()" style="border-style: groove; border-width: 1; background-color: #EEEEEE"></td>
</form>
</tr>
</table>
<object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" height="378" id="MediaPlayer1" width="460">
<param name="AutoStart" value="-1">
<param name="ShowStatusBar" value="-1">
<param name="Filename" value="<%=real%>">
</object>
<%elseif rs("movietype")="htm" then %>
<table border="0" cellpadding="0" cellspacing="0" width="460" height="400">
<tr><td width="460" height="400"><p align="center">
<iframe width="460" height="400" noresize target="main" border="0" frameborder="0" scrolling="no" framespacing="0" src="<%=real%>" name="mov"></iframe></td>
</tr>
</table>
<%end if%></td>
</tr>
</table>
</body>
</html>
<%
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
[此贴子已经被作者于2007-3-20 13:34:01编辑过]