<%@ Page Language="C#" MasterPageFile="../Shared/Main.Master" Inherits="System.Web.Mvc.ViewPage<Mvcmode.E_news>" %>
<%@ Import Namespace="Mvcmode"%>
<%@ Import Namespace="Mvcbll"%>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
<title><%=ViewData["Title"]%></title>
<meta name="Keywords" content="<%=ViewData["Keywords"] %>" />
<meta name="Description" content="<%=ViewData["Description"] %>" />
<link href="<%=ViewData["webd"]%>Content/themes/lightblue/css/reset.css" rel="stylesheet" type="text/css" />
<link href="<%=ViewData["webd"]%>Content/themes/lightblue/css/header.css" rel="stylesheet" type="text/css" />
<link href="<%=ViewData["webd"]%>Content/themes/lightblue/css/body_main.css" rel="stylesheet" type="text/css" />
<link href="<%=ViewData["webd"]%>Content/themes/lightblue/css/article.css" rel="stylesheet" type="text/css" />
<link href="<%=ViewData["webd"]%>Content/themes/lightblue/css/calendar.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<%=ViewData["webd"]%>Comja/jquery-1.12.4.min.js"></script>
<script type="text/javascript" src="<%=ViewData["webd"]%>Comja/swf.js"></script>
<script type="text/javascript" src="<%=ViewData["webd"]%>Content/themes/lightblue/js/haomapblue.js"></script>
<script type="text/javascript" src="<%=ViewData["webd"]%>Comja/common.js" async></script>
<script type="text/javascript" src="<%=ViewData["webd"]%>Comja/news_speak.js" async></script>
<%if (1 == 0)
  { %>
<link href="../../../Content/themes/lightblue/css/reset.css" rel="stylesheet" type="text/css" />
<link href="../../../Content/themes/lightblue/css/header.css" rel="stylesheet" type="text/css" />
<link href="../../../Content/themes/lightblue/css/body_main.css" rel="stylesheet" type="text/css" />
<link href="../../../Content/themes/lightblue/css/article.css" rel="stylesheet" type="text/css" />
<link href="../../../Content/themes/lightblue/css/calendar.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../../../Comja/jquery-1.12.4.min.js"></script>
<script type="text/javascript" src="../../../Comja/swf.js"></script>
<script type="text/javascript" src="../../../Content/themes/lightblue/js/haomapblue.js"></script>
<script type="text/javascript" src="../../../Comja/common.js" async></script>
<script type="text/javascript" src="../../../Comja/news_speak.js" async></script>
<%} %>
<script type="text/javascript">    
   var webd="<%=ViewData["webd"].ToString()%>";
   $(document).ready(function(){ $("#usemap").haomap(); });
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<%E_eachedition eachban = ViewData["edition"] as E_eachedition;
E_eachqi eachqi2 = ViewData["eachqi"] as E_eachqi;%>
<%Html.RenderPartial("~/themes/lightblue/userinc/Top.ascx");%>
<div class="bkleft">
    <div class="bkimg clearfix" >
        <div class="pagepic">
           <div id="bkimg"><%--图像大小width:350px;height:546px;--%>
           <%=eachban.Pagemap%></div>
        </div>
    </div><%--bkimg完--%>	
    <script type="text/javascript"><%--/*判断图片是否加载完成*/--%>
		var pagepic="<%=ViewData["webd"].ToString()+eachban.Pagepic.ToString()%>?editionid=<%=eachban.Id%>";
		var img =new Image(); 
			img.src= pagepic;
		function checkimg()
            { 
			   if(img.readyState == "complete") 
					{
						$("#editionimg").attr("alt","");
						$(".pagepic")[0].style.cssText ="background-image:none;";
						clearInterval(runx);
					}			   
            }
			var isie = (navigator.appName == "Microsoft Internet Explorer"); 
			var runx;
			$(document).ready(function () {
			   if (!isie)
			   {
					$("#editionimg").load(function() {
						$("#editionimg").attr("alt","");
						$(".pagepic")[0].style.cssText ="background-image:none;";
					});
			   }
			   else
				   runx=setInterval("checkimg()",150);
			});
	</script>
    <div class="bkimgbottom"><span></span></div>
    <div class="pageinfo">
        <div class="title"><%Response.Write("第" + eachban.Pagename + "版：" + eachban.Pagetitle);%></div>      
        <div class="clear"><span></span></div>
        <div class="ban">
          <%if (eachban.Prelink.ToString() != "no"){%>
            <span class="pre"><a href="<%=eachban.Prelink%>" >上一版</a></span>
          <%}
            else
           { %>
           <%--<span class="preno">上一版</span>--%>
          <%} 
		  if (eachban.Nextlink.ToString() != "no")
          {%>
          <span class="next"><a href="<%=eachban.Nextlink%>" >下一版</a></span>
         <%}
          else
          { %>
          <%--<span class="nextno">下一版</span>--%>
          <%} %>           
           <span class="dowpdf"><a href="<%=eachban.Pagepdf%>" ><img src="<%=ViewData["webd"]%>Content/themes/lightblue/images/pdficon.jpg" width="16" height="16" alt="PDF原版下载" /></a></span>
        </div>
    </div><%--pageinfo完--%>
    <div class="leftinfo" id="pagenews">        
        <h3 class="titlenav_h3">标题导航</h3>
        <div class="titlenav_con" id="pagenewslist">
        <ul class="scroll">
        <%int editionid_sigle = Fun.Toint(ViewData["editionid_sigle"].ToString());
          ViewData["newslist"] = E_newsbll.Contentlist(editionid_sigle, ViewData["issuedate"].ToString());
            List<E_news> newslist = ViewData["newslist"] as List<E_news>;
            int i = 0;
            string css="";
        foreach (var item in newslist){
            i++;
            css="";
            if (i >= 2 && i % 2 == 0)
                css="class=\"one\"";%>
        <li <%=css %>><a id="news_list_<%=item.Id%>" title="<%=Fun.W3c(item.Title)%>" href="<%=item.Newslink %>"><%=Fun.W3c(item.Title)%></a></li>
        <% } %>  
        </ul>
        </div><%--titlenav_con完--%>
    </div><%--leftinfo完--%>
