logclear.asp

来自「《动态网页设计基础教程》,胡杰,科学出版社」· ASP 代码 · 共 117 行

ASP
117
字号
<html>

<head>
<link rel="stylesheet" href="comCSS.css" >
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>清理操作日志信息</title>
<meta name="Microsoft Border" content="t, default">
</head>
<!-- #include file="adoconn.asp" -->
<%
  If request.form("B1") = "开始清理" then
     Response.write "正在清理操作日志信息,请稍候... ..."
     BeginDate=Request.form("D1") & "-" & Request.form("D2") & "-" & Request.form("D3") & " 00:00:00"
     EndDate=Request.form("D4") & "-" & Request.form("D5") & "-" & Request.form("D6") & " 23:59:59"
     Sql="Delete from operatorLOG Where (LoginTime>='" & BeginDate & "' AND Logintime <='" & EndDate & "') " 
   
     Adoconnection()
     adoconn.execute (Sql)
     set adoconn=nothing
%>
     <script language="vbscript">
     msgbox "清理完成。"
     history.back(2)
     </script>
<%
  Else    
%>

<body><!--msnavigation--><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td>

<p align="left"> </p>

</td></tr><!--msnavigation--></table><!--msnavigation--><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><!--msnavigation--><td valign="top">
<p align="center"><font face="华文新魏" size="4" color="#000080">输入清理时间段</font></p>
<form method="POST" action="LogClear.asp" align="center">

<div align="left">
  <table border="1" width="85%" height="55" align="center">
    <tr> 
      <td width="17%" height="24"> 
        <p align="left">起止时间段</p>        
      </td>             
      <td width="83%" height="24" align="center">        
        <p align="left">      
      <font color="#FF0000">      
      从</font><select size="1" name="D1">  
        <option selected><%=Session("Year")%></option> 
        <%for y=session("Year") to 2000 step -1 %>      
        <option><%=(y)%></option>                                      
        <%next%>     
        </select>年     
        
        <select size="1" name="D2">   
        <option selected><%=session("Month")%></option>      
        <%for m=1 to 12 
          if m<10 then %>    
           <option><%=("0"&m)%></option>   
            <%else %>       
           <option><%=(m) %></option>  
           <%end if %>    
        <%next%> 
        </select>月   
        
        <select size="1" name="D3">         
        <option selected><%=("0" & 1)%></option>   
        <%for d=1 to 31 
         if d<10 then %>   
          <option><%=("0"&d)%></option>     
          <%else%>        
          <option><%=(d) %></option>    
          <%end if %>    
        <%next%>  
         </select>日 <font color="#FF0000">至</font>   
       
       <select size="1" name="D4">
        <option selected><%=Session("Year")%></option> 
        <%for y=session("Year") to 2000 step -1 %>      
        <option><%=(y)%></option>                                      
        <%next%>     
        </select>年     
        
        <select size="1" name="D5">   
        <option selected><%=session("Month")%></option>      
        <%for m=1 to 12 
          if m<10 then %>    
           <option><%=("0"&m)%></option>   
            <%else %>       
           <option><%=(m) %></option>  
           <%end if %>    
        <%next%> 
        </select>月   
        
        <select size="1" name="D6">         
        <option selected><%=session("Day")%></option>   
        <%for d=1 to 31 
         if d<10 then %>   
          <option><%=("0"&d)%></option>     
          <%else%>        
          <option><%=(d) %></option>    
          <%end if %>    
        <%next%>  
         </select>日      
      </td>     
    </tr>     
  </table>   
</div>   
<p align="center"><input type="submit" value="开始清理" name="B1"><input type="reset" value="全部重写" name="B3"></p>  
</form>  
  
 <!--msnavigation--></td></tr><!--msnavigation--></table></body>  
<%End If %> 
</html>  
 

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?