src_3.asp

来自「有关遗传算法的例子」· ASP 代码 · 共 94 行

ASP
94
字号
<!--#include file="conn.asp" -->
<%
if chk_userlogin<>True then
call msgbox_j("请先登陆","self.close()")
Response.end
end if
%>
<link rel="stylesheet" href="images/css.css" type="text/css">

<table border="0" align="center" width="612">
  <tr> 
    <td  valign="top"> 
      <div align="right"><br>
      </div>
      <table width="100%" border="0" cellspacing="5" cellpadding="5">
        <tr> 
          <td bgcolor="#0086C6" class="t1"><b><font color="#FFFFFF">&#149; 用户操作纪录</font></b></td>
        </tr>
        <tr> 
          <td bgcolor="#CAEEFF"> 
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<%
'////限制纪录条数/////参数:site_log_max///
conn.execute("delete from 操作纪录 where 用户='"&session("username")&"' and id not in(select top "&site_log_max&" id from 操作纪录 order by id desc)")
'////限制纪录条数////

set rs=server.createobject("adodb.recordset")
sql="select * from 操作纪录 where 用户='"&session("username")&"' or 事件='系统日志' order by id desc"
rs.open sql,conn,1,1
if not rs.eof then

'///////////////////开始分页代码//////////////////////////////////
cardnumber=rs.recordcount
if Rq("page")="" then page="1" else page=Rq("page") end if
PageSize = 20
rs.PageSize = PageSize
pgnum=rs.Pagecount
if page="" or clng(page)<1 then page=1
if clng(page) > pgnum then page=pgnum
if pgnum>0 then rs.AbsolutePage=page
'///////////////////结束分页代码//////////////////////////////////
count=1
do while not rs.eof and count-1<rs.PageSize%>
              <tr> 
                <td>&nbsp;<%=rs("事件")%></td>
                <td><%=rs("内容")%></td>
                <td> 
                  <div align="right">操作时间:<%=rs("时间")%></div>
                </td>
              </tr>
              <tr> 
                <td colspan="3" height="1" background="images/line.gif"></td>
              </tr>
<%count=count+1
rs.movenext
loop
rs.close
set rs=nothing
showpag=True
else
Rw "暂无"
end if%>
            </table>
          </td>
        </tr>
      </table>
      <div align="right">
        <table width="98%" border="0" cellspacing="0" cellpadding="0" align="center">
          <tr> 
            <td height="31"><img src="images/!.gif" width="14" height="14" align="absmiddle"> 
              系统自动保留<b><%=site_clear_log%></b>天内的<b><%=site_log_max%></b>条日志</td>
            
			<%if showpag=True then%>
			<td height="31">
              <div align="right">共<b><%=cardnumber%></b>条纪录&nbsp;&nbsp;共<b><%=pgnum%></b>页&nbsp;&nbsp;当前第<b><%=page%></b>页&nbsp; 
                <%if cint(page)<>1 then%>
                <a href="?page=1<%=urlstr%>">首页</a>&nbsp;&nbsp;<a href="?page=<%=page-1%><%=urlstr%>">上一页</a>&nbsp; 
                <%end if
if cint(page)<>cint(pgnum) then%>
                <a href="?page=<%=page+1%><%=urlstr%>">下一页</a>&nbsp;&nbsp;<a href="?page=<%=pgnum%><%=urlstr%>">尾页</a> 
                <%end if%>
              </div>
            </td>
			<%end if%>
          </tr>
        </table>
        <br>
      </div>
      </td>
  </tr>
</table>
<%cleartimeout_user
connclose%>

⌨️ 快捷键说明

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