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

📄 temp_inc.asp

📁 网胜B2B电子商务蓝色风格2008SP6.0.1普及版
💻 ASP
📖 第 1 页 / 共 5 页
字号:
			  end if
			  stris=stris&"</td>"
			  end if
			                       
	       If w Mod brnam=0 Then
					   stris=stris&"</tr><tr>"
					End If
					w=w+1
					rst.Movenext
					Loop 
			  stris=stris&"</tr></table>"
			  end if
			
 		Websen_brand=stris
	End Function
	
	
	
	'----------------------------品牌标签----------------------------------

	'^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
	'品牌首页品牌分类
	function hope_tc(nud,nad)
        sqltc=" select top "&nud&" * from websen_Class_1"
	   set rsc=server.CreateObject("adodb.recordset")
	   rsc.Open sqltc,conn,1,1
	   w=1
	   hope_tc=hope_tc&"<table width='100%'><tr>"
	   if rsc.EOF then
	      hope_tc="<td>暂无分类</td>"
	   end if
	   do while not rsc.EOF
	     hope_tc=hope_tc&"<td><div class='bland_bg'><A href="&HOPE_InstallDir&"brand/trade/"&rsc("sortID")&".html target=_blank>"&left(rsc("sort"),4)&"</a></div></td>"
		If w Mod nad=0 Then
		hope_tc=hope_tc&"</tr><tr>"
		End If
		w=w+1
	   rsc.movenext
           loop
	   hope_tc=hope_tc&"</tr></table>"
	   rsc.close
	   set rsc=nothing
	end function
	
	'^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    '热门品牌排行
         function hope_hotpost()
            sqlh="select top 7  * from websen_post where flag=1 and hot=1 order by id desc"
			set rsh=server.CreateObject("adodb.recordset")
			rsh.open sqlh, conn,1,1
			if rsh.eof then
			  hope_hotpost="暂无热门品牌"
			 else 
			 do while not rsh.eof 
			 hope_hotpost=hope_hotpost &"<A href="&HOPE_InstallDir&"brand/offerdetail/"&rsh("type_class1")&"-"&rsh("type_class2")&"-"&rsh("type_class3")&"-"&rsh("id")&".html target=_blank>"
			 hope_hotpost=hope_hotpost&"<font color='#333333'>"&rsh("project")&"</font></a>&nbsp;"			 
			 
			   rsh.movenext
           loop
	    end if
	   rsh.close
	   set rsh=nothing
	end function	 
'^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^		
	
	
  	'供求列表
	'#HOPE_Supply(ispic,picwidth,picheight,whotype,typeid,num,leftstr,isnew,brnum,timed)# 一共10个参数
	'ispic--(1为图片形式,2为文字形式)
	'[picwidth---(图片宽度)、picheight为高度,只有当ispic为1时生效]
	'whotype-------(0为全部,1-供(卖)、2-求(买))栏目
	'typeid------信息大类id
	'num--(显示条数)
	'leftstr--(显示字数)
	'isnew----(0为全部,1为紧急(由Websen_Info表中的jinji字段),2为 普通--显示的类型
	'brnum---(几条信息换行)
	'time--(1为显示时间,0为不显示)
	'Synopsis--(1为显示简要内容,0为不显示)
	'typeNumber--(简要内容显示字数)
	'letier--(显示类型)
 	Function HOPE_Supply(ispic,picwidth,picheight,whotype,typeid,num,leftstr,isnew,brnum,timed,Synopsis,typeNumber,letier)			
		 
		 strs="" 
 		 If typeid=0 Then
		   typestr=""
		 Else
		   typestr=" and Websen_Info.sortid="&typeid
		 End If
 		 If isnew=1 Then                 '显示的信息类型
		    yanser="class='greed'"       '紧急求购样式
			sign=" and Websen_Info.jinji=1"
		 Elseif  isnew=0 Then

		    yanser=""
			sign=""
		 Elseif isnew=2 Then 
		    yanser=""
			sign=" and Websen_Info.jinji=0"
		 End If                        '^^^^^^^^^^^^^^^^^^^
  		 If brnum<=0 Then    '换行
			brnum=1
		 End If
		 
 		  sqlstr="select top "&num&" Websen_Info.*,Websen_corporation.[user] as userdd from Websen_Info left join [Websen_corporation] on Websen_corporation.id=Websen_Info.gsid where Websen_corporation.flag=1 and  Websen_Info.flag=1 "&sign&"  "&typestr&"   order by Websen_Info.dateandtime desc"
			Set rst=Server.CreateObject("ADODB.Recordset")
			rst.open sqlstr,conn,1,1
			If rst.Eof Then
			  strs="暂无信息"      
			End If
			

			
		 If Not rst.Eof Then 
	 If whotype=0 Then '信息大类
  			  Dim t
			  t=1
			  h=0
			  strs="<table border=0 align=center cellspadding=0 cellspacing=0 width='100%'><tr>"
 			If isnew =2 Then             '^^^^^^^^^^^^^^只处理会员信息start^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
			 Do While Not rst.Eof 
		   
			 If ispic=1 Then         '图片处理start
			    If trim(rst("draw")&"ok")="ok" OR rst("draw")="nopicture.gig" Then
 				picimg="<img src="&HOPE_InstallDir&"Uploadfile/nopictrue.gif   width="&picwidth&"  height="&picheight&" border=0 align=center vspace=4 hspace=4 ><br>"
				Else
				picimg="<img src="&HOPE_InstallDir&"vipcom/"&rst("userdd")&"/"&rst("draw")&"  width="&picwidth&"  height="&picheight&" border=0 align=center vspace=4 hspace=4 ><br>"
				End If
			 Else 
			if letier=0 then
		     traal=""
		    else
		     traal=rst("type")
		    end if
			if traal="卖" then
			tral="[求购]&nbsp;"&traal&""
			elseif traal="买" then
			tral="[供应]&nbsp;"&traal&""
			else
			tral=""
			end if
			picimg="·"&tral&""
			 End If                '^^^^^^^^End ^^^^^^^
  			Set rsvip=Server.CreateObject("ADODB.Recordset")
			 vipsql="select * from Websen_corporation where flag=1 and  ID="&rst("Gsid")
			 rsvip.open vipsql,conn,1,1
			 If Not rsvip.Eof Then 
			  If rsvip("flag")=1 Then
			 
			   h=h+1
			   strs=strs&"<td>"
			   If rst("type")="卖" Then                        '买与卖的静态生成页面路径处理start
				 strs=strs&" <a href='"&HOPE_InstallDir&"tradeinfo/offerdetail/"
			   Else
				 strs=strs&" <a href='"&HOPE_InstallDir&"seller/offerdetail/"
			   End If                                           '^^^^^^^^^^^^end^^^^^^^^^
 			strs=strs&rst("sortid")&"-"&rst("typeid")&"-"&rst("typeid_2")&"-"&rst("info_id")&".html' target='_blank' class=c>"&picimg&left(rst("showname"),leftstr)&"</a>"
		   
			  If timed=0 Then                                    '时间显示处理
				strs=strs&""
			  Else
				strs=strs&"&nbsp;&nbsp;["&month(rst("dateandtime"))&"-"&day(rst("dateandtime"))&"]"
			  End If                                          
														   '^^^^^^^^^End ^^^^^^^^^^^^^
 		   strs=strs&"&nbsp;</td>"
		  End If
		  'set rsvip=Nothing
		End If
		If h Mod brnum=0 Then
		 strs=strs&"</tr><tr>"
		End If
		rst.Movenext
		Loop
		   strs=strs&"</tr></table>"
 		   rst.Close
		   Set rst=Nothing
		End If 
									 '^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^end^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 	 If isnew<>2 Then                      '^^^^^^^^^^^^不考虑会员情况start^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 		Do While Not rst.Eof 	  
 		   If ispic=1 Then
		   
		    If trim(rst("draw")&"ok")="ok" OR rst("draw")="nopicture.gig" Then
			   picimg="<img src='"&HOPE_InstallDir&"UploadFile/nopicture.gif'  width="&picwidth&"  height="&picheight&" border=0  align=center vspace=4 hspace=4><br>"

			Else
			  picimg="<img src='"&HOPE_InstallDir&"vipcom/"&rst("userdd")&"/"&rst("draw")&"'  width="&picwidth&"  height="&picheight&" border=0  align=center vspace=4 hspace=4><br>"
	
			End If
		   Else 
			if letier=0 then
		     traal=""
		    else
		     traal=rst("type")
		    end if
			if traal="卖" then
			tral="[求购]&nbsp;"&traal&""
			elseif traal="买" then
			tral="[供应]&nbsp;"&traal&""
			else
			tral=""
			end if
			picimg="·"&tral&""
		   End If
			  strs=strs&"<td>"
		   If rst("type")="卖" Then
			  strs=strs&" <a href='"&HOPE_InstallDir&"tradeinfo/offerdetail/"
		   Else
			 strs=strs&" <a href='"&HOPE_InstallDir&"seller/offerdetail/"
		   End If
 		   strs=strs&rst("sortid")&"-"&rst("typeid")&"-"&rst("typeid_2")&"-"&rst("info_id")&".html' target='_blank' class=c>"&picimg&left(rst("showname"),leftstr)&"</a>"
		   
		   If timed=0 Then
			  strs=strs&""
		   Else
			  strs=strs&"&nbsp;&nbsp;["&month(rst("dateandtime"))&"-"&day(rst("dateandtime"))&"]"
		   End If
 			strs=strs&"&nbsp;</td>"
 		If t Mod brnum=0 Then
			strs=strs&"</tr><tr>"
		End If
 		   rst.Movenext
			t=t+1
		   Loop
		 strs=strs&"</tr></table>"
		   rst.Close
		   Set rst=Nothing                     '^^^^^^^^^^^^^end^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
		End If
	  End If
	 End If
  			'^^^^^^^^^^^^^^^^^
 	 If whotype=1 Then 
				sql="select top "&num&" Websen_Info.*,Websen_corporation.[user] as userdd from Websen_Info left join [Websen_corporation] on Websen_Info.gsid=Websen_corporation.id  where Websen_corporation.flag=1 and   Websen_Info.type='卖' and Websen_Info.flag=1 "&sign&"   "&typestr&"    order by Websen_Info.info_id desc"
 				Set rsg= Server.CreateObject("ADODB.Recordset") 
				rsg.open sql,conn,1,1
				If rsg.Eof Then
					strs="暂无供应信息"
				Else
				   strs="<table border=0 cellpadding=0 cellspacing=0 width='100%'><tr>"
				   Dim tt
				   tt=1
				   hh=0
 			If isnew=2 Then
 				Do While Not rsg.Eof
 				If ispic=1 Then
				If trim(rsg("draw")&"ok")="ok" OR rsg("draw")="nopicture.gig" Then
				 	  picimg="<img src='"&HOPE_InstallDir&"UploadFile/nopicture.gig'  width="&picwidth&"  height="&picheight&" border=0 align=center vspace=4 hspace=4 ><br>"

				Else
			 		  picimg="<img src='"&HOPE_InstallDir&"vipcom/"&rsg("userdd")&"/"&rsg("draw")&"'  width="&picwidth&"  height="&picheight&" border=0 align=center vspace=4 hspace=4 ><br>"

				End If
				Else 
			if letier=0 then
		     traal=""
		    else
		     traal="[供应]"
		    end if
				  picimg=traal
				End If
 				 Set rsvip2=Server.CreateObject("ADODB.Recordset")
				 vipsql2="select * from Websen_corporation where ID="&rsg("Gsid")
				 rsvip2.open vipsql2,conn,1,1
				 If Not rsvip2.Eof Then 
				   If rsvip2("flag")=1  Then
					hh=hh+1
 					strs=strs&" <td><a href='"&HOPE_InstallDir&"tradeinfo/offerdetail/"&rsg("sortid")&"-"&rsg("typeid")&"-"&rsg("typeid_2")&"-"&rsg("info_id")&".html' target='_blank' class=c>·"&picimg&left(rsg("showname"),leftstr)&"</a>"
					
					If timed=0 Then
					  strs=strs&""
					Else
					   strs=strs&"&nbsp;&nbsp;["&month(rsg("dateandtime"))&"-"&day(rsg("dateandtime"))&"]"
					End If
 				 strs=strs&"&nbsp;</td>"
				 End If
					set rsvip2=Nothing
				End If
					if hh Mod brnum=0 Then
					   strs=strs&"</tr><tr>"
					End If
					rsg.Movenext
					Loop
				 strs=strs&"</tr></table>"
				 rsg.Close
				 Set rsg=Nothing
 			 End If
 			   '^^^^^^^^^^
			   If isnew<>2 Then
 			  Do While Not rsg.Eof
  				if ispic=1 Then
				If trim(rsg("draw")&"ok")="ok" OR rsg("draw")="nopicture.gif" Then
			 	    picimg="<img src="&HOPE_InstallDir&"UploadFile/nopicture.gif  width="&picwidth&"  height="&picheight&" border=0  align=center vspace=4 hspace=4><br>"

				Else
			 		 picimg="<img src="&HOPE_InstallDir&"vipcom/"&rsg("userdd")&"/"&rsg("draw")&"  width="&picwidth&"  height="&picheight&" border=0  align=center vspace=4 hspace=4><br>"

				End If
				Else 
			if letier=0 then
		     traal=""
		    else
		     traal="[供应]"
		    end if
					picimg=traal
				End If
					strs=strs&" <td><a href='"&HOPE_InstallDir&"tradeinfo/offerdetail/"&rsg("sortid")&"-"&rsg("typeid")&"-"&rsg("typeid_2")&"-"&rsg("info_id")&".html' target='_blank' class=c>·"&picimg&left(rsg("showname"),leftstr)&"</a>"
 					If timed=0 Then 
					   strs=strs&"" 
					Else
					   strs=strs&"&nbsp;&nbsp;["&month(rsg("dateandtime"))&"-"&day(rsg("dateandtime"))&"]"
					End If
 					strs=strs&"&nbsp;</td>"
					If tt Mod brnum=0 Then
						strs=strs&"</tr><tr>"
					End If
					rsg.Movenext
					tt=tt+1
					Loop
 				strs=strs&"</tr></table>"
					rsg.Close
					 Set rsg=Nothing
				End If	
				End If 
			   End If
		'^^^^^^^^^^^^^^^^^^^^^^^

⌨️ 快捷键说明

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