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

📄 search.asp

📁 1. 硬件环境:MS WINDOWS NT PACK 4 OR LATER /WIN2000 WITH IIS 4.0 OR LATER /WIN9X+PWS 2. 数 据 库:Access2000
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!-- #include file="setup.asp" -->
<!-- #include file="inc/function.asp" -->
<%Call top
Call table()
if Request.ServerVariables("request_method")="POST" then
if instr(Request.ServerVariables("http_referer"),Request.ServerVariables("server_name")) = 0 Then Error 1,"来源错误!",""
Response.Write("<style><!--	TABLE{BORDER-TOP:0px;BORDER-LEFT:0px;BORDER-BOTTOM:1px}TD{BORDER-RIGHT:0px;BORDER-TOP:0px}--></style><br>")
search=Server.htmlencode(Trim(Request.Form("search")))
key=Server.htmlencode(Trim(Request.Form("key")))
key=Replace(key," ","")
if search="" Then Error 2,"请选择您要搜索的范围!",""
if user(search) = False Then Error 1,"参数非法传递!",""
if user(key) = false then Error 2,"关键字不能包含特殊字符!",""
if key="" Then Error 2,"请输入搜索关键字",""
Select Case search
	Case "User"
		UserNum=Request.Form("UserNum")
		Sql="Select Top 100 UserGrade,UserSex,UserID,UserName_1,UserName_2,UserLastT From UserInfo Where DelThis=False and "&UserNum&" like '%"&key&"%'"
		Set rs = Conn.Execute(sql)
		Tab "搜索到以下相关用户信息","如果以下信息仍然没有你需要的信息,请尝试加长关键字。 如:将 ""李"" 改为 ""李XX"" "%>
		<TABLE borderColor=a4b6d7 cellSpacing=0 cellPadding=0 width="100%" border=1 style="border-collapse: collapse" height="24" bgColor="#ecf5ff">
 		<TR  height=25> 
		<TD width=9% align=middle> <p align=center>用户号</TD>
		<TD align=middle width=18%> <div align=center>真实姓名</div></TD>
		<TD align=middle width=19%> <div align=center>社区昵称</div></TD>
		<TD align=middle width=11%> <div align=center>性别</div></TD>
		<TD align=middle width=16%><div align=center>用户类型</div></TD>
		<TD align=middle width=27%><div align=center>上次登陆时间</div></TD>
	  	</TR>
		</TABLE>
		<%
		if Rs.Eof Then
		Response.write "<br><center>很抱歉,没有找到您需要的信息!</Center>"
		else
		Do While Not Rs.Eof
			if Rs("UserSex")=False Then
			Sex="女"
			Else
			Sex="男"
			End if
			Select case rs("UserGrade")
				case 0,1
				Uleve="普通用户"
				case 2
				Uleve="VIP会员"
				case 3
				Uleve="社区管理员"
				case 4
				Uleve="商城管理员"
				case 5
				Uleve="总管理员"
				case 6
				Uleve="商城站长"
			End Select
			Response.write "<TABLE borderColor=a4b6d7 cellSpacing=0 cellPadding=0 width=100% border=1 style=""border-collapse: collapse"" height=24>"&_
			"<TR  height=25>"&_
			"<TD width=9% align=middle> <p align=center>"&Rs("UserID")&"</TD>"&_
			"<TD align=middle width=18% > <div align=center>"&Rs("UserName_1")&"</div></TD>"&_
			"<TD align=middle width=19% > <div align=center>"&Rs("UserName_2")&"</div></TD>"&_
			"<TD align=middle width=11% > <div align=center>"&Sex&"</div></TD>"&_
			"<TD align=middle width=16% ><div align=center>"&Uleve&"</div></TD>"&_
			"<TD align=middle width=27% ><div align=center>"&Rs("UserLastT")&"</div></TD>"&_
			"</TR>"&_
			"</TABLE>"
		Rs.Movenext
		loop
		Rs.Close
		Set Rs = Nothing
		end if
	Case "Pro"
		Response.write "<style>"&_
		"<!--"&_
		"TABLE{BORDER-TOP:0px;BORDER-LEFT:0px;BORDER-BOTTOM:1px}TD{BORDER-RIGHT:0px;BORDER-TOP:0px}"&_
		".border1 {"&_
			"border-top-width: 1px;"&_
			"border-right-width: 1px;"&_
			"border-bottom-width: none;"&_
			"border-left-width: 1px;"&_
			"border-top-style: none;"&_
			"border-right-style: solid;"&_
			"border-bottom-style: none;"&_
			"border-left-style: solid;"&_
			"border-top-color: #A4B6D7;"&_
			"border-right-color: #A4B6D7;"&_
			"border-bottom-color: none;"&_
			"border-left-color: #A4B6D7;"&_
		"}"&_
		"-->"&_
		"</style>"
	
		ProNum=Request.Form("ProNum")
		Sql="Select Top 50 ProductID,ProductNum,ProductCnName,ProductEnName,ProductImgI,ProductImgII,ProductI,ProductII,ProductIII From Product_Info Where ProductConceal=False and DelThis=False and "&ProNum&" like '%"&key&"%'"
		Set Rs = Conn.Execute(Sql)
		Tab "搜索到以下相关信息","如果以下信息仍然没有你需要的信息,请尝试加长关键字。"

		if Rs.Eof Then
		Response.write "<br><center>很抱歉,没有找到您需要的信息!</Center>"
		else
		do while not rs.eof
		Response.write "<table border=0 cellpadding=0 cellspacing=4 style=border-collapse: collapse width=100% height=59 class=border1><tr>"
		For i=i to i+4
		if rs("ProductImgI") <> "" then
			bas="S"
			img=rs("ProductImgI")
		elseif rs("ProductImgII") <> "" then
			bas="B"
			img=rs("ProductImgII")
		end if
		
		
		
		
		Response.write "<td width=20% ><center>货号:"&rs("ProductNum")&"<br><a href=ShowProDuct.asp?ProID="&rs("ProductID")&" title=点击查看"&rs("ProductCnName")&"详细介绍><img src=UpProductimg/"&bas&"/"&img&" width=80 height=80 border=1 ></a><br><br>"&rs("ProductCnName")&"<br>"
			if Application(registered&"ProductI")<>"" then Response.write "<strike>"&Application(registered&"ProductI")&":"&FormatCurrency(rs("ProductI"))&"</strike><br>"
			if Application(registered&"ProductII")<>"" then Response.write Application(registered&"ProductII")&":"&FormatCurrency(rs("ProductII"))&"<br>"
			if Application(registered&"ProductIII")<>"" then Response.write "<font color=#ff9966>"&Application(registered&"ProductIII")&":"&FormatCurrency(rs("ProductIII"))&"</font><br>"
		Response.write "<a href=ShowProDuct.asp?ProID="&rs("ProductID")&"><font color=#A4B6D7>[详细介绍]</a></font><br> <a title=点击订购"&rs("ProductCnName")&" style='cursor:hand;' onclick=javascript:open('OrderList.asp?menu=AddPro&ProID="&rs("ProductID")&"&ProCName="&Trim(rs("ProductCnName"))&"','','width=400,height=150')><img src=images/nico_01.gif border=0>订购</a> <hr width=80% color=#A4B6D7 SIZE=1></center></td>"
	
		
		
		
		
		rs.MoveNext
		if rs.EOF Then Exit For
		Next
		Response.write "<tr></table>"
		loop
		Rs.Close : Set Rs = Nothing
		end if
	Case "Bbs"
		BbsID=Request.Form("BbsID")
		TimeLimit=Request.Form("TimeLimit")
		Title=Request.Form("Title")
		if BbsID <> "all" Then BB="BbsId="&BbsId&" and"
			if TimeLimit="all" Then
			Sql="Select Top 100 UserName,UserID,BbsID,ShowID,Icon,Title,AllPost,Content,LastTime,Restore,GoodTop,TopTopic,LockTopic From Forum Where DelThis=False and "&BB&" "&Title&" like '%"&key&"%' Order by LastTime Desc"
			else
			Sql="Select Top 100 UserName,UserID,BbsID,ShowID,Icon,Title,AllPost,Content,LastTime,Restore,GoodTop,TopTopic,LockTopic From Forum Where DelThis=False and "&BB&" "&Title&" like '%"&key&"%' and DateDiff('d',PostTime,now) <"&TimeLimit&" Order by LastTime Desc"
			end if
		Set Rs = Conn.Execute(Sql)
		Tab "搜索到以下相关信息","如果以下信息仍然没有你需要的信息,请尝试加长关键字。"
		if Rs.Eof Then
		Response.write "<br><center>很抱歉,没有找到您需要的信息!</Center>"
		else%>
		<style type="text/css">
		<!--
		.unnamed1  {
			border-top-width: 1px;
			border-right-width: 1px;
			border-bottom-width: 1px;
			border-left-width: 1px;
			border-top-style: none;
			border-right-style: none;
			border-bottom-style: solid;
			border-left-style: solid;
			border-top-color: #a4b6d7;
			border-right-color: #a4b6d7;
			border-bottom-color: #a4b6d7;
			border-left-color: #a4b6d7;
		}
		.a1 {
			border-top-width: 1px;
			border-right-width: 1px;
			border-bottom-width: 1px;
			border-left-width: 1px;
			border-top-style: none;
			border-right-style: solid;
			border-bottom-style: solid;
			border-left-style: solid;
			border-top-color: #a4b6d7;
			border-right-color: #a4b6d7;
			border-bottom-color: #a4b6d7;
			border-left-color: #a4b6d7;
		}
		
		-->
		</style>
		
		<script>
		function loadThreadFollow(ino){
			var targetImg =eval("followImg" + ino);
			var targetDiv =eval("follow" + ino);

⌨️ 快捷键说明

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