<% data_path=""  %>
<!--#include file="conn/conn.asp"--> 
 <%	 
 
 		Function Replace_Text(fString)
			If IsNull(fString) Then
			Replace_Text=""
			Exit Function
			Else
			fString=Trim(fString)
			fString=Replace(fString,">","")
			fString=Replace(fString,"<","")
			fString=Replace(fString,"'","")
			fString=Replace(fString,";","；")
			fString=Replace(fString,"--","—")
			fString=Server.HtmlEncode(fString)
			Replace_Text=fString
			End If	
		End function
 '^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   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
   
  		Dim XML_Result
		
		  strt=Replace_Text(Trim(Request("strs"))) 

		   XML_Result="<?xml version=""1.0"" encoding=""gb2312"" ?><yixiang><resultmsg><logid>"
		  '-允许游客查看------------------------------------------------------------
		  set rspeo=server.CreateObject("adodb.recordset")
		  sqlpeo="select top 1 issee from Yixiang_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 yixiang_vipgrade where roleid="&gradeid
		  rsrole.open sqlrole,conn,1,1
		  if not rsrole.eof then 
		  '----------------------------------------------------------------------
			  if strt="tra" then   '查看供应信息
			  if instr(rsrole("rolelist"),"msgg")>0 then              '权限允许的用户
			   XML_Result=XML_Result&"1"
			  else
			   XML_Result=XML_Result&"0"
			  end if		  
 		  
		  elseif strt="sel" then  '查看求购信息
			  if instr(rsrole("rolelist"),"msgq")>0 then              '权限允许的用户
			   XML_Result=XML_Result&"1"
			  else
			   XML_Result=XML_Result&"0"
			  end if	
			  
			 elseif strt="pro" then  '查看产品信息
			  if instr(rsrole("rolelist"),"msgp")>0 then              '权限允许的用户
			   XML_Result=XML_Result&"1"
			  else
			   XML_Result=XML_Result&"0"
			  end if
			  
		  elseif strt="com" then  '查看企业信息
			  if instr(rsrole("rolelist"),"msgc")>0 then              '权限允许的用户
			   XML_Result=XML_Result&"1"
			  else
			   XML_Result=XML_Result&"0"
			  end if
			  
 		  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
		  
		  '----------------------------------------------------------------------------------------------
		   XML_Result=XML_Result&"</logid></resultmsg></yixiang>"
		  '------------------------------------- 
		
		
	' 设置MIME Type为XML文档
	 Response.ContentType="application/xml"
	 Response.Charset="utf-8"
	' 输出搜索结果
     Response.Write(XML_Result)
  
%>