📄 list.asp
字号:
<%Response.Buffer=true%>
<%
'修改:
'时间:
'模板设计:秦怀平(jincao@yeah.net)
'开发时间:2000.12
%>
<!--#include file="../include/odbc.asp" -->
<!--#include file="../include/killStr.asp" -->
<!--#include file="../include/checkUser.asp" -->
<!--#include file="../include/checkServer.asp" -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Qinhp NetModel Generator">
<meta name="Author" content="QinHuaiPing(秦怀平)">
<link rel="stylesheet" href="../script/style.css" type="text/css">
</head>
<%if request("mySql")="" then '第一次调用
sql=" where gameid='"&request("gameid")&"' "
if killStr(request("gameTerm1"))<>"" then
if sql<>"" then
sql=sql&" and gameTerm>="&killStr(request("gameTerm1"))
else
sql="gameTerm>="&killStr(request("gameTerm1"))
end if
end if
if killStr(request("gameTerm2"))<>"" then
if sql<>"" then
sql=sql&" and gameTerm<="&killStr(request("gameTerm2"))
else
sql="gameTerm<="&killStr(request("gameTerm2"))
end if
end if
'if killStr(request("gameTime1"))<>"" then
' if sql<>"" then
' sql=sql&" and datediff(dy,gameTime,'"&killStr(request("gameTime1"))&"')<=0"
' else
' sql="datediff(dy,gameTime,'"&killStr(request("gameTime1"))&"')<=0"
' end if
'end if
'if killStr(request("gameTime2"))<>"" then
' if sql<>"" then
' sql=sql&" and datediff(dy,gameTime,'"&killStr(request("gameTime2"))&"')>=0"
' else
' sql="datediff(dy,gameTime,'"&killStr(request("gameTime2"))&"')>=0"
' end if
'end if
if trim(request("ownerclient"))<>"" then
if sql<>"" then
sql=sql&" and "
end if
sql=sql&" ownerclient like '%"&trim(request("ownerclient"))&"%'"
end if
'-------发表时间的查询-------------------
if trim(request("regtime"))="regtimeyes" then
date1=request("year1")&"-"&right("0" &request("month1"),2)&"-"&right("0"&request("day1"),2)
date2=request("year2")&"-"&right("0" &request("month2"),2)&"-"&right("0"&request("day2"),2)
if Sql<>"" then
Sql=Sql & " and "
end if
Sql=Sql & " regtime between '"&date1&"' and '"&date2&"'"
end if
sql="select * from news2_predictGame "&sql&" order by regtime desc"
else '翻页调用
sql=request("mySql")
end if%>
<body bgcolor="#FFFFE0">
<!--#include file="../include/rollPage.asp" -->
<%
set rs=server.CreateObject("adodb.recordset")
set rsSelect=server.CreateObject("adodb.recordset") '查找联赛名称
sqlSelect ="select gameId,gameName from news2_game where gameid='"&trim(request("gameid"))&"'"
rsSelect.open sqlSelect,conn,3,1
%>
<form method=POST action=<% =request.servervariables("path_info")%> name=list>
<p align=center><b><font size=4 color=#0000FF><u><%if not rsselect.EOF then
Response.write rsselect("gamename")
end if
%>赛程预报列表</u></font></b></p>
<div align=center><center>
<table style="border: 1 solid #0000FF" width=100%>
<%
rsselect.Close
set rsselect=nothing
if request("deleteSubmit")<>"" then
selectDelete = CStr(killStr(request("selectDelete")))
'删除所选
If selectDelete <> "" Then
selectDeleteArr = Split(selectDelete, ",")
selectDeleteNumber = UBound(selectDeleteArr)
For i = 0 To selectDeleteNumber
conn.execute "delete from news2_predictGame where predictId='"&trim(selectDeleteArr(i))&"'"
next
end if
end if
rs.Open sql, conn, 3, 1
If Not rs.EOF Then
rs.PageSize = 13
rs.AbsolutePage = getPageNo(rs)
%>
<hr color=#FF0000>
<form method=POST action=<% =request.servervariables("path_info")%>>
<div align=center>
<center><input type=hidden name=gameid value=<%=request("gameid")%>>
<table border=1 cellpadding=0 cellspacing=0>
<tr>
<td width=48 align=center><b>选择</b></td>
<td align=center><b>联赛编号</b></td>
<td align=center><b>主客队</b></td>
<td align=center><b>轮次</b></td>
<td align=center><b>比赛时间</b></td>
<td align=center><b>更新日期</b></td>
<td width=54 align=center><b>编辑</b></td>
</tr>
<%For i = 1 To rs.PageSize
If rs.EOF Then Exit For%>
<tr>
<td align=center><input type=checkbox name=selectDelete value=<%=rs("predictId")%>></td>
<td align=center><%=rs("gameId")%> </td>
<td align=center><%=rs("ownerClient")%> </td>
<td align=center><%=rs("gameTerm")%> </td>
<td align=center><%=rs("gameTime")%> </td>
<td align=center><%=rs("regTime")%> </td>
<td width=54 align=center><a href=update.asp?id=<%=rs("predictId")%>>修改</a></td>
</tr>
<%rs.MoveNext
if rs.eof then exit for
next%>
<tr><td nowrap colspan=7 align=center><input type=submit value=删除所选 name=deleteSubmit onclick="if (confirm('您真的要该记录数据以及相关数据?')){return true;} else{return false;}" language=JScript></td>
</tr>
</table></form><%call listPage(rs)%><%end if%>
</center>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -