<%
'图文新闻
Function HOPE_NewsInfoPic(topnews,picwidth,picheight,Typeid,Num,leftstr,isnew,timed)
		If brnum<=0 Then
		  brnum=1
		End If
		str=""
		If isnew=0 Then
		   tjstr="  order by Dateandtime desc "
		Elseif isnew=2 Then 
			tjstr="  and homehot=1 order by Dateandtime desc "
		Elseif isnew=3 Then 
			tjstr=" order by Dateandtime desc "
		Else
		   tjstr="  and Tjnews=1 order by Dateandtime Desc"
		End If
		
		If typeid=0 Then
			sql="select top "&num&" * from Yixiang_news where newsid<>0  "&tjstr
		Else
			sql="select top "&num&" * from Yixiang_news where typeid="&typeid&tjstr
		End If
		Set rsi= Server.CreateObject("ADODB.Recordset") 
		rsi.open sql,conn,1,1
		If rsi.Eof Then
			strs="暂无该类新闻"
		Else
		w=1
		for i=1 to topnews
			if rsi.eof then
				exit for
			end if
		str=str&"<ul class=""indexcenterright4-2-11""><li class=""indexcenterright4-2-11-1"">"&vbCrlf
		 If rsi("picture")<>"" Or rsi("picture")<>"nopicture.gif" Then
			str=str&"<a href='"&HOPE_InstallDir&"info/detail/"&rsi("typeid")&"-"&rsi("newsid")&".html' target='_blank' class=white title="""&rsi("title")&"""><img src="&HOPE_InstallDir&"UploadFile/"&rsi("picture")&" border=0 width="&picwidth&" height="&picheight&" align=left vspace=4 hspace=4></a>"
		 Else
			str=str&"<a href='"&HOPE_InstallDir&"info/detail/"&rsi("typeid")&"-"&rsi("newsid")&".html' target='_blank' class=white title="""&rsi("title")&"""><img src="&HOPE_InstallDir&"UploadFile/nopicture.gif  border=0 width="&picwidth&" height="&picheight&" align=left vspace=4 hspace=4></a>"
		 End If
		str=str&"	</li>"&vbCrlf
		str=str&"	<li class=""indexcenterright4-2-11-2""><span style=""font-size:13px; font-weight:700; float:left"">"&left(rsi("title"),8)&"</span> "&vbCrlf
		if len(noHtml(rsi("Content")))>25 then
			content=left(noHtml(rsi("Content")),25)&"..."
		else
			content=noHtml(rsi("Content"))
		end if
		str=str&"<br><a href="""&HOPE_InstallDir&"info/detail/"&rsi("typeid")&"-"&rsi("newsid")&".html"">"&content&"</a></li>"&vbCrlf
		str=str&"</ul>"&vbCrlf
		rsi.movenext
		next
		str=str&"<ul class=""indexcenterright4-2-12"">"&vbCrlf
		for i=topnews+1 to num
			if rsi.eof then
				exit for
			end if
		str=str&"	<li class=""indexcenterright4-2-12-1"">·<a href="""&HOPE_InstallDir&"info/detail/"&rsi("typeid")&"-"&rsi("newsid")&".html"" title="""&rsi("title")&""">"&left(rsi("title"),leftstr)&"</a></li>"&vbCrlf
		rsi.movenext
		next
		rsi.close
		set rsi=nothing
		str=str&"</ul>"&vbCrlf
		End If
	HOPE_NewsInfoPic=str
End Function

'新版公司库首页推荐
Function HOPE_newCompany(typeid,num,leftstr,isnew,tuitype,brnum,gradeid)
	strs=""
	sql="select top "&num&" yixiang_corporation.id,yixiang_corporation.Qymc,yixiang_corporation.Country,yixiang_corporation.Sf,yixiang_corporation.City,yixiang_corporation.qylb,yixiang_corporation.sortid,yixiang_corporation.typeid,yixiang_corporation.typeid_2,yixiang_vipgrade.gradepic from yixiang_corporation left join yixiang_vipgrade on yixiang_corporation.gradeid=yixiang_vipgrade.roleid where len(qymc)>0"
	if typeid<>0 then sql=sql&" and sortid="&typeid
	if tuitype=1 then sql=sql&" and uflag=1"
	if gradeid<>0 then sql=sql&" and gradeid="&gradeid
	if isnew=1 then 
		sql=sql&" order by idate desc"
	else
		sql=sql&" order by trust_score desc"
	end if

	set com_rs=server.createobject("adodb.recordset")
	com_rs.open sql,conn,1,1
	strs=strs&"<ul class=""company2-1"">"&vbCrlf
	if not com_rs.eof then
	i=1
	do while not com_rs.eof
	'取大类名
	set sortRs=conn.execute("select sort from yixiang_Class_1 where sortid="&com_rs("sortid"))
	if not sortRs.eof then
		sortName=sortRs("sort")
	end if
	sortRs.close
	set sortRs=nothing
	'取小类名
	set typeRs=conn.execute("select typename from yixiang_Class_2 where typeid="&com_rs("typeid"))
	if not typeRs.eof then
		yixiangtype=typeRs("typename")
	end if
	typeRs.close
	set typeRs=nothing
	'取三级分类名
	set typeRs_2=conn.execute("select typename_2 from yixiang_Class_3 where typeid_2="&com_rs("typeid_2"))
	if not typeRs_2.eof then
		yixiangtype_2=typeRs_2("typename_2")
	end if
	typeRs_2.close
	set typeRs_2=nothing
	strs=strs&"	<li class=""company2-1-1"">"&vbCrlf
	strs=strs&"<table width=""100%"" border=""0"" cellspacing=""0"" cellpadding=""0"" onMouseOut=""this.style.backgroundColor='#ffffff'"" onMouseOver=""this.style.backgroundColor='#FFECDB'"" height=""100%"">"
	strs=strs&"<tr>"
	strs=strs&"<td colspan=""2"" class=""company2-1-1-1"">&nbsp;"&GetUserList(com_rs("id"))&"</td>"
	strs=strs&"</tr>"
	strs=strs&"<tr>"
	
	strs=strs&"<td><table  width=""100%"" border=""0"" cellspacing=""0"" cellpadding=""0""><tr> "
	strs=strs&"<td width=""60"" rowspan=""3"" align=""left"">&nbsp;<img src="""&HOPE_InstallDir&"UploadFile/"&com_rs("gradepic")&""" width='50' height='50'/></td>"
	strs=strs&"<td width=""240"" align=""left"" >"&com_rs("Country")&com_rs("Sf")&com_rs("City")&"</td>"
	strs=strs&" </tr>"
	strs=strs&" <tr>"
	strs=strs&"<td align=""left"" >企业类型："&com_rs("qylb")&"</td>"
	strs=strs&" </tr>"
	strs=strs&" <tr>"
	strs=strs&"	<td align=""left"" >主营行业："&sortName&yixiangtype&yixiangtype_2&"</td>"
	strs=strs&" </tr>"
	strs=strs&" </td></tr></table>"
	strs=strs&"</table>"
	strs=strs&"	</li>"&vbCrlf
	if (i mod brnum = 0) and (num-i<>0) then strs=strs&"</ul><ul class=""company2-1"">"&vbCrlf
	i=i+1
	com_rs.movenext
	loop
	else
		strs=strs&"暂无企业推荐"&vbCrlf
	end if
	com_rs.close
	set com_rs=nothing
	strs=strs&"</ul>"
	HOPE_newCompany=strs
End Function

Function HOPE_infotype_new(brnum,topnum,txtnum)
		strs=""
		If brnum<=0 Then
			brnum=1 
		End If
	   Set rsn=Server.CreateObject("ADODB.Recordset")
	   nsql="select top "&topnum&" * from yixiang_newsType where len(type)>0"
	   if txtnum<>0 then nsql=nsql&" and len(type)="&txtnum
	   nsql=nsql&" order by orderid"
	   rsn.open nsql,conn,1,1
	   If rsn.Eof Then
		  strs="暂无信息"
	   Else
		n=1
		strs=""
	 Do While Not rsn.Eof 
		strs=strs&"<li><a href="&HOPE_InstallDir&"info/community/"&rsn("typeid")&".html class=black>"&rsn("type")&"</a></li>"&vbCrlf
		rsn.Movenext
		n=n+1
		Loop
		rsn.Close
		Set rsn=Nothing
	   End If
	HOPE_infotype_new=strs
End Function



















Function HOPE_GetIndex_newstype(num,homehot,newstype,topnews)
set typeRs=conn.execute("select * from yixiang_newsType where typeid="&newstype)
if not typeRs.eof then
	newstypename=typeRs("type")
else
	newstypename="暂无分类"
end if
typeRs.close
set typeRs=nothing
strs=strs&"<ul class=""way-col-le1"">"&vbCrlf
strs=strs&"	<ul class=""way-col-le1-0"">"&vbCrlf
strs=strs&"		<li>"&newstypename&"</li>"&vbCrlf
strs=strs&"	</ul>"&vbCrlf
sql="select top "&num&" * from Yixiang_news where typeid="&newstype
if homehot=1 then sql=sql&" and homehot=1"
sql=sql&" order by dateandtime desc"
set rsi=server.createobject("adodb.recordset")
rsi.open sql,conn,1,1
if not rsi.eof then
for i=1 to topnews
	if rsi.eof then
		exit for
	end if
strs=strs&"	<ul class=""way-col-le1-1"">"&vbCrlf
If rsi("picture")<>"" Or rsi("picture")<>"nopicture.gif" Then
	strs=strs&"<li class=""way-col-le1-1-1""><a href='"&HOPE_InstallDir&"info/detail/"&rsi("typeid")&"-"&rsi("newsid")&".html' target='_blank' class=white title="""&rsi("title")&"""><img src="&HOPE_InstallDir&"UploadFile/"&rsi("picture")&" border=0 width=68 height=66></a></li>"&vbCrlf
Else
	strs=strs&"<li class=""way-col-le1-1-1""><a href='"&HOPE_InstallDir&"info/detail/"&rsi("typeid")&"-"&rsi("newsid")&".html' target='_blank' class=white title="""&rsi("title")&"""><img src="&HOPE_InstallDir&"UploadFile/nopicture.gif  border=0 width=68 height=66></a></li>"&vbCrlf
 End If
strs=strs&"		<li class=""way-col-le1-1-2"">"&left(rsi("title"),8)&"</li>"&vbCrlf
if len(noHtml(rsi("Content")))>45 then
	content=left(noHtml(rsi("Content")),45)&"..."
else
	content=noHtml(rsi("Content"))
end if
strs=strs&"		<li class=""way-col-le1-1-3""><a href="""&HOPE_InstallDir&"info/detail/"&rsi("typeid")&"-"&rsi("newsid")&".html"">"&content&"</a>"&vbCrlf
strs=strs&"</li>"&vbCrlf
strs=strs&"	</ul>"&vbCrlf
rsi.movenext
next
strs=strs&"	<ul class=""way-col-le1-2"">"&vbCrlf
for i=topnews+1 to num
	if rsi.eof then
		exit for
	end if
strs=strs&"		<li class=""way-col-le1-2-1""><a href="""&HOPE_InstallDir&"info/detail/"&rsi("typeid")&"-"&rsi("newsid")&".html"">·"&left(rsi("title"),22)&"</a></li>"&vbCrlf
rsi.movenext
next
strs=strs&"	</ul>"&vbCrlf
else
	strs=strs&"	没有该类新闻"&vbCrlf
end if
strs=strs&"</ul> "&vbCrlf
HOPE_GetIndex_newstype=strs
End Function

'图片新闻
Function HOPE_PicNews_new()
strs=strs&"<ul class=""way-news-img2"">"&vbCrlf
strs=strs&"	<li class=""way-news-img2-1""><img src=""images/way_img6.jpg""></li>"&vbCrlf
strs=strs&"	<li class=""way-news-img2-2""><a href=""#"">揭秘财富与星座性</a></li>"&vbCrlf
strs=strs&"</ul>"&vbCrlf
End Function

'取大类列名
Function HOPE_GetSort()
strs=""
strs=strs&"<select name=""sortid"" id=""sortid"" style=""width:128px; height:20px"">"&vbCrlf
strs=strs&"	 <option selected style=""color:#CCCCCC "">所有类别</option>"&vbCrlf
set sortRs=conn.execute("select SortID,sort from yixiang_Class_1 order by orderid asc")
if not sortRs.eof then
do while not sortRs.eof
strs=strs&"	 <option value="""&sortRs(0)&""">"&sortRs(1)&"</option>"&vbCrlf
sortRs.movenext
loop
end if
sortRs.close
set sortRs=nothing
strs=strs&"</select>"&vbCrlf
HOPE_GetSort=strs
End Function
'新版产品类别
Function HOPE_ProductShow_New(topnum,sortid,typeid,typeid_2,isdatetime,istypename,istj)
sql="select top "&topnum& " yixiang_productshow.id,yixiang_productshow.cpmc,yixiang_productshow.sortid,yixiang_productshow.typeid,yixiang_productshow.typeid_2,yixiang_Class_1.sort,yixiang_productshow.idate from yixiang_productshow,yixiang_Class_1 where yixiang_productshow.sortid=yixiang_Class_1.sortid"
if sortid<>0 then sql=sql&" and yixiang_productshow.sortid="&sortid
if typeid<>0 then sql=sql&" and yixiang_productshow.typeid="&typeid
if typeid_2<>0 then sql=sql&" and yixiang_productshow.typeid_2="&typeid_2
if istj=1 then sql=sql&" and yixiang_productshow.zsbz='03'"
sql=sql&" order by yixiang_productshow.idate desc"
set proRs=server.createobject("adodb.recordset")
proRs.open sql,conn,1,1
if not proRs.eof then
i=1
do while not proRs.eof
ClassName="bb1-1"
if i mod 2 = 0 then
	ClassName="bb1-2"
end if
strs=strs&"<li class="""&ClassName&"""><div class=""pro_datetime_1""><a href="""&HOPE_InstallDir&"productshow/offerdetail/"&proRs("SortID")&"-"&proRs("TypeID")&"-"&proRs("typeid_2")&"-"&proRs("ID")&".html"">"&proRs("cpmc")&"</a> "
if istypename=1 then
	strs=strs&"["&proRs("sort")&"]"
end if
strs=strs&"</div>"
if isdatetime=1 then
	strs=strs&"<div class=""pro_datetime_2"">"&replace(formatdate(proRs("idate"),2),"/",".")&"</div>"
end if
strs=strs&"</li>"&vbCrlf
i=i+1
proRs.movenext
loop
end if
proRs.close
set proRs=nothing
HOPE_ProductShow_New=strs
End Function

'专项商机图文标签^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
'HOPE_Special_business(view,width，height,bigtype，v_num，s_num，b_num，tradetype，v_date)
'view      显示方式：1 为图片模式 0 为汉字模式 ｛width 图片宽度，height 图片高度｝
'bigtype   商机类别 
'v_num     显示商机条数
's_num     显示信息的文字数
'b_num     几条信息换行
'tradetype 信息行业分类
'v_date    是不否显示时间 1 显示 0 为不显示
'T_true    是否推荐 1 为推荐 0 为不推荐  2 不区分

Function HOPE_Special_business(view,picwidth,picheight,bigtype,tradetype,v_num,s_num,T_true,b_num,v_date)

		'生成查询条件^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
		 Special_sql=" select top "&v_num&" vipinfo_id,vipshowname,viptype,sortid,typeid,gsmc,dateandtime,picture from yixiang_vipinfo where flag=1 and"
		if T_true=2 then 
		  Special_sql=Special_sql&" ( tjhome=1 or tjhome=0 )" 
		 else
		   Special_sql=Special_sql&" tjhome="&T_true
		 end if 
		  
		 If  bigtype<>0 then 
		  Special_sql=Special_sql&" and viptype="&bigtype
		 End if
		 If tradetype<>0  then 
		 
		 Special_sql=Special_sql&" and  sortid="&tradetype
		 End if
		 Special_sql=Special_sql&" order by dateandtime desc" 

		'查询条件结束^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
	
		set Special_rs=server.CreateObject("adodb.recordset")
     	Special_rs.open Special_sql,conn,1,1
		
