<%@ 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">
<%E_eachedition eachban = ViewData["edition"] as E_eachedition;
E_eachqi eachqi2 = ViewData["eachqi"] as E_eachqi;%>
<%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/default/css/reset.css" rel="stylesheet" type="text/css" />
<link href="<%=ViewData["webd"]%>Content/themes/default/css/header.css" rel="stylesheet" type="text/css" />
<link href="<%=ViewData["webd"]%>Content/themes/default/css/footer.css" rel="stylesheet" type="text/css" />
<link href="<%=ViewData["webd"]%>Content/themes/default/css/body_main.css" rel="stylesheet" type="text/css" />
<link href="<%=ViewData["webd"]%>Content/themes/default/css/article.css" rel="stylesheet" type="text/css" />
<link href="<%=ViewData["webd"]%>Content/themes/default/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/jquery.maphilight.js"></script>
<script type="text/javascript" src="<%=ViewData["webd"]%>Comja/pub.js"></script>
<script type="text/javascript" src="<%=ViewData["webd"]%>Comja/haomap.js"></script>
<script type="text/javascript" src="<%=ViewData["webd"]%>Comja/show.js"></script>

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

<script type="text/javascript" src="../../../Comja/news_speak.js" async></script>
<%} %>
<script type="text/javascript">

var webd="<%=ViewData["webd"]%>";
        $(document).ready(function(){ 
            $('#editionimg').maphilight();
			$("#usemap").haomap();
			var typeid=<%=ViewData["E_type"]%>;
			var qiid=<%=eachqi2.Id%>;
			var editionid=<%=eachban.Id%>;
			var issuedate="<%=ViewData["issuedate"]%>";
			var editionurl=webd+"jquery/editionlist";
			var titleurl=webd+"jquery/titlelist";
			var type=1;
            $(".titlenav").showtitle(typeid,editionid,issuedate,type,titleurl);
            type=2;
			$(".editionnav").showedition(typeid,qiid,issuedate,type,editionurl);			
      });
</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.RenderAction("Top", "Userinc", new { adsrc = "Content/themes/default/images/53bk.jpg", type = "0",ishome="1",idate=ViewData["issuedate"] }); --%>
<%

ViewData["adsrc"] = Fun.Webdirectory + "Content/themes/default/images/53bk.jpg";
ViewData["adtype"] = "0";
ViewData["ishome"] = "1";
%>
<%Html.RenderPartial("~/themes/default/userinc/Top.ascx");%>
<div class="path"><div class="leftpath">您正在阅读：<%=ViewData["path"]%><a href="<%=ViewData["nowpagelink"]%>"><strong><%Response.Write("第" + eachban.Pagename + "版：" + eachban.Pagetitle);%></strong></a></div>
    <div class="rightpath">
        <span class="exit"><a href="<%=ViewData["nowpagelink"]%>">返回目录</a></span>
        <span class="titlenav" title="标题导航">标题导航
             <span id="titlenav"></span>
        </span>
        <span title="版面导航" class="editionnav">版面导航
            <span id="editionnav"></span>
        </span>
        <span class="clear"></span>
    </div>
</div>

<div class="main  clearfix ">
<div class="b_left left clearfix"><%--left427px+20背景--%>

<div class="bkimg clearfix" id="bkimg">
<%=eachban.Pagemap%>
</div><%--bkimg结束--%> 
<script type="text/javascript"><%--/*判断图片是否加载完成*/--%>
var pagepic=webd+"<%=eachban.Pagepic.ToString()%>?editionid=<%=eachban.Id%>";
var img =new Image(); 
    img.src= pagepic;
function checkimg()
            { 
			   if(img.readyState == "complete") 
					{
						$("#editionimg").attr("alt","");
						$(".bkimg")[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","");
						$(".bkimg")[0].style.cssText ="background-image:none;";
					});
			   }
			   else
				   runx=setInterval("checkimg()",150);
			});
</script>
<div class="bkpages">
<div class="bktitle">
<span><%Response.Write("第" + eachban.Pagename + "版：" + eachban.Pagetitle);%></span>
<a href="<%=eachban.Pagepdf%>" target="_blank"><img src="<%=ViewData["webd"]%>Content/themes/default/images/ico4.gif" alt="PDF原版" border="0" width="16" align="absmiddle" />PDF原版</a></div>
<div class="nextpage">
    <%if (eachban.Prelink.ToString() != "no")
      {%>
    <a class="prev" href="<%=eachban.Prelink %>">上一版</a>
    <%}
      else
      { %>
      <span class="prev">上一版</span>
      <%} %>
    <%if (eachban.Nextlink.ToString() != "no")
      {%>
    <a class="next" href="<%=eachban.Nextlink %>">下一版</a>
    <%}
      else
      { %>
      <span class="next">下一版</span>
      <%} %>
</div>
</div><%--bkpages结束--%>  

<div class="download"><a href="http://www.53bk.com/download/reader" target="_blank"><img src="<%=ViewData["webd"]%>Content/themes/default/images/pdf_dl.gif" width="107" height="38" alt="pdf阅读器免费下载" /></a>
<a href="<%=Linkeachqi.eachqi_menu(ViewData["issuedate"].ToString(),0)%>" style="margin-left:12px;"><img src="<%=ViewData["webd"]%>Content/themes/default/images/nav.png" width="130" height="38" alt="版面导航" /></a> </div>
<!--download结束-->

<div class="sheng clearfix">
<script type="text/javascript">
    $(document).ready(function() {
        $("#tit02").click(function() {
            $("#tit02").toggleClass("hover");
            $("#sheng02").toggleClass("sheng02show");
        });
    }); 
</script>
<div class="sheng01"><div class="tit01">声明</div> <div class="tit02" id="tit02"><span></span></div></div>
<div class="sheng02" id="sheng02">
<div class="con"><script type="text/javascript">document.write('<%=ViewData["Declaration"]%>');</script></div>
</div>

</div><%--sheng结束--%> 
</div><%--b_left结束--%> 

<div class="b_right right clearfix">
<div style="width:497px;" class="clearfix">
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="border-bottom: #555 1px solid;">
  <tr >
    <td style="width:130px;line-height:23px;padding-left:10px;padding-top:4px;height:22px;">
    <%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" style="font-weight:bold; font-family:Arial, Helvetica, sans-serif;line-height:23px;padding-top:3px;"><%=ViewData["issueday"]%></td>
    <td align="right" class="number"><%if (Fun.Isnews == "1") { Response.Write(Model.Classname); }%> &nbsp; <%=ViewData["numberid"]%></td>
  </tr>
</table>
</div>

<div class="clearfix " id="ozoom" >
           <%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>
            <%} %>

<div class="author">作者：<%=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 class="froms"><%if (Model.Froms.Length > 1)
					 {%> 稿件来源：<%=Model.Froms%> 
                      <%}%>
                    <%if (Model.Reporter.Length > 1)
                     {%>
                    <span class="au">记者：<%=Fun.W3c(Model.Reporter)%></span>
                    <%}%>

                    <%if (Model.Editer.Length > 1)
                     {%>
                    <span class="au">编辑：<%=Fun.W3c(Model.Editer)%></span>
                    <%}%>
                     <%if (Model.Auditor.Length > 1)
                     {%>
                    <span class="au">审核：<%=Fun.W3c(Model.Auditor)%></span>
                    <%}%>                    
  </div>
</div>
<script type="text/javascript">
     var speackclick=false;
    $(function () {
        //change img size
					$("#newspapercontent img").each(function (i) {	
					   if (!isie)
					   {
							$(this).load(function() {
								  if ($(this).width() > 465) {
									$(this).width(465);  
								  }
							});
					   }
					   else
					   {
						   var img=$("#newspapercontent img").get(i);
						   tempTimer=window.setInterval(function(){  
									if(img.readyState=="complete"){  
										window.clearInterval(tempTimer); 
										if ($("#newspapercontent img").eq(i).width() > 465) {
											$("#newspapercontent img").eq(i).width(465);  
										}
									} 
						   },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>

<div style="width:497px;" class="clearfix">
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="border-bottom: #555 1px dashed;margin-bottom:15px;">
  <tr style="background-color:#e8e8e8;">
    <td style="width:120px;padding-left:10px;line-height:23px;padding-top:3px;">
    <%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="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>
    <td align="right" class="zoom">
<script type="text/javascript">
function zoomIn() {
    var newZoom = $("#ozoom .content");
    newZoom.css("font-size", "1.6em");
 }
 function zoomOut() {
     var newZoom = $("#ozoom .content");
     newZoom.css("font-size", "1.0em");
 }
 function zoomNormal() {
     var newZoom = $("#ozoom .content");
     newZoom.css("font-size", "1.2em");
 } 
 </script>
 <span onclick="zoomIn();" >放大<img src="<%=ViewData["webd"]%>Content/themes/default/images/zoomin.gif" width="16" align="absMiddle" alt="" border="0" /></span>&nbsp; <span onclick="zoomOut();" >缩小<img src="<%=ViewData["webd"]%>Content/themes/default/images/zoomout.gif" width="16" align="absMiddle" alt="" border="0" /></span>&nbsp; 
 <span onclick="zoomNormal();" >默认<img src="<%=ViewData["webd"]%>Content/themes/default/images/zoomact.gif" width="16" align="absMiddle" alt="" border="0" /></span>
  
 </td>
  </tr>
</table>
</div>
<%=ViewData["updatehits"]%>

<% int isping = E_settingbll.Sitesetting.Isping;
   if (isping == 1)
   {%>
<div style="width:492px;" class="clearfix">
<%Html.RenderAction("AddComment", "Comment", new { qiid = eachqi2.Id, editionid = eachban.Id, newsid = ViewData["newsid"] }); %>
</div>

<div style="width:492px;padding-bottom:10px;" 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><!--b_right结束--> 
</div><!--main结束-->   
<%--Html.RenderAction("Foot", "Userinc"); --%>
<%Html.RenderPartial("~/themes/default/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" src="<%=ViewData["webd"]%>Comja/showbox2015.js"></script>
</asp:Content>