?? fenlei_2.asp
字號:
<!--#include file=conn.asp-->
<!--#include file=cookies.asp-->
<%
dim rs,sql,class1,class2,paixu,tijiao
tijiao=request("tijiao")
if tijiao<>"" then
class1=request("class1")
class2=trim(request("class2"))
paixu=trim(request("paixu"))
if class1="" then
response.write "<li>錯誤,類別為空!"
response.write "<meta http-equiv=refresh content=""2;URL=fenlei.asp"">"
response.end
end if
if class2="" then
response.write "<li>錯誤,類別為空!"
response.write "<meta http-equiv=refresh content=""2;URL=fenlei.asp"">"
response.end
end if
if paixu="" then
response.write "<li>錯誤,類別為空!"
response.write "<meta http-equiv=refresh content=""2;URL=fenlei.asp"">"
response.end
end if
set rs = Server.CreateObject("ADODB.RecordSet")
sql="select * from [class2] where class2='"&class2&"' order by paixu desc"
rs.open sql,conn,1,3
if rs.eof then
rs.addnew
rs("class1")=class1
rs("class2")=class2
rs("paixu")=paixu
rs.update
response.write "類別添加成功!!<br>"
response.write "<a href=""fenlei_2.asp?id="&request("id")&""">繼續(xù)添加</a>"
else
response.write "類別已經存在,請確認你的輸入是正確的!"
response.write "<meta http-equiv=refresh content=""2;URL=fenlei.asp"">"
response.end
end if
rs.close
set rs=nothing
closedb
else
%>
<link href="inc_style.css" rel="stylesheet" type="text/css">
<p align="center"><img border="0" src="img/list_bo.gif" width="600" height="12"></p>
<div align="center">
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#CCCCCC" width="400" height="68">
<form action="fenlei_2.asp?id=<%=request("id")%>" name="cnmai" method="POST">
<tr>
<td height="25" bgcolor="#FEEEBC">
<p align="center"><b>添加二級分類</b></td>
</tr>
<tr>
<td height="25" style="border-bottom-style: none; border-bottom-width: medium">
<p align="center">所屬大類:
<select name="class1" size="1" style="font-size: 9pt">
<%
dim id,cnmai
id=request("id")
set rs = Server.CreateObject("ADODB.RecordSet")
sql="select * from [class1] order by paixu desc"
rs.open sql,conn,1,1
if rs.eof then
response.write "沒有類別請?zhí)砑樱?quot;
response.end
else
Do while not rs.eof
if id=cstr(rs("id")) then
cnmai="selected"
else
cnmai=""
end if
response.write "<option " & cnmai & " value=" + Cstr(rs("id")) + ">" + rs("class1") + "</option>"
rs.MoveNext
Loop
end if
rs.close
set rs=nothing
closedb
%>
</select>
</td>
</tr>
<tr>
<td height="25" align="center" style="border-bottom-style: none; border-bottom-width: medium; border-top-style:none; border-top-width:medium">
<p>分類名稱:<input type="text" name="class2" size="19" value=""></p>
</td>
</tr>
<tr>
<td height="25" align="center" style="border-top-style: none; border-top-width: medium; border-bottom-style: none; border-bottom-width: medium">
<p>排序數(shù)字:<input type="text" name="paixu" size="19" value="0"></td>
</tr>
<tr>
<td width="322" height="25" style="border-top-style: none; border-top-width: medium">
<p align="center">
<input type="submit" value=" 提 交 " name="tijiao" style="color: #000000; "></td>
</tr>
</form>
</table>
</div>
<%end if%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -