<!--#include file="conn.asp"-->
<!--#include file="inc/const.asp"-->
<!--#include file="plus_marry_conn.asp"-->

<%
dim i
Dvbbs.BoardID=0
Dvbbs.LoadTemplates("index")
Dvbbs.stats="恋人配偶列表"
Dvbbs.nav()
Dvbbs.head_var 2,0,"","" 
if Cint(Dvbbs.GroupSetting(14))=0 then
	sendmsg="<BR><li>您没有进入本社区礼堂的权限，请<a href=login.asp>登陆</a>或者同管理员联系。"
	send_msg()
Else
      call marry_nav()
	Call main()
	response.write          "<Br></td><tr></table></div>"
End if
Dvbbs.footer()



sub main


Select Case request("action")
    case "loveqok"
	      call loveqok()
	       Send_Msg()
	case "loveqno"
	      call loveqno()
	       Send_Msg()
      case "loveqdel"
	      call loveqdel()
	       Send_Msg()
	case "lovefenok"
	      call lovefenok()
	       Send_Msg()
	case "lovefenca"
	      call lovefenca()
	       Send_Msg()
	case "lovedelfeng"
	      call lovedelfeng()
	       send_msg()       
	       
	case "lovevot"
	      call lovevot()
	       Send_Msg()       
	       
	case "lovevotsee"
          call lovevotsee()        

       
	       
      case "marryqok"
	      call marryqok()
	       Send_Msg()
	case "marryqno"
	      call marryqno()
	       Send_Msg()
      case "marryqdel"
	      call marryqdel()
	       Send_Msg()
	case "marryfenok"
	      call marryfenok()
	       Send_Msg()
	case "marryfenca"
	      call marryfenca()
	       Send_Msg()
	case "marrydelfeng"
	      call marrydelfeng()
	       send_msg()       
	case "marryvot"
	      call marryvot()
	       Send_Msg()       
  
	case "marryvotsee"
          call marryvotsee()  
          
    case "marryden"
	      call marryden()
	      
    case "marrydensave"
          call marrydensave()
          send_msg()
	      
      
	Case Else
		call marrying()		
	End Select 

end sub

sub marrying()%>

<style type="text/css">
<!--
body {
	font-size: 9pt;
}
table {
	font-size: 9pt;
}

-->
</style>




<DIV ALIGN="center">
	<TABLE BORDER="0" WIDTH="760" CELLSPACING="0" CELLPADDING="0"  height="49">
		
		
		<!-- MSTableType="nolayout" -->
				
		
		<TR>
			<TD ALIGN="left" height="33" BACKGROUND="Dv_plus/marry/top_l.gif" WIDTH="14">　</TD>
			<TD ALIGN="center" height="33" BACKGROUND="Dv_plus/marry/top_m.gif" WIDTH="57"><A HREF="plus_marry_list.asp?action=loveq">求爱列表</A></TD>
			<TD ALIGN="center" height="33" BACKGROUND="Dv_plus/marry/top_f2.gif" WIDTH="57">　</TD>
			<TD ALIGN="center" height="33" BACKGROUND="Dv_plus/marry/top_m.gif" WIDTH="60"><A HREF="plus_marry_list.asp?action=loved">幸福恋人</A></TD>
			<TD ALIGN="center" height="33" BACKGROUND="Dv_plus/marry/top_f2.gif" WIDTH="61">　</TD>
			<TD ALIGN="center" height="33" BACKGROUND="Dv_plus/marry/top_m.gif" WIDTH="57"><A HREF="plus_marry_list.asp?action=marryq">求婚列表</A></TD>
			<TD ALIGN="center" height="33" BACKGROUND="Dv_plus/marry/top_f2.gif" WIDTH="56">　</TD>
			<TD ALIGN="center" height="33" BACKGROUND="Dv_plus/marry/top_m.gif" WIDTH="57"><A HREF="plus_marry_list.asp?action=marryk">执子之手</A></TD>
			<TD ALIGN="center" height="33" BACKGROUND="Dv_plus/marry/top_f2.gif" WIDTH="51">　</TD>
			<TD ALIGN="center" height="33" BACKGROUND="Dv_plus/marry/top_m.gif" WIDTH="58"><A HREF="plus_marry_list.asp?action=marryd">美满家庭</A></TD>
			<TD ALIGN="center" height="33" BACKGROUND="Dv_plus/marry/top_f2.gif" WIDTH="49">　</TD>
			<TD ALIGN="center" height="33" BACKGROUND="Dv_plus/marry/top_m.gif" WIDTH="56"><A HREF="plus_marry_list.asp?action=lovefen">劳燕分飞</A></TD>
			<TD ALIGN="center" height="33" BACKGROUND="Dv_plus/marry/top_f2.gif" WIDTH="56">　</TD>
			<TD ALIGN="center" height="33" BACKGROUND="Dv_plus/marry/top_m.gif" WIDTH="62"><A HREF="plus_marry_list.asp?action=marryfen">离婚列表</A></TD>
			<TD ALIGN="right" BACKGROUND="Dv_plus/marry/top_r.gif" WIDTH="14">　</TD>
		</TR>
		
		<TR>
			<TD COLSPAN="15" HEIGHT="8" WIDTH="760">
	<%		
			
     Select Case request("action")
      Case "loveq" 
		Call loveq()
	Case "loved"	 
		Call loved()
	Case "lovefen"	 
		Call lovefen()	
	case "marryq" 
	      call marryq()
	Case "marryk"
		call marryk()      
	Case "marryd"
		call marryd()
      Case "marryfen"
            call marryfen()
	case else
	      call listall()			
	End Select 
                   %>
			</TD>
		</TR>
	<TR><TD HEIGHT="8" BACKGROUND="Dv_plus/marry/top_bl.gif" WIDTH="14" ALIGN="left" VALIGN="bottom"></TD>
			<TD COLSPAN="13" HEIGHT="8" BACKGROUND="Dv_plus/marry/top_bm.gif" VALIGN="bottom">　</TD>
			<TD HEIGHT="8" BACKGROUND="Dv_plus/marry/top_br.gif" WIDTH="14" ALIGN="right" VALIGN="bottom">　</TD></TR>
	
	</TABLE>
</DIV>
          <%  		
      
end sub
'=================================================================全部列表
sub listall()
    dim marryname1,marryname2,marryname3,marryname4
    set rsm=server.createobject("adodb.recordset")
    sqlm="select * from m_marry where marry=8 or marry=9 Order By oktime asc"
    rsm.open sqlm,connj,1,1
    if rsm.bof or rsm.eof then
       marryname1="暂无"
       marryname2="暂无"
       else
       marryname1=rsm("forname")
       marryname2=rsm("toname")
    end if
    rsm.close
    set rsm=nothing
    set sqlm=nothing
    '============
    set rsm=server.createobject("adodb.recordset")
    sqlm="select * from m_marry where marry=8 or marry=9 Order By voty desc"
    rsm.open sqlm,connj,1,1
    if rsm.bof or rsm.eof then
       marryname3="暂无"
       marryname4="暂无"
       else
       marryname3=rsm("forname")
       marryname4=rsm("toname")
    end if
    rsm.close
    set rsm=nothing
    set sqlm=nothing
'=========================================================
    dim lovename1,lovename2,lovename3,lovename4
    set rsm=server.createobject("adodb.recordset")
    sqlm="select * from m_love where love=1 Order By oktime asc"
    rsm.open sqlm,connj,1,1
    if rsm.bof or rsm.eof then
       lovename1="暂无"
       lovename2="暂无"
       else
       lovename1=rsm("forname")
       lovename2=rsm("toname")
    end if
    rsm.close
    set rsm=nothing
    set sqlm=nothing
    '============
    set rsm=server.createobject("adodb.recordset")
    sqlm="select * from m_love where love=1 Order By voty desc"
    rsm.open sqlm,connj,1,1
    if rsm.bof or rsm.eof then
       lovename3="暂无"
       lovename4="暂无"
       else
       lovename3=rsm("forname")
       lovename4=rsm("toname")
    end if
    rsm.close
    set rsm=nothing
    set sqlm=nothing

	
%>
      <DIV ALIGN="center">
      <TABLE border=1 frame=vsides rules=none cellPadding=0 width=760 height="1" STYLE="border-collapse: collapse" BORDERCOLOR="#FFc7d1">
  <!-- MSTableType="nolayout" -->
	<TBODY> 
  <TR>
    <TD bgColor=#FFFFFF height=1 vAlign=top width=180 rowspan="3">
    <img border="0" src="Dv_plus/marry/01.jpg"><img border="0" src="Dv_plus/marry/02.jpg"></TD>
    <TD bgColor=#FFFFFF vAlign=top width=39 rowspan="3" height="1">
    <img border="0" src="Dv_plus/marry/03.jpg"></TD>
    <TD bgColor=#FFFFFF vAlign=bottom width=295 background="Dv_plus/marry/04.jpg" height="1" ROWSPAN="2" ALIGN="center"><TABLE BORDER="0" WIDTH="180" HEIGHT="250" CELLSPACING="0" CELLPADDING="0">
		<!-- MSTableType="nolayout" -->
		<TR>
			<TD COLSPAN="2" ALIGN="center"><FONT FACE="楷体_GB2312" SIZE="3">最幸福恋人</FONT></TD>
		</TR>
		<TR>
			<TD ALIGN="center">&nbsp;<%=lovename1%></TD>
			<TD ALIGN="center">&nbsp;<%=lovename2%></TD>
		</TR>
		<TR>
			<TD COLSPAN="2" ALIGN="center"><FONT FACE="楷体_GB2312" SIZE="3">最具人气恋人</FONT></TD>
		</TR>
		<TR>
			<TD ALIGN="center">&nbsp;<%=lovename3%></TD>
			<TD ALIGN="center">&nbsp;<%=lovename4%></TD>
		</TR>
		</TABLE></TD>
    <TD bgColor=#FFFFFF width=213 height="42" background="Dv_plus/marry/06.jpg">
      　</TD>
    <TD bgColor=#FF3300 width=30 height="360" ROWSPAN="2">
      　</TD>
    </TR>
  <TR>
    <TD bgColor=#FFFFFF width=213 height="318" background="Dv_plus/marry/06.jpg" ALIGN="center" VALIGN="bottom">
      <TABLE BORDER="0" WIDTH="180" HEIGHT="250" CELLSPACING="0" CELLPADDING="0">
		<!-- MSTableType="nolayout" -->
		<TR>
			<TD COLSPAN="2" ALIGN="center"><FONT FACE="楷体_GB2312" SIZE="3">最恩爱夫妻</FONT></TD>
		</TR>
		<TR>
			<TD ALIGN="center">&nbsp;<%=marryname1%></TD>
			<TD ALIGN="center">&nbsp;<%=marryname2%></TD>
		</TR>
		<TR>
			<TD COLSPAN="2" ALIGN="center"><FONT FACE="楷体_GB2312" SIZE="3">最具人气夫妻</FONT></TD>
		</TR>
		<TR>
			<TD ALIGN="center">&nbsp;<%=marryname3%></TD>
			<TD ALIGN="center">&nbsp;<%=marryname4%></TD>
		</TR>
		</TABLE>
	</TD>
    </TR>
  <tr>
    <TD bgColor=#FFFFFF vAlign=top width=295 height="32" background="Dv_plus/marry/05.jpg">　</TD>
    <TD bgColor=#FFFFFF width=244 height="90" valign="top" background="Dv_plus/marry/07.jpg" COLSPAN="2">
      　</TD>
    </tr>
  </TBODY></TABLE></DIV>
<%



end sub



'0 求爱 1接受,2,拒绝,3,过期,4,FORNAME提出分手,5,TONAME提出分手.6,分手,7,过期分手
sub loveq()

set rsm=server.createobject("adodb.recordset")
sqlm="select * from m_love where love=0 or love=2 or love=3 Order By addtime Desc"
rsm.open sqlm,connj,1,3				
if rsm.eof or rsm.bof then
       %> 
         <DIV ALIGN="center">
        <table frame=vsides rules=none BACKGROUND="Dv_plus/marry/b01.jpg" WIDTH="760" HEIGHT="270" CELLSPACING="0" CELLPADDING="0" BORDER="1" BORDERCOLOR="#FFc7d1" STYLE="border-collapse: collapse">   
           <TR>
                <TD width="100%" align="center" height="24" colspan=3>
				<FONT FACE="华文彩云" SIZE="7" COLOR="#FFc7d1">还没有人表白呢</FONT></TD>
           </tr>
              
        </table>
                
       </DIV>
     <%
