<% id=trim(request("id")) saveid=trim(request("saveid")) editid=trim(request("editid")) save=trim(request("save")) title=trim(request("title")) content=trim(request("content")) top=trim(request("top")) bottom=trim(request("bottom")) addxx=trim(request("addxx")) userip = Request.ServerVariables("HTTP_X_FORWARDED_FOR"):If userip = "" Then userip = Request.ServerVariables("REMOTE_ADDR") delid=trim(request("delid")) if delid<>"" then conn.Execute "delete from [Other] where ID="&Clng(delid) if editid="" and saveid="" and title<>"" and content<>"" then set rs = Server.CreateObject("ADODB.RecordSet"):rs.cursorlocation=3 rs.Open "select * from [other] order by id desc",conn,3,3 rs.addnew rs("title")=title rs("content")=content rs("top")=top rs("bottom")=bottom rs("addtime")=now() rs("addip")=userip rs("hit")=0 rs.update rs.close:set rs=nothing elseif editid="" and saveid<>"" and title<>"" and content<>"" then set rs = Server.CreateObject("ADODB.RecordSet"):rs.cursorlocation=3 rs.Open "select * from [other] where id="&saveid&" order by id desc",conn,3,3 if rs.recordcount<>0 then rs("title")=title rs("content")=content rs("top")=top rs("bottom")=bottom rs("addtime")=now() rs("addip")=userip rs("hit")=0 rs.update end if rs.close:set rs=nothing Response.Write "


"&Title&" 保存成功



" conn.close:set conn=nothing Response.end end if if editid<>"" and title="" and content="" then sql = "select top 1 * from [other] where id="&editid Set rs = Server.CreateObject("ADODB.RecordSet") rs.Open sql,conn,1,1 if rs.recordcount<>0 then etitle=rs("title") econtent=rs("content") etop=rs("top") ebottom=rs("bottom") end if rs.close:set rs=nothing end if if editid<>"" or addxx="1" then %>
<% end if %>
标题
 

  

<% if addxx="" and editid="" then %>
 
添加新页面
 
<% set rs = Server.CreateObject("ADODB.RecordSet"):rs.cursorlocation=3 rs.Open "select id,title,addtime from [other] order by id asc",conn,1,1 while not rs.eof id=rs("id") %> <% rs.movenext wend rs.close:set rs=nothing %>
标题 更新时间 操作
<%=titleb(rs("title"),40)%> <%=rs("addtime")%> 查看 修改 删除
<% end if %> <% conn.close set conn=nothing %>