using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

namespace JuSNS.Web.Inc.Ajax
{
    public partial class playmovie : JuSNS.UI.Page.UserPage
    {
        JuSNS.Home.Movie MD = new JuSNS.Home.Movie();
        protected void Page_Load(object sender, EventArgs e)
        {
            string play_urllist="youku=";
            play_urllist=play_urllist+"&iask=";
            play_urllist=play_urllist+"&tudou=";
            play_urllist=play_urllist+"&56=";
            play_urllist=play_urllist+"&ouou=";
            play_urllist=play_urllist+"&tvix=";
            play_urllist=play_urllist+"&6rooms=";
            string contentStr = string.Empty;
            JuSNS.Model.MovieInfo MM = new JuSNS.Model.MovieInfo();
            string QURL = Request.QueryString["QURL"];
            MM = MD.GetMovieInfo(Convert.ToInt32(Request.QueryString["ID"]));
            contentStr += "<div class=\"f_box1\"><div class=\"boxtitle chengse\" title=\"按住此处拖动\"><div class=\"nl bold\">正在播放：" + MM.Title + "</div><div class=\"nr\"><a href=\"javascript://\" onclick=\"javascript:closediv($('movie_idwindow'));\">关闭</a></div></div>";
            contentStr += "<div class=\"moviecontent\">";

            if (Request.QueryString["p"] =="1")
            {
                //播放地址2
                if (MM.zt_dy1 != null && MM.zt_dy1 != string.Empty)
                {
                    if (MM.zt_dy1 == "youku" || MM.zt_dy1 == "56" || MM.zt_dy1 == "tudou" || MM.zt_dy1 == "iask" || MM.zt_dy1 == "ouou" || MM.zt_dy1 == "tvix" || MM.zt_dy1 == "6rooms")
                    {
                        contentStr += "<iframe src=\""+rooDir+"/inc/ajax/movie/play.html?" + QURL + "," + MM.zt_dy1 + "\" frameborder=0 align=\"center\"  scrolling=\"no\" width=588 height=468  />";
                    }
                    else if (MM.zt_dy1 == "bobo")
                    {
                        contentStr += "<Object id=\"BoBo\" width=\"500\" height=\"430\" classid=\"clsid:EC0978ED-24E3-403C-AB7A-060E388553E6\" codebase=\"http://www.17bobo.com/Software/BoBo_ActiveX_V3.ocx\"><PARAM NAME=\"MaxLinkCount\"      VALUE=100><PARAM NAME=\"MaxCacheTimeS\"     VALUE=120><PARAM NAME=\"MinCacheTimeS\"     VALUE=60><PARAM NAME=\"MaxCacheSizeMB\"    VALUE=150><PARAM NAME=\"EnabledTcpTurbo\"   VALUE=1><PARAM NAME=\"MaintainAspect\"    VALUE=1><PARAM NAME=\"ActName\" 		VALUE=\"" + QURL + "\"></Object>";
                        contentStr += "<div>要观看此电影，请安装<a href=\"http://www.17bobo.com\" target=\"_blank\">BOBO P2P播放软件</a></div>";
                    }
                    else if (MM.zt_dy1 == "qvod")
                    {
                        contentStr += "<object classid=\"clsid:F3D0D36F-23F8-4682-A195-74C92B03D4AF\"  height=\"'500\" width=\"430\" id=\"QvodPlayer\" name=\"QvodPlayer\" onError=\"\"if(window.confirm('请您先安装QvodPlayer软件,然后刷新本页才可以正常播放.'))\"\"><PARAM NAME=\"URL\" VALUE=\"" + QURL + "\"><param name=\"Autoplay\" value=\"1\"></object>";
                    }
                    else if (MM.zt_dy1 == "real")
                    {
                        contentStr += "<object classid=\"clsid:F3D0D36F-23F8-4682-A195-74C92B03D4AF\"  height=\"'500\" width=\"430\" id=\"QvodPlayer\" name=\"QvodPlayer\" onError=\"\"if(window.confirm('请您先安装QvodPlayer软件,然后刷新本页才可以正常播放.'))\"\"><PARAM NAME=\"URL\" VALUE=\"" + QURL + "\"><param name=\"Autoplay\" value=\"1\"></object>";
                    }
                    else if (MM.zt_dy1 == "media")
                    {
                        contentStr += "<object id=MediaPlayer1 classid=clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95 width='500' height='430'>";
                        contentStr += "<param name=\"filename\" value=\"" + QURL + "\">";
                        contentStr += "<param name=\"AutoStart\" value=\"-1\">";
                        contentStr += "<param name=\"Enabled\" value=\"-1\">";
                        contentStr += "<param name=\"ShowControls\" value=\"-1\">";
                        contentStr += "<param name=\"ShowGotoBar\" value=\"0\">";
                        contentStr += "<param name=\"ShowStatusBar\" value=\"-1\">";
                        contentStr += "<param name=\"EnableFullScreenControls\" value=\"0\">";
                        contentStr += "<param name=\"EnablePositionControls\" value=\"0\">";
                        contentStr += "<param name=\"Volume\" value=\"0\">";
                        contentStr += "<param name=\"DisplaySize\" value=\"4\">";
                        contentStr += "<param name=\"SendErrorEvents\" value=\"0\">";
                        contentStr += "<param name=\"enableContextMenu\" value=\"0\">";
                        contentStr += "<param name=\"EnableTracker\" value=\"-1\">";
                        contentStr += "<param name=\"AudioStream\" value=\"-1\">";
                        contentStr += "<param name=\"AutoSize\" value=\"0\">";
                        contentStr += "<param name=\"AnimationAtStart\" value=\"-1\">";
                        contentStr += "<param name=\"AllowScan\" value=\"-1\">";
                        contentStr += "<param name=\"AllowChangeDisplaySize\" value=\"-1\">";
                        contentStr += "<param name=\"AutoRewind\" value=\"0\">";
                        contentStr += "<param name=\"Balance\" value=\"0\">";
                        contentStr += "<param name=\"BaseURL\" value>";
                        contentStr += "<param name=\"BufferingTime\" value=\"5\">";
                        contentStr += "<param name=\"CaptioningID\" value>";
                        contentStr += "<param name=\"ClickToPlay\" value=\"-1\">";
                        contentStr += "<param name=\"CursorType\" value=\"0\">";
                        contentStr += "<param name=\"CurrentPosition\" value=\"-1\">";
                        contentStr += "<param name=\"CurrentMarker\" value=\"0\">";
                        contentStr += "<param name=\"DefaultFrame\" value>";
                        contentStr += "<param name=\"DisplayBackColor\" value=\"0\">";
                        contentStr += "<param name=\"DisplayForeColor\" value=\"16777215\">";
                        contentStr += "<param name=\"DisplayMode\" value=\"0\">";
                        contentStr += "<param name=\"InvokeURLs\" value=\"-1\">";
                        contentStr += "<param name=\"Language\" value=\"-1\">";
                        contentStr += "<param name=\"Mute\" value=\"0\">";
                        contentStr += "<param name=\"PlayCount\" value=\"1\">";
                        contentStr += "<param name=\"PreviewMode\" value=\"0\">";
                        contentStr += "<param name=\"Rate\" value=\"1\">";
                        contentStr += "<param name=\"SAMILang\" value>";
                        contentStr += "<param name=\"SAMIStyle\" value>";
                        contentStr += "<param name=\"SAMIFileName\" value>";
                        contentStr += "<param name=\"SelectionStart\" value=\"-1\">";
                        contentStr += "<param name=\"SelectionEnd\" value=\"-1\">";
                        contentStr += "<param name=\"SendOpenStateChangeEvents\" value=\"-1\">";
                        contentStr += "<param name=\"SendWarningEvents\" value=\"-1\">";
                        contentStr += "<param name=\"SendKeyboardEvents\" value=\"0\">";
                        contentStr += "<param name=\"SendMouseClickEvents\" value=\"0\">";
                        contentStr += "<param name=\"SendMouseMoveEvents\" value=\"0\">";
                        contentStr += "<param name=\"SendPlayStateChangeEvents\" value=\"-1\">";
                        contentStr += "<param name=\"ShowCaptioning\" value=\"0\">";
                        contentStr += "<param name=\"ShowAudioControls\" value=\"-1\">";
                        contentStr += "<param name=\"ShowDisplay\" value=\"0\">";
                        contentStr += "<param name=\"ShowPositionControls\" value=\"-1\">";
                        contentStr += "<param name=\"ShowTracker\" value=\"-1\">";
                        contentStr += "<param name=\"TransparentAtStart\" value=\"0\">";
                        contentStr += "<param name=\"VideoBorderWidth\" value=\"0\">";
                        contentStr += "<param name=\"VideoBorderColor\" value=\"0\">";
                        contentStr += "<param name=\"VideoBorder3D\" value=\"0\">";
                        contentStr += "<param name=\"WindowlessVideo\" value=\"0\">";
                        contentStr += "</object>";
                    }
                }
                
            }
            else
            {
                if (MM.zt_dy == "youku" || MM.zt_dy == "56" || MM.zt_dy == "tudou" || MM.zt_dy == "iask" || MM.zt_dy == "ouou" || MM.zt_dy == "tvix" || MM.zt_dy == "6rooms")
                {
                    //cursor:move;
                    contentStr += "<iframe src=\""+rooDir+"/inc/ajax/movie/play.html?" + QURL + "," + MM.zt_dy + "\" frameborder=0 align=\"center\"  scrolling=\"no\" width=588 height=468  />";
                }
                else if (MM.zt_dy == "bobo")
                {
                    contentStr += "<Object id=\"BoBo\" width=\"500\" height=\"430\" classid=\"clsid:EC0978ED-24E3-403C-AB7A-060E388553E6\" codebase=\"http://www.17bobo.com/Software/BoBo_ActiveX_V3.ocx\"><PARAM NAME=\"MaxLinkCount\"      VALUE=100><PARAM NAME=\"MaxCacheTimeS\"     VALUE=120><PARAM NAME=\"MinCacheTimeS\"     VALUE=60><PARAM NAME=\"MaxCacheSizeMB\"    VALUE=150><PARAM NAME=\"EnabledTcpTurbo\"   VALUE=1><PARAM NAME=\"MaintainAspect\"    VALUE=1><PARAM NAME=\"ActName\" 		VALUE=\"" + QURL + "\"></Object>";
                    contentStr += "<div>要观看此电影，请安装<a href=\"http://www.17bobo.com\" target=\"_blank\">BOBO P2P播放软件</a></div>";
                }
                else if (MM.zt_dy == "qvod")
                {
                    contentStr += "<object classid=\"clsid:F3D0D36F-23F8-4682-A195-74C92B03D4AF\"  height=\"'500\" width=\"430\" id=\"QvodPlayer\" name=\"QvodPlayer\" onError=\"\"if(window.confirm('请您先安装QvodPlayer软件,然后刷新本页才可以正常播放.'))\"\"><PARAM NAME=\"URL\" VALUE=\"" + QURL + "\"><param name=\"Autoplay\" value=\"1\"></object>";
                }
                else if (MM.zt_dy == "real")
                {
                    contentStr += "<object classid=\"clsid:F3D0D36F-23F8-4682-A195-74C92B03D4AF\"  height=\"'500\" width=\"430\" id=\"QvodPlayer\" name=\"QvodPlayer\" onError=\"\"if(window.confirm('请您先安装QvodPlayer软件,然后刷新本页才可以正常播放.'))\"\"><PARAM NAME=\"URL\" VALUE=\"" + QURL + "\"><param name=\"Autoplay\" value=\"1\"></object>";
                }
                else if (MM.zt_dy == "media")
                {
                    contentStr += "<object id=MediaPlayer1 classid=clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95 width='500' height='430'>";
                    contentStr += "<param name=\"filename\" value=\"" + QURL + "\">";
                    contentStr += "<param name=\"AutoStart\" value=\"-1\">";
                    contentStr += "<param name=\"Enabled\" value=\"-1\">";
                    contentStr += "<param name=\"ShowControls\" value=\"-1\">";
                    contentStr += "<param name=\"ShowGotoBar\" value=\"0\">";
                    contentStr += "<param name=\"ShowStatusBar\" value=\"-1\">";
                    contentStr += "<param name=\"EnableFullScreenControls\" value=\"0\">";
                    contentStr += "<param name=\"EnablePositionControls\" value=\"0\">";
                    contentStr += "<param name=\"Volume\" value=\"0\">";
                    contentStr += "<param name=\"DisplaySize\" value=\"4\">";
                    contentStr += "<param name=\"SendErrorEvents\" value=\"0\">";
                    contentStr += "<param name=\"enableContextMenu\" value=\"0\">";
                    contentStr += "<param name=\"EnableTracker\" value=\"-1\">";
                    contentStr += "<param name=\"AudioStream\" value=\"-1\">";
                    contentStr += "<param name=\"AutoSize\" value=\"0\">";
                    contentStr += "<param name=\"AnimationAtStart\" value=\"-1\">";
                    contentStr += "<param name=\"AllowScan\" value=\"-1\">";
                    contentStr += "<param name=\"AllowChangeDisplaySize\" value=\"-1\">";
                    contentStr += "<param name=\"AutoRewind\" value=\"0\">";
                    contentStr += "<param name=\"Balance\" value=\"0\">";
                    contentStr += "<param name=\"BaseURL\" value>";
                    contentStr += "<param name=\"BufferingTime\" value=\"5\">";
                    contentStr += "<param name=\"CaptioningID\" value>";
                    contentStr += "<param name=\"ClickToPlay\" value=\"-1\">";
                    contentStr += "<param name=\"CursorType\" value=\"0\">";
                    contentStr += "<param name=\"CurrentPosition\" value=\"-1\">";
                    contentStr += "<param name=\"CurrentMarker\" value=\"0\">";
                    contentStr += "<param name=\"DefaultFrame\" value>";
                    contentStr += "<param name=\"DisplayBackColor\" value=\"0\">";
                    contentStr += "<param name=\"DisplayForeColor\" value=\"16777215\">";
                    contentStr += "<param name=\"DisplayMode\" value=\"0\">";
                    contentStr += "<param name=\"InvokeURLs\" value=\"-1\">";
                    contentStr += "<param name=\"Language\" value=\"-1\">";
                    contentStr += "<param name=\"Mute\" value=\"0\">";
                    contentStr += "<param name=\"PlayCount\" value=\"1\">";
                    contentStr += "<param name=\"PreviewMode\" value=\"0\">";
                    contentStr += "<param name=\"Rate\" value=\"1\">";
                    contentStr += "<param name=\"SAMILang\" value>";
                    contentStr += "<param name=\"SAMIStyle\" value>";
                    contentStr += "<param name=\"SAMIFileName\" value>";
                    contentStr += "<param name=\"SelectionStart\" value=\"-1\">";
                    contentStr += "<param name=\"SelectionEnd\" value=\"-1\">";
                    contentStr += "<param name=\"SendOpenStateChangeEvents\" value=\"-1\">";
                    contentStr += "<param name=\"SendWarningEvents\" value=\"-1\">";
                    contentStr += "<param name=\"SendKeyboardEvents\" value=\"0\">";
                    contentStr += "<param name=\"SendMouseClickEvents\" value=\"0\">";
                    contentStr += "<param name=\"SendMouseMoveEvents\" value=\"0\">";
                    contentStr += "<param name=\"SendPlayStateChangeEvents\" value=\"-1\">";
                    contentStr += "<param name=\"ShowCaptioning\" value=\"0\">";
                    contentStr += "<param name=\"ShowAudioControls\" value=\"-1\">";
                    contentStr += "<param name=\"ShowDisplay\" value=\"0\">";
                    contentStr += "<param name=\"ShowPositionControls\" value=\"-1\">";
                    contentStr += "<param name=\"ShowTracker\" value=\"-1\">";
                    contentStr += "<param name=\"TransparentAtStart\" value=\"0\">";
                    contentStr += "<param name=\"VideoBorderWidth\" value=\"0\">";
                    contentStr += "<param name=\"VideoBorderColor\" value=\"0\">";
                    contentStr += "<param name=\"VideoBorder3D\" value=\"0\">";
                    contentStr += "<param name=\"WindowlessVideo\" value=\"0\">";
                    contentStr += "</object>";
                }
            }  
            contentStr += "</div></div>";
            Response.Write(contentStr);
            Response.End();
        }
    }
}
