<%@ CODEPAGE = "936" %> <% '================================= ' ' 阿江酷站访问统计系统 ' Ajiang info@ajiang.net ' www.ajiang.net ' ' 版权所有·抄袭挪用必究 ' '================================= %> <% '权限检查 if session.Contents("master")=false and whatcan<6 then Response.Redirect "help.asp?id=004&error=您没有管理自定义统计检索条件库的权限。" '获取数据 name =trim(Request("name")) content =trim(Request("content")) wherestr =trim(Request("wherestr")) outtype =trim(Request("outtype")) overwrite =cbool(trim(Request("overwrite"))) '过滤单引号 name=replace(name,"'","") '检查数据 if name="" then Response.Redirect "help.asp?id=002&error=请为要存储的检索条件取个名字。" if outtype="" then Response.Redirect "help.asp?id=002&error=没有指明要输出的内容,请确认是在检索结果页点保存进入本页的。" %> <%=countname%>-保存自定义统计的检索条件
<% '打开数据库 set conn=server.createobject("adodb.connection") DBPath = Server.MapPath(connpath) conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DBPath Set rs = Server.CreateObject("ADODB.Recordset") sql="select * from save where name='" & name & "'" rs.Open sql,conn,3,2 if (not rs.EOF) and (not overwrite) then %>
   ∷∷∷ 保存检索条件 ∷∷∷

 注意!!

数据库中已经存在一条名为“<%=name%>”的检索条件记录:

检索条件  <%if rs("wherestr")="" then%>没有检索条件<%else%><%=rs("wherestr")%><%end if%>。

查询项目  <%=rs("outtype")%>。

说  明  <%=rs("content")%>

您将要保存的检索条件为:

检索条件  <%if wherestr="" then%>没有检索条件<%else%><%=wherestr%><%end if%>。

查询项目  <%=outtype%>。

说  明  <%=content%>

请选择您的处理办法——

将保存的名字改为 

覆盖原来的条件,以这次提交的为准

帮助 取消 保存   


<% rs.Close else if rs.EOF then rs.AddNew rs("wherestr")=wherestr rs("outtype")=outtype rs("name")=name rs("content")=content rs.Update rs.Close %>
   ∷∷∷ 保存检索条件成功 ∷∷∷

恭喜!!

已经成功的保存了这次检索的条件:

条件名称  <%=name%>

检索条件  <%if wherestr="" then%>没有检索条件<%else%><%=wherestr%><%end if%>。

查询项目  <%=outtype%>。

说  明  <%=content%>

继续   


<% end if set rs=nothing conn.Close set conn=nothing %>