?? ad_yq.asp
字號(hào):
<!--#include file=pass.asp-->
<!--#include file="conn.asp"-->
<meta http-equiv="Content-Language" content="zh-cn">
<link href="inc_style.css" rel="stylesheet" type="text/css">
<SCRIPT language=JavaScript>
function showoperatealert(id)
{
if (id==1)
{
{
thisForm.target='_self';
thisForm.action="js.asp";
thisForm.submit();
}
}
}
function CheckAll(form)
{
for (var i=0;i<form.elements.length;i++)
{
var e = form.elements[i];
if (e.name != 'chkall' )
e.checked = form.chkall.checked;
}
}
//-->
</SCRIPT>
<style type="text/css">
<!--
body {
background-color: #E7EEF5;
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
-->
</style>
<div align="center">
<table width="100%" border="1" align="center" cellpadding="3" cellspacing="0" bordercolorlight="#335078" bordercolordark="#FFFFFF" bgcolor="#C5D5E4" style="font-size:12px; letter-spacing:1px;">
<tr bgcolor="#B6EBC4">
<td height="20" bgcolor="#E8EEF4" style="margin-top: 0; margin-bottom: 0">
<FORM name=sou1 action="" method=POST style="line-height: 100%; margin-top: 0; margin-bottom: 0">
<p align="center">關(guān)鍵字:
<input name="key" type="text" id="key" size="20">
<select name="type" id="type">
<option value="1" selected>書名</option>
<option value="2">用戶</option>
</select>
<input type="submit" value="查找" name="B1">
</form>
</td>
</tr>
</table>
</div>
<div align="center">
<center>
<table width="100%" border="1" align="center" cellpadding="3" cellspacing="0" bordercolorlight="#335078" bordercolordark="#FFFFFF" bgcolor="#C5D5E4" style="font-size:12px; letter-spacing:1px;">
<FORM name=thisForm action="" method=POST style="line-height: 100%; margin-top: 0; margin-bottom: 0">
<%
dim rs,sql,k,cnmai,rs1
dim ThisPage,Pagesize,Allrecord,Allpage
if request("page")="" then
ThisPage=1
else
ThisPage=request("page")
end if
cnmai=request("cnmai")
set rs = Server.CreateObject("ADODB.RecordSet")
set rs1 = Server.CreateObject("ADODB.RecordSet")
key=trim(request.Form("key"))
type1=trim(request.Form("type"))
if key<>"" then
if type1="1" then
sql="select * from jy where book.b_name like '%"&key&"%' and (r_date<#"&CDate(year(now())&"-"&month(now())&"-"&day(now()))&"# and xj='0' or xjghrq<#"&CDate(year(now())&"-"&month(now())&"-"&day(now()))&"# ) and gh='0' order by jieyue.id desc"
else
sql="select * from jy where user.name like '%"&key&"%' and (r_date<#"&CDate(year(now())&"-"&month(now())&"-"&day(now()))&"# and xj='0' or xjghrq<#"&CDate(year(now())&"-"&month(now())&"-"&day(now()))&"# ) and gh='0' order by jieyue.id desc"
end if
else
sql="select * from jy where (r_date<#"&CDate(year(now())&"-"&month(now())&"-"&day(now()))&"# and xj='0') or (xjghrq<#"&CDate(year(now())&"-"&month(now())&"-"&day(now()))&"# and xj='1') and gh='0' order by jieyue.id desc"
end if
rs.open sql,conn,1,1
if rs.eof then
response.write "<li>還沒有相關(guān)信息!"
response.end
end if
rs.Pagesize=10
Pagesize=rs.Pagesize
Allrecord=rs.Recordcount
Allpage=rs.Pagecount
if ThisPage<1 then
ThisPage=1
end if
On Error Resume Next
rs.move (ThisPage-1)*Pagesize
k=0
%>
<tr bgcolor="#B6EBC4">
<td width="7%" height="30" bgcolor="#C5D5E4" >
<p align="center">編號(hào)</td>
<td width="24%" height="30" bgcolor="#C5D5E4" >
<p align="center">書名</td>
<td width="10%" height="30" bgcolor="#C5D5E4" >
<p align="center"> 借閱者</td>
<td width="10%" align="center" valign="middle" bgcolor="#C5D5E4" > 借閱日期</td>
<td width="10%" align="center" valign="middle" bgcolor="#C5D5E4" > 歸還日期</td>
<td width="11%" align="center" valign="middle" bgcolor="#C5D5E4" >續(xù)借日期</td>
<td width="13%" align="center" valign="middle" bgcolor="#C5D5E4" >續(xù)借歸還日期</td>
<td height="30" align="center" bgcolor="#C5D5E4" >
操作</td>
</tr>
<%
do while not rs.eof
id=rs("id")
%>
<tr onMouseOver="this.style.backgroundColor='#EFE8D6';return true;" onMouseOut="this.style.backgroundColor='#FFFFFF';">
<td width="7%" height="25" bgcolor="#E3EBF2" >
<p align="center"><%=k+1%></td>
<td width="24%" height="25" bgcolor="#E3EBF2" >
<p align="center"><%
bid=rs("book_id")
response.Write conn.execute("select * from [book] where id="&bid)("b_name")%></td>
<td width="10%" height="25" align="center" bgcolor="#E3EBF2" >
<%uid=rs("user_id")
response.Write conn.execute("select * from [user] where id="&uid)("name")%></td>
<td width="10%" align="center" valign="middle" bgcolor="#E3EBF2" ><%=year(rs("l_date"))&"-"&month(rs("l_date"))&"-"&day(rs("l_date"))%></td>
<td width="10%" align="center" valign="middle" bgcolor="#E3EBF2" ><%=rs("r_date")%></td>
<td width="11%" align="center" valign="middle" bgcolor="#E3EBF2" ><%=rs("xjrq")%></td>
<td width="13%" align="center" valign="middle" bgcolor="#E3EBF2" ><%=rs("xjghrq")%></td>
<td width="15%" align="center" bgcolor="#E3EBF2" ><a href="cf.asp?id=<%=rs("jieyue.id")%>" target="_self">處罰</a> | <a href="sd.asp?id=<%=rs("user.id")%>" target="_self">鎖定賬號(hào)</a></td>
</tr>
<%
k=k+1
rs.movenext
if k>=Pagesize then exit do
loop
rs.close
set rs=nothing
set rs1=nothing
closedb
%>
<tr>
<td height="30" colspan="8" bgcolor="#E3EBF2">
<table width="98%" border="1" align="center" cellpadding="3" cellspacing="0" bordercolorlight="#335078" bordercolordark="#FFFFFF" bgcolor="#C5D5E4" style="font-size:12px; letter-spacing:1px;">
<tr>
<td height="17" width="151" align="center">
共有 <font color="#CC5200"><%=Allrecord%></font> 條記錄</td>
<td height="17" width="181" align="center">
共 <font color="#CC5200"><%=Allpage%></font> 頁</td>
<td height="17" width="237" align="center">
現(xiàn)在是第
<font color="#CC5200"><%=ThisPage%></font> 頁</td>
<td height="17" width="200" align="center">
<%
if ThisPage<2 then
response.write "<font color=""#808080"">首頁</font> "
response.write "<font color=""#808080"">上一頁</font> "
else
response.write "<a href=?page=1&t1="&trim(request("t1"))&">首頁</a> "
response.write "<a href=?page="&ThisPage-1&"&t1="&trim(request("t1"))&">上一頁</a> "
end if
if Allpage-ThisPage<1 then
response.write "<font color=""#808080"">下一頁</font> "
response.write "<font color=""#808080"">尾頁</font> "
else
response.write "<a href=?page="&(ThisPage+1)&"&t1="&trim(request("t1"))&">下一頁</a> "
response.write "<a href=?page="&Allpage&"&t1="&trim(request("t1"))&">尾頁</a> "
end if
%></td>
</tr>
</table> </td>
</tr>
</form>
</table>
</center>
</div>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -