?? 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 + -