进来

发表于:2007-06-30来源:作者:点击数: 标签:
%Option Explicit% !--#include file=articleconn.asp-- % dim RS, sql ,str SQL ,zhuinew dim url,id,ddd,dddd id= Request.QueryString(id) filmid=request(filmid) if Trim(id) and IsNumeric(id) then Set RS = Server.CreateObject(ADODB.RecordSet) sql
<%Option Explicit%>
<!--#include file="articleconn.asp"-->
<%
dim RS,sql,strSQL,zhuinew
dim url,id,ddd,dddd
id    = Request.QueryString("id")
filmid=request("filmid")
if Trim(id) <> "" and IsNumeric(id) then
Set RS = Server.CreateObject("ADODB.RecordSet")
sql = "select * from url where id = " & id
RS.Open sql, Conn, 3, 3
url=rs("url")
ddd=rs("filmid")
RS.Close
Set RS = nothing
end if
strSQL ="SELECT * FROM film where id=" & ddd
Set zhuinew = Server.CreateObject("ADODB.Recordset")
zhuinew.open strSQL,Conn,3,3
zhuinew("hits")=zhuinew("hits")+1
filmtype=zhuinew("runsystem")
zhuinew.update
zhuinew.Close
Set zhuinew = nothing
Conn.Close
Set Conn = nothing
if filmtype<>"realplay" then
%>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
<SCRIPT LANGUAGE=javascript>
<!--
function Change_Volume(Vol,MaxVolLoc,MinVolLoc)
{
    //计算播放器的音量
    var tVolume;
    tVolume=100-(Vol/(Math.abs(MaxVolLoc-MinVolLoc)+1))*100;
    VodPlayer.SetVolume(tVolume);
}

var strTitle="";
var ERR_NonePlayer="您的系统中没有安装Real Player播放器,请在主页上下载。\n\nMovie播放器将关闭。";
var ERR_FileNotFind="对不起,未发现你要点播的文件。\n\n请更换其他影片!";
var ERR_NotLocateServer="无法定位Movie服务器。请更换其他影片!";
var ERR_UnkownError="在线用户过多,服务器限制,请抢线或稍后观看!";
var FirstPlay=true;
var StartPlay=true;
    
function Player_Play() {
    if (StartPlay)
    {
        VodPlayer.AutoStart=true;
    }
    else
    {
        VodPlayer.DoPlay();
    }
}

function Player_Stop() {
    VodPlayer.DoStop();
    VodPlayer.CurrentPosition=0;
}

function Player_Pause() {
    VodPlayer.DoPause();
}

function readystatechange() {
    switch (document.readyState)
    {
        case "complete":
            try
            {
                parent.frames["chromewinr"].SetPlayControlStatus(true);
                parent.frames["chromewinr"].SetStopControlStatus(false);
                parent.frames["chromewinr"].SetPauseControlStatus(false);
                parent.frames["chromewinr"].Enable_Control();
            }
            catch (e)
            {
            }
            break;
        deault:
            break;
    }
}

function Player_FullScreen() {
    VodPlayer.SetFullScreen();
}
//-->
</SCRIPT>
<SCRIPT LANGUAGE=VBScript>
Sub VodPlayer_OnBuffering(lFlags,lPercentage)
    if (lPercentage=100) then
        StartPlay=false
        call parent.frames("chromewinr").PlayVod()
        if (FirstPlay) then
            FirstPlay=false
            call window.formHandle.submit()
        end if    
        exit sub
    end if
    call parent.frames("chromewinr").DisableVod()
End Sub

Sub VodPlayer_OnErrorMessage(uSeverity, uRMACode, uUserCode, pUserString, pMoreInfoURL, pErrorString)
    select case VodPlayer.GetLastErrorRMACode()
        case -2147221496
            call parent.frames("chromewinr").DisableVod()
            window.alert(ERR_FileNotFind)
        case -2147221433,-2147221428,-2147221417,-2147217468
            call parent.frames("chromewinr").DisableVod()
            window.alert(ERR_NotLocateServer)
        case else
            call parent.frames("chromewinr").DisableVod()
            window.alert(ERR_UnkownError)
    end select
