📄 search.asp
字号:
<%
if session("userID")="" then
%>
<!--#include file="top.asp"-->
<%
else
%>
<!--#include file="top1.asp"-->
<%
end if
dim mytmpid,mygamecodeid
mytmpid=session("userID")
if mytmpid="" then mytmpid=0
mygamecodeid=request.QueryString("gamecodestr")
if mygamecodeid<>"" and isnumeric(mygamecodeid) then
mygamecodeid=cint(mygamecodeid)
end if
%>
<%
Response.Expires = 0
Response.ExpiresAbsolute=now()-1
const recordsize=20
function doPrice(p,t)
if p=0 then
doPrice="面议"
else
doPrice=p&infoArr(t)
end if
end function
%>
<%
if session("findsql")="" then session("findsql")="select * from ziliao order by pubDate desc"
'-----------------------------------点游戏菜单进来
if request.querystring("key")<>"" then
tmpstr=request.querystring("key")
if tmpstr="all" then
session("findsql")="select * from ziliao order by pubDate desc"
elseif tmpstr="qg" then
session("findsql")="select * from ziliao where tradeType=1 order by pubDate desc"
elseif tmpstr="cs" then
session("findsql")="select * from ziliao where tradeType=0 order by pubDate desc"
else
session("findsql")="select * from ziliao where gameName = '"&tmpstr&"' order by pubDate desc"
end if
end if
'response.write session("findsql")
'response.end
'-----------------------------------点搜索按钮1进来
if request.form("btnseek")="马上搜索" then
dim tmpkey,tmptype
tmpkey=request.form("txtkey")
tmptype=request.form("txttype")
tmpsql="select * from ziliao where id>0"
if tmptype<>"" then
tmpsql=tmpsql&" and tradeType="&cint(tmptype)
end if
if tmpkey<>"" and tmpkey<>"请输入关键字" then
tmpsql=tmpsql&" and (tradeTitle like '%"&tmpkey&"%' or tradeMemo like '%"&tmpkey&"%')"
end if
tmpsql=tmpsql&" order by pubDate desc"
session("findsql")=tmpsql
end if
'-----------------------------------点搜索按钮2进来
if request.form("btnseek2")="马上搜索" then
dim tmpsql
tmpsql="select * from ziliao where id>0"
dim tmparea,myarea,myareastr,mytype1,mytype2,mygameName,myService,mykeyword,mypubDate
tmparea=request.form("Province")&"-"&request.form("city")
mytype1=request.form("tradeType1")
mytype2=request.form("tradeType2")
mygameName=trim(request.form("GAMENAME"))
myService=trim(request.form("GAMEAREA"))
mykeyword=trim(request.form("txtkey"))
mypubDate=request.form("pubDate")
'response.write tmparea
'response.end
'- - - - - - - - - - - - - - - -处理地区选择
if left(tmparea,4)<>"省份不限" then
dim provincelist
provincelist=""
tmparray=split(tmparea,"-")
'////////////////////////////////////////得到满足该地区的所有用户列表---开始
set tmpmyrs=server.createobject("adodb.recordset")
sql="select * from userinfo where province like '%,"&tmparray(0)&"%' and city like '%,"&tmparray(1)&"%'"
tmpmyrs.open sql,conn,3,1
if not tmpmyrs.eof then
while not tmpmyrs.eof
if provincelist="" then
provincelist=tmpmyrs("ID")
else
provincelist=provincelist&","&tmpmyrs("ID")
end if
tmpmyrs.movenext
wend
tmpmyrs.close
set tmpmyrs=nothing
if provincelist<>"" then
tmpsql=tmpsql&" and pubID in ("&provincelist&")"
end if
end if
'///////////////////////////////////////////////////////////////////////////
end if
'- - - - - - - - - - - - - - - -处理交易项目和类别选择
if mytype1<>"" then
tmpsql=tmpsql&" and tradeType ="&cint(mytype1)
end if
if mytype2<>"" then
tmpsql=tmpsql&" and infoType ="&cint(mytype2)
end if
'////////////////////////////////处理游戏名称、区服、物品关键字输入
if mygameName<>"" and mygameName<>"0" then
tmpsql=tmpsql&" and gameName = '"&mygameName&"'"
end if
if myService<>"" and myService<>"0" then
tmpsql=tmpsql&" and gameService = '"&myService&"'"
end if
if mykeyword<>"" then
tmpsql=tmpsql&" and (tradeTitle like '%"&mykeyword&"%' or tradeMemo like '%"&mykeyword&"%')"
end if
'- - - - - - - - - - - - - - - -处理发布日期选择
if mypubDate<>"" then
tmpDateArr=array("","","","","","","","","","")
tmpintArr=split("0,-1,-3,-7,-15,-30,-60,-90,-180,-360",",")
for j=1 to ubound(tmpintArr)
tmpDateArr(j)=dateadd("d",date(),tmpintArr(j))
next
tmpsql=tmpsql&" and pubDate > #"&tmpDateArr(cint(mypubDate))&"#"
'tmpsql=tmpsql&" and pubDate > #2006-1-13#"
end if
tmpsql=tmpsql&" order by pubDate desc"
session("findsql")=tmpsql
end if
'response.write session("findsql")
'response.end
'//////////////////////////////////////////////////////////
dim mycurpage,rs,sql,pagemsg,totalpage,recordlen
infoArr=array("RMB","万游戏币")
typeArr1=array("出售","求购")
if request.querystring("curpage")="" then
mycurpage=1
else
mycurpage=cint(request.querystring("curpage"))
end if
set rs=server.createobject("adodb.recordset")
rs.open session("findsql"),conn,3,1
recordlen=rs.recordcount
if recordlen>0 then
if recordlen mod recordsize=0 then
totalpage=recordlen/recordsize
else
totalpage=fix(recordlen/recordsize)+1
end if
'/////////////////////////////////////////////////////////////////////////////
pagemsg="总共 <font color='#ff0000'>"&recordlen&"</font> 条 <font color='#ff0000'>"&"</font> 每页 <font color='#ff0000'>"&recordsize&"</font> 条 当前: "&mycurpage&" / "&totalpage&"页"
if mycurpage=1 then
pagemsg=pagemsg&" [首页] "
else
pagemsg=pagemsg&" <a href='?curpage=1'>[首页]</a> "
end if
if mycurpage=1 then
pagemsg=pagemsg&" [上页] "
else
pagemsg=pagemsg&" <a href='?curpage="&(mycurpage-1)&"'>[上页]</a> "
end if
if mycurpage=totalpage then
pagemsg=pagemsg&" [下页] "
else
pagemsg=pagemsg&" <a href='?curpage="&(mycurpage+1)&"'>[下页]</a> "
end if
if mycurpage=totalpage then
pagemsg=pagemsg&" [尾页]"
else
pagemsg=pagemsg&" <a href='?curpage="&totalpage&"'>[尾页]</a>"
end if
end if
%>
<style>
<!--
a:link.nav {COLOR: #ffffff;TEXT-DECORATION: none}
.navbg {filter : progid:DXImageTransform.Microsoft.DropShadow(color=#ffffff,offX=1,offY=1,positives=true);}
.navbg1 {filter : progid:DXImageTransform.Microsoft.DropShadow(color=#6C2C00,offX=1,offY=1,positives=true);}
a:link.nav1 {COLOR: #434343;TEXT-DECORATION: none}
.toptext {color: #555555;filter:dropshadow(color=#ffffff,offx=1,offy=1,positive=1);}
-->
</style>
<table border="0" width="100%" cellspacing="0" cellpadding="0" background="images/bg1.jpg" height="100%">
<tr>
<td valign=top>
<table border="0" width="900" cellspacing="0" cellpadding="0">
<tr>
<td width="900" colspan="3" height="7"></td>
</tr>
<tr>
<td width="65"> </td>
<td width="778" height="50">
<table border="0" width="778" cellspacing="0" cellpadding="0">
<tr>
<td width="9">
<img border="0" src="images/2vv2_r7_c2.gif" width="9" height="50"></td>
<td width="759" background="images/2vv2_r7_c4.gif">
<table border="0" width="100%" cellspacing="0" cellpadding="0" height="100%">
<%
call getGameName2
for i=0 to 20
if i=0 then response.write "<tr height=21>"
response.write "<td align='center'valign=bottom class=top><a href='search.asp?key="&tmpArr1(i)&"'>"&formatGameName(tmpArr2(i))&"</a> |</td>"
if i mod 11 =10 and i>0 then response.write "</tr><tr height=22>"
next
response.write "<td align='center' valign=bottom class=top><a href='search.asp?key=all'>全 部...</a></td>"
%>
</table>
</td>
<td width="10">
<img border="0" src="images/2vv2_r7_c31.gif" width="10" height="50"></td>
</tr>
</table>
</td>
<td width="57"> </td>
</tr>
<tr>
<td width="65"></td>
<td width="778" height="7"></td>
<td width="57"></td>
</tr>
<tr>
<td width="65"> </td>
<td width="778">
<div align="center">
<table border="0" width="770" cellspacing="0" cellpadding="0">
<tr>
<td background="images/2_r1_c2.gif" width="22">
<img border="0" src="images/2_r1_c1.gif" width="22" height="33"></td>
<td background="images/2_r1_c2.gif" width="724" valign=bottom>
<table border="0" cellspacing="0" cellpadding="0" height="28">
<tr>
<td class=navbg>艾维游戏交易平台---游戏交易信息列表</td>
</tr>
</table>
</td>
<td background="images/2_r1_c2.gif" width="24">
<img border="0" src="images/2_r1_c3.gif" width="24" height="33"></td>
</tr>
<tr>
<td background="images/2_r2_c1.gif" width="770" colspan="3" height="30">
<div align="center">
<table border="0" width="739" cellspacing="0" cellpadding="0">
<form action="search.asp" method="post" name="frmseek" target="_self"><tr >
<td width="16" class=top>
<p align="center"><font face="Webdings">4</font></td>
<td width="80" class=top>
<b>关键字搜索:</b> </td>
<td width="243" class=top>
<input class="itm2" size="45" name="txtkey" value="" style="color: #003366; background-color:#FFFFFF" ></td>
<td width="78">
<p align="center">
<input class="M" type="submit" value="马上搜索" name="btnseek" style="color: #003366" style=" HEIGHT: 26px"></td>
<td width="58">
<p align="right"> </td>
<td width="269">
<p align="center"><u><font color="#FFFFFF">
<a href="soso.asp"><font color="#FFFFFF">搜索资料不够详细<b>?
</b>请点击此处进入高级搜索</font></a></font></u></td>
</tr></form>
</table>
</div>
</td>
</tr>
<tr>
<td width="770" colspan="3" valign=top>
<table border="0" width="770" cellspacing="0" cellpadding="0">
<tr>
<td width="13" bgcolor="#69B4FE" valign=top>
<img border="0" src="images/2_r3_c1.gif" width="13" height="185"></td>
<td width="744" bgcolor="#FFFFFF" valign=top><table border="1" width="100%" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#1965CD" height="300">
<tr><td valign=top><table border="1" width="100%" cellspacing="0" cellpadding="0" bordercolorlight="#E1E3EE" bordercolordark="#FFFFFF">
<tr>
<td height="25" bgcolor="#EFF0F5" align="center" width="15%"> <p><b>游戏名称</b></td>
<td height="25" bgcolor="#EFF0F5" align="center" width="10%"> <b>交易类型</b></td>
<td height="25" bgcolor="#EFF0F5" align="center" width="20%"> <b>游戏区服</b></td>
<td height="25" bgcolor="#EFF0F5" align="center" width="10%"> <b>价格</b></td>
<td height="25" bgcolor="#EFF0F5" align="center" width="292"> <b>信息标题</b></td>
<td height="25" bgcolor="#EFF0F5" align="center" width="10%"> <b>发布时间</b></td>
</tr><%
if recordlen=0 then
response.write "<tr><td colspan=6 height=150 valign='middle' align='center'>对不起,没有找到你要找的记录...<br><br><br><a style='color:#ff0000' onclick='history.go(-1);'>[返回上一页]</a></td></tr>"
'response.end
else
mytmpid=session("userID")
if mytmpid="" then mytmpid=0
rs.move((mycurpage-1)*recordsize)
Randomize
for i=0 to recordsize-1
tmpType=split(rs("tradeType"),",")
tmpid=rs("id")
ran=int((3-1+1)*Rnd + 1)
if ran=1 then
response.write "<tr height=25 align='center' bgcolor='#ffffff'>"
response.write "<td>"&formatGameName(getGameName(rs("gameName")))
response.write "<td nowrap><font color=990000>"&typeArr1(tmpType(0))
response.write "<td>"&rs("gameService")
response.write "<td>"&doPrice(rs("tradePrice"),rs("priceType"))
response.write "<td><a href='seeInfo.asp?id="&tmpid&"&flagid="&mytmpid&"' title='点此查看此交易详细信息' target=_blank><font color=990000>"&rs("tradeTitle")&"</a>"
response.write "<td>"&rs("pubDate")
response.write "</tr>"
else
response.write "<tr height=25 align='center' bgcolor='#ffffff'>"
response.write "<td>"&formatGameName(getGameName(rs("gameName")))
response.write "<td nowrap>"&typeArr1(tmpType(0))
response.write "<td>"&rs("gameService")
response.write "<td>"&doPrice(rs("tradePrice"),rs("priceType"))
response.write "<td><a href='seeInfo.asp?id="&tmpid&"&flagid="&mytmpid&"' title='点此查看此交易详细信息' target=_blank>"&rs("tradeTitle")&"</a>"
response.write "<td>"&rs("pubDate")
response.write "</tr>"
end if
rs.movenext
if rs.eof then exit for
next
end if
rs.close
set rs=nothing
%>
</table>
<div align="center">
<table cellSpacing="5" width="100%" border="0" bgcolor="#FFFFFF" cellpadding="5">
<tr>
<td align="right" width="79%" height="30"><a style="color:#ff0000" onclick="window.location='index.asp';">[返回首页]</a>
<%if recordlen>0 then response.write pagemsg%></td>
</tr>
</table></div>
<p> </p>
</td>
</tr>
</table>
</td>
<td width="13" bgcolor="#69B4FE" valign=top>
<img border="0" src="images/2_r3_c1.gif" width="13" height="185"></td>
</tr>
<tr>
<td width="13" height="10">
<img border="0" src="images/2_r4_c1.gif" width="13" height="10"></td>
<td width="744" bgcolor="#69B4FE"></td>
<td width="13" bgcolor="#69B4FE">
<img border="0" src="images/2_r4_c11.gif" width="13" height="10"></td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</td>
<td width="57"> </td>
</tr>
<tr>
<td width="65"></td>
<td width="778" height="7"></td>
<td width="57"></td>
</tr>
<tr>
<td width="65"> </td>
<td width="778">
<table border="0" width="778" cellspacing="0" cellpadding="0">
<tr>
<td width="778" height=7></td>
</tr>
<tr>
<td width="778"><!--#include file="bottom.asp"-->
</td>
</tr>
<tr>
<td width="778">
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</td>
<td width="57"> </td>
</tr>
</table>
</td>
</tr>
</table>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -