

<head>
<meta http-equiv="Content-Language" content="zh-cn">
</head>

<%

dim love,love1,love2,name9,name99,rsm9,sqlm9, connj,dbm1,marryk,lovek

'如果想更改数据库名.请更改此处和plus_marry_conn.asp文件另一处.
dbm1="Dv_plus/marry/plus_marry_db.mdb"

set connj = Server.CreateObject("ADODB.connection")
connj.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(dbm1)
connj.Open 
   name9=""
   love1=""
   love2=""
   love=""
   marryk=0
   set rsm9=server.createobject("adodb.recordset")
   sqlm9="select * from m_marry  where (marry=8 or marry=9 or marry=1) and forname='"&UserName&"'"
   rsm9.open sqlm9,connj,1,1
    
      do while not rsm9.bof and not rsm9.eof 
         name9=name9&rsm9("toname")&"|"
         marryk=marryk+1
         rsm9.movenext
      loop
   rsm9.close
   set rsm9=nothing
   set sqlm9=nothing 
   
   set rsm9=server.createobject("adodb.recordset")
   sqlm9="select * from m_marry  where (marry=8 or marry=9 or marry=1) and toname='"&UserName&"'"
   rsm9.open sqlm9,connj,1,1
    
      do while not rsm9.bof and not rsm9.eof 
         name9=name9&rsm9("forname")&"|"
         marryk=marryk+1
         rsm9.movenext
      loop
   rsm9.close
   set rsm9=nothing
   set sqlm9=nothing 
   
  '搜LOVE表========================== 
   name99=""
   lovek=0
   set rsm9=server.createobject("adodb.recordset")
   sqlm9="select * from m_love  where love=1 and forname='"&UserName&"'"
   rsm9.open sqlm9,connj,1,1
    
      do while not rsm9.bof and not rsm9.eof 
         name99=name99&rsm9("toname")&"|"
         lovek=lovek+1
         rsm9.movenext
      loop
   rsm9.close
   set rsm9=nothing
   set sqlm9=nothing 
   
   set rsm9=server.createobject("adodb.recordset")
   sqlm9="select * from m_love  where love=1 and toname='"&UserName&"'"
   rsm9.open sqlm9,connj,1,1
    
      do while not rsm9.bof and not rsm9.eof 
         name99=name99&rsm9("forname")&"|"
         lovek=lovek+1
         rsm9.movenext
      loop
   rsm9.close
   set rsm9=nothing
   set sqlm9=nothing 

connj.close
set connj=nothing
'＝＝＝＝＝＝＝＝＝＝＝＝＝＝
  
  name9=replace(name9,"|"," ")
  name99=replace(name99,"|"," ")
  if marryk>0 then
     love1=name9
     else
       love1="0"
  end if
  if lovek>0 then
       love2=name99
       else
       love2="0" 
  end if
  
  if love1<>"0" then
  		love="&nbsp;&nbsp;<font color=blue>配偶：</font><A HREF=plus_marry_list.asp?action=marryd title=查看美满家庭 target=_blank><font color=red>"&name9&"</font></A>"
  		if love2<>"0" then
           love=love&"&nbsp;&nbsp;<font color=blue>情人：</font><A HREF=plus_marry_list.asp?action=loved title=查看情人 target=_blank><font color=red>"&name99&"</font></A>"
        end if
        else
        if love2<>"0" then
           love="&nbsp;&nbsp;<font color=blue>恋人：</font><A HREF=plus_marry_list.asp?action=loved title=查看幸福恋人 target=_blank><font color=red>"&name99&"</font>"
           else
           love="&nbsp;&nbsp;<font color=blue>恋人：</font><A HREF=plus_marry_index.asp title=向心上人表白 target=_blank><font color=red>寻觅中..</font></A>"
        end if
  end if
%>

