📄 clear_hits.asp
字号:
<!-- #INCLUDE FILE = "conn.asp" -->
<!-- #INCLUDE FILE = "date.asp" -->
<!-- #INCLUDE FILE = "session.asp" -->
<%
dim days,act
act=request.QueryString("act")
if act<>"" and act="do" then
days=Cint(request.Form("days"))
if(databaseType=1) then
conn.execute("delete from t_ip where dateDiff('d',f_date,'"&now&"')>="&days)
conn.execute("delete from t_page where dateDiff('d',f_date,'"&now&"')>="&days)
conn.execute("delete from t_from where dateDiff('d',f_date,'"&now&"')>="&days)
conn.execute("delete from t_keyword where dateDiff('d',f_date,'"&now&"')>="&days)
response.Write("成功清除"&days&"天前的历史数据")
else
conn.execute("delete from t_ip where dateDiff(d,f_date,'"&now&"')>="&days)
conn.execute("delete from t_page where dateDiff(d,f_date,'"&now&"')>="&days)
conn.execute("delete from t_from where dateDiff(d,f_date,'"&now&"')>="&days)
conn.execute("delete from t_keyword where dateDiff(d,f_date,'"&now&"')>="&days)
response.Write("成功清除"&days&"天前的历史数据")
end if
end if
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>Untitled Document</title>
<style type="text/css">
<!--
.style3 { color: #006699;
font-weight: bold;
}
.style4 {
color: #FFFFFF;
font-weight: bold;
}
body,td,th {
font-size: 12px;
}
-->
</style>
</head>
<body>
<p><span class="style3">清除指定天数的数据:</span></p>
<form id="form1" name="form1" method="post" action="?act=do">
<table width="760" height="124" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#006699">
<tr>
<td height="25" colspan="2" bgcolor="#006699"><div align="center" class="style4">清除指定天数的数据</div></td>
</tr>
<tr>
<td width="308" height="25" bgcolor="#FFFFFF"><div align="right">指定天数:</div></td>
<td width="452" bgcolor="#FFFFFF"><input name="days" type="text" id="days" value="7" size="10" maxlength="10" /></td>
</tr>
<tr>
<td height="25" bgcolor="#FFFFFF"> </td>
<td bgcolor="#FFFFFF"><input type="submit" name="Submit" value="清除" /></td>
</tr>
</table>
</form>
<p> </p>
</body>
</html>
<%
call connclose()
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -