<!-- #include file="../inc/checkadmin.asp" -->
<!-- #include file="../inc/conn.asp" -->
<!-- #include file="inc/Config.asp" -->

<% if request.QueryString("delete")<>"" then
de_id=request.QueryString("delete")
set rs=server.createobject("adodb.recordset")
sql="select * from Web_Navigation where n_id="&de_id&""
rs.open sql,conn,1,3
rs.filter= "n_id ="&de_id&""
rs.delete
rs.update
response.write "<script>alert('恭喜，已成功删除编号为："&de_id&" 的栏目！');location.href='ColumnList.asp'</script>"
rs.close
set rs=nothing
%>

<%elseif request.QueryString("delete2")<>"" then
de_id2=request.QueryString("delete2")
set rs=server.createobject("adodb.recordset")
sql="select * from Web_2Navigation where n_id="&de_id2&""
rs.open sql,conn,1,3
rs.filter= "n_id ="&de_id2&""
rs.delete
rs.update
response.write "<script>alert('恭喜，已成功删除编号为："&de_id2&" 的二级栏目！');location.href='ColumnList.asp'</script>"
rs.close
set rs=nothing
response.end
end if
%>
<% 
ye=Request.QueryString("page")
if ye="" then
yema=""
else
yema=" - 第"&ye&"页" 
end if
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
		
		<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
		
		<title>栏目列表<%=yema%>- <%=admin_name%></title>
		
		<!--                       CSS                       -->
	  
		<!-- Reset Stylesheet -->
		<link rel="stylesheet" href="images/css/reset.css" type="text/css" media="screen" />
	  
		<!-- Main Stylesheet -->
		<link rel="stylesheet" href="images/css/style.css" type="text/css" media="screen" />
		
		<!-- Invalid Stylesheet. This makes stuff look pretty. Remove it if you want the CSS completely valid -->
		<link rel="stylesheet" href="images/css/invalid.css" type="text/css" media="screen" />	
		
		<!-- Colour Schemes
	  
		Default colour scheme is green. Uncomment prefered stylesheet to use it.
		
		<link rel="stylesheet" href="images/css/blue.css" type="text/css" media="screen" />
		
		<link rel="stylesheet" href="images/css/red.css" type="text/css" media="screen" />  
	 
		-->
		
		<!-- Internet Explorer Fixes Stylesheet -->
		
		<!--[if lte IE 7]>
			<link rel="stylesheet" href="images/css/ie.css" type="text/css" media="screen" />
		<![endif]-->
		
		<!--                       Javascripts                       -->
  
		<!-- jQuery -->
		<script type="text/javascript" src="images/scripts/jquery-1.3.2.min.js"></script>
		
		<!-- jQuery Configuration -->
		<script type="text/javascript" src="images/scripts/simpla.jquery.configuration.js"></script>
		
		<!-- Facebox jQuery Plugin -->
		<script type="text/javascript" src="images/scripts/facebox.js"></script>
		
		<!-- jQuery WYSIWYG Plugin -->
		<script type="text/javascript" src="images/scripts/jquery.wysiwyg.js"></script>
		
		<!-- jQuery Datepicker Plugin -->
		<script type="text/javascript" src="images/scripts/jquery.datePicker.js"></script>
		<script type="text/javascript" src="images/scripts/jquery.date.js"></script>
		<!--[if IE]><script type="text/javascript" src="images/scripts/jquery.bgiframe.js"></script><![endif]-->

		
		<!-- Internet Explorer .png-fix -->
		
		<!--[if IE 6]>
			<script type="text/javascript" src="images/scripts/DD_belatedPNG_0.0.7a.js"></script>
			<script type="text/javascript">
				DD_belatedPNG.fix('.png_bg, img, li');
			</script>
		<![endif]-->
	<SCRIPT LANGUAGE="JavaScript">

<!-- Begin
var checkflag = "false";
function check(field) {
if (checkflag == "false") {
for (i = 0; i < field.length; i++) {
field[i].checked = true;}
checkflag = "true";
return "false"; }
else {
for (i = 0; i < field.length; i++) {
field[i].checked = false; }
checkflag = "false";
return "true"; }
}
//  End -->
</script>	
	</head>
  
	<body><div id="body-wrapper"> <!-- Wrapper for the radial gradient background -->
		<!-- #include file="Menu.asp" -->
		 <!-- End #sidebar -->
		
		<div id="main-content"> <!-- Main Content Section with everything -->
      			<noscript> <!-- Show a notification if the user has disabled javascript -->
				<div class="notification error png_bg">
					<div>
						亲爱的，你的浏览器不支持。请升级您的浏览器。</div>
				</div>
</noscript>
			
			<!-- Page Head -->
			<div class="content-box">
			  <!-- Start Content Box -->
			  <div class="content-box-header">
			    <h3>栏目列表</h3>
			    <ul class="content-box-tabs">
			      <li></li>
			      <!-- href must be unique and match the id of target div -->
		        </ul>
			    <div class="clear"></div>
		      </div>
			  <!-- End .content-box-header -->
			  <div class="content-box-content">
			    <div class="tab-content default-tab" id="tab1">
			      <!-- This is the target div. id must match the href of this div's tab -->
			      <div class="notification attention png_bg"> <a href="#" class="close"><img src="images/images/icons/cross_grey_small.png" title="Close this notification" alt="close" /></a>
			        <div> 操作提示：在这里您可以对网站的栏目进行管理。</div>
		          </div>
			      <table>
                  <form name="form" method="post" action="?delete=all">
			        <thead>
		            </thead>
			        <tr>
			          <th ><input type=checkbox value="全选" onClick="this.value=check(this.form.id)"></th>
			          <th >编号</th>
			          <th >名称</th>
			          <th >排序</th>
			          <th >类型</th>
			          <th >状态</th>
			          <th >时间</th>
			          <th >操作</th>
		            </tr>
			        <tbody>
			          <% 
set rs=server.createobject("adodb.recordset")
sql="select * from Web_Navigation order by n_id "
rs.open(sql),conn,1,1
If rs.bof And rs.eof Then
response.write "暂时没有任何栏目。<br/><br/>"
response.end
end if
rs.pagesize=15 
page=Request.QueryString("page") 
if page="" then page=1
rs.absolutepage=page 
for i= 1 to rs.pagesize
if rs.eof then
exit for
end if
n_id=rs("n_id")
n_name=rs("n_name")
n_keywords=rs("n_keywords")
n_description=rs("n_description")
n_content=rs("n_content")
n_time=rs("n_time")
n_Display=rs("n_Display")
n_pattern=rs("n_pattern")
n_Sequence=rs("n_Sequence")
%>
			          <tr >
			            <td ><input type="checkbox" name="id" value="<%=n_id%>"></td>
			            <td ><%=n_id%></td>
			            <td ><%=n_name%> [ 一级栏目 ]</td>
			            <td ><%=n_Sequence%></td>
			            <td >
                         <%
						 if n_pattern=1 then 
						 moshi="单页"
						 end if
						 %>
                         <%
						 if n_pattern=2 then 
						 moshi="列表"
						 end if
						 %>
                          <%
						 if n_pattern=3 then 
						 moshi="图片"
						 end if
						 %>
                         <%
						 if n_pattern=4 then 
						 moshi="反馈"
						 end if
						 %>
                         <%
						 if n_pattern=5 then 
						 moshi="关于"
						 end if
						 %>
                         <%
						 if n_pattern=6 then 
						 moshi="链接"
						 end if
						 %>
                         <%
						 if n_pattern=7 then 
						 moshi="说说"
						 end if
						 %>
[ <%=moshi%> ]
</td>
			            <% if n_Display=1 then
n_view="<font color='#666666'>显示</font>"
else
n_view="<font color='#DC4900'>隐藏</font>"
end if
%>
			            <td ><%=n_view%></td>
			            <td ><%=n_time%></td>
			            <td ><a href="NewColumn2.asp?id=<%=n_id%>" ><img src="images/images/icons/pencil.png" alt="New" /></a> &nbsp; &nbsp;<a href="EditColumn.asp?id=<%=n_id%>" ><img src="images/images/icons/hammer_screwdriver.png" alt="Edit Meta" /></a> &nbsp; &nbsp;
                        <%if n_pattern=3 or n_pattern=4 or n_pattern=5 or n_pattern=6 then%>
                        <a href="?delete=<%=n_id%>" onclick="return confirm('请注意：\n\n此模板页是不可以新增的，建议将其隐藏，以备今后使用！\n\n您真的确定要删除此条数据吗?')">
                        <%else%>
                        <a href="?delete=<%=n_id%>" onclick="return confirm('请注意，删除后不可恢复！\n\n您真的确定要删除此条数据吗?')">
                        <%end if%>
                        <img src="images/images/icons/cross.png" alt="Delete" /></a></td>
		              </tr>
			          <% 
set rs2=server.createobject("adodb.recordset")
sql="select * from Web_2Navigation where n_Belong="&n_id&" order by n_id "
rs2.open(sql),conn,1,1
do while not rs2.eof
n_id2=rs2("n_id")
n_name2=rs2("n_name")
n_keywords2=rs2("n_keywords")
n_description2=rs2("n_description")
n_content2=rs2("n_content")
n_time2=rs2("n_time")
n_Display2=rs2("n_Display")
n_pattern2=rs2("n_pattern")
n_Sequence2=rs2("n_Sequence")
%>
			          <tr >
			            <td ><input type="checkbox" name="id" value="<%=n_id2%>"></td>
			            <td ><font color="#FF0000"><%=n_id2%></font></td>
			            <td ><font color="#FF0000"><%=n_name2%> [ 次级栏目 ]</font></td>
			            <td ><font color="#FF0000"><%=n_Sequence2%></font></td>
			            <td ><font color="#FF0000"><%if n_pattern2=1 then 
	 response.write "[ 单页 ]" 
	 elseif n_pattern2=2 then 
	 response.write "[ 列表 ]" 
	 elseif n_pattern2=3 then 
	 response.write "[ 图片 ]"
	 elseif n_pattern2=4 then 
	 response.write "[ 反馈 ]"
	 end if%></font></td>
			            <% if n_Display2=1 then
n_view2="<font color='#666666'>显示</font>"
else
n_view2="<font color='#FF0000'>隐藏</font>"
end if
%>
			            <td ><font color="#FF0000"><%=n_view2%></font></td>
			            <td ><font color="#FF0000"><%=n_time2%></font></td>
			            <td ><a href="EditColumn2.asp?id=<%=n_id2%>" ><img src="images/images/icons/hammer_screwdriver.png" alt="Edit Meta" /></a><a href="EditColumn2.asp?id=<%=n_id2%>" ></a> &nbsp; &nbsp; <a href="?delete2=<%=n_id2%>" onclick="return confirm('请注意，删除后不可恢复！\n\n您真的确定要删除此条数据吗?')"><img src="images/images/icons/cross.png" alt="Delete" /></a></td>
		              </tr>
			          <%
rs2.movenext
loop
rs2.close
set rs2=nothing
%>
			          <%
rs.movenext
next
%>
		            </tbody>
                    </form>
		          </table>
			      <p>
               <br />
当前第<%=page%>页，共有<%=rs.pagecount%>页，共有：<%=rs.recordcount%>条记录
<%if page=1 then%>
首页
<%else%>
<a href="?page=1">首页</a>
<%end if%>

<%if page=1 then%>
上一页
<%else%>
<a href="?page=<%=page-1%>">上一页</a>
<%end if%>

<%if rs.pagecount<page+1 then%>
下一页
<%else%>
<a href="?page=<%=page+1%>">下一页</a>
<%end if%>

<%if rs.pagecount<page+1 then%>
尾页
<%else%>
<a href="?page=<%=rs.pagecount%>">尾页</a>
<%end if
rs.close
set rs=nothing
%>
		          </p>
</div>
			    <!-- End #tab1 -->
			    <div class="tab-content" id="tab2"></div>
			    <!-- End #tab2 -->
		      </div>
		  <!-- End .content-box-content --></div> <!-- End .clear --><!-- End .content-box --><!-- End .content-box --><!-- End .content-box -->

			
			
			<!-- Start Notifications --><!-- End Notifications -->
			
<div id="footer">
				<small> <!-- Remove this notice or replace it with whatever you want -->
						<%=Copyright%>
				</small>
			</div><!-- End #footer -->
			
		</div> <!-- End #main-content -->
		
	</div></body>
  

</html>
<!-- #include file="../inc/close.asp" -->