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

📄 searchdate.asp

📁 个人备忘系统一个不错的备忘软件.专供刚学ASP的人学习. 代码简单易懂 mymanage
💻 ASP
字号:
<!--#include file="conn.asp"-->
<%
if session("user")="" or session("group")="" then
response.write("<script>alert('您还没有登陆或登陆超时');window.location.href('index.asp')</script>")
response.end
end if
%>
<%
title=request.Form("title")
date1=request.Form("date1")
date2=request.Form("date2")
set rs=server.CreateObject("adodb.recordset")
if date1<>"" and date2<>"" then
cmd="select * from riji  where time>=#"&date1&"# and time<=#"&date2&"#  and  title like '%"&title&"%'"
else
cmd="select top 20 * from riji  where  title like '%"&title&"%'"
end if
rs.open cmd,conn,1,1

%>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script language="JavaScript" src="calendar.js" type="text/javascript"></script>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>Untitled Document</title>
<style type="text/css">
<!--
.style1 {
	color: #FFFFFF;
	font-size: 12px;
}
.style2 {color: #FFFFFF}
.style3 {
	color: #6699CC;
	font-size: 12px;
}
.style5 {color: #6699CC}
.style6 {
	font-size: 12;
	color: #6699CC;
}
.style7 {font-size: 12px}
-->
</style>
</head>

<body>
<form id="form1" name="form1" method="post" action="">
  <table width="700" border="0" align="center" bgcolor="#6699cc">
    <tr>
      <td colspan="4"><span class="style1">日记快速查询(注:本页没有分页处理,请尽量缩小范围)</span></td>
    </tr>
    <tr>
      <td width="81" bgcolor="#FFFFFF"><div align="center" class="style3">日记主题:</div></td>
      <td width="138" bgcolor="#FFFFFF"><span class="style2">
        <input name="title" type="text" id="title" />
      </span></td>
      <td width="76" bgcolor="#FFFFFF"><div align="center"><span class="style5"><span class="style7">撰写日期</span>:</span></div></td>
      <td width="387" bgcolor="#FFFFFF"><span class="style2">
        <input name="date1" type="text" id="date1"  onfocus="setday(this)" size="10"/>
        </span><span class="style3">至</span><span class="style2"><span class="style6">
        <input name="date2" type="text" id="date2" onfocus="setday(this)" size="10"/>
        <span class="style7">*日期格式:1984-04-08</span></span></span></td>
    </tr>
    <tr>
      <td colspan="4" bgcolor="#FFFFFF"><div align="center" class="style2">
        <input type="submit" name="Submit" value=" 快速查询 " />
      </div></td>
    </tr>
  </table>
  <table width="700" border="0" align="center" bgcolor="#6699cc">
    <tr>
      <td colspan="4"><span class="style1">查询结果</span></td>
    </tr>
	<%while not rs.eof%>
    <tr>
      <td width="416" bgcolor="#FFFFFF"><span class="style3">
        <% =rs("title") %>
      &nbsp;</span></td>
      <td width="132" bgcolor="#FFFFFF"><span class="style3">
        <% =rs("time") %>
      &nbsp;</span></td>
      <td width="68" bgcolor="#FFFFFF"><div align="center"><a href="viewdatedo.asp?id=<%=rs("id")%>"><img src="images/voteView.gif" width="52" height="18" border="0"></a></div></td>
      <td width="66" bgcolor="#FFFFFF"><div align="center"><a href="deldate.asp?id=<%=rs("id")%>"><img src="images/a_delete.gif" width="52" height="16" border="0"></a></div></td>
    </tr>
	<%
	rs.movenext
	wend
	%>
  </table>
  <table width="700" border="0" align="center">
    <tr>
      <td><div align="center"><span class="style3">以下是您的搜索结果:共有
        <% =rs.recordcount %>
      条记录  </span></div></td>
    </tr>
  </table>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
</form>
</body>
</html>

⌨️ 快捷键说明

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