用排序串字段实现树状结构(例程——删除贴子)

程序名称:delrec.asp
程序功能:删除贴子(剪枝)

 1   
 2flag=request("flag")   
 3keyid=request("keyid")   
 4pageno=request("pageno")   
 5password=request.form("password")   
 6if flag="1" then   
 7if password="你的管理密码" then   
 8set guestconn=Server.CreateObject("ADODB.connection")   
 9guestconn.Open lybstr   
10set cm = Server.CreateObject("ADODB.Command")   
11Set cm.ActiveConnection = guestconn   
12cm.CommandText = "lybdel"   
13cm.CommandType = 4   
14set p = cm.Parameters   
15p.Append cm.CreateParameter("@keyid",3,1,4)   
16cm("@keyid")=keyid   
17cm.execute   
18guestconn.close   
19set guestconn=nothing   
20response.redirect "index.asp?pageno="&pageno   
21end if   
22end if   
 1<html>
 2<head><title>软件使用留言薄管理</title>
 3<style type="text/css">   
 4<!--   
 5a { text-decoration: none}   
 6body {line-height:18px;font-size:9pt;font-family:宋体}   
 7a:hover {color:#FF0000;text-decoration:none}   
 8.submit {line-height:9pt;font-size:9pt;font-family:宋体}   
 9.submit1 {line-height:8pt;font-size:8pt;font-family:宋体}   
10.selectform {font-family: 宋体; font-size: 9pt;background-color:ffE4E4}   
11td {font-family: 宋体; font-size: 9pt;background-color:ECF7FF}   
12.td1 {font-family: 宋体; font-size: 9pt;background-color:A2C8F2}   
13.td2 {font-family: 宋体; font-size: 9pt;background-color:E9EDE0}   
14.small1 {font-family: 宋体; font-size: 9pt;background-color:ffffff;line-height:9pt}   
15\-->   
16</style>
17</head>
18<body background="topbg.gif" topmargin="16">
19<br/><br/><br/>
20<form action="delrec.asp" method="post" name="manage">
21<input name="flag" type="hidden" value="1"/>
22<input name="keyid" type="hidden" value="```
23 =keyid 
24```"/>
25<input name="pageno" type="hidden" value="```
26 =pageno 
27```"/>
28<table align="center" width="80%">
29<tr>
30<td align="right">请输入管理密码:</td>
31<td align="left"><input class="submit" name="password" size="20" type="password"/></td>
32<td align="center"><input class="submit" type="submit" value="删除该留言"/></td>
33</tr>
34</table>
35</form></body></html>
Published At
Categories with Web编程
Tagged with
comments powered by Disqus