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

<%

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 "list"
 		call list()
  	 case "marryliwusend"
  	    call marryliwusend()
  	 case "marryliwusave"
  	    call marryliwusave()
  	    Send_Msg()
  	 case "marryliwusee" 
  	    call marryliwusee()
  	    
       case else
  	    call listall()
	End select
End Sub

'================================婚礼列表（所有）
sub listall()
    call marrytop()
 
	set rsm=server.createobject("adodb.recordset")
	sqlm="select * from m_marry where marry=9  Order By OKtime Desc"
	rsm.open sqlm,connj,1,3	
    if rsm.bof or rsm.eof then
      %>
      <DIV ALIGN="center">

        <table  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%>
     
     <DIV ALIGN="center">
        <table  rules=none BACKGROUND="Dv_plus/marry/b01.jpg" WIDTH="760" HEIGHT="25" CELLSPACING="0" CELLPADDING="0" BORDER="1" BORDERCOLOR="#FFc7d1" STYLE="border-collapse: collapse">
<TR>
                <TD width="108" align="center" height="20" >
				婚礼规格</TD>
                <TD width="108" align="center" height="20" >
				新郎</TD>
                <TD width="108" align="center" height="20" >
				新娘</TD>
                <TD width="108" align="center" height="20" >
				开始时间</TD>
                <TD width="108" align="center" height="20" >
				结束时间</TD>
                <TD width="108" align="center" height="20" >
				我想送礼</TD>
                <TD width="112" align="center" height="20" >
				查看详细</TD>
           </tr>
              
        </table>
       
       </DIV><%
       do while not rsm.eof
       %>
      <DIV ALIGN="center">
        <table  rules=none BACKGROUND="Dv_plus/marry/b01.jpg" WIDTH="760" HEIGHT="28" CELLSPACING="0" CELLPADDING="0" BORDER="1" BORDERCOLOR="#FFc7d1" STYLE="border-collapse: collapse">
  
           <TR>
                <TD width="108" align="center" height="28"><%=mlevel(rsm("marrylevel"))%>
				　</TD>
                <TD width="108" align="center" height="28"><%
                 if msex(rsm("forname")) =1 then
                    Response.Write rsm("forname")
                    else
                    Response.Write rsm("toname")
                 end if%>
				　</TD>
                <TD width="108" align="center" height="28">　
                <%if msex(rsm("forname")) =0 then
                    Response.Write rsm("forname")
                    else
                    Response.Write rsm("toname")
                 end if%>
                
                </TD>
                <TD width="108" align="center" height="28"><%=rsm("oktime")%></TD>
                <TD width="108" align="center" height="28"><%=dateadd("h",rsm("marrylong"),rsm("oktime"))%></TD>
                <TD width="108" align="center" height="28">
                        <%if Dvbbs.membername=rsm("forname") or Dvbbs.membername=rsm("toname") then
                         response.write "新婚快乐!"
                         else %>
				<A HREF="plus_marry_cabaret.asp?action=marryliwusend&id=<%=rsm("marry_id")%>">送贺礼</A>
				<%end if%>
				</TD>
                <TD width="112" align="center" height="28">
                <%if  rsm("oktime")<now() then%>
                <A HREF="plus_marry_cabaret.asp?action=list&id=<%=(rsm("marrylevel")-1)%>">参加婚礼</A>
		          		          <%else
		          response.write "婚礼筹备中哦"
              end if %>
				</TD>
           </tr>
              
        </table>
                
       </DIV>
     <%

       
       
       rsm.movenext
       loop
   end if
   
   rsm.close
   set rsm=nothing
   set sqlm=nothing



end sub

'================================婚礼单项列表
sub list()
 
  dim j,longm,levelm
  j=Dvbbs.CheckStr(request("id"))
  if j="" then 
  SendMsg="<li>参数错误!!"
       send_msg()             
       exit sub
  end if
  
  call marrytop()
  j=clng(j)+1
  set rsm=server.createobject("adodb.recordset")
  sqlm="select * from m_marry where marry=9 and marrylevel="&j
  
   rsm.open sqlm,connj,1,3				
  if rsm.eof or rsm.bof then
       %> 
         <DIV ALIGN="center">
        <table rules=noneBACKGROUND="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="6" COLOR="#FFc7d1">目前这个规格的婚礼没有人举行</FONT></TD>
           </tr>
              
        </table>
                
       </DIV>
     <%
else
     %><DIV ALIGN="center">
        <table rules=noneBACKGROUND="Dv_plus/marry/b01.jpg" WIDTH="760" HEIGHT="28" 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="6" COLOR="#FFc7d1"><%=mlevel(j)%></FONT></TD>
           </tr>
              
        </table>          
       </DIV>
     <%
     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  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=160 background="Dv_plus/marry/index_bg.jpg" height="250">　</TD>
    <TD vAlign=top width=600 background="Dv_plus/marry/b01.jpg" HEIGHT="250">
    
    <TABLE border=1 borderColor="#FFc7d1"cellPadding=0 cellSpacing=0 
            width="600" 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>	 
                <TD align="center" width="100" height="235" ROWSPAN="5"> 
                  <table frame=void  border="1" width="100%" height="100%" bordercolorlight="#FF9999" cellspacing="0" CELLPADDING="0" STYLE="border-collapse: collapse">
		<!-- MSTableType="nolayout" -->
		<tr>
			<td align="center" width="100%" COLSPAN="2"><b><font color="#FF0066"><%=rsm("forname")%></font></b><BR>
			收到的礼物</td>
		</tr>
		<tr>
			<td align="center" width="50%"><%=rsm("liwuymoney")%><BR>
			金币</td>
			<td align="center" width="50%"><%=rsm("liwuy")%><BR>

			人</td>
		</tr>
		<tr>
			<td align="center" width="100%" COLSPAN="2"><b><font color="#FF0066"><%=rsm("toname")%></font></b><BR>
			收到的礼物</td>
		</tr>
		<tr>
			<td align="center" width="50%"><%=rsm("liwunmoney")%><BR>

			金币</td>
			<td align="center" width="50%"><%=rsm("liwun")%><BR>

			人</td>
		</tr>
		<tr>
			<td align="center" width="100%" height="50" COLSPAN="2"><A HREF=plus_marry_cabaret.asp?action=marryliwusee&id=<%=rsm("marry_id")%>>查看送礼宾客</A></td>
		</tr>
		</table></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"><BR>开始时间<Br><%=rsm("oktime")%><BR><BR>结束时间<br><%=dateadd("h",rsm("marrylong"),rsm("oktime"))%></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="3" WIDTH="320">
                 <% 
                 dim usersex1
                 if Dvbbs.MemberName=rsm("forname") or Dvbbs.MemberName=rsm("toname") then
                          response.write  "<A HREF=plus_marry_list.asp?action=marrycphoto&id="&rsm("marry_id")&">更换照片.</A>"
                       else 
                  response.write "<A HREF=plus_marry_cabaret.asp?action=marryliwusend&id="&rsm("marry_id")&">送贺礼</A>"
                   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 WIDTH="760" HEIGHT="20" BORDER="0" BACKGROUND="Dv_plus/marry/b01.jpg"><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 marrytop()%>
<style type="text/css">
<!--
body {
	font-size: 9pt;
}
table {
	font-size: 9pt;
}

-->
</style>


<SCRIPT LANGUAGE="Javascript">
img1=new Array(8);
img1[0]=new Image; img1[0].src="Dv_plus/marry/index_1.gif";
img1[1]=new Image; img1[1].src="Dv_plus/marry/index_2.gif";
img1[2]=new Image; img1[2].src="Dv_plus/marry/index_3.gif";
img1[3]=new Image; img1[3].src="Dv_plus/marry/index_4.gif";
img1[4]=new Image; img1[4].src="Dv_plus/marry/index_5.gif";
img1[5]=new Image; img1[5].src="Dv_plus/marry/index_6.gif";
img1[6]=new Image; img1[6].src="Dv_plus/marry/index_7.gif";
img1[7]=new Image; img1[7].src="Dv_plus/marry/index_8.gif";
img1[8]=new Image; img1[8].src="Dv_plus/marry/index_9.gif";
img2=new Array(8);
img2[0]=new Image; img2[0].src="Dv_plus/marry/index_1h.gif";
img2[1]=new Image; img2[1].src="Dv_plus/marry/index_2h.gif";
img2[2]=new Image; img2[2].src="Dv_plus/marry/index_3h.gif";
img2[3]=new Image; img2[3].src="Dv_plus/marry/index_4h.gif";
img2[4]=new Image; img2[4].src="Dv_plus/marry/index_5h.gif";
img2[5]=new Image; img2[5].src="Dv_plus/marry/index_6h.gif";
img2[6]=new Image; img2[6].src="Dv_plus/marry/index_7h.gif";
img2[7]=new Image; img2[7].src="Dv_plus/marry/index_8h.gif";
img2[8]=new Image; img2[8].src="Dv_plus/marry/index_9h.gif";

