<%@ 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" />
<link href="<%=ViewData["webd"]%>Content/themes/daily/css/manypage.css" rel="stylesheet" type="text/css" />
<link href="<%=ViewData["webd"]%>Content/themes/daily/css/dateinfo_top.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/daily/js/haomap.js"></script>
<script type="text/javascript" src="<%=ViewData["webd"]%>Comja/common.js"></script>
<script type="text/javascript" src="<%=ViewData["webd"]%>Comja/news_speak.js"></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" />
<link href="../../../Content/themes/daily/css/manypage.css" rel="stylesheet" type="text/css" />
<link href="../../../Content/themes/daily/css/dateinfo_top.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/daily/js/haomap.js"></script>
<script type="text/javascript" src="../../../Comja/common.js"></script>
<%} %>
<script type="text/javascript">
    var webd="<%=ViewData["webd"].ToString()%>";
	var isie = (navigator.appName == "Microsoft Internet Explorer");
</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;%>
<%ViewData["isdetail"] = "1"; %>
<%Html.RenderPartial("~/themes/daily/userinc/Topsubmany.ascx");%>    
<div class="main_bg clearfix"> 
    <div class="main clearfix">        
        <div class="manypage clearfix">
          <div class="newsdetail clearfix"> 
          <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>"); }%>

                <%//DateTime idate = Fun.Totime(Model.Edittime.ToString());
                  //int yyyy = idate.Year;
                 // int mm = idate.Month;
                 // int dd = idate.Day;
                 // Mvccom.Datetimeshow ds=new Mvccom.Datetimeshow();
                 // string ddd = ds.weekday(idate);
                     %>
            <%--<div class="fagaodate"><%=yyyy%>年<%=mm%>月<%=dd%>日</div>--%> 

            <div class="tp">
			<%if (Model.Author.Length > 1 && Model.Author!="Admin"){ %>
            <span class="reporter">□ 本版撰文/作者 <%=Fun.W3c(Model.Author)%>  </span>
            <%}%>
            <%if (Model.Editer.Length > 1)
                     {%>
                    <span class="au">编辑：<%=Fun.W3c(Model.Editer)%></span>
                    <%}%>
            <%if (Model.Reporter.Length > 1)
            {%>
            <span class="au">记者：<%=Fun.W3c(Model.Reporter)%></span>
            <%}%>
             <%=ViewData["issueday"]%>  阅读：<%=Model.Hits%>
            </div>
          <div class="content" id="newspapercontent">
              <%--=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));
				  %>
                  
                   
					<%if (Model.Froms.Length > 1)
					 {%><div class="froms"> 稿件来源：<%=Model.Froms%> </div>
                      <%}%>                    
                     <%if (Model.Auditor.Length > 1)
                     {%>
                    <div class="au">审核：<%=Fun.W3c(Model.Auditor)%></div>
                    	 <%}%>   	    
                  
          </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() > 900)
										$("#newspapercontent img").eq(i).width(900);  
								} 
								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() > 900)
									$(this).width(900);  
							}
							else
							{
								if ($(this).width() > 900)
									$(this).width(900);  								
								$(this).load(function() {
									if ($(this).width() > 900) 
									$(this).width(900);  							  
								});
							}
					   });
					   //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="clear"><span></span></div>
         </div><!--newsdetail_bg finish-->         
         
         <div class="ft">       
              <div class="next">
                 <%if (Model.Prelink.ToString() != "no")
                  {%>
                 <a href="<%=Model.Prelink %>"><span  class="pre2"><img src="<%=ViewData["webd"]%>Content/themes/daily/images/pre2.png" width="15" height="11" alt="" border="0" /></span>上一篇</a>
                <%}
                  else
                  { %>
                  <span class="nohref"><span class="pre2"><img src="<%=ViewData["webd"]%>Content/themes/daily/images/pre2.png" width="15" height="11" alt="" border="0" /></span>上一篇</span>
                  <%} %>

                  <span class="split"></span>
                <%if (Model.Nextlink.ToString() != "no")
                  {%>
                <a href="<%=Model.Nextlink %>">下一篇<span class="next2"><img src="<%=ViewData["webd"]%>Content/themes/daily/images/next2.png" width="15" height="11" alt="" border="0" /></span></a>
                <%}
                  else
                  { %>
                  <span class="nohref">下一篇<span class="next2"><img src="<%=ViewData["webd"]%>Content/themes/daily/images/next2.png" width="15" height="11" alt="" border="0" /></span></span>
                  <%} %>
             </div>
             
             <div class="zoom">     
             <a href="<%=ViewData["nowpagelink"]%>">返回目录</a> &nbsp;   &nbsp; &nbsp; &nbsp;      
             <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="copy" onclick="CopyAll();"><img src="<%=ViewData["webd"]%>Content/themes/daily/images/copy.png" width="13" height="13" alt="" border="0" /> 全文复制</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:14px;";
					 //newZoom.css("font-size", "19px");
		         }                 
             </script>         
         </div><!--ft finish-->  
      </div><!--newsdetail finish-->  
      <%=ViewData["updatehits"]%>
              

           <%-- <div class="ban2">
                <div class="bktitle" style="width:260px;">
                <span><%Response.Write("第" + eachban.Pagename + "版：" + eachban.Pagetitle);%></span>
                <a href="<%=eachban.Pagepdf%>" target="_blank"><img src="<%=ViewData["webd"]%>Content/themes/daily/images/pdf.png" alt="PDF原版" border="0" width="17"  height="16" />PDF下载</a>
                </div>
                <div class="nextpage">
                    <%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>
                      <%} %>
                     <span class="split"></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>ban2 end--%>
        </div><%--manypage end--%>    
    </div><!--main 979-->  
    <div class="clear"><span></span></div>
</div><!--main_bg  -->   

<%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"></script>
  <%--禁止网页另存为： --%>
  <noscript><iframe src="*.html"></iframe></noscript>
  <%if (1 == 0)
    { %>
  <script type="text/javascript" src="../../../Comja/copyfalse.js"></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>
