<%@ 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">
<%if (Model.Isrefer == true)
  {
     // Response.Write(Model.Referurl);
      Response.Redirect(Model.Referurl);     
      Response.End();
  }%>
<title><%=ViewData["Title"]%></title>
<meta name="Keywords" content="<%=ViewData["Keywords"] %>" />
<meta name="Description" content="<%=ViewData["Description"] %>" />
<link href="<%=ViewData["webd"]%>Content/themes/daily/css/reset.css" rel="stylesheet" type="text/css" />
<link href="<%=ViewData["webd"]%>Content/themes/daily/css/all.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/pub.js"></script>
<script type="text/javascript" src="<%=ViewData["webd"]%>Content/themes/daily/js/haomap.js"></script>

<script type="text/javascript" src="<%=ViewData["webd"]%>Comja/news_speak.js" async></script>
<script type="text/javascript" src="<%=ViewData["webd"]%>Comja/share.js" async></script>
<%if (1 == 0)
  { %>
<link href="../../../Content/themes/daily/css/reset.css" rel="stylesheet" type="text/css" />
<link href="../../../Content/themes/daily/css/all.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/pub.js"></script>
<script type="text/javascript" src="../../../Content/themes/daily/js/haomap.js"></script>

<script type="text/javascript" src="../../../Comja/news_speak.js" async></script>
<script type="text/javascript" src="../../../Comja/share.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/daily/userinc/Top.ascx");%>    
    <div class="main clearfix">        
      <div class="bkleft">
        <div class="bkimg clearfix" >
            <div class="pagepic">
               <div id="bkimg">
               <%=eachban.Pagemap%>
              </div>
            </div>
        </div><!--bkimg finish-->	
        <script type="text/javascript">
			 var webd="<%=ViewData["webd"]%>";
			 var mapwidth=410;	
			 var pagepic="<%=ViewData["webd"].ToString()+eachban.Pagepic.ToString()%>?editionid=<%=eachban.Id%>";        
		</script> 
        <div class="bkimgbottom">
        <%if (eachban.Pagepdf.Contains(".jpg"))
                     {%><a href="<%=eachban.Pagepdf%>"  id="map_zoom" style="margin-right:10px;"><img src="<%=ViewData["webd"]%>Content/themes/daily/images/jpgbig2.png" alt="" width="35" height="24" /></a>  
                     <a href="<%=eachban.Pagepdf%>"  id="map_zoom_small"><img src="<%=ViewData["webd"]%>Content/themes/daily/images/jpgsmall2.png" alt="" width="35" height="24" /></a>
                     <script type="text/javascript" src="<%=ViewData["webd"]%>Comja/imgzoom.js"></script>
					<%if (1 == 0)
                      { %>
                      <script type="text/javascript" src="../../../Comja/imgzoom.js"></script>
                      <%}%>
                   <%}
                     else 
					 {
					 %>
        <a href="<%=eachban.Pagepdf%>" target="_blank"><img src="<%=ViewData["webd"]%>Content/themes/daily/images/pdficon.jpg" alt="" border="0" width="16" height="16" align="absmiddle" /> &nbsp;PDF原版</a>
                <%}%>
        </div>
        
        <div class="ban">
              <%if (eachban.Prelink.ToString() != "no"){%>
                <span class="pre2"><a href="<%=eachban.Prelink%>" >上一版</a></span>
              <%}
                else
               { %>
               <span class="pre1"><a href="javascript:void(0);" rel="nofollow">上一版</a></span>
              <%} 
		      if (eachban.Nextlink.ToString() != "no")
              {%>
              <span class="next2"><a href="<%=eachban.Nextlink%>" >下一版</a></span>
             <%}
              else
              { %>
              <span class="next1"><a href="javascript:void(0);" rel="nofollow">下一版</a></span>
              <%} %>   
        </div>        
        <div class="clear"><span></span></div>
        <div class="left2 clearfix">
        <div class="r0 clearfix">
            <h3><span>标题导航</span></h3>
            <div class="box clearfix" id="pagenews">    
             <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>
        </div><!--r0 214 -->
        <div class="dateinfo2 clearfix">
            <h3><span>按日期检索</span></h3>
            <div class="box clearfix">    
            <%Html.RenderAction("Calendarqi", "Userinc", new {idate=ViewData["issuedate"]}); %>     
            <div style="width:191px;margin-left:auto;margin-right:auto;"><a href="http://www.53bk.com/download/reader" target="_blank"><img src="../../../Content/themes/daily/images/downpdf.gif" width="191" height="50" alt="电子报刊阅读器" /></a></div>
            
          </div>    
        </div><!--dateinfo2-->
        
        
        </div><!--left2 finish-->
        
        
        
    </div><!---bkleft finish--->
    
     <div class="mright1 clearfix">     
         <div class="newsdetail clearfix">
          <div class="tp">
            <div class="next">
                 <%if (Model.Prelink.ToString() != "no")
                  {%>
                 <a href="<%=Model.Prelink %>" class="pre">上一篇</a>
                <%}
                  else
                  { %>
                  <span class="nohref pre">上一篇</span>
                  <%} %>
                <%if (Model.Nextlink.ToString() != "no")
                  {%>
                <a href="<%=Model.Nextlink %>" class="n">下一篇</a>
                <%}
                  else
                  { %>
                  <span class="nohref n">下一篇</span>
                  <%} %>
            </div>
            <div class="zoom">             
                 <span onclick="zoomOut();" ><img src="<%=ViewData["webd"]%>Content/themes/daily/images/zoomout1.gif" width="14" height="14" alt="" border="0" /> 放大</span>
                 <span onclick="zoomIn();" ><img src="<%=ViewData["webd"]%>Content/themes/daily/images/zoomin1.gif" width="14" height="14" alt="" border="0" /> 缩小</span>
                 <span onclick="zoomNormal();" ><img src="<%=ViewData["webd"]%>Content/themes/daily/images/zoomnormal1.gif" width="14" height="14"  alt="" border="0" /> 默认</span>            </div>
          </div><!--tp finish-->
          <div class="newsdetail_bg clearfix">
          <div class="clear" style="height:12px;"><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><!--newspapercontent finish-->
           <script type="text/javascript">
			    var speackclick=false;
                var isIE11= /rv:11\.0/.test(navigator.userAgent);
                if (isie)
					{
						//ie change img size
						 var imgfinish;
						 var tempTimer=window.setInterval(function(){  
							imgfinish=true;
							var imgs = document.getElementById("newspapercontent").getElementsByTagName("img");
							for (var i=0; i< imgs.length; i++ ) 
							{ 
							   var img=imgs[i];
								if(img.readyState=="complete"){  
									if ($("#newspapercontent img").eq(i).width() > 480)
										$("#newspapercontent img").eq(i).width(480);  
								} 
								else
									imgfinish=false;
							} 					
							if (imgfinish==true)
								window.clearInterval(tempTimer);
						 },120); 
						 //ie change img size finish
					}

                $(function () {
                    if (!isie)
					{
						//change img size
						$("#newspapercontent img").each(function (i) {	
							if (isIE11){
								if ($(this).width() > 480)
									$(this).width(480);  
							}
							else
							{
								if ($(this).width() > 480)
									$(this).width(480);  								
								$(this).load(function() {
									if ($(this).width() > 480) 
									$(this).width(480);  							  
								});
							}
					   });
					   //change img size
				     }
			        
					
                    $("#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 class="clear"><span></span></div>
            <div class="share53bk" style="padding-left:95px;padding-top:0px;padding-bottom:30px;">
                <a href="http://www.53bk.com/" class="s_more" id="share53bk_more"><span class="s_txt">分享到：</span></a><a class="s_button s_qzone" rel="nofollow">QQ空间</a>
                <a class="s_button s_weixin" rel="nofollow">微信</a>
                <a class="s_button s_tsina" rel="nofollow">新浪微博</a>
                <div class="clear"><span></span></div>
            </div>
            <div class="clear"><span></span></div>
            <div class="clear"><span></span></div>
         </div><!--newsdetail_bg finish-->      

         <div class="ft">       
              <div class="next">
                 <%if (Model.Prelink.ToString() != "no")
                  {%>
                 <a href="<%=Model.Prelink %>" class="pre">上一篇</a>
                <%}
                  else
                  { %>
                  <span class="nohref pre">上一篇</span>
                  <%} %>
                <%if (Model.Nextlink.ToString() != "no")
                  {%>
                <a href="<%=Model.Nextlink %>" class="n">下一篇</a>
                <%}
                  else
                  { %>
                  <span class="nohref n">下一篇</span>
                  <%} %>
             </div>
             
             <div class="zoom">             
             <span onclick="zoomOut();" ><img src="<%=ViewData["webd"]%>Content/themes/daily/images/zoomout2.gif" width="14" height="14" alt="" border="0" /> 放大</span>
             <span onclick="zoomIn();" ><img src="<%=ViewData["webd"]%>Content/themes/daily/images/zoomin2.gif" width="14" height="14" alt="" border="0" /> 缩小</span>
             <span onclick="zoomNormal();" ><img src="<%=ViewData["webd"]%>Content/themes/daily/images/zoomnormal2.gif" width="14" height="14"  alt="" border="0" /> 默认</span>
             </div>
             <div 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></div>
             <script type="text/javascript">
				 function zoomOut() {
					var newZoom = $(".content");
					newZoom[0].style.cssText = "font-size:1.6em;";
				 }
				 function zoomIn() {
					 var newZoom = $(".content");
					 newZoom[0].style.cssText = "font-size:1.0em;";
				 }
				 function zoomNormal() {
					 var newZoom = $(".content");
					 newZoom[0].style.cssText = "font-size:1.125em;";
					 //newZoom.css("font-size", "19px");
				 } 
             </script>         
         </div><!--ft finish-->  
      </div><!--newsdetail finish-->        
      <%=ViewData["updatehits"]%>
      <div class="clear"><span></span></div>
          <% int isping = E_settingbll.Sitesetting.Isping;
	   if (isping == 1)
	   {%>
	<div style="width:525px;padding-top:9px;" class="clearfix">
	<%Html.RenderAction("AddComment", "Comment", new { qiid = eachqi2.Id, editionid = eachban.Id, newsid = "0" }); %>
	</div>
	<div style="width:525px;" class="clearfix" id="pagecomment1">
	    <h2>正在加载评论……</h2> 
	</div>
	<script type="text/javascript">
	    $('#pagecomment1').load('<%=ViewData["Webd"]%>comment/pagecomment?qiid=<%=eachqi2.Id%>&editionid=<%=eachban.Id%>&tl=' + Math.random());  
	</script>	
	<%}//isping==1 %>   
    
     </div><!--mright 525-->    
    </div><!--main 982-->    
<%Html.RenderPartial("~/themes/daily/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="http://v2.jiathis.com/code_mini/jia.js" charset="<%=Fun.Webcode%>"></script>--%>
<script type="text/javascript" src="<%=ViewData["webd"]%>Comja/showbox2015.js"></script>
</asp:Content>
