⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 admin_class_add.asp

📁 网吧使用的导航web站点
💻 ASP
字号:
<!--#include file="mdb.asp"-->
<%
if session("adminlogin")<>sessionvar then
Response.Write("<script language=javascript>alert('你尚未登录,或者超时了!请重新登录');this.location.href='index.asp';</script>")
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>
<%
dim rs(5)
function listunder(i)
	set rs(i)=server.createobject("adodb.recordset")
	rs(i).open "select classid,classname,verity from feilei where topclass="&rs(i-1)("classid"),conn,1,3
	while not rs(i).eof
		dim topclassname
		topclassname=""
		for x=0 to i-1
			topclassname=topclassname&rs(x)("classname")&">"
		next
		fujia=""
		if rs(i)("verity")<>1 then fujia="(未审核)"
		response.write "<option value='"&rs(i)("classid")&"'>"&topclassname&rs(i)("classname")&fujia&"</option>"&vbCrLf
		if i<Ubound(rs) then
			call listunder(i+1)
		end if
		rs(i).movenext
	wend
end function
%>
<BODY>
<table width="96%" border="0" cellspacing="1" cellpadding="8" align="center" bgcolor="#999999">
  <tr> 
    <td bgcolor="#cccccc" align="center">
      类别添加管理</td>
  </tr>
  <tr> 
    <td bgcolor="#eeeeee">
<%
dim action,classname,leibie,memo,newname
action=request("action")
classname=request("classname")
leibie=request("leibie")
memo=request("memo")
newname=request("newname")
if action="add" then
	if classname="" or leibie="" then
		Response.Write "表单填写不完整!"
		Response.End
	end if
	if Session("lastadded")<>classname then
		set rss=server.createobject("adodb.recordset")
		rss.open "select * from feilei",conn,1,3
		rss.addnew
		rss("classname")=classname
		rss("topclass")=leibie
		set r=server.createobject("adodb.recordset")
		r.open "select * from feilei 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")=level
		if memo="" then memo=" "
		rss("memo")=memo
		rss("verity")=1
		rss.update
		rss.close
		set rss=nothing
		Session("lastadded")=classname
		Response.Write "<table width=100% height=100%\><tr><td width=100% height=100% align=center>"
		Response.Write "新网站分类已经成功添加!!"
		Response.Write "</td></tr></table>"
		Response.End
	end if
end if
%>
<br>
<form action="admin_class_add.asp" method="post">
新类别名:<input name="classname" size="15">
  <br>
  <!--input type="radio" name="ljj" value="radiobutton" checked onclick="dv1.style.display='none';">
  一级&nbsp; 
  <input type="radio" name="ljj" value="radiobutton" onclick="dv1.style.display='';">
  二级<br>
<div id=dv1 style="display:none"-->
上级类别:<select name="leibie"> 
<option value='0'>无上级类别</option>
<%
set rs(0)=server.createobject("adodb.recordset")
rs(0).open "select classid,classname,verity from feilei where topclass=0",conn,1,3
while not rs(0).eof
	fujia=""
	if rs(0)("verity")<>1 then fujia="(未审核)"
	response.write "<option value='"&rs(0)("classid")&"'>"&rs(0)("classname")&fujia&"</option>"&vbCrLf
	call listunder(1)
	rs(0).movenext
wend
%>
</select><br>
<!--/div-->
 类别注释:<input name="memo" size="50"><br>
<input type="hidden" name="action" value="add">
<input type="submit" value="添加新类别"> 
</form>
<br>
</td>
</tr>
<tr>
<td align="center" bgcolor="#eeeeee">[<font color="#002288"> <a href="http://www.HOTwz.com" target="_blank">热门网址</a> </font>]</td>
</tr>
</table>
</BODY>
</HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -