📄 myweb_type.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="myweb_check.asp"-->
<html>
<head>
<title>木叶村免费个人主页http://www.x92.cn</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="keywords" content="木叶村网免费个人主页http://www.x92.cn">
<meta name="description" content="木叶村网免费个人主页http://www.x92.cn">
<link rel="stylesheet" href="admin/Admin_STYLE.CSS">
<base target="_self">
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" class="bgcolor" bgcolor="#EEF8ED">
<table border="0" width="100%" cellpadding="2" cellspacing="1" bgcolor="#FFFFFF" class="border">
<tr class="tdbg" >
<td class="title" height="24">
<p align="center"><font color="#000000">网站系统分类管理</font></td>
</tr>
<tr class="tdbg" onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#F6FcF9'">
<td width="98%" >
<p align="left">分类管理导航:<a href="myweb_type.asp">网站系统分类管理首页</a> | <font color="#000000">
<a href="myweb_type.asp?type=add">添加网站分类</a> </font></td>
</tr>
</table>
<%if request("type")="" then%>
<br>
<table border="0" width="100%" cellpadding="2" cellspacing="1" bgcolor="#FFFFFF" class="border">
<tr class="tdbg" >
<td class="topbg" align="center">
ID</td>
<td class="topbg" align="center">
系统分类名称</td>
<td class="topbg" align="center">
管理操作</td>
</tr>
<%set rs=server.createobject("adodb.recordset")
sql="select * from myweb_type order by id desc"
rs.open sql,conn,1,1
do while not rs.eof %>
<tr class="tdbg" onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#F6FcF9'">
<td width="12%" align="center" ><%=rs("id")%> </td>
<td width="20%" align="center" ><%=rs("webtype")%></td>
<td width="67%" align="center" ><a href="myweb_type.asp?type=modif&id=<%=rs("id")%>&webtype=<%=rs("webtype")%>">修改分类</a>
| <a href="myweb_type.asp?type=del&id=<%=rs("id")%>" <%="onClick='return confirm(""确定要删除此分类吗(不可恢复)?"");'"%>>删除分类</a></td>
</tr>
<%rs.movenext
loop
rs.close%>
</table>
<%end if%>
<%if request("type")="add" then%>
<br>
<table border="0" width="100%" cellpadding="2" cellspacing="1" bgcolor="#FFFFFF" class="border">
<tr class="tdbg" >
<td class="topbg" colspan="2">
<p align="center"><font color="#000000">添加网站系统分类</font></td>
</tr>
<tr class="tdbg" onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#F6FcF9'">
<td width="22%" >
<p align="center">添加分类:</td><form action=myweb_type.asp?type=addtype method=post>
<td width="76%" >
分类名:<input type="text" name="typename" size="30" maxlength=30> <input type=submit value="提 交"></td></form>
</tr>
</table>
<%end if%>
<%if request("type")="addtype" then%>
<br>
<table border="0" width="60%" align="center" cellpadding="2" cellspacing="1" bgcolor="#FFFFFF" class="border" height="56">
<tr class="tdbg" >
<td height="24" class="title">
<p align="center"><font color="#000000">系统信息提示</font></td>
</tr>
<tr class="tdbg" onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#F6FcF9'">
<td >
<%dim typename,error
typename=trim(request("typename"))
if typename="" then
error=error&"<font color=red>系统处理结果如下</font></li><br><li>分类名称不能为空</li><br> <center> <a href=javascript:history.go(-1)><font color=red>返回重写</font></a></center>"
end if
if error="" then
set rs=server.CreateObject("adodb.recordset")
sql="select * from myweb_type where webtype='"&typename&"'"
rs.open sql,conn,1,3
if rs.eof then
rs.addnew
rs("webtype")=typename
rs.update
response.redirect"myweb_type.asp"
rs.close
set rs=nothing
else
response.write"<li><font color=red>系统处理结果如下</font></li><br><li>该分类名已经存在请换个名字 <br> <center><a href=javascript:history.go(-1)><font color=red>返回重写</font></a></center>"
end if
else
response.write""&error&""
end if
%>
</td>
</tr>
</table>
<%end if%>
<%if request("type")="modif" then%>
<br>
<table border="0" width="100%" cellpadding="2" cellspacing="1" bgcolor="#FFFFFF" class="border">
<tr class="tdbg" >
<td class="topbg" colspan="2">
<p align="center"><font color="#000000">修改网站系统分类</font></td>
</tr>
<tr class="tdbg" onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#F6FcF9'">
<td width="22%" >
<p align="center">修改分类:</td><form action=myweb_type.asp?type=save&id=<%=request("id")%> method=post>
<td width="76%" >
分类名:<input type="text" name="typename1" size="30" maxlength=30 value="<%=request("webtype")%>"> <input type=submit value="修 改"></td></form>
</tr>
</table>
<%end if%>
<%if request("type")="save" then%>
<br>
<div align="center">
<table border="0" width="60%" cellpadding="2" cellspacing="1" bgcolor="#FFFFFF" class="border" height="56">
<tr class="tdbg" >
<td height="24" class="title">
<p align="center"><font color="#000000">系统信息提示</font></td>
</tr>
<tr class="tdbg" onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#F6FcF9'">
<td >
<%dim typename1,id,erroredit
id=trim(request("id"))
typename1=trim(request.form("typename1"))
if typename1="" then
erroredit=erroredit&"<li><font color=red>系统处理结果如下</font></li><br><li>分类名称不能为空<br><center> <a href=javascript:history.go(-1)><font color=red>返回重写</font></a></center>"
end if
if erroredit="" then
set rs1=server.CreateObject("adodb.recordset")
sql1="select * from myweb_type where id<>"&request("id")&" and webtype='"&typename1&"' "
rs1.open sql1,conn,1,1
if not rs1.eof then
response.write"<li><font color=red>系统处理结果如下</font></li><br><li>该名称已经存在请换其他的名称<br><center> <a href=javascript:history.go(-1)><font color=red>返回重写</font></a></center>"
rs1.close
else
set rs=server.CreateObject("adodb.recordset")
sql="select * from myweb_type where id="&request("id")&" "
rs.open sql,conn,1,3
rs.update
rs("webtype")=typename1
rs.update
response.redirect"myweb_type.asp"
rs.close
set rs=nothing
end if
else
response.write""&erroredit&""
end if
%>
</td>
</tr>
</table>
</div>
<%end if%>
<%if request("type")="del" then%>
<%
set rs=conn.execute("delete from myweb_type where id="&request("id")&"")
response.redirect"myweb_type.asp"
rs.close
%>
<%end if%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -