<% data_path="../" 'ACC连接数据库路径，对SQL无效 %>
<!--#include file="../conn/conn.asp"-->
<!--#include file="../inc/safe.asp"-->
<%
Dim sea_msg,str
sea_msg=false
response.Charset="gb2312"
id=Replace_Text(request("id"))
'登陸會員等級驗證
if issession=0 then
	gradeid=request.Cookies("gradeid")
	if request.Cookies("gradeid")="" then
		 gradeid=0
	end if
else
	gradeid=session("gradeid")
	if session("gradeid")="" then
		 gradeid=0
	end if
end if
set rsl=server.CreateObject("adodb.recordset")
sqll="select rolelist from yixiang_vipgrade where roleid="&gradeid
rsl.open sqll,conn,1,1
if not rsl.eof then
	rolelist=rsl("rolelist")
	rsl.close
end if

if initdata("supply",rolelist)=1 then 
	sea_msg=true
end if
'判斷游客是否可以查看信息
if tradeinfo_tel=1 then
	sea_msg=true
end if
if sea_msg then
sql="select * from [yixiang_Info] where info_id="&id&""
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn,1,3
if not rs.eof then
rs.update

set gsrs=server.createobject("adodb.recordset")
sqlgs="select * from yixiang_corporation where id="&rs("gsid")
gsrs.open sqlgs,conn,1,1
call   Viewinfo() 
Function Viewinfo()
 With Response
   .Write "<table width=""100%"" border=""0"" cellspacing=""0"" cellpadding=""0"">"
   .Write "<tr>"
   .Write "<td width=""25%"">公司名称：</td>"
   if instr(rolelist,"qw")>0 then		
	'公司信息'^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
	if is2weburl=1 Then
	.Write "<td><A href='http://"&gsrs("user")&"."&weburl1&"' target=_blank>"&gsrs("qymc")&"</A> </td> " 
	Else
	.Write "<td><A href="&HOPE_InstallDir&"vipcom/"&gsrs("user")&"/ target=_blank>"&gsrs("qymc")&"</A></td>  " 
	End If
	Else 
	.Write "<td><A href="&HOPE_InstallDir&"Ptcom/"&gsrs("user")&".html target=_blank>"&gsrs("qymc")&"</A></td>" 
	End If 
   .Write "</tr>  " 
   .Write "<tr>"
   .Write "<td >联系&nbsp;&nbsp;人：</td>"
   .Write "<td >"&gsrs("name")&gsrs("ch")&"</td>"
   .Write "</tr>  " 
   .Write "<tr>"
   .Write "<td >电&nbsp;&nbsp;&nbsp;&nbsp;话：</td>"
   .Write "<td >"&gsrs("phone")&"</td>"
   .Write "</tr>  " 
   .Write "<tr>"
   .Write " <td>传&nbsp;&nbsp;&nbsp;&nbsp;真：</td>"
   .Write " <td>"&gsrs("fax")&"</td>"
   .Write "</tr>"
   .Write "<tr>"
   .Write " <td>移动电话：</td>"
   .Write " <td>"&gsrs("mobile")&"</td>"
   .Write "</tr>"
   .Write "<tr>"
   .Write "<td>办公地址：</td>"
   .Write " <td>"&gsrs("Country")&""&gsrs("sf")&""&gsrs("city")&""&gsrs("address")&"</td>"
   .Write "</tr>"
   .Write " <tr>"
   .Write " <td>邮政编码：</td>"
   .Write "<td>"&gsrs("post")&"</td>"
   .Write " </tr>"
   .Write " <tr>"
   .Write "<td colspan=2><img src="&HOPE_InstallDir&"images/icon_tianjiasy.gif width=13 height=12 align=absmiddle border=0> <a href="&HOPE_InstallDir&"member/myfriend/addfriend.asp?user="&gsrs("user")&" target=_blank >添加为商业伙伴</a></td>"
   .Write " </tr>"
   .Write "</table>"
   .End
 End With
End Function
gsrs.close
set gsrs=nothing
else
	response.write("该条信息不存在或已经过期")
	response.end()
end if
rs.close
set rs=nothing
else
	response.Write("<table width=""90%"" border=""0"" cellspacing=""0"" cellpadding=""0"" align=""center"" style=""margin-top:10px;""><tr><td style=""text-align:left;"">对不起，你没有权限查看该信息。可能是你不是会员，或者会员等级不够。</td></tr><tr>")
	if gradeid<>0 then
		response.write("<td> &nbsp;&nbsp;<a href="""&HOPE_InstallDir&"member/updatelist.asp"">升级用户</a></td>")
	else
		response.Write("<td>&nbsp;&nbsp;<a href="""&HOPE_InstallDir&"login/register.asp""><img src="""&HOPE_InstallDir&"skins/skin8/images/indexmf.jpg""></a></td>")
	end if
	response.Write("</tr></table>")
	response.end()
end if
'权限比较问题
function initdata(str,strs)
   if instr(trim(strs),str)>0 then
    resultval=1
    else
	resultval=0
    end if
	initdata=resultval
end function
%>