下面是提交信息处理页的代码,保存为disp.asp
<!--#include file="initialize.asp"--> <% function checkstr(str) str=replace(str,"'","''",1,-1,1) checkstr=str end function
dim disp,parentId,listName,listInfo disp=request.QueryString("disp") parentId=request.QueryString("parentId") select case disp case "add" listName=checkstr(left(request.QueryString("listName"),10)) listInfo=checkstr(left(request.QueryString("listInfo"),50)) if listName="" then listName="空白节点" if listInfo="" then ListInfo="此节点在添加入未填写内容" sSql="insert into listTable (listName,listInfo,parentId) values('" & listName & "','" & listInfo & "'," & parentId & ")" case "edit" listName=checkstr(left(request.QueryString("listName"),10)) listInfo=checkstr(left(request.QueryString("listInfo"),50)) if listName="" then listName="空白节点" if listInfo="" then listInfo="此节点在添加入未填写内容" sSql="update listTable set listName='" & listName & "',listInfo='" & listInfo & "' where listId=" & parentId case "del" sSql="delete from listTable where listId=" & parentId & " or parentId=" & parentId end select sConn.execute sSql,,1 response.redirect("index.asp") %> |
上一页 [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] 下一页 |