<table width="96%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="12" colspan="2">&nbsp;</td>
  </tr>
  <tr>

    <td>
    
    
<%sub news_class_body()
dim totalnews,Currentpage,totalpages,i,language
Language=request.QueryString("language")
if Language<>"" then
sql="select * from news_class  where news_language=" & language &" order by news_id ASC"
else
sql="select * from news_class  where news_language=0 order by news_id ASC"
end if
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
%>

<HTML>
<HEAD>
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<style type="text/css">
A{TEXT-DECORATION: none}
A:link {COLOR: #666666; FONT-FAMILY: 宋体; TEXT-DECORATION: none}
A:visited {COLOR: #666666; FONT-FAMILY: 宋体; TEXT-DECORATION: none}
A:active {FONT-FAMILY: 宋体; TEXT-DECORATION: none}
A:hover {BORDER-BOTTOM: 1px dotted; BORDER-LEFT-WIDTH: 1px; BORDER-RIGHT-WIDTH: 1px; BORDER-TOP-WIDTH: 1px; COLOR: #ff6600; TEXT-DECORATION: none}
BODY {
FONT-SIZE: 12px;
COLOR: #666666;
FONT-FAMILY:  宋体;
background-color: #ffffff; 
background-image: url(images/show.gif);
SCROLLBAR-FACE-COLOR: #e8e7e7; 
SCROLLBAR-HIGHLIGHT-COLOR: #ffffff; 
SCROLLBAR-SHADOW-COLOR: #ffffff; 
SCROLLBAR-3DLIGHT-COLOR: #cccccc; 
SCROLLBAR-ARROW-COLOR: #ff6600; 
SCROLLBAR-TRACK-COLOR: #EFEFEF; 
SCROLLBAR-DARKSHADOW-COLOR: #b2b2b2; 
SCROLLBAR-BASE-COLOR: #000000
}
TABLE {BORDER-COLLAPSE: collapse; FONT-FAMILY: 宋体; FONT-SIZE: 9pt}
.button{height:18px;width:62px;background:#f6f6f9 url(images/ButtonBg.gif); border:solid 1px #5589AA;color: #000000 ;FONT-SIZE: 9pt}
.lanyu{border:solid 1px #5589AA;color: #000000 ; font-size: 12px;}
.font {  filter: DropShadow(Color=#cccccc, OffX=2, OffY=1, Positive=2); text-decoration: none; font-size: 9pt}
</style>
<LINK href="inc/djcss.css" type=text/css rel=StyleSheet>
<META content="MSHTML 6.00.2800.1126" name=GENERATOR>
</HEAD>
<body onkeydown=return(!(event.keyCode==78&&event.ctrlKey)) background=inc/dj_bg.gif>
<table align="center" width="96%" border="1" cellspacing="0" cellpadding="4" bordercolor="#C0C0C0" style="border-collapse: collapse">
        <tr bgcolor="#E8E8E8"> 
          <td height="30" colspan="4">&nbsp;新闻分类&nbsp;&nbsp;</td>
	    </tr>
        <tr bgcolor="#E8E8E8" align="center"> 
          <td class="chinese" width="10%" bgcolor="#F5F5F5">编号</td>
          <td width="70%" height="30" bgcolor="#F5F5F5" class="chinese">类别名称</td>
          <td class="chinese" width="20%" bgcolor="#F5F5F5">操作</td>
        </tr>
<%if Not rs.EOF then
dim newsperpage
newsperpage=10
rs.movefirst
rs.pagesize=newsperpage
if trim(request("page"))<>"" then
   page1=trim(request("page"))
   if check_num(page1)=true then
       currentpage=clng(request("page"))
       if currentpage>rs.pagecount then
          currentpage=rs.pagecount
       End if
   else
      currentpage=1
   end if
else
   currentpage=1
End if
   totalnews=rs.recordcount
   if currentpage<>1 then
       if (currentpage-1)*newsperpage<totalnews then
	       rs.move(currentpage-1)*newsperpage
		   dim bookmark
		   bookmark=rs.bookmark
	   End if
   End if
   if (totalnews mod newsperpage)=0 then
      totalpages=totalnews\newsperpage
   else
      totalpages=totalnews\newsperpage+1
   End if
i=0
Do While Not rs.EOF and i<newsperpage%>
        <tr> 
          
    <td bgcolor="#FFFFFF" class="chinese" align="center"><%=rs("news_id")%></td>
    <td bgcolor="#FFFFFF" class="chinese"><a href="admin_news_class.asp?id=<%=rs("news_id")%>&Language=<%=rs("news_language")%>&action=edit#edit" target="_blank"><%=left(rs("news_type"),30)&""%></a> </strong></font></td>
          <td bgcolor="#FFFFFF" class="chinese" align="center"><a href="admin_news_class.asp?id=<%=rs("news_id")%>&Language=<%=rs("news_language")%>&action=edit#edit">修改</a> 
            <a href="admin_news_class.asp?id=<%=rs("news_id")%>&Language=<%=rs("news_language")%>&action=del#del">删除</a></td>
        </tr>
<%i=i+1
rs.movenext
loop
else
if rs.EOF and rs.BOF then%>
        <tr align="center" bgcolor="#FFFFFF"> 
          <td height="30" colspan="3" class="chinese">当前没有分类！</td>
  </tr>
<%End if
End if%>
</table>
      <table align="center" width="96%" border="0" cellspacing="0" cellpadding="0">
	    <form name="form2" method="post" action="admin_news_class.asp">
        <tr>
          
      <td height="30" align="right" class="chinese"> <a href="admin_news_class.asp?page=<%=page%>" title="下一页">下一页</a> 
        &nbsp;&nbsp;
        <input type="text" name="page" class="textarea" size="4">
          <input type="submit" name="Submit" value="Go" class="button"></td>
        </tr>
		</form>
      </table>
      <br>
	  <%if request.QueryString("action")="new" then%>
      <table align="center" width="96%" border="1" cellspacing="0" cellpadding="4" bordercolor="#C0C0C0" style="border-collapse: collapse">
        <form name="form1" method="post" action="">
          <tr> 
            <td height="30" bgcolor="#E8E8E8">&nbsp;<a name="newp">新的分类</a></font></td>
          </tr>
          <tr> 
            <td height="30" bgcolor="#FFFFFF" class="chinese">&nbsp;分类名称 ： 
              <input name="news_type" type="text" class="textarea"  size="20">
              <input name="news_language" type="radio" value="0" checked>
中文</td>
          </tr>
          <tr> 
            <td bgcolor="#F5F5F5" class="chinese" height="40" align="center">
              <input type="submit" name="Submit2" value="确定新增" class="button">
               　 
               <input type="reset" name="Reset" value="清空重填" class="button">            </td>
          </tr>
		  <input type="hidden" name="action" value="new">
		  <input type="hidden" name="MM_insert" value="true">
        </form>
      </table>
	  <%End if
if request.QueryString("action")="edit" then
if request.querystring("id")="" then
  errmsg=errmsg+"<br>"+"<li>请指定操作的对象！"
  Call diserror()
  response.End
else
  if Not isinteger(request.querystring("id")) then
    errmsg=errmsg+"<br>"+"<li>非法的ID参数！"
	Call diserror()
	response.End
  End if
End if
sql="select * from news_class where news_id="&cint(request.querystring("id"))
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
%>
      <table align="center" width="96%" border="1" cellspacing="0" cellpadding="4" bordercolor="#C0C0C0" style="border-collapse: collapse">
        <form name="form1" method="post" action="">
          <tr> 
            <td height="30" bgcolor="#E8E8E8">&nbsp;<a name="editp">修改分类</a></font></td>
          </tr>
          <tr> 
            <td bgcolor="#FFFFFF" class="chinese">&nbsp;分类名称 ：
              <input type="text" name="news_type" size="20" class="textarea" value="<%=rs("news_type")%>">
<input name="news_language" type="radio" value="0"  <%if rs("news_language")="0" then%> checked<%end if%>>
中文</td>
          <tr> 
            <td bgcolor="#F5F5F5" class="chinese" height="40" align="center"> 
              <input type="submit" name="Submit" value="确定修改" class="button"> 
              　
              <input type="reset" name="Reset" value="清空重填" class="button">
            【<a href="admin_news_class.asp">返回</a>】</td>
          </tr>
		  <input type="hidden" name="id" value="<%=rs("news_id")%>">
		  <input type="hidden" name="action" value="edit">
          <input type="hidden" name="MM_insert" value="true">
        </form>
      </table>
	  <%End if
if request.QueryString("action")="del" then
if request.querystring("id")="" then
  errmsg=errmsg+"<br>"+"<li>请指定操作的对象！"
  Call diserror()
  response.End
else
  if Not isinteger(request.querystring("id")) then
    errmsg=errmsg+"<br>"+"<li>非法的ID参数！"
	Call diserror()
	response.End
  End if
End if
sql="select * from news_class where news_id="&cint(request.querystring("id"))
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1%>
      <table align="center" width="96%" border="1" cellspacing="0" cellpadding="4" bordercolor="#C0C0C0" style="border-collapse: collapse">
        <form name="form1" method="post" action="">
          <tr> 
            <td height="30" bgcolor="#E8E8E8">&nbsp;<a name="del" id="del">删除分类</a>&nbsp;&nbsp;注意：删除分类将同时删除分类内容,建议你使用修改功能！</font></td>
          </tr>
          <tr> 
            
      <td height="30" bgcolor="#FFFFFF" class="chinese">&nbsp;分类名称 ： </td>
          </tr>
          <tr> 
            <td bgcolor="#F5F5F5" class="chinese" height="40" align="center"> 
              <input name="Submit" type="submit" class="button" id="Submit" value="确定删除"> 
            【<a href="admin_news_class.asp">返回</a>】</td>
          </tr>
          <input type="hidden" name="id" value="<%=rs("news_id")%>">
          <input type="hidden" name="action" value="del">
          <input type="hidden" name="MM_insert" value="true">
        </form>
      </table>
	  <%End if
%>
      
	
      <br>
    </td>
  </tr>
  <tr> 
    <td colspan="3" height="1" background="images/dotlineh.gif"></td>
  </tr>
</table>
<%
rs.close
set rs=Nothing
End sub
%>
    
    
    
    
    </td>
  </tr>
</table>