End Sub

Sub VodPlayer_OnPlayStateChange(lNewState)
    select case VodPlayer.GetPlayState()
        case 0:
            call parent.frames("chromewinr").StopVod()
        case 3:
            call parent.frames("chromewinr").PlayVod()
        case 4:
            call parent.frames("chromewinr").PauseVod()
    end select
End Sub
</SCRIPT>
<SCRIPT ID=clientEventHandlersJS LANGUAGE=javascript>
<!--
function document_oncontextmenu() {
    event.returnValue=false;
}

function document_ondragstart() {
    event.returnValue=false;
}

function document_onselectstart() {
    event.returnValue=false;
}
//-->
</SCRIPT>
<SCRIPT LANGUAGE=javascript FOR=document EVENT=oncontextmenu>
<!--
document_oncontextmenu()
//-->
</SCRIPT>
<SCRIPT LANGUAGE=javascript FOR=document EVENT=ondragstart>
<!--
document_ondragstart()
//-->
</SCRIPT>
<SCRIPT LANGUAGE=javascript FOR=document EVENT=onselectstart>
<!--
document_onselectstart()
//-->
</SCRIPT>

</HEAD>
<BODY oncontextmenu="return false" onselectstart="return false" bgColor=black topMargin=0 leftMargin=0 rightMargin=0 bottomMargin=0>

<TABLE border=0 cellpadding=0 cellspacing=0 width=319 height=240>
    <TR><TD align=center vAlign=middle>
        <OBJECT classid="clsid:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA" height=222 id=VodPlayer width=319 VIEWASTEXT>
            <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="Player">
            <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>
                <object CLASSID=clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA HEIGHT=18 ID=Player WIDTH=319 VIEWASTEXT>
                         <param NAME="CONTROLS" VALUE="PositionSlider">
                         <param NAME="CONSOLE" VALUE="_master">
                 </object>
    </TD></TR>
</TABLE>
            
                            
<SCRIPT LANGUAGE=javascript>
<!--
function SetFileName()
{
    var ReadyStatus=new Array(4);
    var i=0;
                    
    for (i=0;i<4;i++)
    ReadyStatus[i]=false;
                    
    if (typeof(parent.frames["chromewint"])!="undefined")
    {
        if (parent.frames["chromewint"].document.readyState=="complete" )
            ReadyStatus[0]=true;
    }
                    
    if (typeof(parent.frames["chromewinl"])!="undefined")
    {
        if (parent.frames["chromewinl"].document.readyState=="complete" )
            ReadyStatus[1]=true;
    }
                    
    if (typeof(parent.frames["chromewinr"])!="undefined")
    {
        if (parent.frames["chromewinr"].document.readyState=="complete" )
            ReadyStatus[2]=true;
    }
                    
    if (typeof(parent.frames["chromewinb"])!="undefined")
    {
        if (parent.frames["chromewinb"].document.readyState=="complete" )
            ReadyStatus[3]=true;
    }
                    
    if (ReadyStatus[0] && ReadyStatus[1] && ReadyStatus[2] && ReadyStatus[3])
    {
        window.clearInterval(timeid);
        try
        {
        
            VodPlayer.SetVolume(50);
            VodPlayer.Source="<%=url%>";
            VodPlayer.SetWantErrors(true);
            VodPlayer.SetEnableContextMenu(false);
            readystatechange();
        
        }
        catch (e)
        {
            window.alert(ERR_NonePlayer);
            top.window.close();
        }
    }
    delete ReadyStatus;
}

var timeid;
            
timeid=window.setInterval("SetFileName()",100,"javascript");
//-->
</SCRIPT>
<%end if%>
我嫌麻烦没有整理,自己看把

原文转自:http://www.ltesting.net