else
     dim ipagecount,curpage,i,strurl
       rsm.PageSize=5                '设置单页的数据记录数 
       iPageCount=rsm.PageCount      '定义了一个页码数量的变量 
         If Len(Request.QueryString("Page"))=0 Then 
               CurPage=1 
                       Else 
               CurPage=CInt(Request.Querystring("Page")) 
         End If 
       rsm.AbsolutePage=CurPage           '得到当前的页码 
  
     i=0
     do while (not rsm.eof) 
     i=i+1
     %>

                <DIV ALIGN="center">

                <TABLE border=1 frame=vsides rules=none cellPadding=0 width=760 height="270" STYLE="border-collapse: collapse" BORDERCOLOR="#FFc7d1">
  
   <!-- MSTableType="nolayout" -->
	  
   <TR>
    <TD vAlign=top width="760" background="Dv_plus/marry/b01.jpg" height="10" COLSPAN="3"><BR></TD>
  </TR>
  
  <TR>
    <TD vAlign=top width=160 background="Dv_plus/marry/index_bg.jpg" height="250">　</TD>
    <TD vAlign=top width=500 background="Dv_plus/marry/b01.jpg" HEIGHT="250" ALIGN="right">
    
    <TABLE border=1 borderColor=#FFc7d1 cellPadding=0 cellSpacing=1 
            width="500" height="250" STYLE="border-collapse: collapse">
           
				               
              <TR>
                <TD align="center" height="15" WIDTH="140"> 
                  <DIV align=center><B>追求者</B></DIV></TD>
                <TD align="center" WIDTH="140" height="15"> 
                  <DIV align=center><B>意中人</B></DIV></TD>
                <TD align="center" COLSPAN="2" width="220" height="15"> 
                  <DIV align=center><B>表白时间</B></DIV></TD>	 
                </TR>		  	
<TR>	  	
               <TD width="140" align="center" height="220" ROWSPAN="4"><%=mface(rsm("forname"))%></TD>
               <TD width="140" align="center" height="220" ROWSPAN="4"><%=mface(rsm("toname"))%></TD>
         <TD valign="left" align="center" height="15" COLSPAN="2" width="220"><%=rsm("addtime")%></TD>
		
		 </TR> <TR>
			  	
                <TD valign="left" align="center" HEIGHT="15" COLSPAN="2" width="220">
                
                         <FONT COLOR="#FF0066"><B>真情告白</B></FONT></TD>
		 </TR> <TR>
			  	
                <TD valign="left" align="center" HEIGHT="80" COLSPAN="2" width="220">
				<%=msgbr(rsm("msg"))%> 
                </TD>
		 </TR> 
		 <TR><TD valign="left" align="center" HEIGHT="110" width="110">
			<%if rsm("love")=0 then
			 response.write "<img border=0 src=Dv_plus/marry/qiuwait.gif width=110 height=110>"
			 elseif rsm("love")=2 then
			  response.write "<img border=0 src=Dv_plus/marry/qiuno.gif width=110 height=110>"
			 elseif rsm("love")=3 then
			   response.write "<img border=0 src=Dv_plus/marry/qiupass.gif width=110 height=110>"
			 end if%>
			</TD>
			<TD valign="left" align="center" HEIGHT="110" width="110"><%mloveliwu()%></TD>
		 </TR> 
				<TR>
                <TD align="center" height="15" width="140">
<a href=dispuser.asp?name=<%=rsm("forname")%> target=_blank title=查看<%=rsm("forname")%>的资料><%=rsm("forname")%></a>
                </TD>  
                <TD align="center" height="15" width="140">         
  <a href=dispuser.asp?name=<%=rsm("toname")%> target=_blank title=查看<%=rsm("toname")%>的资料><%=rsm("toname")%></a>              
                </TD>
                <TD valign="left" align="center" height="15" COLSPAN="2">
                 <% if Dvbbs.MemberName=rsm("forname") then%>
                   <A HREF="plus_marry_list.asp?action=loveqdel&id=<%=rsm("love_id")%>">删除</A>
                  <%elseif Dvbbs.MemberName=rsm("toname") and rsm("love")=0 then %>
                   <A HREF="plus_marry_list.asp?action=loveqok&id=<%=rsm("love_id")%>">接受</A> <A HREF="plus_marry_list.asp?action=loveqno&id=<%=rsm("love_id")%>">拒绝</A>
                   <%else
                   response.write " 祝福他们吧!"
                   end if%>
                   				</TD> 
		 </TR> 
             </TABLE>
    </TD>
    <TD vAlign=top width=100 background="Dv_plus/marry/b01.jpg" HEIGHT="250">
    <%lovevottable()%>
    </TD>
  </TR>
  <TR>
    <TD vAlign=top width="760" background="Dv_plus/marry/b01.jpg" height="10" COLSPAN="3">　</TD>
  </TR>
  </TABLE>
  </DIV>
  <%
  if i>=rsm.PageSize then exit do
  rsm.movenext
loop
  %>
  <DIV ALIGN="center">
  <table frame=vsides rules=none WIDTH="760" HEIGHT="20" BORDER="1" BACKGROUND="Dv_plus/marry/b01.jpg" CELLSPACING="0" CELLPADDING="0" BORDERCOLOR="#FFc7d1" STYLE="border-collapse: collapse"><TR>
  <TD ALIGN="right" HEIGHT="20" WIDTH="360">总共有<%=rsm.RecordCount%>条记录</TD>
  <TD ALIGN="right" WIDTH="400">
    <%if rsm.recordcount>rsm.pagesize then
          strUrl="plus_marry_list.asp?action=loveq" 
          ShowPageBar iPageCount,CurPage,strUrl 
    end if%>       
  </TD></TR></table>
  </DIV>
  <%
end if

rsm.close
set rsm=nothing
set sqlm=nothing
end sub

'====================================================================显示恋人列表
sub loved()

set rsm=server.createobject("adodb.recordset")
sqlm="select * from m_love where love=1  Order By OKtime Desc"
rsm.open sqlm,connj,1,3				
if rsm.eof or rsm.bof then
       %> 
         <DIV ALIGN="center">
        <table frame=vsides rules=none BACKGROUND="Dv_plus/marry/b01.jpg" WIDTH="760" HEIGHT="270" CELLSPACING="0" CELLPADDING="0" BORDER="1" BORDERCOLOR="#FFc7d1" STYLE="border-collapse: collapse">   
           <TR>
                <TD width="100%" align="center" height="24" colspan=3>
				<FONT FACE="华文彩云" SIZE="7" COLOR="#FFc7d1">还没有人恋爱呢</FONT></TD>
           </tr>
              
        </table>
                
       </DIV>
     <%
else

     dim ipagecount,curpage,i,strurl
       rsm.PageSize=5                '设置单页的数据记录数 
       iPageCount=rsm.PageCount      '定义了一个页码数量的变量 
         If Len(Request.QueryString("Page"))=0 Then 
               CurPage=1 
                       Else 
               CurPage=CInt(Request.Querystring("Page")) 
         End If 
       rsm.AbsolutePage=CurPage           '得到当前的页码 
  
     i=0
     do while (not rsm.eof) 
     i=i+1
     %>

                <DIV ALIGN="center">

                <TABLE border=1 frame=vsides rules=none cellPadding=0 width=760 height="270" STYLE="border-collapse: collapse" BORDERCOLOR="#FFc7d1">

  
   <TR>
    <TD vAlign=top width="760" background="Dv_plus/marry/b01.jpg" height="10" COLSPAN="3"><BR></TD>
  </TR>
  
  <TR>
    <TD vAlign=top width=160 background="Dv_plus/marry/index_bg.jpg" height="250">　</TD>
    <TD vAlign=top width=250 background="Dv_plus/marry/b01.jpg" HEIGHT="250">
    
    <TABLE border=1 borderColor=#FFc7d1 cellPadding=0 cellSpacing=1 
            width="500" height="250" STYLE="border-collapse: collapse">
           
				               
              <TR>
                <TD align="center" height="15" WIDTH="140"> 
                  <DIV align=center><B>追求者</B></DIV></TD>
                <TD align="center" WIDTH="140" height="15"> 
                  <DIV align=center><B>意中人</B></DIV></TD>
                <TD align="center" COLSPAN="2" width="220" height="15"> 
                  <DIV align=center><b>牵手时间</b></DIV></TD>	 
                </TR>		  	
<TR>	  	
               <TD width="280" align="center" height="220" ROWSPAN="4" COLSPAN="2">
				<%=mlovephoto(rsm("love_id"))%></TD>
         <TD valign="left" align="center" height="15" COLSPAN="2" width="220"><%=rsm("oktime")%></TD>
		
		 </TR> <TR>
			  	
                <TD valign="left" align="center" HEIGHT="15" COLSPAN="2" width="220">
                
                         <FONT COLOR="#FF0066"><B>真情告白</B></FONT></TD>
		 </TR> <TR>
			  	
                <TD valign="left" align="center" HEIGHT="80" COLSPAN="2" width="220">
				<%=msgbr(rsm("msg"))%> 
                </TD>
		 </TR> 
		 <TR><TD valign="left" align="center" HEIGHT="110" width="110"><%=mlovetitle(rsm("love_id"))%></TD>
			<TD valign="left" align="center" HEIGHT="110" width="110"><%mloveliwu()%></TD>
		 </TR> 
				<TR>
                <TD align="center" height="15" width="140">
<a href=dispuser.asp?name=<%=rsm("forname")%> target=_blank title=查看<%=rsm("forname")%>的资料><%=rsm("forname")%></a>
                </TD>  
                <TD align="center" height="15" width="140">         
  <a href=dispuser.asp?name=<%=rsm("toname")%> target=_blank title=查看<%=rsm("toname")%>的资料><%=rsm("toname")%></a>              
                </TD>
                <TD valign="left" align="center" height="15" COLSPAN="2">
                 <% if Dvbbs.MemberName=rsm("forname") then%>
                   <A HREF="plus_marry_up.asp?action=lovecphoto&id=<%=rsm("love_id")%>">更换照片.</A>
                  <%elseif Dvbbs.MemberName=rsm("toname") then %>
                   <A HREF="plus_marry_up.asp?action=lovecphoto&id=<%=rsm("love_id")%>">更换照片.</A>
                   <%else 
                  response.write " 祝福他们吧!"
                   end if%>
				</TD> 
		 </TR> 
             </TABLE>
    </TD>
    <TD vAlign=bottom width=100 background="Dv_plus/marry/b01.jpg" HEIGHT="250"><%lovevottable()%></TD>
  </TR>
  <TR>
    <TD vAlign=top width="760" background="Dv_plus/marry/b01.jpg" height="10" COLSPAN="3">　</TD>
  </TR>
  </TABLE>
  </DIV>
  <%
  if i>=rsm.PageSize then exit do
  rsm.movenext
loop
%>
  <DIV ALIGN="center">
  <table frame=vsides rules=none WIDTH="760" HEIGHT="20" BORDER="1" BACKGROUND="Dv_plus/marry/b01.jpg" CELLSPACING="0" CELLPADDING="0" BORDERCOLOR="#FFc7d1" STYLE="border-collapse: collapse">
<TR>
  <TD ALIGN="right" HEIGHT="20" WIDTH="360">总共有<%=rsm.RecordCount%>条记录</TD>
  <TD ALIGN="right" WIDTH="400">
    <%if rsm.recordcount>rsm.pagesize then
          strUrl="plus_marry_list.asp?action=loved" 
          ShowPageBar iPageCount,CurPage,strUrl 
    end if%>       
  </TD></TR></table>
  </DIV>
  <%

end if
rsm.close
set rsm=nothing
set sqlm=nothing
end sub

'========================================================显示分手列表
sub lovefen()

set rsm=server.createobject("adodb.recordset")
sqlm="select * from m_love where love=4 or love=5 or love=6 or love=7 Order By fentime Desc"
rsm.open sqlm,connj,1,3				
if rsm.eof or rsm.bof then
       %> 
         <DIV ALIGN="center">
        <table frame=vsides rules=none BACKGROUND="Dv_plus/marry/b01.jpg" WIDTH="760" HEIGHT="270" CELLSPACING="0" CELLPADDING="0" BORDER="1" BORDERCOLOR="#FFc7d1" STYLE="border-collapse: collapse">   
           <!-- MSTableType="nolayout" -->
			<TR>
                <TD width="100%" align="center" height="24" colspan=3>
				<FONT FACE="华文彩云" SIZE="7" COLOR="#FFc7d1">还没有人分手呢</FONT></TD>
           </tr>
              
        </table>
                
       </DIV>
     <%
else
     dim ipagecount,curpage,i,strurl
       rsm.PageSize=5                '设置单页的数据记录数 
       iPageCount=rsm.PageCount      '定义了一个页码数量的变量 
         If Len(Request.QueryString("Page"))=0 Then 
               CurPage=1 
                       Else 
               CurPage=CInt(Request.Querystring("Page")) 
         End If 
       rsm.AbsolutePage=CurPage           '得到当前的页码 
  
     i=0
     do while (not rsm.eof) 
     i=i+1
     %>

                <DIV ALIGN="center">

                <TABLE border=1 frame=vsides rules=none cellPadding=0 width=760 height="270" STYLE="border-collapse: collapse" BORDERCOLOR="#FFc7d1">
<TR>
    <TD vAlign=top width="760" background="Dv_plus/marry/b01.jpg" height="10" COLSPAN="2"><BR></TD>
  </TR>
  
  <TR>
    <TD vAlign=top width=260 background="Dv_plus/marry/index_bg.jpg" height="250">　</TD>
    <TD vAlign=top width=500 background="Dv_plus/marry/b01.jpg" HEIGHT="250">
    
    <TABLE border=1 borderColor=#FFc7d1 cellPadding=0 cellSpacing=1 
            width="500" height="250" STYLE="border-collapse: collapse">
           
				               
              <TR>
                <TD align="center" height="15" WIDTH="140"> 
                  <DIV align=center><B>追求者</B></DIV></TD>
                <TD align="center" WIDTH="140" height="15"> 
                  <DIV align=center><B>意中人</B></DIV></TD>
                <TD align="center" width="220" height="15"> 
                  <DIV align=center><b>牵手时间</b></DIV></TD>	 
                </TR>		  	
<TR>	  	
               <TD width="280" align="center" height="220" ROWSPAN="5" COLSPAN="2">
				<%=mlovephoto(rsm("love_id"))%></TD>
         <TD valign="left" align="center" height="15" width="220"><%=rsm("oktime")%></TD>
		
		 </TR> <TR>
			  	
                <TD valign="left" align="center" HEIGHT="15" width="220">
                
                         <FONT COLOR="#FF0066"><B>分手理由</B></FONT></TD>
		 </TR> <TR>
			  	
                <TD valign="left" align="center" HEIGHT="110" width="220">
				<%=msgbr(rsm("msgfen"))%> 
                </TD>
		 </TR> 
				<TR>
			  	
                <TD valign="left" align="center" HEIGHT="50" width="220">
                <%if rsm("love")=4 then
			response.write rsm("forname")&"<br>"&rsm("fentime")&"<BR>"&"提出分手"
			elseif rsm("love")=5 then
			response.write rsm("toname")&"<br>"&rsm("fentime")&"<BR>"&"提出分手"
			elseif rsm("love")=6 then
			response.write "他们"&"<br>"&rsm("fentime")&"<BR>"&"已经分手"
			else 
			response.write "他们"&"<br>"&rsm("fentime")&"<BR>"&"系统判分手"
			end if
			%>
				　</TD>
		 </TR> 
		 <TR><TD valign="left" align="center" HEIGHT="30" width="220">
			<%
			if rsm("love")=4 and Dvbbs.MemberName=rsm("forname")then
			response.write "<a href=plus_marry_list.asp?action=lovefenca&id="&rsm("love_id")&">撤消</a><br>"
			elseif rsm("love")=4 and Dvbbs.MemberName=rsm("toname")then
			response.write "<a href=plus_marry_list.asp?action=lovefenok&id="&rsm("love_id")&">同意</a><br>"
			response.write "<a HREF=messanger.asp?action=new&touser="&rsm("forname")&">不同意(发送短消息给"&rsm("forname")&")</a>"	
			elseif rsm("love")=5 and Dvbbs.MemberName=rsm("toname")then
			response.write "<a href=plus_marry_list.asp?action=lovefenca&id="&rsm("love_id")&">撤消</a><br>"
			elseif rsm("love")=5 and Dvbbs.MemberName=rsm("forname")then
			response.write "<a href=plus_marry_list.asp?action=lovefenok&id="&rsm("love_id")&">同意</a><br>"
			response.write "<a HREF=messanger.asp?action=new&touser="&rsm("toname")&">不同意(发送短消息给"&rsm("toname")&")</a>"	
			elseif rsm("love")=6 or rsm("love")=7  then
			     if Dvbbs.MemberName=rsm("forname") or Dvbbs.MemberName=rsm("toname") then
			        delfengmoney=getm("delfengmoney")
			        response.write "<a href=plus_marry_list.asp?action=lovedelfeng&id="&rsm("love_id")&">删除</a><br>"
			        response.write "(删除需要"&delfengmoney&"金币)"
			                 else
			        response.write "..."
			     end if
			end if

			%>
			</TD>
		 </TR> 
				<TR>
                <TD align="center" height="15" width="140">
<a href=dispuser.asp?name=<%=rsm("forname")%> target=_blank title=查看<%=rsm("forname")%>的资料><%=rsm("forname")%></a>
                </TD>  
                <TD align="center" height="15" width="140">         
  <a href=dispuser.asp?name=<%=rsm("toname")%> target=_blank title=查看<%=rsm("toname")%>的资料><%=rsm("toname")%></a>              
                </TD>
                <TD valign="left" align="center" height="15">
                 <% if Dvbbs.MemberName=rsm("forname") then%>
                   <A HREF="plus_marry_up.asp?action=lovecphoto&id=<%=rsm("love_id")%>">更换照片.</A>
                  <%elseif Dvbbs.MemberName=rsm("toname") then %>
                   <A HREF="plus_marry_up.asp?action=lovecphoto&id=<%=rsm("love_id")%>">更换照片.</A>
                   <%else 
                  response.write " 祝福他们吧!"
                   end if%>
				</TD> 
		 </TR> 
             </TABLE>
    </TD>
  </TR>
  <TR>
    <TD vAlign=top width="760" background="Dv_plus/marry/b01.jpg" height="10" COLSPAN="2">　</TD>
  </TR>
  </TABLE>
  </DIV>
  <%
  if i>=rsm.PageSize then exit do
  rsm.movenext
loop
%>
  <DIV ALIGN="center">
  <table frame=vsides rules=none WIDTH="760" HEIGHT="20" BORDER="1" BACKGROUND="Dv_plus/marry/b01.jpg" CELLSPACING="0" CELLPADDING="0" BORDERCOLOR="#FFc7d1" STYLE="border-collapse: collapse">
<TR>
  <TD ALIGN="right" HEIGHT="20" WIDTH="360">总共有<%=rsm.RecordCount%>条记录</TD>
  <TD ALIGN="right" WIDTH="400">
    <%if rsm.recordcount>rsm.pagesize then
          strUrl="plus_marry_list.asp?action=lovefen" 
          ShowPageBar iPageCount,CurPage,strUrl 
    end if%>       
  </TD></TR></table>
  </DIV>
  <%

end if
rsm.close
set rsm=nothing
set sqlm=nothing
end sub
'=================================分手OK子程序
sub lovefenok()
dim j,name7,rsm7,sqlm7,cptem,cp7
  j=Dvbbs.CheckStr(request("id"))
  cptem=getm("lovecp2")
  cp7=split(cptem,"|")
  
  set rsm7=server.createobject("adodb.recordset")
   sqlm7="select * from m_love  where love_id="&j
   rsm7.open sqlm7,connj,1,3	
   rsm7("oktime")=now()
   rsm7("love")=6
   if Dvbbs.membername=rsm7("forname") then
     name7=rsm7("toname")
    else
     name7=rsm7("forname")
   end if
   
   rsm7.update
   rsm7.close
   set rsm7=nothing
   set sqlm7=nothing
   sqlm7="insert into dv_message(sender,incept,title,content,sendtime,issend)values('恋爱事务处','"&name7&"','很遗憾的通知您：','"&Dvbbs.membername&"接受了您的分手请求!您的魅力减少"&cp7(0)&"!对方魅力减少"&cp7(1)&"','"&now()&"','1')"
  Dvbbs.execute(sqlm7)
  UPDATE_User_Msg name7
  
  UpdateUserCP Dvbbs.membername, -cp7(1)
  UpdateUserCP name7, -cp7(1)
    
  SendMsg="<li>已经分手！祝你们幸福!您的魅力减少"&cp7(1)&"!对方魅力减少"&cp7(0)&"!"
  set sqlm7=nothing

end sub

'=================================分手撤消子程序
sub lovefenca()
dim j,name7,rsm7,sqlm7
  j=Dvbbs.CheckStr(request("id"))

  set rsm7=server.createobject("adodb.recordset")
   sqlm7="select * from m_love  where love_id="&j
   rsm7.open sqlm7,connj,1,3	
   rsm7("fentime")=now()
   rsm7("love")=1
   if Dvbbs.membername=rsm7("forname") then
     name7=rsm7("toname")
    else
     name7=rsm7("forname")
   end if
   
   rsm7.update
   rsm7.close
   set rsm7=nothing
   set sqlm7=nothing
   sqlm7="insert into dv_message(sender,incept,title,content,sendtime,issend)values('恋爱事务处','"&name7&"','很高兴的通知您：','"&Dvbbs.membername&"取消了分手请求!恭喜!','"&now()&"','1')"
  Dvbbs.execute(sqlm7)
  UPDATE_User_Msg name7
  
  SendMsg="<li>撤消成功！祝你们幸福!"
  set sqlm7=nothing

end sub

'===============================求爱同意子程序

sub loveqok()
dim j,forname,rsm7,sqlm7,cp7
  j=Dvbbs.CheckStr(request("id"))
  cp7=clng(getm("lovecp1"))
  set rsm7=server.createobject("adodb.recordset")
   sqlm7="select * from m_love  where love_id="&j
   rsm7.open sqlm7,connj,1,3	
   
   if rsm7("love")=1 then
      rsm7.close
   	set rsm7=nothing
   	set sqlm7=nothing
      SendMsg="<li>请不要重复提交!"
      exit sub
   end if
   
   rsm7("oktime")=now()
   rsm7("love")=1
   rsm7("lovephoto")="dv_plus/marry/lovephoto.jpg"
   forname=rsm7("forname")
   rsm7.update
   rsm7.close
   set rsm7=nothing
   set sqlm7=nothing
   sqlm7="insert into dv_message(sender,incept,title,content,sendtime,issend)values('恋爱事务处','"&forname&"','很高兴的通知您：','"&Dvbbs.membername&"接受了您的表白!恭喜!您的魅力增加"&cp7&"!','"&now()&"','1')"
  Dvbbs.execute(sqlm7)
  UPDATE_User_Msg forname
  
  UpdateUserCP Dvbbs.membername, cp7
  UpdateUserCP forname, cp7

   SendMsg="<li>恭喜恭喜！祝你们幸福!您的魅力增加"&cp7&"!"
  set sqlm7=nothing

end sub


'===============================求爱拒绝子程序
sub loveqno()
dim j,forname,rsm7,sqlm7,cp7
  j=Dvbbs.CheckStr(request("id"))
  cp7=clng(getm("lovecp1"))
  set rsm7=server.createobject("adodb.recordset")
   sqlm7="select * from m_love  where love_id="&j
   rsm7.open sqlm7,connj,1,3
   
   if rsm7("love")=1 then
      rsm7.close
   	set rsm7=nothing
   	set sqlm7=nothing
      SendMsg="<li>同意后怎么能再拒绝呢..."
      exit sub
   end if

   



	
   rsm7("oktime")=now()
   rsm7("love")=2
   forname=rsm7("forname")
   rsm7.update
   rsm7.close
   set rsm7=nothing
   set sqlm7=nothing
   sqlm7="insert into dv_message(sender,incept,title,content,sendtime,issend)values('恋爱事务处','"&forname&"','很遗憾的通知您：','"&Dvbbs.membername&"拒绝了您的表白!忘了吧!您的魅力减少"&cp7&"!','"&now()&"','1')"
  Dvbbs.execute(sqlm7)
  UPDATE_User_Msg forname

  UpdateUserCP forname, -cp7


  SendMsg="<li>世事不如意者十常八九!对方魅力值减少"&cp7&"!"
   set sqlm7=nothing
end sub

'===============================求爱撤消子程序
sub loveqdel()
dim j,toname,rsm7,sqlm7,love7
  j=Dvbbs.CheckStr(request("id"))
  set rsm7=server.createobject("adodb.recordset")
   sqlm7="select * from m_love  where love_id="&j
   rsm7.open sqlm7,connj,1,3	
   toname=rsm7("toname")
   love7=rsm7("love")
   rsm7.close
   set rsm7=nothing
   set sqlm7=nothing
   sqlm7="delete * from m_love where love_id="&j
   connj.execute(sqlm7)
   set sqlm7=nothing
   if love7<>2 then
   
   sqlm7="insert into dv_message(sender,incept,title,content,sendtime,issend)values('恋爱事务处','"&toname&"','很遗憾的通知您：','"&Dvbbs.membername&"取消了向您的表白!忘了吧!','"&now()&"','1')"
  Dvbbs.execute(sqlm7)
  UPDATE_User_Msg toname
   end if
  SendMsg="<li>世事不如意者十常八九！"
  set sqlm7=nothing

end sub

'===============================分手删除子程序
sub lovedelfeng()

dim j,name7,sqlm7,delfengmoney
  delfengmoney=getm("delfengmoney")
  j=Dvbbs.CheckStr(request("id"))
  if clng(Dvbbs.UserSession.documentElement.selectSingleNode("userinfo/@usermoney").text)<clng(delfengmoney) then
   SendMsg="<li>您的金币不足！"
   exit sub
  end if
   '删除合影
   dim oldfilename,delold,dels
   sqlm7="select lovephoto from m_love where love_id="&j
   dels=connj.execute(sqlm7)
   oldfilename=dels(0)
   delold=deloldfile("love"&j,oldfilename)
   
   sqlm7="delete * from m_love where love_id="&j
   connj.execute(sqlm7)
   set sqlm7=nothing
  
  UpdateUserMoney Dvbbs.membername,-delfengmoney
  
   SendMsg="<li>删除成功！您的金币减少"&delfengmoney&".祝你们幸福!"
  set sqlm7=nothing



end sub

'=======================================LOVE投票子程序
sub lovevottable()
dim yh,nh
yh=rsm("voty")
nh=rsm("votn")
yh=yh*10                      '此处可根据论坛人数多少决定
nh=nh*10
if yh>150 then yh=150
if nh>150 then nh=150
%>
<form method="POST" action="plus_marry_list.asp?action=lovevot&id=<%=rsm("love_id")%>" name="lovevot">
    <table border="1" border=1 frame=hsides width="100%" height="100%" bordercolorlight="#FFc7d1" bordercolordark="#FFc7d1" cellspacing="1" STYLE="border-collapse: collapse">
		<tr>
			<td align="center" valign="bottom" width="50%">
			<img border="0" src="Dv_plus/marry/bar1.gif" width="10" height="<%=yh%>"></td>
			<td width="50%" align="center" valign="bottom">
			<img border="0" src="Dv_plus/marry/bar2.gif" width="10" height="<%=nh%>"></td>
		</tr>
		<tr>
			<td align="center" valign="bottom" width="50%" height="10"><%=rsm("voty")%></td>
			<td width="50%" align="center" valign="bottom"><%=rsm("votn")%></td>
		</tr>
		<tr>
			<td colspan="2" height="40" align="center" valign="bottom">
			    <%
			    dim checkvot,j
			    checkvot=0
			    if Dvbbs.membername=rsm("forname") or Dvbbs.membername=rsm("toname") then
			          checkvot=1 
			    end if
			    if rsm("voty")<>0 then
			          dim votyname
			          votyname=split(rsm("votyname"),"|")
			          for j=0 to ubound(votyname)
			          if Dvbbs.membername=votyname(j) then checkvot=1 
			          next 
			    end if
			    
                if rsm("votn")<>0 then
			          dim votnname
			          votnname=split(rsm("votnname"),"|")
			          for j=0 to ubound(votnname)
			          if Dvbbs.membername=votnname(j) then checkvot=1 
			          next 
			    end if
			   
                if checkvot=1 then  
                Response.Write "支持  反对<br>"
                Response.Write "<A HREF=plus_marry_list.asp?action=lovevotsee&id="&rsm("love_id")&">查看投票用户</a>"
			    else
			    %>
				<input type="radio" value="1" name="lovevot">支持<input type="radio" name="lovevot" value="0">反对<br>
				<button name="submit" type="submit" style="width: 45px; height: 18px">
				提交</button>&nbsp;
				<%end if%>
				</td>
		</tr>
	</table>
	</form>



<%
end sub





'=======================================LOVE投票SAVE子程序
sub lovevot()
dim j,name7,rsm7,sqlm7,vot
  j=Dvbbs.CheckStr(request("id"))
  vot=request("lovevot")
  
  if vot="" or j="" then
     SendMsg="<li>参数错误！"
     exit sub
  end if
  set rsm7=server.createobject("adodb.recordset")
   sqlm7="select * from m_love  where love_id="&j
   rsm7.open sqlm7,connj,1,3	
   
   '投票判断 
    dim n 
     if Dvbbs.membername=rsm7("forname") or Dvbbs.membername=rsm7("toname") then
			            rsm7.close
   					set rsm7=nothing
   					set sqlm7=nothing
  					SendMsg="<li>您不能参加投票！"
                           exit sub
	end if
    if rsm7("voty")<>0 then
			          dim votyname
			          votyname=split(rsm7("votyname"),"|")
			          for n=0 to ubound(votyname)
			           if Dvbbs.membername=votyname(n) then 
			              rsm7.close
   					  set rsm7=nothing
   					  set sqlm7=nothing
  					  SendMsg="<li>您已经投过票了！"
                           	exit sub
                           	end if
			          next 
	end if
			    
    if rsm7("votn")<>0 then
			          dim votnname
			          votnname=split(rsm7("votnname"),"|")
			          for n=0 to ubound(votnname)
			          if Dvbbs.membername=votnname(n) then 
			              rsm7.close
   					  set rsm7=nothing
   					  set sqlm7=nothing
  					  SendMsg="<li>您已经投过票了！"
                           	exit sub
                           	end if
			          next 
	end if

  '==========
   
   
   
   
   
   
   
   
   if vot=1 then
   rsm7("voty")=clng(rsm7("voty"))+1
   rsm7("votyname")=rsm7("votyname")&Dvbbs.membername&"|"
      else
   rsm7("votn")=clng(rsm7("votn"))+1
   rsm7("votnname")=rsm7("votnname")&Dvbbs.membername&"|"
   end if
   rsm7.update
   rsm7.close
   set rsm7=nothing
   set sqlm7=nothing
  SendMsg="<li>投票成功！"
  set sqlm7=nothing

end sub

'=======================================LOVE投票查看子程序
sub lovevotsee()
  dim okname,noname,rsm7,sqlm7,j
 j=Dvbbs.CheckStr(request("id"))
   set rsm7=server.createobject("adodb.recordset")
   sqlm7="select * from m_love  where love_id="&j
   rsm7.open sqlm7,connj,1,1	
   okname=rsm7("votyname")
   noname=rsm7("votnname")
   rsm7.close
   set rsm7=nothing
   set sqlm7=nothing

   if okname<>"" then 
   okname=replace(okname,"|","<br>")
   end if
   if noname<>"" then
   noname=replace(noname,"|","<br>")
   end if 

  %>
  <div align="center">
  <TABLE BORDER="1" WIDTH="760" CELLSPACING="0" CELLPADDING="0" height="50" bordercolorlight="#FF00FF" bordercolordark="#FF00FF" STYLE="border-collapse: collapse">
		
		
		<TR><TD ALIGN="center" height="20" width="380" >支持会员</TD>
			<TD ALIGN="center" width="380">反对会员</TD></TR>
		
		<TR><TD height="22" align="center">&nbsp;<br><%=okname%>&nbsp;</TD>
			<TD height="22" align="center">&nbsp;<br><%=noname%>&nbsp;</TD>
		</TR>
		
	</TABLE>
	</div>

	<%

end sub


'#######################################################################################################################


'=============================显示求婚列表


'0 求婚 1接受(未登记） 2 拒绝,3,过期,4,FORNAME提出离婚,5,TONAME提出离婚.6,离婚,7,过期离婚，8,登记结婚.9,婚礼中
sub marryq()

set rsm=server.createobject("adodb.recordset")
sqlm="select * from m_marry where marry=0 or marry=2 or marry=3 Order By addtime Desc"
rsm.open sqlm,connj,1,3				
if rsm.eof or rsm.bof then
       %> 
         <DIV ALIGN="center">
        <table frame=vsides rules=none BACKGROUND="Dv_plus/marry/b01.jpg" WIDTH="760" HEIGHT="270" CELLSPACING="0" CELLPADDING="0" BORDER="1" BORDERCOLOR="#FFc7d1" STYLE="border-collapse: collapse">  
           <TR>
                <TD width="100%" align="center" height="24" colspan=3>
				<FONT FACE="华文彩云" SIZE="7" COLOR="#FFc7d1">还没有人求婚呢</FONT></TD>
           </tr>
              
        </table>
                
       </DIV>
     <%
else
     dim ipagecount,curpage,i,strurl
       rsm.PageSize=5                '设置单页的数据记录数 
       iPageCount=rsm.PageCount      '定义了一个页码数量的变量 
         If Len(Request.QueryString("Page"))=0 Then 
               CurPage=1 
                       Else 
               CurPage=CInt(Request.Querystring("Page")) 
         End If 
       rsm.AbsolutePage=CurPage           '得到当前的页码 
  
     i=0
     do while (not rsm.eof) 
     i=i+1
     %>

                <DIV ALIGN="center">

                <TABLE border=1 frame=vsides rules=none cellPadding=0 width=760 height="270" STYLE="border-collapse: collapse" BORDERCOLOR="#FFc7d1">
<!-- MSTableType="nolayout" -->
	  
   <TR>
    <TD vAlign=top width="760" background="Dv_plus/marry/b01.jpg" height="10" COLSPAN="3"><BR></TD>
  </TR>
  
  <TR>
    <TD vAlign=top width=160 background="Dv_plus/marry/index_bg.jpg" height="250">　</TD>
    <TD vAlign=top width=250 background="Dv_plus/marry/b01.jpg" HEIGHT="250">
    
    <TABLE border=1 borderColor=#FFc7d1 cellPadding=0 cellSpacing=1 
            width="500" height="250" STYLE="border-collapse: collapse">
           
				               
              <TR>
                <TD align="center" height="15" WIDTH="140"> 
                  <DIV align=center><B>追求者</B></DIV></TD>
                <TD align="center" WIDTH="140" height="15"> 
                  <DIV align=center><B>意中人</B></DIV></TD>
                <TD align="center" COLSPAN="2" width="220" height="15"> 
                  <DIV align=center><B>求婚时间</B></DIV></TD>	 
                </TR>		  	
<TR>	  	
               <TD width="140" align="center" height="220" ROWSPAN="4"><%=mface(rsm("forname"))%></TD>
               <TD width="140" align="center" height="220" ROWSPAN="4"><%=mface(rsm("toname"))%></TD>
         <TD valign="left" align="center" height="15" COLSPAN="2" width="220"><%=rsm("addtime")%></TD>
		
		 </TR> <TR>
			  	
                <TD valign="left" align="center" HEIGHT="15" COLSPAN="2" width="220">
                
                         <FONT COLOR="#FF0066"><B>求婚誓言</B></FONT></TD>
		 </TR> <TR>
			  	
                <TD valign="left" align="center" HEIGHT="80" COLSPAN="2" width="220">
				<%=msgbr(rsm("msg"))%> 
                </TD>
		 </TR> 
		 <TR><TD valign="left" align="center" HEIGHT="110" width="110">
			<%if rsm("marry")=0 then
			 response.write "<img border=0 src=Dv_plus/marry/qiuwait.gif width=110 height=110>"
			 elseif rsm("marry")=2 then
			  response.write "<img border=0 src=Dv_plus/marry/qiuno.gif width=110 height=110>"
			 elseif rsm("marry")=3 then
			   response.write "<img border=0 src=Dv_plus/marry/qiupass.gif width=110 height=110>"
			 end if%>
			</TD>
			<TD valign="left" align="center" HEIGHT="110" width="110"><%mmarryliwu()%></TD>
		 </TR> 
				<TR>
                <TD align="center" height="15" width="140">
<a href=dispuser.asp?name=<%=rsm("forname")%> target=_blank title=查看<%=rsm("forname")%>的资料><%=rsm("forname")%></a>
                </TD>  
                <TD align="center" height="15" width="140">         
  <a href=dispuser.asp?name=<%=rsm("toname")%> target=_blank title=查看<%=rsm("toname")%>的资料><%=rsm("toname")%></a>              
                </TD>
                <TD valign="left" align="center" height="15" COLSPAN="2">
                 <% if Dvbbs.MemberName=rsm("forname") then%>
                   <A HREF="plus_marry_list.asp?action=marryqdel&id=<%=rsm("marry_id")%>">删除</A>
                  <%elseif Dvbbs.MemberName=rsm("toname") and rsm("marry")=0 then %>
                   <A HREF="plus_marry_list.asp?action=marryqok&id=<%=rsm("marry_id")%>">接受</A> 
                   <A HREF="plus_marry_list.asp?action=marryqno&id=<%=rsm("marry_id")%>">拒绝</A>
                   <%else
                   response.write " 祝福他们吧!"
                   end if%>
                   				</TD> 
		 </TR> 
             </TABLE>
    </TD>
    <TD vAlign=top width=100 background="Dv_plus/marry/b01.jpg" HEIGHT="250">
    <%marryvottable()%>
    </TD>
  </TR>
  <TR>
    <TD vAlign=top width="760" background="Dv_plus/marry/b01.jpg" height="10" COLSPAN="3">　</TD>
  </TR>
  </TABLE>
  </DIV>
  <%
  if i>=rsm.PageSize then exit do
  rsm.movenext
loop
  %>
  <DIV ALIGN="center">
  <table frame=vsides rules=none WIDTH="760" HEIGHT="20" BORDER="1" BACKGROUND="Dv_plus/marry/b01.jpg" CELLSPACING="0" CELLPADDING="0" BORDERCOLOR="#FFc7d1" STYLE="border-collapse: collapse">
<TR>
  <TD ALIGN="right" HEIGHT="20" WIDTH="360">总共有<%=rsm.RecordCount%>条记录</TD>
  <TD ALIGN="right" WIDTH="400">
    <%if rsm.recordcount>rsm.pagesize then
          strUrl="plus_marry_list.asp?action=marryq" 
          ShowPageBar iPageCount,CurPage,strUrl 
    end if%>       
  </TD></TR></table>
  </DIV>
  <%
end if

rsm.close
set rsm=nothing
set sqlm=nothing


end sub

'====================================================================显示订婚列表
sub marryk()

set rsm=server.createobject("adodb.recordset")
sqlm="select * from m_marry where marry=1 or marry=9 Order By OKtime Desc"
rsm.open sqlm,connj,1,3				
if rsm.eof or rsm.bof then
       %> 
         <DIV ALIGN="center">
        <table frame=vsides rules=none BACKGROUND="Dv_plus/marry/b01.jpg" WIDTH="760" HEIGHT="270" CELLSPACING="0" CELLPADDING="0" BORDER="1" BORDERCOLOR="#FFc7d1" STYLE="border-collapse: collapse">  
           <TR>
                <TD width="100%" align="center" height="24" colspan=3>
				<FONT FACE="华文彩云" SIZE="7" COLOR="#FFc7d1">还没有人订婚呢</FONT></TD>
           </tr>
              
        </table>
                
       </DIV>
     <%
else

     dim ipagecount,curpage,i,strurl
       rsm.PageSize=5                '设置单页的数据记录数 
       iPageCount=rsm.PageCount      '定义了一个页码数量的变量 
         If Len(Request.QueryString("Page"))=0 Then 
               CurPage=1 
                       Else 
               CurPage=CInt(Request.Querystring("Page")) 
         End If 
       rsm.AbsolutePage=CurPage           '得到当前的页码 
  
     i=0
     do while (not rsm.eof) 
     i=i+1
     %>

                <DIV ALIGN="center">

                <TABLE border=1 frame=vsides rules=none cellPadding=0 width=760 height="270" STYLE="border-collapse: collapse" BORDERCOLOR="#FFc7d1">

  
   <TR>
    <TD vAlign=top width="760" background="Dv_plus/marry/b01.jpg" height="10" COLSPAN="3"><BR></TD>
  </TR>
  
  <TR>
    <TD vAlign=top width=160 background="Dv_plus/marry/index_bg.jpg" height="250">　</TD>
    <TD vAlign=top width=250 background="Dv_plus/marry/b01.jpg" HEIGHT="250">
    
    <TABLE border=1 borderColor=#FFc7d1 cellPadding=0 cellSpacing=1 
            width="500" height="250" STYLE="border-collapse: collapse">
           
				               
              <TR>
                <TD align="center" height="15" WIDTH="140"> 
                  <DIV align=center><B>追求者</B></DIV></TD>
                <TD align="center" WIDTH="140" height="15"> 
                  <DIV align=center><B>意中人</B></DIV></TD>
                <TD align="center" COLSPAN="2" width="220" height="15"> 
                  <DIV align=center><b>订婚时间</b></DIV></TD>	 
                </TR>		  	
<TR>	  	
               <TD width="280" align="center" height="220" ROWSPAN="4" COLSPAN="2">
				<%=mmarryphoto(rsm("marry_id"))%></TD>
         <TD valign="left" align="center" height="15" COLSPAN="2" width="220"><%=rsm("oktime")%></TD>
		
		 </TR> <TR>
			  	
                <TD valign="left" align="center" HEIGHT="15" COLSPAN="2" width="220">
                
                         <FONT COLOR="#FF0066"><B>求婚誓言</B></FONT></TD>
		 </TR> <TR>
			  	
                <TD valign="left" align="center" HEIGHT="80" COLSPAN="2" width="220">
				<%=msgbr(rsm("msg"))%> 
                </TD>
		 </TR> 
		 <TR><TD valign="left" align="center" HEIGHT="110" width="110">
		 <% if rsm("marry")=1 then
		 response.write "<img border=0 src=dv_plus/marry/marrydin.gif width=110 height=110>"
		 elseif rsm("marry")=9 then
		      
		      if rsm("oktime")<now() then
		          response.write "<img border=0 src=dv_plus/marry/marrynow.gif width=110 height=110>"
		          else
		          response.write "<img border=0 src=dv_plus/marry/marryden.gif width=110 height=110>"
                  end if 
		 
		 end if%></TD>
			<TD valign="left" align="center" HEIGHT="110" width="110"><%mmarryliwu()%></TD>
		 </TR> 
				<TR>
                <TD align="center" height="15" width="140">
<a href=dispuser.asp?name=<%=rsm("forname")%> target=_blank title=查看<%=rsm("forname")%>的资料><%=rsm("forname")%></a>
                </TD>  
                <TD align="center" height="15" width="140">         
  <a href=dispuser.asp?name=<%=rsm("toname")%> target=_blank title=查看<%=rsm("toname")%>的资料><%=rsm("toname")%></a>              
                </TD>
                <TD valign="left" align="center" height="15" COLSPAN="2">
                 <FONT FACE="宋体"></FONT><% 
                 dim usersex1,usersex2,forname,toname,sex1,sex2,sex3
                 forname=rsm("forname")
                 toname=rsm("toname")
                 set usersex2=Dvbbs.Execute("select usersex from dv_user where username='"&forname&"'")
                 sex1=usersex2(0)
                 set usersex2=Dvbbs.Execute("select usersex from dv_user where username='"&toname&"'")
                 sex2=usersex2(0)
                 
                 if sex1=0 and sex2=0 then sex3=1
                 
                 if Dvbbs.MemberName=rsm("forname") then
                       if rsm("marry")=1 then
                         set usersex1=Dvbbs.Execute("select usersex from dv_user where username='"&dvbbs.membername&"'")
                         if usersex1(0)=1 or sex3=1 then
                           response.write  "<A HREF=plus_marry_list.asp?action=marryden&id="&rsm("marry_id")&"><FONT COLOR=red><B>【结婚登记】</b></font></A>"
                         end if
                       end if
                           response.write  "<A HREF=plus_marry_up.asp?action=marrycphoto&id="&rsm("marry_id")&">.更换照片.</A>"
                        
                 elseif Dvbbs.MemberName=rsm("toname") then 
                       if rsm("marry")=1 then
                         set usersex1=Dvbbs.Execute("select usersex from dv_user where username='"&dvbbs.membername&"'")
                         if usersex1(0)=1 or sex3=1 then
                           response.write  "<A HREF=plus_marry_list.asp?action=marryden&id="&rsm("marry_id")&"><FONT COLOR=red><B>【结婚登记】</b></font></A>"
                         end if
                       end if
                           response.write  "<A HREF=plus_marry_up.asp?action=marrycphoto&id="&rsm("marry_id")&">.更换照片.</A>"
                   else 
                  response.write " 祝福他们吧 !"
                   end if
                                      %>
				</TD> 
		 </TR> 
             </TABLE>
    </TD>
    <TD vAlign=bottom width=100 background="Dv_plus/marry/b01.jpg" HEIGHT="250"><%marryvottable()%></TD>
  </TR>
  <TR>
    <TD vAlign=top width="760" background="Dv_plus/marry/b01.jpg" height="10" COLSPAN="3">　</TD>
  </TR>
  </TABLE>
  </DIV>
  <%
  if i>=rsm.PageSize then exit do
  rsm.movenext
loop
%>
  <DIV ALIGN="center">
  <table frame=vsides rules=none WIDTH="760" HEIGHT="20" BORDER="1" BACKGROUND="Dv_plus/marry/b01.jpg" CELLSPACING="0" CELLPADDING="0" BORDERCOLOR="#FFc7d1" STYLE="border-collapse: collapse">
<TR>
  <TD ALIGN="right" HEIGHT="20" WIDTH="360">总共有<%=rsm.RecordCount%>条记录</TD>
  <TD ALIGN="right" WIDTH="400">
    <%if rsm.recordcount>rsm.pagesize then
          strUrl="plus_marry_list.asp?action=marryk" 
          ShowPageBar iPageCount,CurPage,strUrl 
    end if%>       
  </TD></TR></table>
  </DIV>
  <%

end if
rsm.close
set rsm=nothing
set sqlm=nothing
end sub


'====================================================================显示结婚列表
sub marryd()

set rsm=server.createobject("adodb.recordset")
sqlm="select * from m_marry where  marry=8  Order By OKtime Desc"
rsm.open sqlm,connj,1,3				
if rsm.eof or rsm.bof then
       %> 
         <DIV ALIGN="center">
        <table frame=vsides rules=none BACKGROUND="Dv_plus/marry/b01.jpg" WIDTH="760" HEIGHT="270" CELLSPACING="0" CELLPADDING="0" BORDER="1" BORDERCOLOR="#FFc7d1" STYLE="border-collapse: collapse">  
           <TR>
                <TD width="100%" align="center" height="24" colspan=3>
				<FONT FACE="华文彩云" SIZE="7" COLOR="#FFc7d1">还没有人结婚呢</FONT></TD>
           </tr>
              
        </table>
                
       </DIV>
     <%
else

     dim ipagecount,curpage,i,strurl
       rsm.PageSize=5                '设置单页的数据记录数 
       iPageCount=rsm.PageCount      '定义了一个页码数量的变量 
         If Len(Request.QueryString("Page"))=0 Then 
               CurPage=1 
                       Else 
               CurPage=CInt(Request.Querystring("Page")) 
         End If 
       rsm.AbsolutePage=CurPage           '得到当前的页码 
  
     i=0
     do while (not rsm.eof) 
     i=i+1
     %>

                <DIV ALIGN="center">

                <TABLE border=1 frame=vsides rules=none cellPadding=0 width=760 height="270" STYLE="border-collapse: collapse" BORDERCOLOR="#FFc7d1">

  
   <TR>
    <TD vAlign=top width="760" background="Dv_plus/marry/b01.jpg" height="10" COLSPAN="3"><BR></TD>
  </TR>
  
  <TR>
    <TD vAlign=top width=160 background="Dv_plus/marry/index_bg.jpg" height="250">　</TD>
    <TD vAlign=top width=250 background="Dv_plus/marry/b01.jpg" HEIGHT="250">
    
    <TABLE border=1 borderColor=#FFc7d1 cellPadding=0 cellSpacing=1 
            width="500" height="250" STYLE="border-collapse: collapse">
           
				               
              <TR>
                <TD align="center" height="15" WIDTH="140"> 
                  <DIV align=center><B>追求者</B></DIV></TD>
                <TD align="center" WIDTH="140" height="15"> 
                  <DIV align=center><B>意中人</B></DIV></TD>
                <TD align="center" COLSPAN="2" width="220" height="15"> 
                  <DIV align=center><b>结婚时间</b></DIV></TD>	 
                </TR>		  	
<TR>	  	
               <TD width="280" align="center" height="220" ROWSPAN="4" COLSPAN="2">
				<%=mmarryphoto(rsm("marry_id"))%></TD>
         <TD valign="left" align="center" height="15" COLSPAN="2" width="220"><%=rsm("oktime")%></TD>
		
		 </TR> <TR>
			  	
                <TD valign="left" align="center" HEIGHT="15" COLSPAN="2" width="220">
                
                         <FONT COLOR="#FF0066"><B>结婚誓言</B></FONT></TD>
		 </TR> <TR>
			  	
                <TD valign="left" align="center" HEIGHT="80" COLSPAN="2" width="220">
				<%=msgbr(rsm("msg"))%> 
                </TD>
		 </TR> 
		 <TR><TD valign="left" align="center" HEIGHT="110" width="110">
		 <%  
		 
		 response.write mmarrytitle(rsm("marry_id"))
		 %></TD>
			<TD valign="left" align="center" HEIGHT="110" width="110"><%mmarryliwu()%></TD>
		 </TR> 
				<TR>
                <TD align="center" height="15" width="140">
<a href=dispuser.asp?name=<%=rsm("forname")%> target=_blank title=查看<%=rsm("forname")%>的资料><%=rsm("forname")%></a>
                </TD>  
                <TD align="center" height="15" width="140">         
  <a href=dispuser.asp?name=<%=rsm("toname")%> target=_blank title=查看<%=rsm("toname")%>的资料><%=rsm("toname")%></a>              
                </TD>
                <TD valign="left" align="center" height="15" COLSPAN="2">
                 <FONT FACE="宋体"></FONT><% 
                 dim usersex1
                 if Dvbbs.MemberName=rsm("forname") then
                         response.write  "<A HREF=plus_marry_up.asp?action=marrycphoto&id="&rsm("marry_id")&">.更换照片.</A>"
                        
                 elseif Dvbbs.MemberName=rsm("toname") then 
                                 response.write  "<A HREF=plus_marry_up.asp?action=marrycphoto&id="&rsm("marry_id")&">.更换照片.</A>"
                   else 
                  response.write " 祝福他们吧!"
                   end if%>
				</TD> 
		 </TR> 
             </TABLE>
    </TD>
    <TD vAlign=bottom width=100 background="Dv_plus/marry/b01.jpg" HEIGHT="250"><%marryvottable()%></TD>
  </TR>
  <TR>
    <TD vAlign=top width="760" background="Dv_plus/marry/b01.jpg" height="10" COLSPAN="3">　</TD>
  </TR>
  </TABLE>
  </DIV>
  <%
  if i>=rsm.PageSize then exit do
  rsm.movenext
loop
%>
  <DIV ALIGN="center">
  <table frame=vsides rules=none WIDTH="760" HEIGHT="20" BORDER="1" BACKGROUND="Dv_plus/marry/b01.jpg" CELLSPACING="0" CELLPADDING="0" BORDERCOLOR="#FFc7d1" STYLE="border-collapse: collapse">
<TR>
  <TD ALIGN="right" HEIGHT="20" WIDTH="360">总共有<%=rsm.RecordCount%>条记录</TD>
  <TD ALIGN="right" WIDTH="400">
    <%if rsm.recordcount>rsm.pagesize then
          strUrl="plus_marry_list.asp?action=marryd" 
          ShowPageBar iPageCount,CurPage,strUrl 
    end if%>       
  </TD></TR></table>
  </DIV>
  <%

end if
rsm.close
set rsm=nothing
set sqlm=nothing
end sub

'========================================================显示离婚列表
sub marryfen()

set rsm=server.createobject("adodb.recordset")
sqlm="select * from m_marry where marry=4 or marry=5 or marry=6 or marry=7 Order By fentime Desc"
rsm.open sqlm,connj,1,3				
if rsm.eof or rsm.bof then
       %> 
         <DIV ALIGN="center">
        <table frame=vsides rules=none BACKGROUND="Dv_plus/marry/b01.jpg" WIDTH="760" HEIGHT="270" CELLSPACING="0" CELLPADDING="0" BORDER="1" BORDERCOLOR="#FFc7d1" STYLE="border-collapse: collapse">  
           <!-- MSTableType="nolayout" -->
			<TR>
                <TD width="100%" align="center" height="24" colspan=3>
				<FONT FACE="华文彩云" SIZE="7" COLOR="#FFc7d1">还没有人离婚呢</FONT></TD>
           </tr>
              
        </table>
                
       </DIV>
     <%
else
     dim ipagecount,curpage,i,strurl
       rsm.PageSize=5                '设置单页的数据记录数 
       iPageCount=rsm.PageCount      '定义了一个页码数量的变量 
         If Len(Request.QueryString("Page"))=0 Then 
               CurPage=1 
                       Else 
               CurPage=CInt(Request.Querystring("Page")) 
         End If 
       rsm.AbsolutePage=CurPage           '得到当前的页码 
  
     i=0
     do while (not rsm.eof) 
     i=i+1
     %>

                <DIV ALIGN="center">

                <TABLE border=1 frame=vsides rules=none cellPadding=0 width=760 height="270" STYLE="border-collapse: collapse" BORDERCOLOR="#FFc7d1">
<TR>
    <TD vAlign=top width="760" background="Dv_plus/marry/b01.jpg" height="10" COLSPAN="2"><BR></TD>
  </TR>
  
  <TR>
    <TD vAlign=top width=260 background="Dv_plus/marry/index_bg.jpg" height="250">　</TD>
    <TD vAlign=top width=500 background="Dv_plus/marry/b01.jpg" HEIGHT="250">
    
    <TABLE border=1 borderColor=#FFc7d1 cellPadding=0 cellSpacing=1 
            width="500" height="250" STYLE="border-collapse: collapse">
           
				               
              <TR>
                <TD align="center" height="15" WIDTH="140"> 
                  <DIV align=center><B>追求者</B></DIV></TD>
                <TD align="center" WIDTH="140" height="15"> 
                  <DIV align=center><B>意中人</B></DIV></TD>
                <TD align="center" width="220" height="15"> 
                  <DIV align=center><B>结婚时间</B></DIV></TD>	 
                </TR>		  	
<TR>	  	
               <TD width="280" align="center" height="220" ROWSPAN="5" COLSPAN="2">
				<%=mmarryphoto(rsm("marry_id"))%></TD>
         <TD valign="left" align="center" height="15" width="220"><%=rsm("oktime")%></TD>
		
		 </TR> <TR>
			  	
                <TD valign="left" align="center" HEIGHT="15" width="220">
                
                         <FONT COLOR="#FF0066"><B>离婚理由</B></FONT></TD>
		 </TR> <TR>
			  	
                <TD valign="left" align="center" HEIGHT="110" width="220">
				<%=msgbr(rsm("msgfen"))%> 
                </TD>
		 </TR> 
				<TR>
			  	
                <TD valign="left" align="center" HEIGHT="50" width="220">
                <%if rsm("marry")=4 then
			response.write rsm("forname")&"<br>"&rsm("fentime")&"<BR>"&"提出离婚"
			elseif rsm("marry")=5 then
			response.write rsm("toname")&"<br>"&rsm("fentime")&"<BR>"&"提出离婚"
			elseif rsm("marry")=6 then
			response.write "他们"&"<br>"&rsm("fentime")&"<BR>"&"已经离婚"
			else 
			response.write "他们"&"<br>"&rsm("fentime")&"<BR>"&"系统判离婚"
			end if
			%>
				　</TD>
		 </TR> 
		 <TR><TD valign="left" align="center" HEIGHT="30" width="220">
			<%
			if rsm("marry")=4 and Dvbbs.MemberName=rsm("forname")then
			response.write "<a href=plus_marry_list.asp?action=marryfenca&id="&rsm("marry_id")&">撤消</a><br>"
			elseif rsm("marry")=4 and Dvbbs.MemberName=rsm("toname")then
			response.write "<a href=plus_marry_list.asp?action=marryfenok&id="&rsm("marry_id")&">同意</a><br>"
			response.write "<a HREF=messanger.asp?action=new&touser="&rsm("forname")&">不同意(发送短消息给"&rsm("forname")&")</a>"	
			elseif rsm("marry")=5 and Dvbbs.MemberName=rsm("toname")then
			response.write "<a href=plus_marry_list.asp?action=marryfenca&id="&rsm("marry_id")&">撤消</a><br>"
			elseif rsm("marry")=5 and Dvbbs.MemberName=rsm("forname")then
			response.write "<a href=plus_marry_list.asp?action=marryfenok&id="&rsm("marry_id")&">同意</a><br>"
			response.write "<a HREF=messanger.asp?action=new&touser="&rsm("toname")&">不同意(发送短消息给"&rsm("toname")&")</a>"	
			elseif rsm("marry")=6 or rsm("marry")=7  then
			     if Dvbbs.MemberName=rsm("forname") or Dvbbs.MemberName=rsm("toname") then
			        delfengmoney=getm("delfengmoney")
			        response.write "<a href=plus_marry_list.asp?action=marrydelfeng&id="&rsm("marry_id")&">删除</a><br>"
			        response.write "(删除需要"&delfengmoney&"金币)"
			                 else
			        response.write "..."
			     end if
			end if

			%>
			</TD>
		 </TR> 
				<TR>
                <TD align="center" height="15" width="140">
<a href=dispuser.asp?name=<%=rsm("forname")%> target=_blank title=查看<%=rsm("forname")%>的资料><%=rsm("forname")%></a>
                </TD>  
                <TD align="center" height="15" width="140">         
  <a href=dispuser.asp?name=<%=rsm("toname")%> target=_blank title=查看<%=rsm("toname")%>的资料><%=rsm("toname")%></a>              
                </TD>
                <TD valign="left" align="center" height="15">
                 <% if Dvbbs.MemberName=rsm("forname") then%>
                   <A HREF="plus_marry_up.asp?action=marrycphoto&id=<%=rsm("marry_id")%>">更换照片.</A>
                  <%elseif Dvbbs.MemberName=rsm("toname") then %>
                   <A HREF="plus_marry_up.asp?action=marrycphoto&id=<%=rsm("marry_id")%>">更换照片.</A>
                   <%else 
                  response.write " 祝福他们吧!"
                   end if%>
				</TD> 
		 </TR> 
             </TABLE>
    </TD>
  </TR>
  <TR>
    <TD vAlign=top width="760" background="Dv_plus/marry/b01.jpg" height="10" COLSPAN="2">　</TD>
  </TR>
  </TABLE>
  </DIV>
  <%
  if i>=rsm.PageSize then exit do
  rsm.movenext
loop
%>
  <DIV ALIGN="center">
  <table frame=vsides rules=none WIDTH="760" HEIGHT="20" BORDER="1" BACKGROUND="Dv_plus/marry/b01.jpg" CELLSPACING="0" CELLPADDING="0" BORDERCOLOR="#FFc7d1" STYLE="border-collapse: collapse">
<TR>
  <TD ALIGN="right" HEIGHT="20" WIDTH="360">总共有<%=rsm.RecordCount%>条记录</TD>
  <TD ALIGN="right" WIDTH="400">
    <%if rsm.recordcount>rsm.pagesize then
          strUrl="plus_marry_list.asp?action=marryfen" 
          ShowPageBar iPageCount,CurPage,strUrl 
    end if%>       
  </TD></TR></table>
  </DIV>
  <%

end if
rsm.close
set rsm=nothing
set sqlm=nothing
end sub
'=================================离婚OK子程序
sub marryfenok()
dim j,name7,rsm7,sqlm7,cptem,cp7
  j=Dvbbs.CheckStr(request("id"))
  limoney=getm("limoney")
  cptem=getm("marrycp2")
  cp7=split(cptem,"|")
  
  set rsm7=server.createobject("adodb.recordset")
   sqlm7="select * from m_marry  where marry_id="&j
   rsm7.open sqlm7,connj,1,3	
   rsm7("oktime")=now()
   rsm7("marry")=6
   if Dvbbs.membername=rsm7("forname") then
     name7=rsm7("toname")
    else
     name7=rsm7("forname")
   end if
   
   rsm7.update
   rsm7.close
   set rsm7=nothing
   set sqlm7=nothing
   sqlm7="insert into dv_message(sender,incept,title,content,sendtime,issend)values('恋爱事务处','"&name7&"','很遗憾的通知您：','"&Dvbbs.membername&"接受了您的离婚请求!您的金币减少"&limoney&"!您的魅力减少"&cp7(0)&"!对方魅力减少"&cp7(1)&"','"&now()&"','1')"
  Dvbbs.execute(sqlm7)
  UPDATE_User_Msg name7
  
  UpdateUserMoney name7, -limoney
  UpdateUserMoney Dvbbs.membername, limoney
  
  UpdateUserCP Dvbbs.membername, -cp7(1)
  UpdateUserCP name7, -cp7(0)

    
  SendMsg="<li>已经离婚！祝你们幸福!您的金币增加"&limoney&"!您的魅力减少"&cp7(1)&"!对方魅力减少"&cp7(0)&"!"
  set sqlm7=nothing

end sub

'=================================离婚撤消子程序
sub marryfenca()
dim j,name7,rsm7,sqlm7
  j=Dvbbs.CheckStr(request("id"))

  set rsm7=server.createobject("adodb.recordset")
   sqlm7="select * from m_marry  where marry_id="&j
   rsm7.open sqlm7,connj,1,3	
   rsm7("fentime")=now()
   rsm7("marry")=1
   if Dvbbs.membername=rsm7("forname") then
     name7=rsm7("toname")
    else
     name7=rsm7("forname")
   end if
   
   rsm7.update
   rsm7.close
   set rsm7=nothing
   set sqlm7=nothing
   sqlm7="insert into dv_message(sender,incept,title,content,sendtime,issend)values('婚姻事务处','"&name7&"','很高兴的通知您：','"&Dvbbs.membername&"取消了离婚请求!恭喜!','"&now()&"','1')"
  Dvbbs.execute(sqlm7)
  
  UPDATE_User_Msg name7
  SendMsg="<li>撤消成功！祝你们幸福!"
  set sqlm7=nothing

end sub

'===============================求婚同意子程序

sub marryqok()
dim j,forname,toname,rsm7,sqlm7,cp7
  j=Dvbbs.CheckStr(request("id"))
  cp7=clng(getm("marrycp1"))

  set rsm7=server.createobject("adodb.recordset")
   sqlm7="select * from m_marry  where marry_id="&j
   rsm7.open sqlm7,connj,1,3
   
   if rsm7("marry")=1 then
      rsm7.close
   	set rsm7=nothing
   	set sqlm7=nothing
      SendMsg="<li>请不要重复提交!"
      exit sub
   end if



	
   rsm7("oktime")=now()
   rsm7("marry")=1
   forname=rsm7("forname")
   toname=rsm7("toname")
   '查找LOVE表，删除同一对人
   '查找合影
   dim oldfilename,dels
   oldfilename=""
   sqlm7="select lovephoto from m_love where forname='"&forname&"' and toname='"&toname&"'"
   if not connj.execute(sqlm7).eof or not connj.execute(sqlm7).bof then
   dels=connj.execute(sqlm7)
   oldfilename=dels(0)
   sqlm7="delete * from m_love where forname='"&forname&"' and toname='"&toname&"'"
   connj.execute(sqlm7)
   
   else
   
   sqlm7="select lovephoto from m_love where toname='"&forname&"' and forname='"&toname&"'"
   if not connj.execute(sqlm7).eof or not connj.execute(sqlm7).bof then
   dels=connj.execute(sqlm7)
   oldfilename=dels(0)
   sqlm7="delete * from m_love where toname='"&forname&"' and forname='"&toname&"'"
   connj.execute(sqlm7)
   end if
   
   end if

   if oldfilename="dv_plus/marry/lovephoto.jpg" or oldfilename="" then oldfilename="dv_plus/marry/marryphoto.jpg"
   rsm7("marryphoto")=oldfilename
   
   rsm7.update
   rsm7.close
   set rsm7=nothing
   set sqlm7=nothing
   

   '查找LOVE表，删除婚外恋
   if getm("isml")=0 then
     dim n,name7
       set rsm7=server.createobject("adodb.recordset")
       sqlm7="select * from m_love  where forname='"&forname&"' or forname='"&toname&"' or toname='"&forname&"' or toname='"&toname&"'"
       rsm7.open sqlm7,connj,1,3
       DO WHILE NOT rsm7.eof 	
          if rsm7("forname")=forname or rsm7("forname")=toname then name7=rsm7("toname")
         
          if rsm7("toname")=forname or rsm7("toname")=toname then name7=rsm7("forname")
        
          n=rsm("love_id")
          
          '发送短消息
             dim sqlm77
             sqlm77="insert into dv_message(sender,incept,title,content,sendtime,issend)values('婚姻事务处','"&name7&"','很遗憾的通知您：','"&forname&"和"&toname&"结婚了!你失恋了。','"&now()&"','1')"
             Dvbbs.execute(sqlm77)
             UPDATE_User_Msg name7
          '写恋爱消息为已分手
             rsm7("love")=6
             rsm7.update
             rsm7.movenext
       loop
       rsm7.close
       set rsm7=nothing
       set sqlm7=nothing
       set sqlm77=nothing
   end if            
         
   
   
   '求婚成功
   sqlm7="insert into dv_message(sender,incept,title,content,sendtime,issend)values('婚姻事务处','"&forname&"','很高兴的通知您：','"&Dvbbs.membername&"接受了您的求婚!恭喜!您的魅力增加"&cp7&"!','"&now()&"','1')"
  Dvbbs.execute(sqlm7)

  UPDATE_User_Msg forname
  UpdateUserCP Dvbbs.membername, cp7
  UpdateUserCP forname, cp7
  
  SendMsg="<li>恭喜恭喜！祝你们幸福!您的魅力增加"&cp7&"!"
  set sqlm7=nothing

end sub


'===============================求婚拒绝子程序
sub marryqno()
dim j,forname,rsm7,sqlm7,cp7
  j=Dvbbs.CheckStr(request("id"))
  cp7=clng(getm("marrycp1"))
  set rsm7=server.createobject("adodb.recordset")
   sqlm7="select * from m_marry  where marry_id="&j
   rsm7.open sqlm7,connj,1,3
   
      if rsm7("marry")=1 then
      rsm7.close
   	set rsm7=nothing
   	set sqlm7=nothing
      SendMsg="<li>同意后怎么可以再拒绝呢..."
      exit sub
   end if

   rsm7("oktime")=now()
   rsm7("marry")=2
   forname=rsm7("forname")
   rsm7.update
   rsm7.close
   set rsm7=nothing
   set sqlm7=nothing
   sqlm7="insert into dv_message(sender,incept,title,content,sendtime,issend)values('婚姻事务处','"&forname&"','很遗憾的通知您：','"&Dvbbs.membername&"拒绝了您的求婚!忘了吧!您的魅力减少"&cp7&"!','"&now()&"','1')"
  Dvbbs.execute(sqlm7)

  UPDATE_User_Msg forname
  UpdateUserCP forname, -cp7
  
  SendMsg="<li>世事不如意者十常八九!对方魅力值减少"&cp7&"!"
   set sqlm7=nothing
end sub

'===============================求婚撤消子程序
sub marryqdel()
dim j,toname,rsm7,sqlm7,marry7
  j=Dvbbs.CheckStr(request("id"))
  set rsm7=server.createobject("adodb.recordset")
   sqlm7="select * from m_marry  where marry_id="&j
   rsm7.open sqlm7,connj,1,3	
   toname=rsm7("toname")
   marry7=rsm7("marry")
   rsm7.close
   set rsm7=nothing
   set sqlm7=nothing
   sqlm7="delete * from m_marry where marry_id="&j
   connj.execute(sqlm7)
   set sqlm7=nothing
   if marry7<>2 then
   
   sqlm7="insert into dv_message(sender,incept,title,content,sendtime,issend)values('婚姻事务处','"&toname&"','很遗憾的通知您：','"&Dvbbs.membername&"取消了向您的求婚!忘了吧!','"&now()&"','1')"
  Dvbbs.execute(sqlm7)
  UPDATE_User_Msg toname
   end if
  SendMsg="<li>世事不如意者十常八九！"
  set sqlm7=nothing

end sub

'===============================离婚删除子程序
sub marrydelfeng()

dim j,name7,sqlm7,delfengmoney
  delfengmoney=getm("delfengmoney")
  j=Dvbbs.CheckStr(request("id"))
  if clng(Dvbbs.UserSession.documentElement.selectSingleNode("userinfo/@usermoney").text)<clng(delfengmoney) then
   SendMsg="<li>您的金币不足！"
   exit sub
  end if
    '删除合影
   dim oldfilename,delold,dels
   sqlm7="select marryphoto from m_marry where marry_id="&j
   dels=connj.execute(sqlm7)
   oldfilename=dels(0)
   delold=deloldfile("marry"&j,oldfilename)

   sqlm7="delete * from m_marry where marry_id="&j
   connj.execute(sqlm7)
   
   set sqlm7=nothing
 
  UpdateUserMoney Dvbbs.membername,-delfengmoney
  
  SendMsg="<li>删除成功！您的金币减少"&delfengmoney&".祝你们幸福!"
  set sqlm7=nothing



end sub

'=======================================marry投票子程序
sub marryvottable()
dim yh,nh
yh=rsm("voty")
nh=rsm("votn")
yh=yh*10                      '此处可根据论坛人数多少决定
nh=nh*10
if yh>150 then yh=150
if nh>150 then nh=150
%>
<form method="POST" action="plus_marry_list.asp?action=marryvot&id=<%=rsm("marry_id")%>" name="marryvot">
    <table border="1" border=1 frame=hsides width="100%" height="100%" bordercolorlight="#FFc7d1" bordercolordark="#FFc7d1" cellspacing="1" STYLE="border-collapse: collapse">
		<tr>
			<td align="center" valign="bottom" width="50%">
			<img border="0" src="Dv_plus/marry/bar1.gif" width="10" height="<%=yh%>"></td>
			<td width="50%" align="center" valign="bottom">
			<img border="0" src="Dv_plus/marry/bar2.gif" width="10" height="<%=nh%>"></td>
		</tr>
		<tr>
			<td align="center" valign="bottom" width="50%" height="10"><%=rsm("voty")%></td>
			<td width="50%" align="center" valign="bottom"><%=rsm("votn")%></td>
		</tr>
		<tr>
			<td colspan="2" height="40" align="center" valign="bottom">
			    <%
			    dim checkvot,j
			    checkvot=0
			    if Dvbbs.membername=rsm("forname") or Dvbbs.membername=rsm("toname") then
			          checkvot=1 
			    end if
			    if rsm("voty")<>0 then
			          dim votyname
			          votyname=split(rsm("votyname"),"|")
			          for j=0 to ubound(votyname)
			          if Dvbbs.membername=votyname(j) then checkvot=1 
			          next 
			    end if
			    
                if rsm("votn")<>0 then
			          dim votnname
			          votnname=split(rsm("votnname"),"|")
			          for j=0 to ubound(votnname)
			          if Dvbbs.membername=votnname(j) then checkvot=1 
			          next 
			    end if
			   
                if checkvot=1 then  
                Response.Write "支持  反对<br>"
                Response.Write "<A HREF=plus_marry_list.asp?action=marryvotsee&id="&rsm("marry_id")&">查看投票用户</a>"
			    else
			    %>
				<input type="radio" value="1" name="marryvot">支持<input type="radio" name="marryvot" value="0">反对<br>
				<button name="submit" type="submit" style="width: 45px; height: 18px">
				提交</button>&nbsp;
				<%end if%>
				</td>
		</tr>
	</table>
	</form>



<%
end sub





'=======================================marry投票SAVE子程序
sub marryvot()
dim j,name7,rsm7,sqlm7,vot
  j=Dvbbs.CheckStr(request("id"))
  vot=request("marryvot")
  
  if vot="" or j="" then
     SendMsg="<li>参数错误！"
     exit sub
  end if
  set rsm7=server.createobject("adodb.recordset")
   sqlm7="select * from m_marry  where marry_id="&j
   rsm7.open sqlm7,connj,1,3	
   
 '投票判断 
    dim n 
     if Dvbbs.membername=rsm7("forname") or Dvbbs.membername=rsm7("toname") then
			            rsm7.close
   					set rsm7=nothing
   					set sqlm7=nothing
  					SendMsg="<li>您不能参加投票！"
                           exit sub
	end if
    if rsm7("voty")<>0 then
			          dim votyname
			          votyname=split(rsm7("votyname"),"|")
			          for n=0 to ubound(votyname)
			           if Dvbbs.membername=votyname(n) then 
			              rsm7.close
   					  set rsm7=nothing
   					  set sqlm7=nothing
  					  SendMsg="<li>您已经投过票了！"
                           	exit sub
                           	end if
			          next 
	end if
			    
    if rsm7("votn")<>0 then
			          dim votnname
			          votnname=split(rsm7("votnname"),"|")
			          for n=0 to ubound(votnname)
			          if Dvbbs.membername=votnname(n) then 
			              rsm7.close
   					  set rsm7=nothing
   					  set sqlm7=nothing
  					  SendMsg="<li>您已经投过票了！"
                           	exit sub
                           	end if
			          next 
	end if

  '========== 
   
   
   if vot=1 then
   rsm7("voty")=clng(rsm7("voty"))+1
   rsm7("votyname")=rsm7("votyname")&Dvbbs.membername&"|"
      else
   rsm7("votn")=clng(rsm7("votn"))+1
   rsm7("votnname")=rsm7("votnname")&Dvbbs.membername&"|"
   end if
   rsm7.update
   rsm7.close
   set rsm7=nothing
   set sqlm7=nothing
  SendMsg="<li>投票成功！"
  set sqlm7=nothing

end sub

'=======================================marry投票查看子程序
sub marryvotsee()
  dim okname,noname,rsm7,sqlm7,j
 j=Dvbbs.CheckStr(request("id"))
   set rsm7=server.createobject("adodb.recordset")
   sqlm7="select * from m_marry  where marry_id="&j
   rsm7.open sqlm7,connj,1,1	
   okname=rsm7("votyname")
   noname=rsm7("votnname")
   rsm7.close
   set rsm7=nothing
   set sqlm7=nothing

   if okname<>"" then 
   okname=replace(okname,"|","<br>")
   end if
   if noname<>"" then
   noname=replace(noname,"|","<br>")
   end if 

  %>
  <div align="center">
  <TABLE BORDER="1" WIDTH="760" CELLSPACING="0" CELLPADDING="0" height="50" bordercolorlight="#FF00FF" bordercolordark="#FF00FF" STYLE="border-collapse: collapse">
		
		
		<TR><TD ALIGN="center" height="20" width="380" >支持会员</TD>
			<TD ALIGN="center" width="380">反对会员</TD></TR>
		
		<TR><TD height="22" align="center">&nbsp;<br><%=okname%>&nbsp;</TD>
			<TD height="22" align="center">&nbsp;<br><%=noname%>&nbsp;</TD>
		</TR>
		
	</TABLE>
	</div>

	<%

end sub
'=================================================结婚登记

'=================================================结婚登记
sub marryden()
dim j,usersex1,rsm7,sqlm7,name7,longm,levelm
  
  longm=getm("longm")
  levelm=getm("levelm")
  j=Dvbbs.CheckStr(request("id"))
'  set usersex1=Dvbbs.Execute("select usersex from dv_user where username='"&dvbbs.membername&"'")
                         if j="" then
                           SendMsg="<li>参数错误或者你不是新郎！"
                            send_msg()
                           exit sub
                        end if
'  set usersex1=nothing
  
  set rsm7=server.createobject("adodb.recordset")
   sqlm7="select * from m_marry  where marry_id="&j
   rsm7.open sqlm7,connj,1,3

   if Dvbbs.membername=rsm7("forname") then
     name7=rsm7("toname")
    elseif Dvbbs.membername=rsm7("toname") then
     name7=rsm7("forname")
    else 
       
       rsm7.close
       set rsm7=nothing
       set sqlm7=nothing
       SendMsg="<li>参数错误或者你不是新郎!!"
       send_msg()             
       exit sub

   end if

%>
<SCRIPT>
function showPrice()
{
	var marrylong=document.marryden.marrylong.value;
	var marrylevel=document.marryden.marrylevel.value;
	var longm=document.marryden.longm.value;
    var levelm=document.marryden.levelm.value;
	var total;
	total=marrylevel*levelm+marrylong*longm;            //婚礼费用
	document.all['price'].innerHTML=Math.round(total)+"元";
	}
</SCRIPT>
<div align="center">
<TABLE border=0 cellPadding=0 cellSpacing=0 width=760>
    
  <TR>
    <TD   height=517 vAlign=top width=247 background="Dv_plus/marry/j01.jpg" rowspan="2" >
      　</TD>
    <TD   height=91 vAlign=top width=282 background="Dv_plus/marry/j02.jpg">
   
      </TD>
    <TD   height=91 vAlign=top width=231 background="dv_plus/marry/b01.jpg">
   
      　</TD></TR> 
    
  <TR>
    <TD   height=426 width=513 background="dv_plus/marry/b01.jpg" colspan="2" align="center">
            <FORM action=plus_marry_list.asp?action=marrydensave&id=<%=j%>   method=POST name=marryden>
            <TABLE      width=500 height="418" bordercolorlight="#FF00FF" bordercolordark="#FF00FF" border="1" STYLE="border-collapse: collapse">
             
               
              <tr><TD colSpan=3  height=68 align="center" VALIGN="middle" width="418" >
              <FONT  color=#ff3300 face="华文彩云" size="5"><%=Dvbbs.membername%>恭喜您即将踏入婚礼的殿堂</font></TD>
               </TR>
              <tr><TD height=15 width=100 ALIGN="center" VALIGN="middle"><FONT color=#ff3300>对方昵称:</FONT></TD>
                <TD height=15 width=200 >&nbsp;&nbsp;&nbsp;<%=name7%></TD>
                <TD height=15 width=200 ALIGN="center" >赞成:<%=rsm7("voty")%>票|反对:<%=rsm7("votn")%>票</TD>
              </TR>
              
              <tr><TD height=50 width=100 ALIGN="center" VALIGN="middle"  >
                  <FONT color=#ff3300>爱情宣言:</FONT></TD>
                <TD   colSpan=2 height=50 width=400>
				<TEXTAREA cols=50 name=msg rows=5 wrap=VIRTUAL><%=rsm7("msg")%></TEXTAREA></TD>
              </TR>
              <TR >
                <TD height=15 width=100 ALIGN="center" VALIGN="middle"  > <FONT color=#ff3300>婚礼规格:</FONT></TD>
                <TD height=15 width=200 align="left" VALIGN="middle" >
                   
                  <SELECT name=marrylevel onchange=showPrice() size=1> 
                    <OPTION selected value="0">请选择</OPTION> <OPTION 
                    value=1>一心一意</OPTION> <OPTION value=2>比翼双飞</OPTION> <OPTION 
                    value=3>三生有幸</OPTION> <OPTION value=4>海誓山盟</OPTION> <OPTION 
                    value=5>五彩缤纷</OPTION> <OPTION value=6>流光飞舞</OPTION> <OPTION 
                    value=7>郎情妾意</OPTION> <OPTION value=8>白头偕老</OPTION> <OPTION 
                    value=9>天长地久</OPTION></SELECT>
					</TD>
                <TD height=15 width=200 align="center" ><input type=hidden type="text" name="levelm" size="20" value="<%=levelm%>">
                   加成为<%=levelm%>
                  </TD></TR>
              <TR >
                <TD height=15 width=100 nowrap ALIGN="center" VALIGN="middle"  ><FONT color=#ff3300>婚礼开始时间:</FONT></TD>
                <TD colSpan=2 height=15 width=400 align="left"  >
				<SELECT name=dentime_year size=1> 
					<OPTION value=2006 selected>2006</OPTION> 
                              <OPTION value=2007>2007</OPTION>
                              <OPTION value=2008>2008</OPTION> 
                        </SELECT>年 
				<SELECT name=dentime_month size=1> 
				<OPTION value=1 selected>1</OPTION> 
				<OPTION value=2>2</OPTION>
				<OPTION value=3>3</OPTION>
				<OPTION value=4>4</OPTION> 
				<OPTION value=5>5</OPTION> 
				<OPTION value=6>6</OPTION> 
				<OPTION value=7>7</OPTION> 
				<OPTION value=8>8</OPTION> 
				<OPTION value=9>9</OPTION> 
				<OPTION value=10>10</OPTION> 
				<OPTION value=11>11</OPTION> 
				<OPTION value=12>12</OPTION>
				</SELECT>月 
				<SELECT name=dentime_day size=1> 
                    <OPTION value=1>1</OPTION> 
                    <OPTION value=2>2</OPTION> 
                    <OPTION value=3>3</OPTION> 
                    <OPTION value=4>4</OPTION> 
                    <OPTION value=5>5</OPTION>
                    <OPTION value=6>6</OPTION> 
                    <OPTION value=7>7</OPTION> 
                    <OPTION value=8>8</OPTION> 
                    <OPTION value=9>9</OPTION> 
                    <OPTION value=10>10</OPTION> 
                    <OPTION value=11>11</OPTION> 
                    <OPTION value=12>12</OPTION> 
                    <OPTION value=13>13</OPTION> 
                    <OPTION value=14>14</OPTION> 
                    <OPTION value=15>15</OPTION> 
                    <OPTION value=16>16</OPTION> 
                    <OPTION value=17>17</OPTION> 
                    <OPTION value=18 SELECTED>18</OPTION> 
                    <OPTION value=19>19</OPTION> 
                    <OPTION value=20>20</OPTION> 
                    <OPTION value=21>21</OPTION> 
                    <OPTION value=22>22</OPTION> 
                    <OPTION value=23>23</OPTION> 
                    <OPTION value=24>24</OPTION> 
                    <OPTION value=25>25</OPTION> 
                    <OPTION value=26>26</OPTION> 
                    <OPTION value=27>27</OPTION> 
                    <OPTION value=28>28</OPTION> 
                    <OPTION value=29>29</OPTION> 
                    <OPTION value=30>30</OPTION> 
                    <OPTION value=31>31</OPTION>
                    </SELECT>日 
                  <SELECT name=dentime_hour onchange=showPrice() size=1> 
                     <OPTION  selected value=0>0</OPTION> 
                     <OPTION value=1>1</OPTION> 
                     <OPTION value=2>2</OPTION> 
                     <OPTION value=3>3</OPTION> 
                     <OPTION value=4>4</OPTION> 
                     <OPTION value=5>5</OPTION> 
                     <OPTION value=6>6</OPTION>
                     <OPTION value=7>7</OPTION> 
                    <OPTION value=8>8</OPTION> 
                    <OPTION value=9>9</OPTION> 
                    <OPTION value=10>10</OPTION> 
                    <OPTION value=11>11</OPTION> 
                    <OPTION value=12>12</OPTION> 
                    <OPTION value=13>13</OPTION> 
                    <OPTION value=14>14</OPTION> 
                    <OPTION value=15>15</OPTION> 
                    <OPTION value=16>16</OPTION> 
                    <OPTION value=17>17</OPTION> 
                    <OPTION value=18>18</OPTION> 
                    <OPTION value=19>19</OPTION> 
                    <OPTION value=20>20</OPTION> 
                    <OPTION value=21>21</OPTION> 
                    <OPTION value=22>22</OPTION> 
                    <OPTION value=23>23</OPTION>
                    </SELECT> 时 </TD></TR>
	              <tr><TD height=15 width=100 nowrap ALIGN="center" VALIGN="middle"  ><FONT color=#ff3300>婚礼持续时间：</FONT></TD>
                <TD height=15 width=200  >
                  <FONT color=#ff3300>
					<SELECT name=marrylong  onchange=showPrice() size=1> 
					<OPTION selected value=1>1</OPTION> 
					<OPTION value=2>2</OPTION> 
					<OPTION  value=3>3</OPTION> 
					<OPTION value=4>4</OPTION> 
					<OPTION value=5>5</OPTION> 
                              <OPTION value=6>6</OPTION> 
                              <OPTION value=7>7</OPTION>
                               <OPTION value=8>8</OPTION> 
                               <OPTION value=9>9</OPTION>
                               <OPTION value=10>10</OPTION> 
                               <OPTION value=11>11</OPTION> 
                              <OPTION value=12>12</OPTION> 
                              <OPTION value=13>13</OPTION>
                               <OPTION value=14>14</OPTION> 
                               <OPTION value=15>15</OPTION> 
                               <OPTION value=16>16</OPTION>
                                <OPTION  value=17>17</OPTION> 
                                <OPTION value=18>18</OPTION> 
                                <OPTION value=19>19</OPTION>
                                 <OPTION value=20>20</OPTION> 
                                 <OPTION value=21>21</OPTION> 
                                 <OPTION value=22>22</OPTION> 
                                 <OPTION value=23>23</OPTION> 
                                 <OPTION value=24>24</OPTION></SELECT> 
                  </FONT>小时  
					</TD>
                <TD height=15 width=200 align="center"  ><input type=hidden type="text" name="longm" size="20" value="<%=longm%>">
                  加成为<%=longm%>
                  </TD></TR>
              <tr><TD height=15 width=100   ALIGN="center" VALIGN="middle" nowrap>
				<FONT color=#ff3300>费用预算:</FONT></TD>
                <TD height=15 width=200 align="center" VALIGN="middle" id=price>&nbsp;</TD>
                <TD height=15 width=200   ALIGN="center" VALIGN="middle" nowrap>&nbsp;</FONT>（你的
				金币：<%=Dvbbs.UserSession.documentElement.selectSingleNode("userinfo/@usermoney").text%>）　</TD>
				</TR>
              <tr><TD colSpan=3 height=20 width="500" ALIGN="center"  >
                   <%if getm("isfriend")=0 then%>
                              
					<button name="submit" type="submit" style="width: 49px; height: 19px">
					提交</button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					<button name="reset" type="reset" style="width: 49px; height: 19px">
					重填</button> 
				<%else 
				       dim marryvot7,vottotal,voty
				       friendlow=getm("friendlow")
				       friend1=getm("friend1")
				       vottotal=rsm7("voty")+rsm7("votn")
				       
				       if vottotal=<0 then vottotal=1
				       voty=rsm7("voty")
				       voty=voty*100
				     
				       marryvot7=cCur(voty) \ cCur(vottotal)
				       marryvot7=int(marryvot7)
  
				       if clng(rsm7("voty"))<clng(friendlow)  then
				          	Response.Write "同意票数不足"&friendlow&"票哦...加油吧!"
				          elseif clng(marryvot7)<clng(friend1) then
				            Response.Write "同意票数没有达到总票数的百分之"&friend1&"哦...加油吧!"
				          else%>        
					<button name="submit" type="submit" style="width: 49px; height: 19px">
					提交</button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					<button name="reset" type="reset" style="width: 49px; height: 19px">
					重填</button>
					<%end if
		       end if%>
					</TD></TR> </TABLE>
	
    </FORM>
    
    
    </TD></TR> 
   </TABLE>

</div>

<%
rsm7.close
set rsm7=nothing
set sqlm7=nothing
end sub
'=======================================结婚登记存储
sub marrydensave()
dim j,rsm7,sqlm7,name7,longm,levelm
dim msg,marrylevel,marrylong,dentimeyear,dentimemonth,dentimeday,dentimehour,dentime,total
  j=Dvbbs.CheckStr(request("id"))
   if j="" then
        SendMsg="<li>参数错误!"
        exit sub
   end if
  msg=Dvbbs.CheckStr(request("msg"))
    if msg="" then
        SendMsg="<li>请填写结婚誓言!"
        exit sub
   end if
  marrylevel=Dvbbs.CheckStr(request("marrylevel"))
    if marrylevel=0 then
        SendMsg="<li>请选择婚礼规格!"
        exit sub
    end if
  marrylong=Dvbbs.CheckStr(request("marrylong"))
    if marrylong="" then
        SendMsg="<li>请选择婚礼时长!"
        exit sub
    end if
  dentimeyear=Dvbbs.CheckStr(request("dentime_year"))
  dentimemonth=Dvbbs.CheckStr(request("dentime_month"))
  dentimeday=Dvbbs.CheckStr(request("dentime_day"))
  dentimehour=Dvbbs.CheckStr(request("dentime_hour"))
   if dentimeyear="" or dentimemonth="" or dentimeday="" or dentimehour="" then
     SendMsg="<li>婚礼开始时间有误!"
        exit sub
    end if
  '=============================================2005-5-1 18:30:00  
  dentime=dentimeyear&"-"&dentimemonth&"-"&dentimeday&" "&dentimehour&":00:00"
  if not IsDate(dentime) then
      SendMsg="<li>婚礼开始时间有误!"
        exit sub   
  end if
  if clng(Datediff("h", now(),dentime))<0 then
      SendMsg="<li>请不要选在过去开始婚礼!"
        exit sub
  end if
  '时间判断结束
  longm=getm("longm")
  levelm=getm("levelm")
  total=marrylevel*levelm+marrylong*longm

  if clng(total)>clng(Dvbbs.UserSession.documentElement.selectSingleNode("userinfo/@usermoney").text) then
     SendMsg="<li>您的金币不足!"
        exit sub
  end if
   
   set rsm7=server.createobject("adodb.recordset")
   sqlm7="select * from m_marry  where marry=1 and marry_id="&j
   rsm7.open sqlm7,connj,1,3
   if rsm7.bof or rsm7.eof then
      SendMsg="<li>!参数错误!"
      rsm7.close
      set rsm7=nothing
      set sqlm7=nothing  
      exit sub
   end if
   if Dvbbs.MemberName=rsm7("forname") then name7=rsm7("toname")
   if Dvbbs.MemberName=rsm7("toname") then name7=rsm7("forname")
   rsm7("msg")=msg
   rsm7("oktime")=dentime 
   rsm7("marry")=9
   rsm7("marrylong")=marrylong
   rsm7("marrylevel")=marrylevel
   
   rsm7.update
   
   
   rsm7.close
   set rsm7=nothing
   set sqlm7=nothing
   
   UpdateUserMoney Dvbbs.membername,-total

   
   sqlm7="insert into dv_message(sender,incept,title,content,sendtime,issend)values('恋爱事务处','"&name7&"','很高兴的通知您：','"&Dvbbs.membername&"已经和您登记结婚了,快去参加婚礼吧!','"&now()&"','1')"
  Dvbbs.execute(sqlm7)
  UPDATE_User_Msg name7
  
  '发布公告，不想要可以注释下一行
  if getm("isann")<>0 then
  call bnew (Dvbbs.membername&"和"&name7&"将于"&dentime&"举行婚礼！","大家都来捧场啊！祝他们幸福美满，万事如意！",Dvbbs.membername)
  end if

   SendMsg="<li>登记成功！您已经结婚了!祝你们幸福!快去请亲朋好友来喝喜酒吧!"
  set sqlm7=nothing
  
end sub
'＝＝＝＝＝＝＝＝＝＝＝公告发布
sub bnew(title,content,username)
          conn.execute("insert into [Dv_BbsNews] (boardid,title,content,username,addtime) values (0,'"&title&"','"&content&"','"&username&"',now())")
end sub

%>