<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<!--#include file="../head.asp"-->
  <!--#include file="../checkrole.asp"-->
 <%
      call checkuser("ds")
	 
	if issession=0 then
	gsid=Replace_Text(request.Cookies("Yxmemberid"))
	else
	gsid=session("id")
	end if 
	  
  %>
<TABLE width=778 border=0 align="center" cellPadding=0 cellSpacing=0>
  <TBODY>
  <TR>
    <TD 
    style="BACKGROUND-POSITION: right 50%; BACKGROUND-IMAGE: url(i../mages/bg1.gif); BACKGROUND-REPEAT: repeat-y; BACKGROUND-COLOR: #ffffff" 
    vAlign=top align=middle>
      <TABLE cellSpacing=0 cellPadding=0 width=100% border=0>
        <TBODY>
        <TR>
              <TD width="5%"><IMG height=32 src="../images/myemail.gif" 
            border=0></TD>
              <TD width="95%" background="../images/info_bg.gif">&nbsp;</TD>
        </TR></TBODY></TABLE>

<TABLE class=content_border cellSpacing=0 cellPadding=0 width=100% 
border=0>
        <TBODY>
        <TR>
          <TD align=middle><BR>
            <TABLE cellSpacing=0 cellPadding=5 width="95%" border=0>
              <TBODY>
              <TR>
                <TD class=C bgColor=#d8ebff><STRONG>浏览按关键字订阅的信息</STRONG></TD>
                      <TD class=C align=right bgColor=#d8ebff><IMG height=9 
                  src="../../images/indexpoint.gif" width=5> <A 
                  href="ordermodify_begin.asp">修改关键字 </A></TD>
                  </TR>
              <TR>
                      <TD class="C lh15" bgColor=#f4faff colSpan=2>
<%
maxperpage=20
sql="select * from Websen_emailorder where gsid="&gsid&""
Set rs= Server.CreateObject("ADODB.Recordset") 
rs.open sql,conn,1,1
if rs.eof or rs.bof then
response.write"您尚未按关键字订阅信息"
else
buyorder=rs("buyorder")
saleorder=rs("saleorder")

if buyorder<>"" then
if instr(buyorder,",")>0 then
Arrbuyorder=split(buyorder,",")
for i=0 to ubound(Arrbuyorder)
response.write"<a href='emailorder.asp?type=buy&keywords="&Arrbuyorder(i)&"'>求购"&Arrbuyorder(i)&"</a> "

next
else
response.write"<a href='emailorder.asp?type=buy&keywords="&buyorder&"'>求购"&buyorder&"</a> "
end if
end if

if saleorder<>"" then
if instr(saleorder,",")>0 then
Arrsaleorder=split(saleorder,",")
for i=0 to ubound(Arrsaleorder)
response.write"<a href='emailorder.asp?type=sale&keywords="&Arrsaleorder(i)&"'>供应"&Arrsaleorder(i)&"</a> "
next
else
response.write"<a href='emailorder.asp?type=sale&keywords="&saleorder&"'>供应"&saleorder&"</a>"
end if
end if

end if


%> 
 </TD></TR></TBODY></TABLE>
<BR><BR>
           
<%
if not(rs.eof and rs.bof) then

type1=replace_text(request("type"))
keywords=replace_text(request("keywords"))
select case type1
case "buy"
sql1="select Websen_info.info_id,Websen_info.showname,Websen_corporation.flag from Websen_Info,Websen_corporation where Websen_info.type='买' and (Websen_info.keywords like '%"&keywords&"%' or Websen_info.showname like '%"&keywords&"%' or Websen_info.content like '%"&keywords&"%') and Websen_corporation.id=Websen_info.gsid and Websen_corporation.flag=1 and Websen_info.flag=1  order by Websen_info.dateandtime desc"
case "sale"
sql1="select Websen_info.info_id,Websen_info.showname,Websen_corporation.flag from Websen_Info,Websen_corporation where Websen_info.type='卖' and (Websen_info.keywords like '%"&keywords&"%' or Websen_info.showname like '%"&keywords&"%' or Websen_info.content like '%"&keywords&"%') and Websen_corporation.id=Websen_info.gsid and Websen_corporation.flag=1  and Websen_info.flag=1 order by Websen_info.dateandtime desc"
case else
response.Redirect("../../login/chklogin.asp?login=4")
end select
  Set rs1= Server.CreateObject("ADODB.Recordset") 
rs1.open sql1,conn,1,1 
if rs1.eof then
response.write"<font color=red>暂无信息</font>"
else
%>		   
		    <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
              <TBODY>
              <TR>
                <TD bgColor=#9ec5ff>
                  <TABLE cellSpacing=1 cellPadding=5 width="100%" border=0>
                    <TBODY>
                    <TR>
                      <TD class=C align=middle bgColor=#d8ebff>您订阅的
<%
select case type1
case "buy"
response.write"<FONT color=#CC3300>求购 <STRONG>"&keywords&"</STRONG></FONT>"
case "sale"
response.write"<FONT color=#CC3300>供应 <STRONG>"&keywords&"</STRONG></FONT>"
case else
response.Redirect("../../login/chklogin.asp?login=4")
end select
%>
 的最新信息共有 <STRONG><%=rs1.recordcount%></STRONG> 条</TD></TR>
                    <TR>
                      <TD align=middle bgColor=#f4faff><BR>
                        <TABLE cellSpacing=0 cellPadding=0 width="95%" 
                          border=0><TBODY>

                          <TR>
<%

do while not rs1.eof
%>
                            <TD class=C vAlign=top width="2%">·<BR><BR></TD>
                                      <TD vAlign=top class=C><A class=f3 
                              href="<%select case type1
                                      case "buy"
							  response.write"../../seller/info.asp?info_id="&rs1("info_id")&"" 
							          case "sale" 
							  response.write"../../tradeinfo/info.asp?info_id="&rs1("info_id")&"" 
							          case else
                              response.Redirect("../../login/chklogin.asp?login=4")
                                       end select%>" 
                              target=_blank><%=replace(rs1("showname"),keywords,"<FONT color=red>"&keywords&"</FONT>")%></A> 
							  <BR></TD>
                              <%
a=a+1
if a=2 then
response.Write"</tr>"
a=0
end if
b=b+1
if b>=maxperpage then exit do
rs1.movenext
loop

if rs1.recordcount>20 then
response.write"<TR align=right><TD class=C colSpan=5><IMG height=9 src='../../images/indexpoint.gif' width=5>"
select case type1
case "buy"
response.write" <A href='../../search/searchbuy.asp?keywords="&keywords&"&sortid=' target='_blank'>更多求购<FONT color=#CC3300>"&keywords&"</FONT>信息</A>"
case "sale"
response.write" <A href='../../search/searchsale.asp?keywords="&keywords&"&sortid=' target='_blank'>更多供应<FONT color=#CC3300>"&keywords&"</FONT>信息</A>"
case else
response.Redirect("../../login/chklogin.asp?login=4")
end select
response.write" </TD></TR>"
end if
%>							  
</TBODY></TABLE>
                        <BR></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
<%
end if
end if
%>						  
<BR><BR>
 <BR><BR><BR><BR></TD></TR></TBODY></TABLE>
<BR>
<BR>
</TABLE>
<%
rs1.close
set rs1=nothing
rs.close
set rs=nothing
%>