function show(n)
{
if (n==0) document.P0.src=img2[0].src;
if (n==1) document.P1.src=img2[1].src;
if (n==2) document.P2.src=img2[2].src;
if (n==3) document.P3.src=img2[3].src;
if (n==4) document.P4.src=img2[4].src;
if (n==5) document.P5.src=img2[5].src;
if (n==6) document.P6.src=img2[6].src;
if (n==7) document.P7.src=img2[7].src;
if (n==8) document.P8.src=img2[8].src;
}
function hide(n)
{
if (n==0) document.P0.src=img1[0].src;
if (n==1) document.P1.src=img1[1].src;
if (n==2) document.P2.src=img1[2].src;
if (n==3) document.P3.src=img1[3].src;
if (n==4) document.P4.src=img1[4].src;
if (n==5) document.P5.src=img1[5].src;
if (n==6) document.P6.src=img1[6].src;
if (n==7) document.P7.src=img1[7].src;
if (n==8) document.P8.src=img1[8].src;
}
</SCRIPT>


<div align="center">
	<table border="0" width="760" height="0" cellspacing="0" cellpadding="0">
		<!-- MSTableType="nolayout" -->
		<tr>
			<td background="Dv_plus/marry/left.jpg" width="207" height="213">　</td>
			<td width="346" height="213" background="Dv_plus/marry/middle.jpg">　</td>
			<td background="Dv_plus/marry/right.jpg" width="207" height="213">　</td>
		</tr>
		<tr>
			<td colspan="3" width="760" height="26" background="Dv_plus/marry/jiubj.gif">　</td>
		</tr>
	</table>
</div>
<div align="center">
	<table border="0" width="760" height="0" cellspacing="0" cellpadding="0">
		<!-- MSTableType="nolayout" -->
		<tr>
			<td background="Dv_plus/marry/girl.gif" width="171" height="227">　</td>
			<td width="46" height="227" background="Dv_plus/marry/jhbj.gif" align="center">
			<a href="?action=list&id=0" ONMOUSEOVER="show(0);" ONMOUSEOUT="hide(0);">
			<IMG SRC="Dv_plus/marry/index_1.gif" NAME="P0" BORDER=0 HEIGHT=208 WIDTH=38></a></td>
			
			<td width="46" height="227" background="Dv_plus/marry/jhbj.gif" align="center">
			<a href="?action=list&id=1" ONMOUSEOVER="show(1);" ONMOUSEOUT="hide(1);">
			<IMG SRC="Dv_plus/marry/index_2.gif" NAME="P1" BORDER=0 HEIGHT=208 WIDTH=38></a></td>
			
            <td width="46" height="227" background="Dv_plus/marry/jhbj.gif" align="center">
			<a href="?action=list&id=2" ONMOUSEOVER="show(2);" ONMOUSEOUT="hide(2);">
			<IMG SRC="Dv_plus/marry/index_3.gif" NAME="P2" BORDER=0 HEIGHT=208 WIDTH=38></a></td>
			
			<td width="46" height="227" background="Dv_plus/marry/jhbj.gif" align="center">
			<a href="?action=list&id=3" ONMOUSEOVER="show(3);" ONMOUSEOUT="hide(3);">
			<IMG SRC="Dv_plus/marry/index_4.gif" NAME="P3" BORDER=0 HEIGHT=208 WIDTH=38></a></td>
			
			<td width="46" height="227" background="Dv_plus/marry/jhbj.gif" align="center">
			<a href="?action=list&id=4" ONMOUSEOVER="show(4);" ONMOUSEOUT="hide(4);">
			<IMG SRC="Dv_plus/marry/index_5.gif" NAME="P4" BORDER=0 HEIGHT=208 WIDTH=38></a></td>
			
			<td width="46" height="227" background="Dv_plus/marry/jhbj.gif" align="center">
			<a href="?action=list&id=5" ONMOUSEOVER="show(5);" ONMOUSEOUT="hide(5);">
			<IMG SRC="Dv_plus/marry/index_6.gif" NAME="P5" BORDER=0 HEIGHT=208 WIDTH=38></a></td>
			
			<td width="46" height="227" background="Dv_plus/marry/jhbj.gif" align="center">
			<a href="?action=list&id=6" ONMOUSEOVER="show(6);" ONMOUSEOUT="hide(6);">
			<IMG SRC="Dv_plus/marry/index_7.gif" NAME="P6" BORDER=0 HEIGHT=208 WIDTH=38></a></td>
			
			<td width="46" height="227" background="Dv_plus/marry/jhbj.gif" align="center">
			<a href="?action=list&id=7" ONMOUSEOVER="show(7);" ONMOUSEOUT="hide(7);">
			<IMG SRC="Dv_plus/marry/index_8.gif" NAME="P7" BORDER=0 HEIGHT=208 WIDTH=38></a></td>
			
			<td width="46" height="227" background="Dv_plus/marry/jhbj.gif" align="center">
			<a href="?action=list&id=8" ONMOUSEOVER="show(8);" ONMOUSEOUT="hide(8);">
			<IMG SRC="Dv_plus/marry/index_9.gif" NAME="P8" BORDER=0 HEIGHT=208 WIDTH=38></a></td>
			
            <td background="Dv_plus/marry/boy1.gif" width="171" height="227">　</td>
		</tr>
		<tr>
			<td colspan="11" width="760" height="20" background="Dv_plus/marry/b01.jpg">　</td>
		</tr>
	</table>
</div>
<%end sub


'=================================婚礼规格函数

function mlevel(k)

 dim j(8)
 j(0)="一心一意"
 j(1)="比翼双飞"
 j(2)="三生有幸"
 j(3)="海誓山盟"
 j(4)="五彩缤纷"
 j(5)="流光飞舞"
 j(6)="郎情妾意"
 j(7)="白头偕老"
 j(8)="天长地久"
 mlevel=j(k-1)
 
end function

'==============================查看性别函数
function msex(k)
	dim usersex1
	set usersex1=Dvbbs.Execute("select usersex from dv_user where username='"&k&"'")
    msex=usersex1(0)
end function


'======================================marry送礼表格子程序
sub marryliwusend()
dim j,name7,rsm7,sqlm7
  j=Dvbbs.CheckStr(request("id"))
  if j="" then
     SendMsg="<li>参数错误！"
     Send_Msg()
     exit sub
  end if
   set rsm7=server.createobject("adodb.recordset")
   sqlm7="select * from m_marry  where marry_id="&j
   rsm7.open sqlm7,connj,1,1
  if Dvbbs.membername=rsm7("forname") or Dvbbs.membername=rsm7("toname") then
     rsm7.close
     set rsm7=nothing
     set sqlm7=nothing
     SendMsg="<li>参数错误！"
     Send_Msg()
     exit sub
  end if
 
  
  %>
  <DIV ALIGN="center">
     <FORM METHOD="POST" ACTION="plus_marry_cabaret.asp?action=marryliwusave&id=<%=j%>" NAME="marry_liwusend">
        <table BACKGROUND="Dv_plus/marry/b01.jpg" WIDTH="760" HEIGHT="160" BORDERCOLORLIGHT="#FF00FF" BORDERCOLORDARK="#FF00FF" BORDER="1" STYLE="border-collapse: collapse">   
           <TR>
                <TD width="760" align="center" height="50" COLSPAN="3">
				<FONT FACE="华文行楷" SIZE="6" COLOR="#FFc7d1">送贺礼给一对新人</FONT></TD>
           </tr>
              
           <TR>
                <TD width="250" align="center" height="40">送给 <b><font color="#FFc7d1"><%=rsm7("forname")%></font></b></TD>
                <TD width="250" align="center" height="40"><INPUT TYPE="text" NAME="liwuymoney" SIZE="20" VALUE="0">金币</TD>
                <TD width="260" align="center" height="80" ROWSPAN="2">
您现在有<BR><%=Dvbbs.MyUserInfo(37)%><BR>金币</TD>
           </tr>
              
           <TR>
                <TD width="250" align="center" height="40">送给 <b><font color="#FFc7d1"><%=rsm7("toname")%></font></b></TD>
                <TD width="250" align="center" height="40"><INPUT TYPE="text" NAME="liwunmoney" SIZE="20" VALUE="0">金币</TD>
           </tr>
              
           <TR>
                <TD width="100%" align="center" height="30" COLSPAN="3">
				<BUTTON NAME="submit" TYPE="submit" >提交</BUTTON>
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				<BUTTON NAME="retset" TYPE="reset">重填</BUTTON></TD>  
           </tr>
              
        </table>
        </FORM>        
       </DIV>


  <%

     rsm7.close
     set rsm7=nothing
     set sqlm7=nothing
end sub


'=======================================marry送礼SAVE子程序
sub marryliwusave()
dim j,rsm7,sqlm7,liwuymoney,liwunmoney,liwut,forname,toname
  j=Dvbbs.CheckStr(request("id"))
  liwuymoney=Dvbbs.CheckStr(request("liwuymoney"))
  liwunmoney=Dvbbs.CheckStr(request("liwunmoney"))
  if liwuymoney="" or liwunmoney="" or j=""  then
     SendMsg="<li>参数错误!!!!!!"
     exit sub
  end if
  if liwuymoney=0 and liwunmoney=0 then
    SendMsg="<li>没有送出金币！"
     exit sub
  end if
  liwut=(clng(liwuymoney)+clng(liwunmoney))
  if liwut>clng(Dvbbs.MyUserInfo(37)) 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	
    
   forname=rsm7("forname")
   toname=rsm7("toname")
    if Dvbbs.membername=rsm7("forname") or Dvbbs.membername=rsm7("toname") then
     rsm7.close
     set rsm7=nothing
     set sqlm7=nothing
     SendMsg="<li>参数错误！"
     Send_Msg()
     exit sub
    end if

   if liwuymoney<>0 then
   rsm7("liwuy")=clng(rsm7("liwuy"))+1
   rsm7("liwuymoney")=clng(rsm7("liwuymoney"))+clng(liwuymoney)
   rsm7("liwuyname")=rsm7("liwuyname")&Dvbbs.membername&"@"&liwuymoney&"|"
   end if
   if liwunmoney<>0 then
   rsm7("liwun")=clng(rsm7("liwun"))+1
   rsm7("liwunmoney")=clng(rsm7("liwunmoney"))+clng(liwunmoney)
   rsm7("liwunname")=rsm7("liwunname")&Dvbbs.membername&"@"&liwunmoney&"|"
   end if
   rsm7.update
   rsm7.close
   set rsm7=nothing
   set sqlm7=nothing
  
  if liwuymoney<>0 then
          UpdateUserMoney forname,liwuymoney
  end if
  if liwunmoney<>0 then
         UpdateUserMoney toname,liwunmoney 
  end if
         UpdateUserMoney Dvbbs.MemberName,-liwut 
  SendMsg="<li>送礼成功！您的金币减少"&liwut&"!"
  
end sub

'=======================================marry送礼查看子程序
sub marryliwusee()
  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("liwuyname")
   noname=rsm7("liwunname")
   

   if okname<>"" then 
   okname=replace(okname,"|","<br>")
   okname=replace(okname,"@","    ")
   end if
   if noname<>"" then
   noname=replace(noname,"|","<br>")
   noname=replace(noname,"@","    ")
   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" >送礼给<%=rsm7("forname")%>的会员</TD>
			<TD ALIGN="center" width="380">送礼给<%=rsm7("toname")%>的会员</TD></TR>
		
		<TR><TD height="11" align="center">&nbsp;<br><%=okname%>&nbsp;</TD>
			<TD height="11" align="center">&nbsp;<br><%=noname%>&nbsp;</TD>
		</TR>
		
		<TR><TD height="11" align="center">总计<%=rsm7("liwuymoney")%>金币</TD>
			<TD height="11" align="center">总计<%=rsm7("liwunmoney")%>金币</TD>
		</TR>
		
	</TABLE>
	</div>

	<%
    rsm7.close
   set rsm7=nothing
   set sqlm7=nothing
end sub


%>