IF not Special_rs.eof then 	
    IF view=1 then 
	'图片模式^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   	 dim br_num 
	 Special_str="<style type=""text/css"">"&vbCrlf
	 Special_str=Special_str&".buso_borg_pic a{color:#E87F0C; text-decoration:none}"&vbCrlf
	 Special_str=Special_str&".buso_borg_pic ul{float:left; border:#cccccc solid 1px; margin:4px;height:115px;}"&vbCrlf
	 Special_str=Special_str&"*html .buso_borg_pic ul{margin:10px 4px auto 4px}"&vbCrlf
	 Special_str=Special_str&".buso_borg_pic ul:hover{border:1px dotted #cccccc; background-color:#FFFFCC;}" &vbCrlf
	 Special_str=Special_str&".buso_borg_pic ul li{margin:4px; line-height:23px;}"&vbCrlf
	 Special_str=Special_str&".buso_borg_pic ul li img{border:none;}"&vbCrlf	 
     Special_str=Special_str&"</style>"&vbCrlf
	 Special_str=Special_str&"<table width=""100%"" border=""0"" cellspacing=""0"" cellpadding=""0"" style=""margin-top:5px;"">"
	    do while not  Special_rs.eof
	       br_num=br_num+1
		   Special_str=Special_str&"<td class=""buso_borg_pic"">"
		   Special_str=Special_str&"<ul>"
		   Special_str=Special_str&"<li><a href="&HOPE_InstallDir&"vipinfo/offerdetail/"&Special_rs("viptype")&"-"&Special_rs("vipinfo_id")&".html target=_blank alt="""&Special_rs("vipshowname")&"""><img src="""&HOPE_InstallDir&"UploadFile/"&Special_rs("picture")&""" width='"&picwidth&"' height='"&picheight&"'/></a></li>"
		   Special_str=Special_str&"<li><a href="&HOPE_InstallDir&"vipinfo/offerdetail/"&Special_rs("viptype")&"-"&Special_rs("vipinfo_id")&".html target=_blank>"&left(Special_rs("vipshowname"),s_num)&"</a></li>"
		   if v_date=1 then 
		   Special_str=Special_str&"<li>"&formatdatetime(Special_rs("dateandtime"),1)&"</li>"
		   end if 
		   Special_str=Special_str&"</ul>"
	       Special_str=Special_str&"</td>"
		   IF br_num >= b_num then 
		   Special_str=Special_str&"</tr><tr>"
		   br_num=0
		   end if 
	    Special_rs.movenext	  
	   loop	
	   Special_str=Special_str&"</tr>"
	   Special_str=Special_str&"</table>"
	   
	Else
	'汉字模式^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
	 dim br_num_1
	 Special_str="<style type=""text/css"">"
	 Special_str=Special_str&".table_style{float:left; text-align:left; padding:3px; width:95%; overflow:hidden; border-bottom:1px dotted #cccccc}"
     Special_str=Special_str&"</style>"
	 Special_str=Special_str&"<table width=""100%"" border=""0"" cellspacing=""0"" cellpadding=""0"">"
	 Special_str=Special_str&"<tr>"
	  do while not  Special_rs.eof
	  br_num_1=br_num_1+1
	     Special_str=Special_str&"<td>"
		 Special_str=Special_str&"<ul class=""table_style""><a href="&HOPE_InstallDir&"vipinfo/offerdetail/"&Special_rs("viptype")&"-"&Special_rs("vipinfo_id")&".html target=_blank>"&left(Special_rs("vipshowname"),s_num)
		 if v_date=1 then 
		 Special_str=Special_str&"&nbsp;"&formatdatetime(Special_rs("dateandtime"),2)&"</a></ul>"
		 else
		 Special_str=Special_str&"</a></ul>"
		 end if 
		 Special_str=Special_str&"</td>"
	     IF br_num_1 >= b_num then 
		 Special_str=Special_str&"</tr><tr>"
		 br_num_1=0
		 end if 
	    Special_rs.movenext	  
	   loop	
	  Special_str=Special_str&"</tr>"
	  Special_str=Special_str&"</table>"
	End if 
Else 
Special_str="暂无信息"
End if 
Special_rs.close
set Special_rs= nothing
HOPE_Special_business=Special_str
End function



'专项商机图文标签结束^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
'4.1 专项商机搜索引导标签^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
'HOPE_search_links(s_type,s_num,b_num)
's_type 导航类型
's_num  显示数
'b_num  几个换行
's_price  起价
'e_price  结束价
'increment 增幅
Function HOPE_search_links(s_type,s_num,b_num,s_price,e_price,increment )
   dim br_num ,brnum_1,brnum_2
   If s_type =1 then 
   '地区导航
   search_sql="select top "&s_num&" * from yixiang_areacity "
   set search_rs=server.CreateObject("adodb.recordset")
   search_rs.open search_sql,conn,1,1 
   if not search_rs.eof then 
         search_str="<table width=""100%"" border=""0"" cellspacing=""0"" cellpadding=""0"">"
		 search_str=search_str&"<tr>"
    do while not search_rs.eof 
	  br_num=br_num+1 
	     search_str=search_str&"<td>"
		 search_str=search_str&"<a href=../search/searchvipinfo.asp?city="&search_rs("city")&">"&search_rs("city")&"</a>"
		 search_str=search_str&"</td>"
	 search_rs.movenext
	 if br_num>=b_num and search_rs.recordcount<>br_num then 
	    search_str=search_str&"</tr><tr>"
		br_num=0
	 end if 
	loop   
	    search_str=search_str&"</tr>"
		search_str=search_str&"</table>"
   search_rs.close
   set search_rs=nothing
   end if  
   Elseif s_type =2 then  
   '价格导航
     
       search_str="<table width=""100%"" border=""0"" cellspacing=""0"" cellpadding=""0"">"
	   search_str=search_str&"<tr>"
	   for i =  s_price to e_price step increment
	   brnum_1=brnum_1+1
	   search_str=search_str&"<td>"
	   search_str=search_str&"<a href=../search/searchvipinfo.asp?price="&i&"-"&i+increment&"万>"&i&"-"&i+increment&"万</a>"
	   search_str=search_str&"</td>"
	    if brnum_1>=b_num then 
	    search_str=search_str&"</tr><tr>"
		brnum_1=0
	    end if 
	   next  
       search_str=search_str&"</tr>"
	   search_str=search_str&"</table>"
   Elseif s_type =3 then  
       '行业导航
	    search_sql_1= "select top "&s_num&" sortid,sort from yixiang_class_1"
		set search_rs_1=server.CreateObject("adodb.recordset")
		search_rs_1.open search_sql_1,conn,1,1

		if not search_rs_1.eof then 
		  search_str="<table width=""100%"" border=""0"" cellspacing=""0"" cellpadding=""0"">"
	      search_str=search_str&"<tr>"
		  do while not search_rs_1.eof 
		   brnum_2 =brnum_2 +1
		   search_str=search_str&"<td align='left'>"
	       search_str=search_str&"<a href=../search/searchvipinfo.asp?topCatFormKey="&search_rs_1("sortid")&">"&left(search_rs_1("sort"),4)&"</a>"
	       search_str=search_str&"</td>"
		   if brnum_2 >=b_num and brnum_2<>search_rs_1.recordcount then 
           search_str=search_str&"</tr><tr>"
		   brnum_2=0
		   end if 
		   search_rs_1.movenext
		  loop 
		  search_str=search_str&"</tr>"
	      search_str=search_str&"</table>"
		end if  
        search_rs_1.close
		set search_rs_1=nothing
   End if 

HOPE_search_links=search_str
End function 




%>