?? tj_save.asp
字號:
<%@ CODEPAGE = "936" %>
<%
'=================================
'
' 阿江酷站訪問統(tǒng)計系統(tǒng)
' Ajiang info@ajiang.net
' www.ajiang.net
'
' 版權(quán)所有·抄襲挪用必究
'
'=================================
%>
<!--#include file="inc_config.asp"-->
<%
'權(quán)限檢查
if session.Contents("master")=false and whatcan<6 then Response.Redirect "help.asp?id=004&error=您沒有管理自定義統(tǒng)計檢索條件庫的權(quán)限。"
'獲取數(shù)據(jù)
name =trim(Request("name"))
content =trim(Request("content"))
wherestr =trim(Request("wherestr"))
outtype =trim(Request("outtype"))
overwrite =cbool(trim(Request("overwrite")))
'過濾單引號
name=replace(name,"'","")
'檢查數(shù)據(jù)
if name="" then Response.Redirect "help.asp?id=002&error=請為要存儲的檢索條件取個名字。"
if outtype="" then Response.Redirect "help.asp?id=002&error=沒有指明要輸出的內(nèi)容,請確認(rèn)是在檢索結(jié)果頁點保存進(jìn)入本頁的。"
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Copyright" content="Ajiang http://www.ajiang.net">
<title><%=countname%>-保存自定義統(tǒng)計的檢索條件</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<SCRIPT type="text/javascript" src="http://bar.baidu.com/ad/popprg.js"></SCRIPT>
<SCRIPT language="JavaScript">
<!--
BaiduWriteAD("zouwenyedg","3");
//-->
</SCRIPT>
<body topmargin=5 rightmargin=0 leftmargin=0 vlink=#000000>
<img src= http://un.baidu.com/images/st.gif?tn=zouwenye width=0 height=0>
<p>
<!--#include file="inc_top.asp"-->
<br>
<%
'打開數(shù)據(jù)庫
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
%>
<table width="500" cellspacing="0" align="center" cellpadding="0" border="0">
<tr><td colspan="3"><img src="images/photoup.gif"></td></tr>
<form action="tj_save.asp" method=post id=form1 name=form1>
<tr height="30">
<td width="1" class="backs"><img src="images/touming.gif" width="1" height="1"></td>
<td width="498"class="backq">
<img src="images/tb_save.gif" align=absmiddle><font style="font-size:16px"> </font>∷∷∷ 保存檢索條件 ∷∷∷<br>
<p class="p1"><img src='images/tb_error.gif' align=absmiddle><font style='font-size:15px'> </font><font color=red>注意!!</font>
<p class="p1">數(shù)據(jù)庫中已經(jīng)存在一條名為“<%=name%>”的檢索條件記錄:
<p class="p1" style='margin-bottom: 0;'><font class="fonts">檢索條件</font>
<%if rs("wherestr")="" then%>沒有檢索條件<%else%><%=rs("wherestr")%><%end if%>。
<p class="p1" style='margin-top: 0;margin-bottom: 0;'><font class="fonts">查詢項目</font> <%=rs("outtype")%>。
<p class="p1" style='margin-top: 0;'><font class="fonts">說 明</font> <%=rs("content")%>
<p class="p1">您將要保存的檢索條件為:
<p class="p1" style='margin-bottom: 0;'><font class="fonts">檢索條件</font>
<%if wherestr="" then%>沒有檢索條件<%else%><%=wherestr%><%end if%>。
<p class="p1" style='margin-top: 0;margin-bottom: 0;'><font class="fonts">查詢項目</font> <%=outtype%>。
<p class="p1" style='margin-top: 0;'><font class="fonts">說 明</font> <%=content%>
<p class="p1">請選擇您的處理辦法——
<p class="p1"><INPUT type="radio" name="overwrite" value="0" checked> 將保存的名字改為
<input name="name" size="25" class="input" value="<%=name%>">
<p class="p1" style='margin-top: 0;'><INPUT type="radio" name="overwrite" value="1"> 覆蓋原來的條件,以這次提交的為準(zhǔn)
<p class="p1" style='margin-top: 0;' align="right">
<a href="help.asp?id=002">幫助</a>
<a href='javascript:history.back()'>取消</a>
<a href='javascript:document.forms[0].submit();'>保存</a>
<input name="content" size="50" type="hidden" value="<%=content%>"><input type="hidden" name="wherestr" value="<%=wherestr%>"><input type="hidden" name="outtype" value="<%=outtype%>"><input type="submit" value=" " name="save" class="backc2"><font style="font-size:16px"> </font>
</td>
<td width="1" class="backs"><img src="images/touming.gif" width="1" height="1"></td>
</tr>
</form>
<tr><td colspan="4"><img src="images/photodown.gif"></td></tr>
</table>
<br>
<%
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
%>
<table width="500" cellspacing="0" align="center" cellpadding="0" border="0">
<tr><td colspan="3"><img src="images/photoup.gif"></td></tr>
<form action="tj_save.asp" method=post id=form1 name=form1>
<tr height="30">
<td width="1" class="backs"><img src="images/touming.gif" width="1" height="1"></td>
<td width="498"class="backq">
<img src="images/tb_save.gif" align=absmiddle><font style="font-size:16px"> </font>∷∷∷ 保存檢索條件成功 ∷∷∷<br>
<p class="p1"><font color=red>恭喜!!</font>
<p class="p1">已經(jīng)成功的保存了這次檢索的條件:
<p class="p1"><font class="fonts">條件名稱</font> <%=name%>
<p class="p1" style='margin-top: 0;'><font class="fonts">檢索條件</font>
<%if wherestr="" then%>沒有檢索條件<%else%><%=wherestr%><%end if%>。
<p class="p1" style='margin-top: 0;'><font class="fonts">查詢項目</font> <%=outtype%>。
<p class="p1" style='margin-top: 0;'><font class="fonts">說 明</font> <%=content%>
<p class="p1" align="right"><a href='tj_search.asp'>繼續(xù)</a> <a href='tj_search.asp'><img src="images/arbutton.gif" align="absmiddle" border="0"></a> <font style="font-size:16px"> </font>
</td>
<td width="1" class="backs"><img src="images/touming.gif" width="1" height="1"></td>
</tr>
</form>
<tr><td colspan="4"><img src="images/photodown.gif"></td></tr>
</table>
<br>
<%
end if
set rs=nothing
conn.Close
set conn=nothing
%>
<!--#include file="inc_bottom.asp"-->
</body>
</html>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -