<%@ Register TagPrefix="uc1" TagName="NewsCatNav" Src="Modules/NewsCatNav.ascx" %>
<%@ Register TagPrefix="uc1" TagName="Header" Src="Modules/Header.ascx" %>
<%@ Register TagPrefix="uc1" TagName="Helper" Src="Modules/Helper.ascx" %>
<%@ Register TagPrefix="uc1" TagName="Footer" Src="../../Modules/Footer.ascx" %>
<%@ Page language="c#" Codebehind="NewsCat.aspx.cs" AutoEventWireup="false" Inherits="wqeshop.NewsCat" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<!--#include file="../../inc/head.inc"-->
<title><%=GetResourceString("NewsCategories")%>-<%=config.SiteTitle%></title>
</head>
<body id="MenuM8">
<uc1:Header id="Header1" runat="server"></uc1:Header>
<div class="twidth">
  <div id="cnav">
    <div class="l"></div>
    <div class="r"></div>
    <div class="m"><%=GetResourceString("WhereYouAre")%><a href='/<%=System.Configuration.ConfigurationSettings.AppSettings["ShopFolder"]%><%if(config.html==""){%>Default.aspx<%}else{%>index.<%=config.html%><%}%>'><%=GetResourceString("Home")%></a> <font face="Times New Roman, Times, serif">>></font> <%=GetResourceString("NewsCategories")%></div>
  </div>
  <div id="middle">
    <div class="middlel">
      <uc1:NewsCatNav id="NewsCatNav1" runat="server"></uc1:NewsCatNav>
    </div>
    <div class="middler">
      <div class="mframe">
        <div class="tl"></div>
        <div class="tr"></div>
        <div class="tm"><%=GetNewsCategoryName()%></div>
        <div class="wrapper"><div class="ml"></div>
        <div class="mr"></div>
        <div class="mm">
          <table>
            <tr>
              <td width="10"></td>
              <td height="300" valign="top"><%BindNewsList(10);%>
                <asp:DataList ID="dlNewsList" Runat="server" RepeatColumns="1">
                  <ItemTemplate> <img src='/<%=System.Configuration.ConfigurationSettings.AppSettings["ShopFolder"]%>images/items.gif'> <a href='/<%=System.Configuration.ConfigurationSettings.AppSettings["ShopFolder"]%><%if(config.html==""){%>NewsShow.aspx?NewsID=<%# DataBinder.Eval(Container.DataItem, "ArticleID") %><%}else{%>articles/News_<%# DataBinder.Eval(Container.DataItem, "ArticleID") %>.<%=config.html%><%}%>'> <%#DataBinder.Eval(Container.DataItem,"Title")%> </a> <span class='gray' style='font-family:arial;font-size:8pt'>(<%#DataBinder.Eval(Container.DataItem,"AddTime")%>)</span> </ItemTemplate>
                </asp:DataList>
              </td>
              <td width="10"></td>
            </tr>
            <tr>
              <td colspan="3" height="10"></td>
            </tr>
            <tr>
              <td></td>
              <td><table width="100%">
                  <tr>
                    <td><asp:hyperlink id="hplPrev" runat="server"><%=GetResourceString("PreviousPage")%></asp:hyperlink>
                      [&nbsp;
                      <asp:Label ID="lbPage" Runat="server"></asp:Label>
                      &nbsp;]
                      <asp:hyperlink id="hplNext" runat="server"><%=GetResourceString("NextPage")%></asp:hyperlink>
                    </td>
                    <td align="right"><asp:label id="lblPagerInfo" runat="server"></asp:label>
                      &nbsp;&nbsp;&nbsp;&nbsp;
                      <input type="text" name="gopage"  onkeyup="isNumber()" class="inputbg" size="1">
                      <input type="submit" value="Go" onclick="return GoPage()">
                      <script type="text/javascript">
															function GoPage() 
													        { 
													            if(trim(document.all.gopage.value)!="" )
		                                                        {
			                                                        if(document.all.gopage.value!="0")
			                                                        {
													                    if(document.getElementById('gopage').value > <%=totalPage %>)
													                    {
													                        alert('输入的数字大于总页数');
													                        return false;
													                    }
													                    else
													                    {
														                    javascript:window.location.href="/<%=System.Configuration.ConfigurationSettings.AppSettings["ShopFolder"]%>NewsCat.aspx?CatID=<%=Request.QueryString["CatID"]%>&Page=" + document.all.gopage.value;
														                }
        														        
														            }
			                                                        else
			                                                        {  
				                                                        alert("输入错误！");
				                                                        document.all.gopage.value="";
				                                                         return false;
			                                                        }
		                                                        }
		                                                        else
		                                                        {
			                                                        alert("请输入要跳转到的页面");
			                                                        document.all.gopage.value="";
			                                                        return false;
		                                                        }
													        }
													        
													        function trim(str)
	                                                        {
		                                                        for(var i = 0; i<str.length && str.charAt(i)==" "; i++);
		                                                        for(var j =str.length; j>0 && str.charAt(j-1)==" "; j--);
		                                                        if(i>j) return "";
		                                                        return str.substring(i,j);
	                                                        }
														    
														     function isNumber()
                                                            {
	                                                            document.getElementById("gopage").value = document.getElementById("gopage").value.replace(/\D/g,"");
                                                            }
															</script>
                    </td>
                  </tr>
                </table></td>
              <td></td>
            </tr>
            <tr>
              <td colspan="3" height="20"></td>
            </tr>
          </table>
        </div>
        </div><div class="bl"></div>
        <div class="br"></div>
        <div class="bm"></div>
      </div>
    </div>
  </div>
</div>
<uc1:Helper id="Helper1" runat="server"></uc1:Helper>
<uc1:Footer id="Footer1" runat="server"></uc1:Footer>
</body>
</html>
