我在桌面上删帖子

 网站首页 > 电脑技术 > 远程脚本 asp技术 网络编程

我在桌面上删帖子 内容简介:

        #&39;del.vbsoption explicitdim message,resultdim title,text1,text2message="请输入要删除帖子的ID"title="帖子删除"text1="你取消了操作!"result=inputbox(message,title,&qu
我在桌面上删帖子 祥细内容:
‘del.vbs
option explicit
dim message,result
dim title,text1,text2
message="请输入要删除帖子的ID"
title="帖子删除"
text1="你取消了操作!"
result  =inputbox(message,title,"请输入要删除帖子的ID")
if result  =""  then
Wscript.echo text1
elseif isnumeric(result)=false  then
Wscript.echo "请输入正确的ID!"
ElseIf  trim(cint(result))<>trim(result) then
Wscript.echo "请输入正确的ID!"
Else
dim result1
result1=msgbox("你确定要删除帖子"&result&vbcrlf&"这一操作将删除帖子本身及帖子的所有子贴",48+1+256,"按 确定 删除,按 取消 放弃!")
if result1=vbok then
dim conn
Set conn = Wscript.CreateObject("ADODB.Connection")
conn.Open"driver={sql server};server=111.111.111.111;uid=11;pwd=11;"&"database=11;"
dim sql,rs,sql2,rs2,sql3
sql="select rootid,deep,ordernum from bbs where mianid ="&cint(result)
set rs=conn.execute(sql)
if not rs.eof then
if rs(0)=0 then
sql3="delete bbs where rootid="&result&" or mianid= "&result
else
sql2="select top 1  ordernum from bbs where rootid="&rs(0)&" and deep<="&rs(1)&" and ordernum >"&rs(2)&"order by ordernum "
set rs2=conn.execute(sql2)
if  not rs2.eof then
sql3="delete bbs where ordernum >="&rs(2)&" and ordernum < "&rs2(0)&" and rootid="&rs(0)
else
sql3="delete bbs where  ordernum >="&rs(2)&" and rootid="&rs(0)
end if
end if
dim introws
conn.execute(sql3),introws
if introws >0 then
        Wscript.echo  "删除成功 !"         
                else     
        Wscript.echo  "删除失败 !"         
end if   
else
Wscript.echo"你要删除的帖子不存在!"
End if
else
Wscript.echo "你放弃了删除!"
end if
end if
       
更新时间:2005-5-26 11:17:18 查看次数: 添加人:采集器
下载: 采集信息

关键字: 我在桌面上删帖子 远程脚本 asp技术 网络编程 

相关连接: 我在桌面上删帖子  将你的网站设置为客户的信任站点--VB方案  WSH 直接将查询数据结果生成 EXCEL 表  如何在服务器端调用winzip命令行对上传的多个文件打包  利用 WSH 作定时工作流程  Vbscript类型转换函数  ASP取得图片大小代码  用VB创建FTP组件(put)  一个新的JMail(4.3版本)发送代码  精彩OUTLOOK 2000组件放送  不用询问关闭一个独立的窗口代码  一种在父窗口中得知window.open()出的子窗口关闭事件  动态显示图片的函数(显示广告条)  按下回车键指向下一个位置的一个函数  嵌入式Web视频点播系统实现方法  根据选择的Checkbox动态在表格中列出选择的值 
E路同行 版权所有; 2002-2005 Xiaoqi.net! Inc. 保留所有权利。