📄 area_add2.asp
字号:
<!-- #include file="../Include/Chk.asp" -->
<!-- #include file="../Include/Conn.asp" --><%
dim pid,pn
pid=Request.QueryString("pid")
if pid="" then
Response.write "参数错误,没有传给本页pid值!"
Response.End()
end if
SQL2="Select * from area where aid="&pid
set rs2=server.createobject("Adodb.Recordset")
rs2.open SQL2,conn,1,1
if rs2.eof then
Response.Write "参数错误,没有这个分类!"
Response.End()
else
pn=rs2("areaname")
end if
rs2.Close
Set rs2=Nothing
if Request.QueryString("Action")="add" then
dim areaname
areaname=Trim(Request.Form("areaname"))
if areaname="" then
Response.Write "<script language='javascript'>alert('分类名称不能为空!');history.go(-1);</script>"
Response.End()
end if
SQL="Select * from area"
set rs=server.createobject("Adodb.Recordset")
rs.open SQL,conn,1,3
rs.AddNew
rs("areaname")=areaname
rs("pid")=pid
rs.Update
rs.Close
Set rs=Nothing
Response.Write "<script language='javascript'>alert('次级分类添加成功 !');document.location.href('area_Manage.asp');</script>"
Response.End()
end if
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title></title>
<link href="images/admin_STYLE.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.STYLE1 {color: #FF0000}
-->
</style>
<link href="../Images/default.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" name="form1" method="post" action="?Action=add&pid=<%=pid%>">
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#FFFFFF">
<tr>
<td height="24" colspan="2"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="82" height="24" align="center" valign="middle" background="Images/t_1.gif" class="AddGoods"><a href="#">添加分类</a></td>
<td width="1" align="center" valign="middle"></td>
<td width="88" height="24" align="center" valign="bottom" class="AddGoods"><table width="88" height="22" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="middle" background="Images/t_2.gif"><a href="area_Manage.asp" class="AddGoods">管理分类</a></td>
</tr>
</table></td>
<td> </td>
</tr>
</table></td>
</tr>
<tr>
<td height="5" colspan="2" background="Images/topnav.gif"></td>
</tr>
<tr>
<td height="5" colspan="2"></td>
</tr>
<tr>
<td width="18%" height="25" align="right" valign="middle" bgcolor="#efefef">次级分类名称:</td>
<td width="82%" height="25" align="left" valign="middle">
<input name="areaname" type="text" id="areaname" size="15" maxlength="15" />
* 这里添加的是<span class="STYLE1"><%=pn%></span>的次级分类,分类名称不能超过15个字 </td>
</tr>
<tr>
<td height="25" align="right" valign="middle" bgcolor="#efefef"> </td>
<td height="25" align="left" valign="middle">
<input type="submit" name="Submit" value="添 加" />
<span class="C_Title">带
* 的项目为必填内容</span> </td>
</tr>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -