<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<!--#include file="session.asp"-->
<!--#include file="../conn.asp"-->
<title>资讯分类管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script language="javascript">
function selectall(v){
var f = document.forms["listform"];
for (i=0;i<f.elements.length;i++)
if (f.elements[i].name=="ids")
     f.elements[i].checked = v;
	 }
</script>
<SCRIPT language=JavaScript>
<!--//
function CheckForm()
{
if(document.myform.news_class_name.value=="")
	{
	    alert("请输入分类名称!!");
        document.myform.news_class_name.focus();
	    return false;
	}

if(document.myform.news_class_wz.value=="")
	{
	    alert("请输入分类，请填写数字!");
        document.myform.news_class_wz.focus();
	    return false;
	}

}
//-->
</SCRIPT>

<link rel="stylesheet" href="images/colorbox.css" />
<link rel="stylesheet" type="text/css" href="images/admin.css">
<script src="images/jquery.min.js"></script>
<script src="images/jquery.colorbox.js"></script>
</head>
<body>
<script>
	$(document).ready(function(){
		$(".iframe").colorbox({iframe:true, width:"500", height:"300",top:"50",left:"50"});
		$(".inline").colorbox({inline:true, width:"500", height:"300",top:"50",left:"50"});
	});
</script>
</head>
<body>
<div class="w760box">
<form name="listform" action="cmd.asp?act=Del_All_Info&type=news_class" method="post">
<div class="w730box">
	<div class="fl ml15" style="width:600px;text-align:center;"><h3>新闻分类管理</h3></div>
	<a class='inline' href="#inline_content" style="width:100px;background-position: left center;  background-image:url('images/add.gif'); background-repeat:no-repeat;display:block;float:right;text-align:right;">添加新闻分类</a>
</div>
	
	<div class="c10"></div>
	
	
<table cellspacing="0" id="table1" style="width:730px;margin-left:15px;">
		<%
		sql="select * from news_class order by id asc"
		Set rs = Server.CreateObject("ADODB.Recordset")
		rs.open sql,conn,1,1
		if not rs.eof then
		for i=1 to 20 %>
				<tr class="info">
					<td width="196" height="28" class="listtxt"><a <% if rs("news_class_name")="本站公告" then%>title="系统分类，不能删除" <%else%>href="edit_news_class.asp?id=<%=rs("id")%>" <%end if%>><%=rs("news_class_name")%></a></td>
					<td width="196" height="28" class="listtxt"><%=rs("news_class_wz")%></td>
					<td width="140" height="28" class="listtxt" align="center">
					<a class='iframe' href="edit_news_class.asp?id=<%=rs("id")%>"><img  src="images/edit.gif" style="margin-top:8px;"></a>　<% if rs("news_class_name")="本站公告" then%><img  src="images/del.gif" title="系统分类，不能删除，只能修改" style="margin-top:8px;"> <%else%><a href="cmd.asp?act=Del_Info&type=news_class&id=<%=rs("id")%>"><img  src="images/del.gif" style="margin-top:8px;"></a><%end if%></td>
				</tr>
				<%
				rs.movenext()
				if rs.eof then
				exit for
				end if
				next
				%>
				
			<% else %>
			
			<tr class="info">
					<td height="28" class="listtxt" colspan="6">没有找到任何数据！</td>
			</tr>
			
			<% end if %>
			</table>
			
		<div class="fenye" style="width:720px;height:40px;line-height:40px;text-align:center;">
		<%
		response.write "您共添加了："&rs.RecordCount&"个新闻分类。"
		rs.close
		set rs=nothing
		%>
		</div>
</form>
</div>



<div style='display:none'>
	<div id='inline_content'>
	<div class="c10"></div><div class="c10"></div>
	<div class="w760box" style="width:450px;margin:0 auto;">
		<div class="th3"><h3>添加新闻分类</h3></div>
		<div class="c8"></div>
			<form method="post" action="cmd.asp?act=Add_News_Class" name="myform"  onsubmit="javascript:return CheckForm();">
			<table  cellspacing="0" id="table1" style="width:400px;margin-left:25px;">
				<tr>
					<td class="title_td" width="205">分类名称：</td>
					<td class="bottomline_td pl8" width="480"><input type="text" name="news_class_name" size="40" class="input" /></td>
				</tr>
				<tr>
					<td class="title_td" width="205">排列顺序：</td>
					<td class="bottomline_td pl8" width="480"><input type="text" name="news_class_wz" size="30" class="input" onKeyUp="value=value.replace(/[^\d]/g,'') "onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))" /></td>
				</tr>
				<tr>
						<td width="392">　</td>
						<td width="140" >
						<div class="c10"></div>
						<input type="hidden" value="ok" name="send"><input type="image" name="imageField"  src="images/RegBtn.jpg"/></td>
				</tr>
			</table>
		</form>
	</div>
	</div>

</div>

</body>
</html>