www.gusucode.com > 中网景企业网站源码时尚版 2009.73码程序 > admin/download_class.asp

    <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="opendb.asp" -->
<%
'Call CheckUserLogin(username)
Call CheckAdmin()
Call AdminRight("AddAdmin",ChannelID,session("admin"))
Call AdminRight("ModiAdmin",ChannelID,session("admin"))

if request("addnew")<>"" then
 rs.open "select * from cnk_downloadclass",conn,1,3
 rs.addnew
 rs("paixu")=Trim(Request.Form("paixu"))
 rs("classname")=Trim(Request.Form("classname"))
 rs("classname_en")=Trim(Request.Form("classname_en"))
 rs.update
 rs.Close
end if

if request("modi")<>"" then
 rs.open "select * from cnk_downloadclass where classid="&Trim(Request.Form("classid")),conn,1,3
 rs("paixu")=Trim(Request.Form("paixu"))
 rs("classname")=Trim(Request.Form("classname"))
 rs("classname_en")=Trim(Request.Form("classname_en"))
 rs.update
 rs.Close
end if

if request("delid")<>"" then conn.execute("delete from cnk_downloadclass where classid="&request("delid"))
%>
<html>

<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="admin.css" rel="stylesheet" type="text/css">
<script language="javascript" src="inc/cnkgl.js"></script>
</head>

<body>
<div class="cnkbox">
 <div class="title">添加下载类别</div>
 <div class="content" align="center">
   <table width="100%" border="0" cellspacing="1">
     <form action="" method="post" name="form2" onSubmit="return validata_form()">
       <tr bgcolor="#f0f0f0">
         <td align="right">排序:</td>
         <td><input name="paixu" type="text" class="input" value="0" size="3" maxlength="3">
           输入数字</td>
       </tr>
       <tr bgcolor="#f0f0f0">
         <td align="right">中文类别名名称:</td>
         <td><input name="classname" type="text" class="input" maxlength="20">
           (20字符以内)</td>
       </tr>
       <tr bgcolor="#f0f0f0">
         <td align="right">英文类别名称:</td>
         <td><input name="classname_en" type="text" class="input" maxlength="20"></td>
       </tr>
       <tr bgcolor="#f0f0f0">
         <td align="right"><input name="addnew" type="hidden" id="addnew" value="1">
            <input name="ChannelID" type="hidden" id="ChannelID" value="<%= ChannelID %>" /></td>
         <td><input type="submit" name="Submit2" value="增加">         </td>
       </tr>
     </form>
   </table>
 </div>
 
  <div class="title">管理下载类别</div>
  <div class="content" align="center">
   <table width="100%" border="0" cellspacing="1">
     <tr bgcolor="#f0f0f0">
       <td align="right">排序</td>
       <td>中文类别名称</td>
       <td>英文类别名称</td>
       <td>修改</td>
       <td>删除</td>
     </tr>
     <% rs.open "select * from cnk_downloadclass order by paixu",conn,1,1 
			 do while not rs.eof%>
     <form action="" method="post" name="form<%= rs("classid") %>">
       <tr bgcolor="#f0f0f0">
         <td align="right"><input name="paixu" type="text" class="input" value="<%= rs("paixu") %>" size="3" maxlength="3"></td>
         <td><input name="classname" type="text" class="input" value="<%= rs("classname") %>" maxlength="20"></td>
         <td><input name="classname_en" type="text" class="input" value="<%= rs("classname_en") %>" maxlength="20"></td>
         <td><input type="submit" name="Submit22" value="修改">
             <input name="classid" type="hidden" id="classid" value="<%= rs("classid") %>">
            <input name="ChannelID" type="hidden" id="ChannelID" value="<%= ChannelID %>" />
             <input name="modi" type="hidden" id="modi" value="1"></td>
         <td><a href="?ChannelID=<%= ChannelID %>&delid=<%= rs("classid") %>" onClick="return cfdel();">删除</a></td>
       </tr>
     </form>
     <% rs.movenext
		  loop
		  rs.close %>
   </table>
 </div>
</div>

</body>
</html>
<% 
conn.close 
set conn=nothing 
%>