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

📄 webborn.asp

📁 实现一个用JSP、Servlet技术实现的小型物流网站系统。实现功能如下:管理员通过登录该系统
💻 ASP
📖 第 1 页 / 共 5 页
字号:
	rs7.movenext
	loop
	rs7.close
	end if
	cpsearch=cpsearch&"</select>"&_
	"<select name=smallclassid>"&_
	"<option selected value=''>--请选择产品小类--</option>"&_
	"</select><INPUT type=submit value='查看' name=Submit22></TD>"&_
	"</TR></TBODY></FORM></TABLE>"
	end if
	'response.write cpsearch
	'产品搜索结束=====================================================================
	
	end function
	
	
	
  '^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

	public function cpzs()
	
	'产品展示开始=====================================================================
	dim cpsz
	bigclassid=replace_text(request("bigclassid"))
	smallclassid=replace_text(request("smallclassid"))
	sqlp="select * from wygkcn_productshow where gsid="&id&" and flag=1"
	if  Chkrequest(bigclassid) then sqlp=sqlp&" and bigclassid="&bigclassid&""
	sqlp=sqlp&" order by id desc"
	Set rsp= Server.CreateObject("ADODB.Recordset") 
	rsp.open sqlp,conn,1,1
	
	msg_per_page=1 '定义每页显示记录条数
	
	%>
	<%
	rsp.pagesize=msg_per_page '定义分页记录集每页显示记录数
	
	if not (rsp.eof and rsp.bof) then
		totalrec=rsp.RecordCount'总记录条数
		if rsp.recordcount mod msg_per_page=0 then'计算总页数,recordcount:数据的总记录数
			n=rsp.recordcount\msg_per_page'n:总页数
		else
			n=rsp.recordcount\msg_per_page+1                        
		end if                                                                
		currentpage=request("page")'currentpage:当前页
		If currentpage <> "" then
			currentpage =  cint(currentpage)
			if currentpage < 1 then  
				currentpage = 1
			end if  
			if err.number <> 0 then '错误处理
				err.clear
				currentpage=1
			end if
		else
			currentpage=1
		End if                                                                
		if currentpage*msg_per_page > totalrec and not((currentpage-1)*msg_per_page < totalrec)then 
			currentPage=1
		end if
		rsp.absolutepage=currentpage'absolutepage:设置指针指向某页开头
		rowcount=rsp.pagesize'pagesize:设置每一页的数据记录数
	end if
	
 	if rsp.eof or rsp.bof then
	cpzs="<TABLE cellSpacing=0 cellPadding=0 width=""100%"" align=center border=0>"&_
	"<TR><TD><FONT class=M color=silver><BR><BR>"&_
	"<CENTER>该会员目前尚未发布任何的产品信息! <BR><BR><BR><BR></CENTER></TD>"&_
	"<TR></TR></TBODY></TABLE>"
	else
	cpzs="<TABLE cellSpacing=0 cellPadding=0 width=""100%"" border=0>"&_
	"<TBODY>"&_
	"<TR>"&_
	"<TD bgColor=#d1d1d1><IMG height=1 src=image/shim.gif width=1></TD>"&_
	"</TR>"&_
	"</TBODY>"&_
	"</TABLE>"
	
	Dim t
	t=1
	i=0
	cpzs=cpzs&"<table width=""100%"" ><tr>"
	do while not rsp.eof and rowcount > 0
	
	cpzs=cpzs&"<td width=""25%"" align=center valign=top><DIV style=PADDING-TOP: 10px></DIV>"&_
	"<TABLE width=""100%"" border=0 align=center cellSpacing=1>"&_
	"<TBODY>"
	if icolor=0 then 
	color="bgColor=#ffffff" 
	else 
	color="bgColor=#ffffff"
	end if
	cpzs=cpzs&"<TR "& color &">"&_
	"<TD width=15% align=center>"&_
	"<TABLE  height=64 cellSpacing=0 cellPadding=0 width=64 border=0>"&_
	"<TBODY>"&_
	"<TR>"&_
	"<TD align=middle>"
	if rsp("picture")<>"nopicture.gif" then
	cpzs=cpzs&"<A href="&HOPE_InstallDir&""&weburl&"productshow/offerdetail/"&rsp("sortid")&"-"&rsp("typeid")&"-"&rsp("typeid_2")&"-"&rsp("id")&".html target=_blank><IMG src=/Vipcom/"&rsp("picture")&" border=0 width=100 height=85></A>" 
	else
	cpzs=cpzs&"<FONT class=C color=#cecfce>无图</FONT>"
	end if
	cpzs=cpzs&"</TD>"&_
	"</TR>"&_
	"</TBODY>"&_
	"</TABLE>"&_
	"<table width=""100%""  border=""0"" cellspacing=0 cellpadding=0>"&_
	"<tr>"&_
	"<td width=""4%"">&nbsp;</td>"&_
	"<td width=""96%"" class=""lh13 s"">"&_
	"<A href="""&HOPE_InstallDir&""&weburl&"productshow/offerdetail/"&rsp("sortid")&"-"&rsp("typeid")&"-"&rsp("typeid_2")&"-"&rsp("id")&".html target=_blank>"&_
	"<B>"&rsp("cpmc")&"</B><BR>"&_
	"<FONT color=#666666>发表时间:"&rsp("idate")&_
	"</A></td>"&_
	"</tr>"&_
	"</table>"&_
	"</TD>"
 	cpzs=cpzs&"</TR></TBODY></TABLE></td>"
	if tm<>"" then
	t=t+1
	end if
	icolor=icolor+1
	if icolor>1 then icolor=0
	rowcount=rowcount-1
 	rsp.movenext
	i=i+1
	if i mod 4=0 then cpzs=cpzs&"</tr><tr><td colspan=4><hr size=""1"" noshade=""noshade""></td></tr><tr>"
  	loop
	cpzs=cpzs&"</table>"
	cpzs=cpzs&"<TABLE cellSpacing=0 cellPadding=4 width=""100%"" border=0>"&_
	"<TBODY>"&_
	"<TR bgcolor=#f0f0f0>" &_
	"<td align=center class=s>"
	Pages("index.asp?MemberId="&user&"&bigclassid="&bigclassid&"&smallclassid="&smallclassid&"")
	cpzs=cpzs&"</td>"&_
	"</TR>"&_
	"</TBODY>"&_
	"</TABLE>"
	end if
	'产品结束开始=====================================================================
	
	end function
	
	
  '^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

	Function Pages(LinkFile) 
	   if not (rsp.eof and rsp.bof) then
		gopage=currentpage
		totalpage=n
		blockPage=Int((gopage-1)/10)*10+1
		
		If LCase(Request.ServerVariables("HTTPS")) = "off" Then 
		strTemp = "http://" 
		Else 
		strTemp = "https://" 
		End If 
		strTemp = strTemp & CheckStr(Request.ServerVariables("SERVER_NAME")) 
		If Request.ServerVariables("SERVER_PORT") <> 80 Then strTemp = strTemp & ":" & CheckStr(Request.ServerVariables("SERVER_PORT")) 
		strTemp = strTemp & CheckStr(Request.ServerVariables("URL"))
		lenstrTemp=len(strTemp)+1	
		if instr(left(linkfile,lenstrTemp),"?")>0 then 
		
		if blockPage = 1 Then
			cpzs=cpzs&"<span disabled>前10页</span>&nbsp;"
		Else
			cpzs=cpzs&"<a href=" & LinkFile & "&page="&blockPage-10&">前10页</a>&nbsp;"
		End If
	   i=1
	   Do Until i > 10 or blockPage > n
		If blockPage=int(gopage) Then
			cpzs=cpzs&"<font color=#FF0000><b>"&blockPage&"</b></font>"
		Else
			cpzs=cpzs&"<a href=" & LinkFile & "&page="&blockPage&">"&blockPage&"</a>"
		End If
		blockPage=blockPage+1
		i = i + 1
		Loop
		if blockPage > totalpage Then
			cpzs=cpzs&"&nbsp;<span disabled>后10页"
		Else
			cpzs=cpzs&"&nbsp;<a href=" & LinkFile & "&page="&blockPage&">后10页</a><span disabled>"
		End If 
		cpzs=cpzs&" 直接到第 "&_
		"<select onchange=if(this.options[this.selectedIndex].value!=''){location=this.options[this.selectedIndex].value;}>"
		for i=1 to totalpage
		if i=gopage then 
			ch="selected"
		else
			ch=""
		end if
		cpzs=cpzs&"<option value='" & LinkFile & "&page=" & i & "' "& ch &">"&i&"</option>"
		next
		cpzs=cpzs&"</select>"
		cpzs=cpzs&" 页<Br><Br>"
		
		else
		
		if blockPage = 1 Then
			cpzs=cpzs&"<span disabled>【←前10页</span>&nbsp;"
		Else
			cpzs=cpzs&"<span disabled>【</span><a href=" & LinkFile & "?page="&blockPage-10&">←前10页</a>&nbsp;"
		End If
	   i=1
	   Do Until i > 10 or blockPage > n
		If blockPage=int(gopage) Then
			cpzs=cpzs&"<font color=#FF0000>[<b>"&blockPage&"</b>]</font>"
		Else
			cpzs=cpzs&"<a href=" & LinkFile & "?page="&blockPage&">["&blockPage&"]</a> "
		End If
		blockPage=blockPage+1
		i = i + 1
		Loop
		if blockPage > totalpage Then
			cpzs=cpzs&"&nbsp;<span disabled>后10页→】"&_
		El
			cpzs=cpzs&"&nbsp;<a href=" & LinkFile & "?page="&blockPage&">后10页→</a><span disabled>】"
		End If 
		cpzs=cpzs&" 直接到第 "&_
		"<select onchange=if(this.options[this.selectedIndex].value!=''){location=this.options[this.selectedIndex].value;}>"
		for i=1 to totalpage
		if i=gopage then 
			ch="selected"
		else
			ch=""
		end if
		cpzs=cpzs&"<option value='" & LinkFile & "&page=" & i & "' "& ch &">"&i&"</option>"
		next
		cpzs=cpzs&"</select>"
		cpzs=cpzs&" 页<Br><Br>"
		
		End If
		
		Startinfo=((gopage-1)*msg_per_page)+1
		Endinfo=gopage*msg_per_page
		if Endinfo>totalrec then Endinfo=totalrec
			  cpzs=cpzs&"&nbsp;&nbsp;共 "&totalrec&" 条信息 当前显示第 "&Startinfo&" - "&Endinfo&" 条 每页 "&msg_per_page&" 条信息 共 "&n&" 页"
	end if
	End Function
	
	
  '^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

	
	
		public function cp_list_fun()
		
		'产品展示不分页=====================================================================
		dim cp_list    '参数1: 调用条数 
					   '参数2: 调用标题长度,以字符为单位,超过部分将不会显示。
					   '参数3:排序方法,为1按发表时间,为2按点击数,为3按回复数。
					   '参数4: 是否推荐,为1调用所有产品,为2调用推荐产品。
					   '参数5: 产品分类, 为1则调用所有分类的分类
					   '参数6: 是否显示图片 为1显示图片,2不显示
					   '参数7: 显示信息 1为显示发表时间 2 显示点击数
		sqlp="select top 12 id,picture,cpmc,idate from wygkcn_productshow where gsid="&session("autoid")&" and flag=1"
		sqlp=sqlp&" order by id desc"
		Set rsp= Server.CreateObject("ADODB.Recordset") 
		rsp.open sqlp,conn,1,1
		if not rsp.eof then
		cp_list=cp_list&"<table width=""100%"" border=0 bgcolor=#ffffff><tr>"
		dim cpi
		cpi=0
		do while not rsp.eof 
			cp_list=cp_list&"<td align=center width=""25%"" style=line-height:25px;><table width=""100%""><tr><td align=center><img src="&weburl&"picture\"&rsp("picture")&" width=""100"" height=""75""></td></tr><tr><td align=center><p class=s><a href= >"&rsp("cpmc")&"</a></p></td></tr></table></td>"
		rsp.movenext
		cpi=cpi+1
		if cpi mod 4=0 then cp_list=cp_list&"</tr><tr><td colspan=4><hr size=""1"" noshade=""noshade""></td></tr></tr>"
		
		loop
		cp_list=cp_list&"</tr></table>"
		end if 	
		cp_list_fun=cp_list
		
		end function
		
	
  '^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


		Function HOPE_newgong(typeid,num)			
			'供应
			if typeid=0 then 
				sql="select top "&num&" info_id,draw,draw1,draw2,type,showname,picture,sortid,typeid,typeid_2,dateandtime from Yixiang_Info where type='卖' and gsid="&session("autoid")&" and flag=1 order by info_id desc"
			else
				sql="select top "&num&" info_id,type,draw,showname,picture,sortid,typeid,typeid_2,dateandtime from Yixiang_Info where typeid="&typeid&" and type='卖' and gsid="&session("autoid")&" and flag=1 order by info_id desc"
			end if
				Set rs= Server.CreateObject("ADODB.Recordset") 
	rs.open sql,conn,1,1
				if rs.eof then
					newgong="暂无供求信息"
				else
					newgong=newgong&"<TABLE height=64 cellSpacing=0 cellPadding=0 width=64 border=0><TR>"
				do while not rs.eof
				if trim(rs("draw"))="" and trim(rs("draw1"))=""  and trim(rs("draw2"))="" then 
				   img=rs("picture")
			   else
				  if trim(rs("draw1"))<>"" and  trim(rs("draw2"))<>""  and trim(rs("draw"))<>"" then 
				   img=rs("draw")
				  elseif trim(rs("draw2"))="" and trim(rs("draw1"))="" then
					img=rs("draw")
				  elseif trim(rs("draw2"))="" and trim(rs("draw"))="" then
					 img=rs("draw1")

⌨️ 快捷键说明

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