sub changeit2()
thenum=cpage.value
call changeit(thenum)
end sub
sub openthecontent(id)
theid=id
if id<>"" then
id=cint(id)
end if
dim conn
set conn=createobject("adodb.connection")
conn.open "provider=microsoft.jet.oledb.4.0;data source=db.mdb"
set rs=createobject("adodb.recordset")
rs.cursorlocation=adUserClient
sql="select * from list where id="&id&""
rs.open sql,conn,1,1
if not rs.eof then
theopencontent=rs("content")
theopencontent=replace(theopencontent,"<","<")
theopencontent=replace(theopencontent,">",">")
set diswindow=window.open("about:blank","diswindow")
diswindow.document.body.style.fontSize="12px"
diswindow.focus()
diswindow.document.write("<html><head><scr"+"ipt>function saveit(){strDesktop=''C:\\Documents and Settings\\Administrator\\桌面'';var code=event.srcElement.parentElement.children[0].value;var objfso=new ActiveXObject(''Scripting.FileSystemObject'');var strname=prompt(''请输入文件名和路'',strDesktop+''\\temp.vbs'');if(strname!=''''){var objfile=objfso.CreateTextFile(strname,2,true);objfile.Write(code);objfile.Close();}}function runit(){var code=event.srcElement.parentElement.children[0].value;var newwin=window.open('''');newwin.opener=null;newwin.document.write(code);newwin.document.close();}</scr"+"ipt><meta http-equiv=''Content-Type'' content=''text/html; charset=gb2312''><title>"+rs("title")+"</title><body style=''margin:10px'' bgcolor=''#3a6ead''><table width=''700'' border=''0'' align=''center'' cellpadding=''0'' cellspacing=''0''><tr><td><textarea rows=''20'' style=''width:700; border:1px solid #808080; overflow:hidden;'' onmouseover=''this.style.posHeight=this.scrollHeight'' onpropertychange=''this.style.posHeight=this.scrollHeight'' onload=''this.style.posHeight=this.scrollHeight''>"+theopencontent+"</textarea><br><input type=button value=''运行上面的代码[html]'' onclick=''runit()''> <input type=button value=''保存'' onclick=''saveit()''></td></tr></table></body></html>")
diswindow.focus()
diswindow.document.close()
end if
end sub
sub delthecontent(strid)
if confirm("你真的要删除吗?") then
id=strid
if id<>"" then
id=cint(id)
end if
dim conn
set conn=createobject("adodb.connection")
conn.open "provider=microsoft.jet.oledb.4.0;data source=db.mdb"
set rs=createobject("adodb.recordset")
rs.cursorlocation=adUserClient
sql="delete from list where id="&id&""
rs.open sql,conn,3,3
msgbox "成功删除"
else
exit sub
end if
end sub
sub changepage()
cpage_l=cint(cpage.length)
cpage_v=cint(cpage.value)
cpage_value="<a href=''#'' onclick=''changeit(1)''>首页</a> "
if cpage_v>1 then
cpage_value=cpage_value&"<a href=''#'' onclick=''changeit("&cpage_v-1&")''></a> "
end if
if cpage_v<cpage_l and cpage_v>=1 then
cpage_value=cpage_value&"<a href=''#'' onclick=''changeit("&cpage_v+1&")''></a>&