📄 admin_downsort.asp
字号:
<!--#INCLUDE FILE="../HXINCLUDE/HXINCLUDEHEAD.ASP"-->
<%
if WS_S.MemberPriv("WS_FrontSetadmin")<>1 then HX_GoBack "对不起,您的权限不够!",""
dim rscat,sqlcat,colparam1,rsclass,sqlclass,rstotal,none,showye,founderr
Rem 判断数字是否整形
function isInteger(para)
on error resume next
dim str
dim l,i
if isNUll(para) then
isInteger=false
exit function
end if
str=cstr(para)
if trim(str)="" then
isInteger=false
exit function
end if
l=len(str)
for i=1 to l
if mid(str,i,1)>"9" or mid(str,i,1)<"0" then
isInteger=false
exit function
end if
next
isInteger=true
if err.number<>0 then err.clear
end function
if request.form("MM_insert") then
if request.form("action")="newcat" then
sql="select * from a125_down"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
rs.addnew
dim cat_name
cat_name=trim(replace(request.form("cat_name"),"'",""))
cat_name=WS_s.HX_Replace(cat_name)
if cat_name="" then
founderr=true
Response.Write("<script language=javascript>alert('你必须填写分类名称!');history.back(1);</script>")
else
rs("cat_name")=cat_name
end if
if founderr then
call diserror()
response.end
else
rs.update
rs.close
set rs=nothing
conn.Close
Set conn=nothing
response.redirect "admin_downsort.asp"
end if
elseif request.form("action")="newclass" then
sql="select * from a125_d_class"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
rs.addnew
dim class_name,cat_id
cat_id=cint(request.form("cat_id"))
class_name=trim(replace(request.form("class_name"),"'",""))
class_name=WS_s.HX_Replace(class_name)
if cat_id<1 then
founderr=true
Response.Write("<script language=javascript>alert('你必须选择所属分类名称!');history.back(1);</script>")
else
rs("cat_id")=cat_id
end if
if class_name="" then
founderr=true
Response.Write("<script language=javascript>alert('你必须填写子分类名称!');history.back(1);</script>")
else
rs("class_name")=class_name
end if
if founderr then
call diserror()
response.end
else
rs.update
rs.close
set rs=nothing
conn.Close
Set conn=nothing
response.redirect "admin_downsort.asp"
end if
elseif request.form("action")="editcat" then
if cint(request.form("id"))<1 then
founderr=true
Response.Write("<script language=javascript>alert('非法的分类参数!');history.back(1);</script>")
response.end
end if
sql="select * from a125_down where cat_id="&request.form("id")
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
cat_name=trim(replace(request.form("cat_name"),"'",""))
cat_name=WS_s.HX_Replace(cat_name)
if cat_name="" then
founderr=true
Response.Write("<script language=javascript>alert('你必须填写分类名称!');history.back(1);</script>")
else
rs("cat_name")=cat_name
end if
if founderr then
call diserror()
response.end
else
rs.update
rs.close
set rs=nothing
conn.Close
Set conn=nothing
response.redirect "admin_downsort.asp"
end if
elseif request.form("action")="editclass" then
if cint(request.form("id"))<1 then
founderr=true
Response.Write("<script language=javascript>alert('非法的分类参数!');history.back(1);</script>")
response.end
end if
sql="select * from a125_d_class where class_id="&request.form("id")
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
cat_id=cint(request.form("cat_id"))
class_name=trim(replace(request.form("class_name"),"'",""))
class_name=WS_s.HX_Replace(class_name)
if cat_id<1 then
founderr=true
Response.Write("<script language=javascript>alert('你必须选择所属分类名称!');history.back(1);</script>")
else
rs("cat_id")=cat_id
end if
if class_name="" then
founderr=true
Response.Write("<script language=javascript>alert('你必须填写子分类名称!');history.back(1);</script>")
else
rs("class_name")=class_name
end if
if founderr then
call diserror()
response.end
else
rs.update
rs.close
set rs=nothing
conn.Close
Set conn=nothing
response.redirect "admin_downsort.asp"
end if
elseif request.form("action")="delcat" then
if cint(request.form("id"))<1 then
founderr=true
Response.Write("<script language=javascript>alert('非法的分类参数!');history.back(1);</script>")
response.end
end if
sql="select * from a125_down where cat_id="&request.form("id")
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
rs.delete
rs.close
set rs=nothing
conn.Close
Set conn=nothing
response.redirect "admin_downsort.asp"
elseif request.form("action")="delclass" then
if cint(request.form("id"))<1 then
founderr=true
Response.Write("<script language=javascript>alert('非法的分类参数!');history.back(1);</script>")
response.end
end if
sql="select * from a125_d_class where class_id="&request.form("id")
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
rs.delete
rs.close
set rs=nothing
conn.Close
Set conn=nothing
response.redirect "admin_downsort.asp"
end if
end if
sql="select * from a125_down"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
%>
<HTML><HEAD><TITLE> 下载管理</title>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<link href="../HXinclude/HX_Style.css" rel="stylesheet" type="text/css">
</HEAD>
<body onkeydown=return(!(event.keyCode==78&&event.ctrlKey)) topmargin='20' leftmargin='0' bottommargin='0'>
<%if request.querystring("action")="" then%>
<p align="center"><a href="admin_downsort.asp">下载分类管理</a> | <a href="admin_downsort.asp?action=newcat">添加下载分类</a></p>
<table width='596' border='0' cellspacing='1' cellpadding='0' align=center bgcolor='#115F8F'><tr><td colspan='2' bgcolor=ffffff>
<table width='100%' border='0' cellspacing='0' cellpadding='0'><tr><td height='25' background='../hximages/titleline.gif'><font class='fontmenu'>下载分类管理</font></td></tr></table>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -