<% data_path="../" 'ACC连接数据库路径，对SQL无效 %>
<!--#include file="../conn/conn.asp"-->

<%
if issession=0 then
   gsid=request.Cookies("Yxmemberid")
   yxflag=request.Cookies("yxflag")
   gradeid=request.Cookies("gradeid")
else
   gsid=session("id")
   yxflag=session("yxflag")
   gradeid=session("gradeid")
end if
issee=0
Response.ContentType = "text/xml"
Response.Expires = 0
' 不保存在客户端缓存

  set rspeo=server.CreateObject("adodb.recordset")
		  sqlpeo="select top 1 issee from Websen_worldec_config"
		  rspeo.open sqlpeo,conn,1,1
		  if not rspeo.eof then
		      issee=rspeo("issee")
		      rspeo.close
		  end if

if issee=0 then
		  '-验证是否登陆与是否具有查看权限-------------------------------------------------------------
	   if gsid<>"" then    
		  if yxFlag=1 then                            '通过审核的用户 
		     set rsrole=server.CreateObject("adodb.recordset")
		      sqlrole="select   rolelist from Websen_vipgrade where roleid="&gradeid
		     rsrole.open sqlrole,conn,1,1
		     if not rsrole.eof then 
 		         if instr(rsrole("rolelist"),"msg")>0 then              '权限允许的用户
 		                              
		             XML_Result=XML_Result&"1"
		         else
		             XML_Result=XML_Result&"0"
		         end if
		         rsrole.close
		     end if
 		  end if
	    else
		   XML_Result=XML_Result&"0"
		end if
	else
		   XML_Result=XML_Result&"1"
    end if



gsid1=Request("gsid")
set rs=server.CreateObject("adodb.recordset")
sqlmp="select * from Websen_corporation where ID="&gsid1
rs.open sqlmp,conn,1,1
 

Websen_Related=Websen_Related&"<table width='98%' border='0' cellspacing='0' cellpadding='0' align='center' style=' border-bottom: 1px #C1C1C1 dashed' ><tr>"
			Websen_Related=Websen_Related&"<td width='52%' height='26'>"
	   if instr(rs("rolelist"),"qw")>0 then		
		'公司信息'^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

			If is2weburl=1 Then
			Websen_Related=Websen_Related&"<A href='http://"&rs("user")&"."&weburl1&"' target=_blank><img src='"&HOPE_InstallDir&"Blue/fl_bg.gif' width='121' height='25' border='0' /></a>"
			Else
			Websen_Related=Websen_Related&"<A href='"&HOPE_InstallDir&"vipcom/"&rs("user")&"/' target=_blank><img src='"&HOPE_InstallDir&"Blue/fl_bg.gif' width='121' height='25' border='0' /></a>"
			End If
			Else 
		    Websen_Related=Websen_Related&"<A href='"&HOPE_InstallDir&"Ptcom/"&rs("user")&".html' target=_blank><img src='"&HOPE_InstallDir&"Blue/fl_bg.gif' width='121' height='25' border='0' /></A>" 
		End If 
			Websen_Related=Websen_Related&"</td><td width='48%'></td>"
			if instr(rs("rolelist"),"qw")>0 then
			Websen_Related=Websen_Related&"</tr><td height='25' colspan='2'><A href='"&HOPE_InstallDir&"vipcom/"&rs("user")&"/supply1.htm' target=_blank>最新供应</a> | <A href='"&HOPE_InstallDir&"vipcom/"&rs("user")&"/About.htm' target=_blank>公司介绍</a></td>"
			else
			Websen_Related=Websen_Related&""
			end if
			Websen_Related=Websen_Related&"</tr><tr><td height='25' colspan='2'>经营模式：　&nbsp;"&rs("Qylb")&"</td></tr>"
			Websen_Related=Websen_Related&"<tr><td height='25' colspan='2'>会员评价总数：" 
		sqls="select count(id) from Websen_trustadv where Websen_trustadv.bprid="&rs("id")&""
		Set totles=Server.CreateObject("adodb.Recordset")
		totles.Open sqls,conn,1,1
		If Not totles.Eof Then
		totle2s=totles(0)
			Websen_Related=Websen_Related&"<FONT color=red><b>"&totle2s&"</b></font>条 "
		totles.Close 
		Set totles=nothing
		End If 
			Websen_Related=Websen_Related&"<a href="&HOPE_InstallDir&"trustadv/rempost.asp?id="&rs("id")&"  target=_blank   >发表评价</a></td></tr>" 
			Websen_Related=Websen_Related&"<tr><td height='25' colspan='2'>诚信指数：　&nbsp;<strong><font color=red style=""font-size:14px"">"&rs("trust_score")&"</font></strong></td></tr></table>"

	        Websen_Contact=Websen_Contact&"<input type='text' id='installurlmsg'  style='display:none; width:12;height:1'  value='"&HOPE_InstallDir&"'/><table width='100%' border='0' cellspacing='0' cellpadding='0' id='secTable' ><tr>"
			Websen_Contact=Websen_Contact&"<td height='20'><span style=' font-size: 18px; color: #000000; font-weight: bold; line-height: 200%'>"&rs("name")&"</span>&nbsp;<span style=' font-size: 18px; color: #000000; font-weight: bold; line-height: 200%'>"&rs("ch")&"</span>"
			if rs("zw")<>"" then
			Websen_Contact=Websen_Contact&"&nbsp;(<span style=' font-size: 16px; color: #000000; line-height: 180%'>"&rs("zw")&"</span>)</td></tr><tr>"
			else
			Websen_Contact=Websen_Contact&"</td></tr><tr>"
			end if
			Websen_Contact=Websen_Contact&"<td height='20'>电　　话："&rs("Phone")&"</td></tr><tr><td height='30'>移动电话："&rs("mobile")&"</td>"
			Websen_Contact=Websen_Contact&"</tr><tr><td height='20'>传　　真："&rs("Fax")&"</td></tr><tr><td height='30'>地　　址："&rs("Address")&"</td>"
			Websen_Contact=Websen_Contact&"</tr><tr><td height='20'>邮　　箱："&rs("Email")&"</td></tr><tr>"
			If is2weburl=1 Then
			Websen_Contact=Websen_Contact&"<td height='20'>公司网站：<A href='http://"&rs("user")&"."&weburl1&"' target=_blank>http://"&rs("user")&"."&weburl1&"</a></td>"
			Else
			Websen_Contact=Websen_Contact&"<td height='20'>公司网站：<A href='"&HOPE_InstallDir&"vipcom/"&rs("user")&"/' target=_blank>"&WebUrl&"vipcom/"&rs("user")&"</a></td>"
			End If
			Websen_Contact=Websen_Contact&"</tr></table>"
	
	
	 
			 set rsmp1=server.CreateObject("adodb.recordset")
	   sqlmp1="select * from Websen_vipgrade where roleid="&rs("gradeid")
	   rsmp1.open sqlmp1,conn,1,1
	   if not rsmp1.eof  then
	   if instr(rsmp1("rolelist"),"qw")>0 then
 
  		If is2weburl=1 Then
		      HOPE_CORNAME=HOPE_CORNAME&"<A href='http://"&rs("user")&"."&weburl1&"'  target=_blank>"&rs("qymc")&" </A> " 
		 Else
		      HOPE_CORNAME=HOPE_CORNAME&"<A href='"&HOPE_InstallDir&"vipcom/"&rs("user")&"/'  target=_blank>"&rs("qymc")&" </A> " 
		 End If
 		
		else
 		
		 HOPE_CORNAME=HOPE_CORNAME&"<A href='"&HOPE_InstallDir&"Ptcom/"&rs("user")&".html'  target=_blank>"&rs("qymc")&" </A>" 
       end if
	  end if		
	
Response.Write("<?xml version='1.0' encoding='gb2312'?>")
Response.Write("<user>")
Response.Write("<msg>")

 if not rs.bof and not rs.eof  then 
    if gsid1="" then
response.Write "<![CDATA[<table border='0' cellspacing='0' cellpadding='0' align='center'><tr><td ><font color='#FF0000'>错误!</font></td></tr></table>]]>"
	else
response.Write "<![CDATA[<span class='h4'>"&HOPE_CORNAME&"</span>"&Websen_Related&Websen_Contact&"]]>"
    end if
else
response.Write "<![CDATA[<table border='0' cellspacing='0' cellpadding='0' align='center'><tr><td ><font color='#FF0000'>读取数据错误!</font></td></tr></table>]]>"
end if
' 文件内容格式为XML
response.Write("</msg>")
response.Write ("<mssg>")
response.Write"<![CDATA["&XML_Result&"]]>"
response.Write ("</mssg>")
response.Write ("<mag>")
response.Write"<![CDATA["&Systemtel&"&nbsp;"&hottel&"]]>"
response.Write ("</mag>")
Response.Write("</user>")
rs.close  
rsmp1.close
%>
			

