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

📄 lookresult.asp

📁 很好的OA办公系统
💻 ASP
字号:
<%response.expires=0%>
<!--#include file="conn.asp"-->
<%
condition1=request.form("C1")
condition2=request.form("C2")
condition3=request.form("C3")
year1=request.form("year1")
month1=request.form("month1")
day1=request.form("day1")
year2=request.form("year2")
month2=request.form("month2")
day2=request.form("day2")
r1=request.form("R1")
r2=request.form("R2")
companyname=request.form("company")
username=request.form("username")
newdate1=dateserial(year1,month1,day1)
newdate2=dateserial(year2,month2,day2)
if condition1="" and condition2="" and condition3="" then
	sql="select * from logtable where year(senddate)="&year(date())&" and month(senddate)="&month(date())&" and day(senddate)="&day(date())
else
	sql="select * from logtable where "
	if condition1="ON" then
		if newdate1=newdate2 then
			sql1="year(senddate)="&year1&" and month(senddate)="&month1&" and day(senddate)="&day1
		elseif newdate1<newdate2 then
			sql1="year(senddate)<="&year2&" and month(senddate)<="&month2&" and day(senddate)<="&day2&" and year(senddate)>="&year1&" and month(senddate)>="&month1&" and day(senddate)>="&day1
		else
			sql1="year(senddate)<="&year1&" and month(senddate)<="&month1&" and day(senddate)<="&day1&" and year(senddate)>="&year2&" and month(senddate)>="&month2&" and day(senddate)>="&day2
		end if
	end if
	if condition2="ON" then
		sql2="companycode='"&companyname&"'"
	end if
	if condition3="ON" then
		sql3="usercode='"&username&"'"
	end if
	if condition1="ON" and condition2="" and condition3="" then
		sql=sql&sql1
	elseif condition1="" and condition2="ON" and condition3="" then
		sql=sql&sql2
	elseif condition1="" and condition2="" and condition3="ON" then
		sql=sql&sql3
	elseif condition1="ON" and condition2="ON" and condition3="" then
		sql=sql&sql1&" "&r1&" "&sql2
	elseif condition1="ON" and condition2="" and condition3="ON" then
		sql=sql&sql1&" "&r1&" "&sql3
	elseif condition1="" and condition2="ON" and condition3="ON" then
		sql=sql&sql2&" "&r2&" "&sql3
	elseif condition1="ON" and condition2="ON" and condition3="ON" then
		sql=sql&sql1&" "&r1&" "&sql2&" "&r2&" "&sql3
	end if
end if
set conn=opendb("conn")
set rs=server.createobject("adodb.recordset")
'response.write sql
'response.end
rs.open sql,conn,1
%>
<html>

<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>查询结果</title>
<link rel="stylesheet" type="text/css" href="css.css">
</head>

<body>
<%
if rs.eof or rs.bof then
	conn.close
	set conn=nothing
	set rs=nothing
%>
<p align="center"><b><font color="#FF0000" size="3">没有找到符合条件的记录!</font></b></p>
<%
else
%>
<p align="center"><b><font color="#FF0000" size="3">查询结果</font></b></p>
<div align="center">
<table border="1" cellpadding="0" width="600" cellspacing="0" bordercolorlight="#C0C0C0" bordercolordark="#FFFFFF" height="25">
  <tr>
    <td height="25" bgcolor="#EFEFEF"><font color="#0000FF">编号</font></td>
    <td height="25" bgcolor="#EFEFEF"><font color="#0000FF">手机下放代码</font></td>
    <td height="25" bgcolor="#EFEFEF"><font color="#0000FF">部门名称</font></td>
    <td height="25" bgcolor="#EFEFEF"><font color="#0000FF">发送人姓名</font></td>
    <td height="25" bgcolor="#EFEFEF"><font color="#0000FF">接收者手机</font></td>
    <td height="25" bgcolor="#EFEFEF"><font color="#0000FF">发送日期</font></td>
  </tr>
<%
i=1
do while not rs.eof
%>
  <tr>
    <td height="20"><%=cstr(i)%></td>
    <td height="20">&nbsp;<%=rs("downcode")%></td>
    <td height="20"><%=rs("companycode")%></td>
    <td height="20"><%=rs("usercode")%></td>
    <td height="20"><%=rs("sendnumber")%></td>
    <td height="20"><%=cstr(rs("senddate"))%></td>
  </tr>
<%
	i=i+1
	rs.movenext
loop
end if
%>
</table>
</div>
</body>

</html>


<html></html>

⌨️ 快捷键说明

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