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

📄 company.asp

📁 网人分类信息5.0商业版。非常优秀的分类信息系统。比较少见。
💻 ASP
字号:
<!--#include file="../../../inc/Conn.asp"-->
<!--#include file="../../../Inc/Cls.Common.asp"-->
<!--#include file="../../../Inc/Cls.Templates.asp"-->
<body style="margin:0">
<style>
A.white  	{COLOR: #FFFFFF; TEXT-DECORATION: none}
A.white:link	{COLOR: #FFFFFF; TEXT-DECORATION: none}
A.white:visited{COLOR: #FFFFFF; TEXT-DECORATION: none}
A.white:hover	{COLOR: yellow; TEXT-DECORATION: none}
A.white:active	{TEXT-DECORATION: none}
body,td{font-size:12px;word-break:break-all}
</style>
<%
    Response.Buffer = True
    Response.Expires = -1
    Response.ExpiresAbsolute = Now() - 1
    Response.Expires = 0
    Response.CacheControl = "no-cache"

If WR_Other(11) = "" Or Isnull(WR_Other(11)) Then
  Response.write "<script>if (confirm('请先至 www.mapbar.com 申请地图API密钥,并在\n后台-常规-网站参数设置-其它信息\n里配置好密钥信息!、\n\n现在就去申请?')){window.open('http://union.mapbar.com/apidoc/index.jsp?dtype=10','_blank')}</script>"
  Response.end
End If

Dim xy,i,n,LastPhoto,dj,SQL1,KeyList,SortID,SortSmallID,ComSSort,City
xy = Request("xy")
If Instr(xy,".") = 0 Then xy = ""
If xy <> "" Then dj = 13 Else dj = 10
Key = WRMPS.CheckStr(Request("Key"),0)
SortID = WRMPS.CheckStr(Request("Sort"),1)
SortSmallID = WRMPS.CheckStr(Request("SortSmall"),1)

If MyCityID > 0 and xy = "" Then
	Call DBConnBegin()
    Set Rs = Conn.Execute("Select WM_Map from WM_Area Where WM_ID="&MyCityID)
	If Not Rs.Eof Then
	  xy = Rs(0)
	End If
	Rs.Close
End If
If xy = "" Or IsNull(xy) Then xy = WR_Area(1)

If SortID <> "" Then
  If SortSmallID <> "" Then SQL = " WM_ClassID in("&SortSmallID&")" Else SQL = " WM_ClassID in("&WRDB.GetChildClass(SortID,"WM_CompanySort")&")"
End If
If City > 0 Then
  If SQL <> "" Then SQL = SQL & " and WM_AreaID="&City Else SQL = " WM_AreaID="&City
Else
  If MyCityID > 0 Then If SQL <> "" Then SQL = SQL & " and WM_AreaID="&MyCityID Else SQL = " WM_AreaID="&MyCityID
End If
If SQL <> "" Then SQL = SQL & " and WM_Key=1" Else SQL = " WM_Key=1"

If Key <> "" Then
	If Key <> "" Then
      Key = Replace(Key,"[","")
      Key = Replace(Replace(Key," ","+"),"&nbsp;","+")
      Key = Key &"+"
	  KeyList = Split(Key,"+")
      For i=0 To Ubound(KeyList)
	    If KeyList(i) <> "" Then
		  If SQL1 = "" Then SQL1 = "WM_Company like'%"&KeyList(i)&"%'" Else SQL1 = SQL1 & " Or WM_Company like'%"&KeyList(i)&"%'"
		End If
	  Next
	  If SQL1 <> "" Then SQL = SQL&" and ("&SQL1&")"
	End If
End If

Select Case ConnTypeStr
  Case 0
    SQL = "Select top 20 WM_ID,WM_Company,WM_Coordinate,WM_LastPhoto,WM_Phone,WM_Address,WM_Intro from WM_Company where "&SQL&" and WM_Coordinate Is Not Null and WM_Coordinate <> '' Order By WM_ID Desc"
  Case 1
    SQL = "Select top 20 WM_ID,WM_Company,WM_Coordinate,WM_LastPhoto,WM_Phone,WM_Address,WM_Intro from WM_Company where "&SQL&" and WM_Coordinate Is Not Null and WM_Coordinate <> '' Order By WM_ID Desc"
End Select
Set Rs = server.createobject("adodb.recordset")
Rs.Open Sql,Conn,1,1
%>
<script language="javascript" src="http://union.mapbar.com/apis/maps/free?f=mapi&v=31&k=<%=WR_Other(11)%>"></script>
<script type="text/javascript" src="http://union.mapbar.com/apidoc/js/tools.js"></script>
<div id="mapbar" style="width:678px;height:600px;"></div>
<script language="javascript">
		var maplet = null;
		function initMap() {
			maplet = new Maplet("mapbar");
			maplet.centerAndZoom(new MPoint(<%=xy%>), <%=dj%>);
			maplet.addControl(new MStandardControl());
<%
  Do While Not Rs.EOF
  N = N + 1
    LastPhoto = Rs(3)
	If LastPhoto = "" Or IsNull(LastPhoto) Then LastPhoto = WR_Setting(3)&"Skins/"&WR_Setting(5)&"/nopic.gif" Else LastPhoto = WRMPS.CheckStr(LastPhoto,5)
%>
			var marker<%=n%> = new MMarker(
				new MPoint(<%=Rs(2)%>),
				new MIcon("../centerPoi.gif", 20, 20),
				new MInfoWindow("<div style='padding:3px;background:red'><a href=<%=WRMPS.GetCompanyUrl(Rs(0))%> target=_blank class=white><%=Rs(1)%></a></div>", "<table width='100%' border='0' cellspacing='0' cellpadding='3'><tr><td width='80' rowspan='3' align=center><div style='padding:3px;border:1px #CCCCCC Solid;'><a href=<%=WRMPS.GetCompanyUrl(Rs(0))%> target=_blank><img src=<%=LastPhoto%> border=0 onload='javascript:DrawImage(this,80,60)'></a></div></td><td width=* height=20>电话:<%=Rs(4)%></td></tr><tr><td height=20>地址:<%=Rs(5)%></td></tr><tr><td height=40>  <%=WRMPS.GotTopic(WRMPS.LeachHTML(Rs(6)),50,1)%></td></tr></table>"),
				new MLabel("<%=Rs(1)%>")
			);
			maplet.addOverlay(marker<%=n%>);
<%
  Rs.MoveNext
  Loop
%>
		}
        initMap();
</script>
<%
Rs.Close
Set Rs = Nothing
Call ClassEnd()
Call DBConnEnd()
%>
<script>
//设定图片显示尺寸
var flag=false; 
function DrawImage(ImgD,w,h){ 
var image=new Image(); 
image.src=ImgD.src; 
if(image.width>0 && image.height>0){ 
  flag=true; 
  if(image.width/image.height>= w/h){ 
    if(image.width>w){ 
      ImgD.width=w; 
      ImgD.height=(image.height*w)/image.width; 
    }else{ 
      ImgD.width=image.width; 
      ImgD.height=image.height; 
    } 
  }else{ 
    if(image.height>h){ 
      ImgD.height=h; 
      ImgD.width=(image.width*h)/image.height; 
    }else{ 
      ImgD.width=image.width; 
      ImgD.height=image.height; 
    } 
  } 
} 
} 
</script>

⌨️ 快捷键说明

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