</div><%--bkleft完--%>
<div class="clear"><span></span></div>
<div class="mainright" style="">
      <div class="clearfix " id="ozoom">           
          <table width="100%" border="0" class="contable1" cellspacing="0" cellpadding="0" style="border-bottom: #787878 1px solid;">
              <tr >
                <td class="next">
                <%if (Model.Prelink.ToString() != "no")
                  {%>
                <a href="<%=Model.Prelink %>"><span style="font-family:Webdings;">3</span>上一篇</a>
                <%}
                  else
                  { %>
                  <span class="nohref"><span style="font-family:Webdings;">3</span>上一篇</span>
                  <%} %>
                <%if (Model.Nextlink.ToString() != "no")
                  {%>
                <a href="<%=Model.Nextlink %>">下一篇<span style="font-family:Webdings;">4</span></a>
                <%}
                  else
                  { %>
                  <span class="nohref">下一篇<span style="font-family:Webdings;">4</span></span>
                  <%} %>
                </td>
                <td align="center" class="d"><%=ViewData["issueday"]%></td>
                <td align="right" class="number"><%if (Fun.Isnews == "1") { Response.Write(Model.Classname); }%> &nbsp; <%=ViewData["numberid"]%></td>
              </tr>
            </table>
            <div class="clear" style="height:18px;"><span></span></div>    
            <%if (Model.Jiantitle.Length > 2)
             {%>
            <h2><%=Fun.W3c(Model.Jiantitle)%></h2>
            <%} %>
            <h1><%=Fun.W3c(Model.Title) %></h1>
            <%if (Model.SubTitle.Length > 2)
             {%>
            <h2><%=Fun.W3c(Model.SubTitle)%></h2>
            <%} %>
            <%if (Fun.Isnews == "1") { Response.Write("<h2>"+Model.Classname + "</h2>"); }%>
            <%if (Model.Reporter.Length > 1)
             {%>
            <div class="reporter">□ 本报记者 <%=Fun.W3c(Model.Reporter)%></div>
            <%}
			else if (Model.Author.Length > 1 && Model.Author!="Admin"){ %>
            <div class="reporter">□ 作者 <%=Fun.W3c(Model.Author)%></div>
            <%}%>
            <div class="content" id="newspapercontent" >

            <%if (Model.Tvurl.Length > 3)
           {
               //rtmp://mov.mlr.gov.cn/masvod/public/2014/03/31/20140331_14515bdeeb8_r98.mp4
               //http://tb.mlr.gov.cn/masvod/public/2014/03/31/46439.images/v46439_b1396229164383.jpg
               if (Model.Tvurl.Contains(".avi") || Model.Tvurl.Contains(".mp4")  || Model.Tvurl.Contains(".flv"))
               { %>
          <div class="player clearfix">
              <div id="flashcontent_play">您的浏览器和Flash环境异常, 导致该内容无法显示!</div>
              <noscript>您使用的浏览器不支持或没有启用javascript, 请启用javascript后再访问!</noscript>
              <script type="text/javascript" src="<%=ViewData["Webd"]%>Content/player/swfobject.js"></script>
              <script type="text/javascript">
                  var flashvars = { videoSource: '<%=Model.Tvurl%>', videoImgUrl: '<%=Model.Picsmall%>', autoPlay: 'false', isAutoBandWidthDetection: 'false', logoCss: '180*80,lt', logoAlpha: '0' };
                  var params = { allowFullScreen: 'true', quality: 'high', allowScriptAccess: 'always' };
                  swfobject.embedSWF('<%=ViewData["Webd"]%>Content/player/TRSVideoPlayer.swf', 'flashcontent_play', 448, 349, '9.0.124', false, flashvars, params);
              </script>
          </div>
          <%}
            if (Model.Tvurl.Contains(".wmv"))
               { %>
          <!--.wmv-->
          <div class="player clearfix">
          <object id="NSPlay" width="480" height="358" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject" align="middle" hspace="5">
        <param name="AutoRewind" value ="1" />
        <param name="FileName" value ="<%=Model.Tvurl%>" />
        <param name="ShowControls" value ="1" />
        <param name="ShowPositionControls" value ="0" />
        <param name="ShowAudioControls" value ="1" />
        <param name="ShowTracker" value ="1" />
        <param name="ShowDisplay" value ="0" />
        <param name="ShowStatusBar" value ="0" />
        <param name="ShowGotoBar" value ="0" />
        <param name="ShowCaptioning" value ="0" />
        <param name="AutoStart" value ="1" />
        <param name="Volume" value ="-2500" />
        <param name="AnimationAtStart" value ="0" />
        <param name="TransparentAtStart" value ="0" />
        <param name="AllowChangeDisplaySize" value ="0" />
        <param name="AllowScan" value ="0" />
        <param name="EnableContextMenu" value ="0" />
        <param name="ClickToPlay" value ="0" />
        <embed src="<%=Model.Tvurl%>" width="480" height="358"  hspace="5" autostart="1" align="middle" autorewind="1" filename="<%=Model.Tvurl%>" showcontrols="1" showpositioncontrols="0" showaudiocontrols="1" showtracker="0" showdisplay="0" showstatusbar="0" showgotobar="0" showcaptioning="0" volume="-2500" animationatstart="0" transparentatstart="0" allowchangedisplaysize="0" allowscan="0" enablecontextmenu="0" clicktoplay="0"></embed>
            </object>
          </div>
          <%}
           } %>
               <%--=Model.Content--%>
               <%int ispage = 0;
          ispage = E_settingbll.Sitesetting.Ispage;
          Mvccom.ArticlePage pg = new Mvccom.ArticlePage();
          if (ispage == 1)
          { 
              //开始分页      
              string[] con = pg.ArticleSplit(Model.Content);
              if (con.Length == 1)
                  Response.Write(con[0]);
              else
              {
                  string tempstr = "";
                  int curpage = Fun.Toint(ViewData["CurPage"].ToString());
                  //Response.Write(Model.Id);
                 // Response.End();
                  if (curpage <= con.Length)
                  {
                      //输出实际页面的文本
                      tempstr += "<div class=\"con_split clearfix\">";
                      tempstr += con[curpage - 1];
                      tempstr += "</div>";              
                      //添加页面代码
                     // string viewnowpagelink = Linknews.detail(Model.Id, ViewData["issuedate"].ToString(), curpage, 0);
                      tempstr += pg.ArticleMorepages(Model.Id, ViewData["issuedate"].ToString(), con.Length, curpage);
        
                      Response.Write(tempstr);
                  }
                  else  //页面代码不对
                      Response.Write(con[0]);
                  
              }      
          }
          else  //没有分页
              Response.Write(pg.Unpage(Model.Content));
          %>
            </div>
            <script type="text/javascript">
			    var speackclick=false;
                $(function () {
                     //change img size
				    //change img size
					$("#newspapercontent img").each(function (i) {	
					   if (!isie)
					   {
							$(this).load(function() {
								  if ($(this).width() > 450) {
									$(this).width(450);  
								  }
							});
					   }
					   else
					   {
						   var img=$("#newspapercontent img").get(i);
						   tempTimer=window.setInterval(function(){  
									if(img.readyState=="complete"){  
										window.clearInterval(tempTimer); 
										if ($("#newspapercontent img").eq(i).width() > 450) {
											$("#newspapercontent img").eq(i).width(450);  
										}
									} 
						   },120);  
					   }
				   });
			        
					
                    $("#textspeak").click(function () {
						var fileurl = webd+"jquery/outputwav";
						var msg=$("#textspeak .m").html();
						if (msg=="朗读" && speackclick==false)
						{
						   speackclick=true;
						   Speakarticle(fileurl,<%=Model.Id%>);
						}
						if (msg=="正在朗读…")
						{
						   speackclick=false;
                           if (isie)
                           {
							  try{
                              document.getElementById("mediaplayer1").stop();
							  }
							  catch(err){}
                              $("#player").html("");
	                          $("#textspeak .m").html("朗读");  
                           }
                           else
                              Speakstop();
						}
                   });
        
                });
            </script>
       </div>       
       
         <table width="100%" border="0" class="contable2" cellspacing="0" cellpadding="0" style="border-top:#787878 1px solid;">
          <tr>
            <td  class="next">
            <%if (Model.Prelink.ToString() != "no")
              {%>
            <a href="<%=Model.Prelink %>"><span style="font-family:Webdings;">3</span>上一篇</a>
            <%}
              else
              { %>
              <span class="nohref"><span style="font-family:Webdings;">3</span>上一篇</span>
              <%} %>
            <%if (Model.Nextlink.ToString() != "no")
              {%>
            <a href="<%=Model.Nextlink %>">下一篇<span style="font-family:Webdings;">4</span></a>
            <%}
              else
              { %>
              <span class="nohref">下一篇<span style="font-family:Webdings;">4</span></span>
              <%} %>
            </td>        
            <td>&nbsp;</td>    
            <td align="right" class="zoom">
        <script type="text/javascript">
        function zoomIn() {
            var newZoom = $("#ozoom .content");
            newZoom[0].style.cssText = "font-size:1.6em;";
         }
         function zoomOut() {
             var newZoom = $("#ozoom .content");
             newZoom[0].style.cssText = "font-size:1.2em;";
         }
         function zoomNormal() {
             var newZoom = $("#ozoom .content");
             newZoom[0].style.cssText = "font-size:1.4em;";
             //newZoom.css("font-size", "19px");
         } 
         </script>
         <span onclick="zoomIn();" >放大<img src="<%=ViewData["webd"]%>Content/themes/default/images/zoomin.gif" width="16"  alt="" border="0" /></span>&nbsp; <span onclick="zoomOut();" >缩小<img src="<%=ViewData["webd"]%>Content/themes/default/images/zoomout.gif" width="16" alt="" border="0" /></span>&nbsp; 
         <span onclick="zoomNormal();" >默认<img src="<%=ViewData["webd"]%>Content/themes/default/images/zoomact.gif" width="16"  alt="" border="0" /></span>          
         </td>
         <td class="speak"><a href="javascript:void(0);" rel="nofollow" id="textspeak"><span id="player"></span><span class="m">朗读</span><img src="../../../Content/themes/default/images/soundon.gif" width="21" height="14" alt="" /></a></td>
          </tr>
        </table>
       
       
      <%=ViewData["updatehits"]%>
     <div class="clear"><span></span></div>
     <% int isping = E_settingbll.Sitesetting.Isping;
	   if (isping == 1)
	   {%>
	<div style="width:585px;padding-top:9px;" class="clearfix">
	<%Html.RenderAction("AddComment", "Comment", new { qiid = eachqi2.Id, editionid = eachban.Id, newsid = ViewData["newsid"] }); %>
	</div>
	<div style="width:585px;" class="clearfix" id="pagecomment1">
	    <h2>正在加载评论……</h2>
	</div>
	<script type="text/javascript">
	    $('#pagecomment1').load('<%=ViewData["Webd"]%>comment/pagecomment?qiid=<%=eachqi2.Id%>&editionid=<%=eachban.Id%>&newsid=<%=ViewData["newsid"]%>&tl=' + Math.random());  
	</script>	
	<%}//isping==1 %>     
     
</div><%--mainright完--%>
<div class="blank7"><span></span></div>
<%Html.RenderPartial("~/themes/lightblue/userinc/Foot.ascx");%>
<%--禁用复制--%>
<%int iscopy = E_settingbll.Sitesetting.Iscopy;
  if (iscopy == 0)
  {%>
  <script type="text/javascript" src="<%=ViewData["webd"]%>Comja/copyfalse.js" async></script>
  <%--禁止网页另存为： --%>
  <noscript><iframe src="*.html"></iframe></noscript>
  <%if (1 == 0)
    { %>
  <script type="text/javascript" src="../../../Comja/copyfalse.js" async></script>
  <%} %>
<%} %>
<script type="text/javascript">   
    function CopyAll() {
        var obj = document.getElementById("newspapercontent");
        if (obj != null) {
           <%if (iscopy == 1){%>
            var content = obj.innerText;
            window.clipboardData.setData("Text", content);
            alert("复制成功");
            <%}
            else
            { %>
            alert("系统已禁用复制!");
            <%} %>
        }
    }
</script>
<script type="text/javascript" src="<%=ViewData["webd"]%>Comja/showbox.js"></script>
</asp:Content>