⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 worklog.asp

📁 一个互联网络公司网站源码
💻 ASP
字号:
<!--#include file="conn.asp" -->
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=gb2312" />
<TITLE>办公自动化系统</TITLE>
<link href="skins/css/main.css" rel="stylesheet" type="text/css" />
<script src="inc/ShowCalendar.js"></script>
</head>
<body>
<%
%>
<table cellPadding=0 cellSpacing=0 align=center width=100%>
    <tr>
      <th width="100%" style="text-align:center;">日志列表</th>
    </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <TR>
    <TD width="*">
    <%
		if session("flag") then
	%>
    搜索用户:
    <select name="loginID">
            		<option value="">日志检索</option>
                    <%
						sql="select * from [user] where loginID<>'admin' order by id"
						set rs=conn.execute(sql)
						while not rs.eof
					%>
            		<option value="<%=rs("loginID")%>"<%if rs("loginID")=request.QueryString("loginID") then%> selected<%end if%>><%=rs("username")%></option>
        <%
						rs.movenext
						wend 
						rs.close
					%>
      </SELECT> 
     <%end if%>
    日期:从
    <input name="startDate" type="text" id="startDate" size="10"  onClick="javascript:ShowCalendar('startDate')" value="<%=request.QueryString("startDate")%>"> <img style="cursor:hand;" src="images/date1.jpg"  onClick="javascript:ShowCalendar('startDate')">
    <input name="endDate" type="text" id="endDate" size="10"  onClick="javascript:ShowCalendar('endDate')"  value="<%=request.QueryString("endDate")%>"> <img style="cursor:hand;" src="images/date2.jpg"  onClick="javascript:ShowCalendar('endDate')">
    <input name="button" type="submit" class="button" id="button" onClick="location.href='worklog.asp?startDate='+document.all.startDate.value+'&endDate='+document.all.endDate.value<%if session("flag") then%>+'&loginID='+document.all.loginID.options[document.all.loginID.selectedIndex].value<%end if%>" value="搜索"></TD>
  </TR>
</table>
<br>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" style="word-break:break-all" >
  <tr align=center>
    <td>标题</td>
      <td>真实姓名</td>
    <td>添加时间</td>
      <td>提交IP</td>
      <td>是否审核</td>
      <td>审核日期</td>
      <td>操作</td>
  </tr>
<%
	if session("flag")=false then
	wherestr=" and a.loginID='"&session("loginID")&"'"  
	end if
	if isdate(request("startDate")) then
	wherestr=wherestr&" and  datediff('d',a.insertTime,'"&request("startDate")&"')<=0"  
	end if
	
	if isdate(request("endDate")) then
	wherestr=wherestr&" and  datediff('d',a.insertTime,'"&request("endDate")&"')>=0"  
	end if
	if session("flag") then
		if request("loginID")<>"" and request("loginID")<>"0" then
		wherestr=wherestr&" and  a.loginID='"&request("loginID")&"'"  
		end if
	end if
	
	sql="select a.id,a.title,b.username,a.insertTime,a.IP,a.loginID,a.ischeck,a.checktime from [summary] a left join [user] b on a.loginID=b.loginID where 1=1 "&wherestr&" order by a.id desc"
	set rs=server.CreateObject("adodb.recordset")
	rs.open sql,conn,1,1
	rs.pagesize=10
	currentPage=Request.QueryString("page")
	if not isnumeric(currentPage) then
		currentPage=1
	end if
	currentPage=cint(currentPage)
	if currentPage<1 then
		currentPage=1
	end if
	if currentPage>rs.pagecount then
		currentPage=rs.pagecount
	end if
	PageCounts=rs.pagecount
	recordCounts=Rs.RecordCount
	if not rs.eof then
		rs.absolutepage=currentPage
	for i=1 to rs.pagesize
	if rs.eof then exit for
%>
  <tr >
    <td class="td1"><a href="logview.asp?id=<%=rs("id")%>"><%=rs("title")%></a></td>
      <td align="center" class="td1"><a href="worklog.asp?loginID=<%=rs("loginID")%>"><%=rs("username")%></a></td>
      <td align="center" class="td1"><%=rs("insertTime")%></td>
      <td align="center" class="td1"><%=rs("IP")%></td>
      <td align="center" class="td1"><%if rs("ischeck") then%>是<%else%>否<%end if%></td>
      <td align="center" class="td1"><%=rs("checktime")%>&nbsp;</td>
      <td align="center" class="td1">&nbsp;<% if session("loginID")=rs("loginID") then%><%if formatdatetime(now,vbshortdate)=formatdatetime(rs("insertTime"),vbshortdate) then%><a href="worklogedit.asp?id=<%=rs("id")%>">修改</a><%end if%><%end if%>
	  <% if session("loginID")=rs("loginID") then%><%if formatdatetime(now,vbshortdate)=formatdatetime(rs("insertTime"),vbshortdate) then%> <a href="logdel.asp?id=<%=rs("id")%>" onClick="return confirm('您确认要删除吗')">删除</a><%end if%><%end if%>&nbsp;</td>
  </tr>
<%
	rs.movenext
	next
	end if
	rs.close
	conn.close
%>
</table>
<TABLE cellSpacing="0" cellPadding="0" width="100%" align="center" border="0">
    <TBODY>
      <TR>
        <TD vAlign="center"><!--#include file="turnpage.asp" --></TD>
      </TR>
    </TBODY>
  </TABLE>
</body>
</html>

⌨️ 快捷键说明

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