📄 admin_class_add.asp
字号:
<!--#include file="mdb.asp"-->
<%
if session("adminlogin")<>sessionvar then
Response.Write("<script language=javascript>alert('你尚未登录,或者超时了!请重新登录');this.location.href='admin_login.asp';</script>")
Response.End
End if
dim classname,leibie,memo,mewname
if Session("level")<2 then
Call outcome("你的权限不足")
Response.End
End if
if request("action")="add" then
if Trim(request("classname"))="" then
Call outcome("请输入分类名称")
Response.End
end if
if Trim(request("leibie"))="" then
Call outcome("请选择上级分类")
Response.End
end if
classname=ReplaceBadChar(Trim(request("classname")))
simplify=ReplaceBadChar(Trim(request("simplify")))
leibie=ReplaceBadChar(Trim(request("leibie")))
index=ReplaceBadChar(Trim(request("index")))
key=ReplaceBadChar(Trim(request("key")))
memo=ReplaceBadChar(Trim(request("memo")))
newname=ReplaceBadChar(Trim(request("newname")))
search=ReplaceBadChar(Trim(request("search")))
topid=ReplaceBadChar(Trim(request("topid")))
xian=ReplaceBadChar(Trim(request("xian")))
if Cstr(Session("lastadded"))=Cstr(classname) then
Call outcome("表单重复提交")
Response.End
end if
Session("lastadded")=classname
set rss=server.createobject("adodb.recordset")
rss.open "select * from [O3888_class]",conn,1,3
rss.addnew
rss("classname")=classname
rss("topclass")=leibie
set r=server.createobject("adodb.recordset")
r.open "select * from O3888_class where classid="&leibie,conn,1,3
if not r.eof then
level=r("level")+1
else
level=1
end if
r.close
set r=nothing
rss("level")=int(level)
if not simplify="" then rss("simplify")=simplify
if not memo="" then rss("memo")=memo
if not key="" then rss("key")=key
if not search="" then rss("search")=search
if topid="" then
rss("topid")=0
else
rss("topid")=topid
end if
rss("index")=index
rss("xian")=xian
rss("verity")=1
rss.update
rss.close
set rss=nothing
Call outcome("新网站分类已经成功添加")
Response.End
end if
%>
<HTML>
<HEAD>
<TITLE>分类添加</TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK REL="stylesheet" HREF="css.css" TYPE="text/css">
</HEAD>
<BODY>
<table width="96%" border="0" cellspacing="1" cellpadding="8" align="center" class="b">
<tr>
<td align="center">分类添加</td>
</tr></table>
<table width="96%" border="0" cellspacing="1" cellpadding="8" align="center" class="a">
<tr>
<form action="admin_class_add.asp" method="post">
<td width="20%">分类名称:</td>
<td width="80%"><input class="c" name="classname" size="15"> <font color="#FF0000">*</font></td>
</tr>
<tr>
<td>上级分类:</td>
<td>
<select class="c" name="leibie">
<option value=0>一级分类</option>
<%
set rssss(0)=server.createobject("adodb.recordset")
rssss(0).open "select classid,classname,verity from O3888_class where topclass=0",conn,1,3
while not rssss(0).eof
fujia=""
if rssss(0)("verity")<>1 then fujia="(未审核)"
response.write "<option value='"&rssss(0)("classid")&"'>"&rssss(0)("classname")&fujia&"("&rssss(0)("classid")&")</option>"&vbCrLf
call listunder(1)
rssss(0).movenext
wend
%>
</select> <font color="#FF0000">*</font>
</td>
</tr>
<tr>
<td>简写名称:</td>
<td><input class="c" name="simplify" size="15"> 用于首页实用酷站</td>
</tr>
<tr>
<td>首页分类列表</td>
<td><input class="c" type="radio" value='1' name="xian"> 显示分类 <input class="c" type="radio" name="xian" value='0' checked> <font color=red>未显示分类</font></td>
</tr>
<tr>
<td>实用酷站列表</td>
<td><input class="c" type="radio" value='1' name="index"> 显示分类 <input class="c" type="radio" name="index" value='0' checked> <font color=red>未显示分类</font></td>
</tr>
<input style='display:none' name="topid" size="15">
<tr>
<td>相关搜索:</td>
<td><input class="c" name="search" size="15"> 用于分类页相关搜索,多个关键词请用“|”隔开</td>
</tr>
<input style='display:none' name="key" size="15"><input style='display:none' name="memo" size="15">
<tr>
<td>点击添加</td>
<td>
<input type="hidden" name="action" value="add">
<input type="submit" class="d" value="添加新分类">
</td>
</tr>
<tr>
<td align="center" colspan="2">[<A href='http://www.03888.com/' target=_blank>03888网址大全</A>]</td>
</tr>
</table>
</form>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -