<%if jiage="" then%>
<%if keyword="" then
response.write ""
response.End
else
response.write "您查询的车牌号是:"&shopsort&""
if (anClassId <> "") And _
IsNumeric(anClassId) Then
if anclassid<>0 then
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from shop_anclass where anclassid="&anclassid,conn,1,1
response.write ""&rs("anclass")&""&" >> "
rs.close
set rs=nothing
end if
End If
response.write ""&keyword&""
s_shopname=keyword
end if%>
<%else%>
<%if (action="1" or action="2" or action="3") and keyword="" then
response.write ""
response.End
else
response.write "您查询的车牌号是:"
if anclassid<>0 then
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from shop_anclass where anclassid="&anclassid,conn,1,1
response.write ""&rs("anclass")&""&" >> "
rs.close
set rs=nothing
end if
if action="1" or action="3" then
response.write ""&keyword&""
s_shopname=keyword
else
response.write ""&selectname&""
s_shopname=selectname
end if
end if%>
<%end if%>
<%'开始分页
Const MaxPerPage=20
dim totalPut
dim CurrentPage
dim TotalPages
dim j
dim sql
if Not isempty(request("page")) then
currentPage=Cint(request("page"))
else
currentPage=1
end if
set rs=server.CreateObject("adodb.recordset")
sql="select * from shop_snsn where shopname='"&StrKeyWord&"' order by adddate desc"
rs.open sql,conn,1,1
if rs.eof And rs.bof then
Response.Write "
恭喜您!,截止到2009年7月27日为止没有您违章的记录!
不过还是建议您方便时到乌市各区交警大队设置的触摸式电子屏幕上详细查询
"
else
totalPut=rs.recordcount
if currentpage<1 then
currentpage=1
end if
if (currentpage-1)*MaxPerPage>totalput then
if (totalPut mod MaxPerPage)=0 then
currentpage= totalPut \ MaxPerPage
else
currentpage= totalPut \ MaxPerPage + 1
end if
end if
if currentPage=1 then
showContent
showpage totalput,MaxPerPage,"research.asp"
else
if (currentPage-1)*MaxPerPage
<%i=i+1
if i>=MaxPerPage then Exit Do
rs.movenext
loop
rs.close
set rs=nothing%>
<%
End Sub
Function showpage(totalnumber,maxperpage,filename)
Dim n
If totalnumber Mod maxperpage=0 Then
n= totalnumber \ maxperpage
Else
n= totalnumber \ maxperpage+1
End If
Response.Write ""
End Function
%>
<%
sub sss() '增加搜索关健字到数据库
if request.cookies("snsn")("username")<>"" then
set rs_s=server.CreateObject("adodb.recordset")
rs_s.open "select * from [shop_user] where username='"&request.cookies("snsn")("username")&"'",conn,1,1
t_userid=rs_s("userid")
rs_s.close
set rs_s=server.CreateObject("adodb.recordset")
rs_s.open "select * from shop_his where username='"&request.cookies("snsn")("username")&"' and shopname='"&s_shopname&"' and lx=2",conn,1,3
if rs_s.recordcount>0 then
rs_s("ltime")=now()
rs_s("userid")=t_userid
rs_s("keyword")=sql2
rs_s.update
rs_s.close
set rs_s=nothing
else
rs_s.close
set rs_s=server.createobject("adodb.recordset")
rs_s.open "select * from shop_his where username='"&request.cookies("snsn")("username")&"' and lx=2",conn,1,3
if rs_s.recordcount>=4 then
rs_s.delete
rs_s.update
end if
rs_s.addnew
rs_s("username")=request.cookies("snsn")("username")
rs_s("keyword")=sql2
rs_s("shopname")=s_shopname
rs_s("userid")=t_userid
rs_s("lx")=2
rs_s("ltime")=now()
rs_s.update
rs_s.close
set rs_s=nothing
end if
end if
end sub%>