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

<%

dim admin_flag,i
admin_flag=",36,"
if not Dvbbs.master  then
	sendmsg="<BR><li>本页面为管理员专用，请<a href=admin_login.asp target=_top>登录</a>后进入。<br><li>您没有管理本页面的权限。"
	send_msg()
Else
      admin_nav() 
	Call main()
	
End if


Sub main()
	Select Case request("action")
      	case "saveconfig"
 			Call Saveconfig()
 		 	Send_Msg()
 		case "lovelist"
 			Call lovelist()
 		case "lovelist_del" 	 	
 		       lovelist_del()
 		        Send_Msg()
 		case "lovelist_edit" 	 	
 		       lovelist_edit()
 		        Send_Msg()
        
 	 	
 		case "marrylist"
 			Call marrylist()
 		case "marrylist_del" 	 	
 		       marrylist_del()
 		        Send_Msg()
 		case "marrylist_edit" 	 	
 		       marrylist_edit()
 		        Send_Msg()
 			
		Case Else
			getconfig()
            	Call Info()		
	End Select 
End Sub

sub admin_nav()%>
<style type="text/css">
<!--
body {
	font-size: 9pt;
}
table {
	font-size: 9pt;
}
input {
	background-color: #FFFFFF;
	border: 1px solid #CCCCCC;
}
-->
</style>
   <TABLE BORDER="1" WIDTH="100%" HEIGHT="30" BORDERCOLORLIGHT="#000080" BORDERCOLORDARK="#808080">
		<TR>
			<TD ALIGN="center" HEIGHT="30"><A HREF="plus_marry_admin.asp">婚姻中心基本设置</A></TD>
			<TD ALIGN="center"><A HREF="plus_marry_admin.asp?action=lovelist">恋爱列表管理</A></TD>
			<TD ALIGN="center"><A HREF="plus_marry_admin.asp?action=marrylist">婚姻列表管理</A></TD>
		</TR>
</TABLE><%
end sub
'======================================恋爱列表
sub lovelist()
     set rsm=server.createobject("adodb.recordset")
     sqlm="select * from m_love  Order By addtime Desc"
	rsm.open sqlm,connj,1,3				
if rsm.eof or rsm.bof then
       %> 
       <br>
         <DIV ALIGN="center">
        <table WIDTH="100%" HEIGHT="35" BORDERCOLORLIGHT="#000080" BORDERCOLORDARK="#808080" BORDER="1">   
           <TR>
                <TD width="100%" align="center" height="24" colspan=3>没有记录</TD>
           </tr>
              
        </table>
                
       </DIV>
     <%
else
     dim ipagecount,curpage,i,strurl
       rsm.PageSize=10                '设置单页的数据记录数 
       iPageCount=rsm.PageCount      '定义了一个页码数量的变量 
         If Len(Request.QueryString("Page"))=0 Then 
               CurPage=1 
                       Else 
               CurPage=CInt(Request.Querystring("Page")) 
         End If 
       rsm.AbsolutePage=CurPage           '得到当前的页码 
     %>
     <br>
     <TABLE border=1 cellPadding=0 cellSpacing=1 width="100%" height="20" BORDERCOLORLIGHT="#000080" BORDERCOLORDARK="#808080"><TR>	  	
               <TD width="15%" align="center" HEIGHT="25" >FORNAME</TD>
               <TD width="15%" align="center" >TONAME</TD>
               <TD width="45%" align="center" >目前状态</TD>
               <TD width="13%" align="center" >编辑</TD>
               <TD width="12%" align="center" >删除</TD>
		 </TR>  
     </TABLE>
     <%
     i=0
     do while (not rsm.eof) 
     i=i+1
     %>
     <br>
     <TABLE border=0 cellPadding=0 cellSpacing=0 width="100%" height="25">
     <FORM METHOD="POST" ACTION="plus_marry_admin.asp?action=lovelist_edit&id=<%=rsm("love_id")%>" NAME="love_list" STYLE="margin-top: 0; margin-bottom: 0">
     <TR>	  	
               <TD width="15%" align="center" HEIGHT="25" ><%=rsm("forname")%></TD>
               <TD width="15%" align="center" ><%=rsm("toname")%></TD>
               <TD width="45%" align="center" ><SELECT SIZE="1" NAME="lovetype">
				<OPTION VALUE="0" <%if rsm("love")=0 then response.write "SELECTED"%>>求爱中,等待同意</OPTION>
				<OPTION VALUE="1" <%if rsm("love")=1 then response.write "SELECTED"%>>恋人关系</OPTION>
				<OPTION VALUE="2" <%if rsm("love")=2 then response.write "SELECTED"%>>求爱被拒</OPTION>
				<OPTION VALUE="3" <%if rsm("love")=3 then response.write "SELECTED"%>>求爱过期</OPTION>
				<OPTION VALUE="4" <%if rsm("love")=4 then response.write "SELECTED"%>>FORNAME提出分手</OPTION>
				<OPTION VALUE="5" <%if rsm("love")=5 then response.write "SELECTED"%>>TONAME提出分手</OPTION>
				<OPTION VALUE="6" <%if rsm("love")=6 then response.write "SELECTED"%>>对方同意,两人已分手</OPTION>
				<OPTION VALUE="7" <%if rsm("love")=7 then response.write "SELECTED"%>>分手判决时间已过,两人已分手</OPTION>
				</SELECT></TD>
               <TD width="13%" align="center" >
				<INPUT TYPE="submit" VALUE="提交" NAME="submit">
				<INPUT TYPE="reset" VALUE="重置" NAME="reset"></TD>
               <TD width="12%" align="center" ><A HREF="plus_marry_admin.asp?action=lovelist_del&id=<%=rsm("love_id")%>" onclick='javascript: return confirm("你确定要删除吗? ");'>删除</A></TD></TR>  
         </FORM>    
             </TABLE>
        
     <%
  if i>=rsm.PageSize then exit do
  rsm.movenext
loop
  %>
  <table WIDTH="100%" HEIGHT="20" BORDER="1" BORDERCOLORLIGHT="#000080" BORDERCOLORDARK="#808080"><TR>
  <TD ALIGN="right" HEIGHT="20" WIDTH="360">总共有<%=rsm.RecordCount%>条记录</TD>
  <TD ALIGN="right" WIDTH="400">&nbsp;
    <%if rsm.recordcount>rsm.pagesize then
          strUrl="?action=lovelist" 
          ShowPageBar iPageCount,CurPage,strUrl 
    end if%>               
  </TD></TR></table>
  <%
end if

rsm.close
set rsm=nothing
set sqlm=nothing
end sub
'=======================================恋爱编辑子程序
sub lovelist_edit()
  dim j,forname,toname,rsm7,sqlm7,k
  j=Dvbbs.CheckStr(request("id"))
  k=Dvbbs.CheckStr(request("lovetype"))
  
   set rsm7=server.createobject("adodb.recordset")
   sqlm7="select * from m_love  where love_id="&j
   rsm7.open sqlm7,connj,1,3	
   	if rsm7.eof or rsm7.bof then
   	     			rsm7.close
             		set rsm7=nothing
             		set sqlm7=nothing
             	      exit sub
           end if

        if clng(k)=clng(rsm7("love")) then
             SendMsg="<li>资料无任何改变!"
             rsm7.close
             set rsm7=nothing
             set sqlm7=nothing
             exit sub
        end if
   forname=rsm7("forname")
   toname=rsm7("toname")
        rsm7("love")=k
        if IsNull(rsm7("oktime")) then rsm7("oktime")=now()
        if IsNull(rsm7("fentime")) then rsm7("fentime")=now()
        if IsNull(rsm7("lovephoto")) then rsm7("lovephoto")="dv_plus/marry/lovephoto.jpg"
        if IsNull(rsm7("msgfen")) then rsm7("msgfen")="管理员干预"
   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&"改变了你和"&toname&"的恋爱状态','"&now()&"','1')"
  Dvbbs.execute(sqlm7)
  UPDATE_User_Msg forname

  sqlm7="insert into dv_message(sender,incept,title,content,sendtime,issend)values('恋爱管理处','"&toname&"','通知：','管理员"&Dvbbs.membername&"改变了你和"&forname&"的恋爱状态','"&now()&"','1')"
  Dvbbs.execute(sqlm7)
  UPDATE_User_Msg toname
  
      
  SendMsg="<li>编辑成功 "&forname&" 和 "&toname&" 已经收到短消息通知!"
  set sqlm7=nothing

end sub

'==========================恋爱删除
sub lovelist_del()
        dim j,forname,toname,rsm7,sqlm7,k
  		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
   		if rsm7.eof or rsm7.bof then
   	     			rsm7.close
             		set rsm7=nothing
             		set sqlm7=nothing
             		  sendmsg="记录已经被删除"
             	      exit sub
         end if

         forname=rsm7("forname")
   		 toname=rsm7("toname")
         '删除合影文件
         dim oldfilename,delold
         oldfilename=rsm7("lovephoto")
         delold=deloldfile("love"&j,oldfilename)
         
             rsm7.close
             set rsm7=nothing
             set sqlm7=nothing

        sqlm7 = "Delete  From m_love Where love_id="&Request("id")
        connj.Execute(sqlm7)
        
        	sqlm7="insert into dv_message(sender,incept,title,content,sendtime,issend)values('恋爱管理处','"&forname&"','通知：','管理员"&Dvbbs.membername&"删除了你和"&toname&"的恋爱信息','"&now()&"','1')"
  Dvbbs.execute(sqlm7)
  UPDATE_User_Msg forname

  		sqlm7="insert into dv_message(sender,incept,title,content,sendtime,issend)values('恋爱管理处','"&toname&"','通知：','管理员"&Dvbbs.membername&"删除了你和"&forname&"的恋爱信息','"&now()&"','1')"
  Dvbbs.execute(sqlm7)
  UPDATE_User_Msg toname

        sendmsg=SendMsg+"<br>"+"<li>删除成功 "&forname&" 和 "&toname&" 已经收到短消息通知!"
end sub

'======================================婚姻列表
sub marrylist()
     set rsm=server.createobject("adodb.recordset")
     sqlm="select * from m_marry  Order By addtime Desc"
	rsm.open sqlm,connj,1,3				
if rsm.eof or rsm.bof then
       %> 
       <br>
         <DIV ALIGN="center">
        <table WIDTH="100%" HEIGHT="35" BORDERCOLORLIGHT="#000080" BORDERCOLORDARK="#808080" BORDER="1">   
           <TR>
                <TD width="100%" align="center" height="24" colspan=3>没有记录</TD>
           </tr>
              
        </table>
                
       </DIV>
     <%
else
     dim ipagecount,curpage,i,strurl
       rsm.PageSize=10                '设置单页的数据记录数 
       iPageCount=rsm.PageCount      '定义了一个页码数量的变量 
         If Len(Request.QueryString("Page"))=0 Then 
               CurPage=1 
                       Else 
               CurPage=CInt(Request.Querystring("Page")) 
         End If 
       rsm.AbsolutePage=CurPage           '得到当前的页码 
     %>
     <br>
     <TABLE border=1 cellPadding=0 cellSpacing=1 width="100%" height="20" BORDERCOLORLIGHT="#000080" BORDERCOLORDARK="#808080"><TR>	  	
               <TD width="15%" align="center" HEIGHT="25" >FORNAME</TD>
               <TD width="15%" align="center" >TONAME</TD>
               <TD width="45%" align="center" >目前状态</TD>
               <TD width="13%" align="center" >编辑</TD>
               <TD width="12%" align="center" >删除</TD>
		 </TR>  
     </TABLE>
     <%
     i=0
     do while (not rsm.eof) 
     i=i+1
     %>
     <br>
     <TABLE border=0 cellPadding=0 cellSpacing=0 width="100%" height="25">
     <FORM METHOD="POST" ACTION="plus_marry_admin.asp?action=marrylist_edit&id=<%=rsm("marry_id")%>" NAME="marry_list" STYLE="margin-top: 0; margin-bottom: 0">
     <TR>	  	
               <TD width="15%" align="center" HEIGHT="25" ><%=rsm("forname")%></TD>
               <TD width="15%" align="center" ><%=rsm("toname")%></TD>
               <TD width="45%" align="center" ><SELECT SIZE="1" NAME="marrytype">
				<OPTION VALUE="0" <%if rsm("marry")=0 then response.write "SELECTED"%>>求婚中,等待同意</OPTION>
				<OPTION VALUE="1" <%if rsm("marry")=1 then response.write "SELECTED"%>>订婚状态(求婚被接受,尚未登记)</OPTION>
				<OPTION VALUE="2" <%if rsm("marry")=2 then response.write "SELECTED"%>>求婚被拒</OPTION>
				<OPTION VALUE="3" <%if rsm("marry")=3 then response.write "SELECTED"%>>求婚过期</OPTION>
				<OPTION VALUE="4" <%if rsm("marry")=4 then response.write "SELECTED"%>>FORNAME提出离婚</OPTION>
				<OPTION VALUE="5" <%if rsm("marry")=5 then response.write "SELECTED"%>>TONAME提出离婚</OPTION>
				<%if getm("isfayuan")=0 then%>
				<OPTION VALUE="6" <%if rsm("marry")=6 then response.write "SELECTED"%>>对方同意,两人已离婚</OPTION>
				<%else%>
				<OPTION VALUE="6" <%if rsm("marry")=6 then response.write "SELECTED"%>>法院判决,两人已离婚</OPTION>
				<%end if%>
				<OPTION VALUE="7" <%if rsm("marry")=7 then response.write "SELECTED"%>>离婚判决时间已过,两人已离婚</OPTION>
				<OPTION VALUE="8" <%if rsm("marry")=8 then response.write "SELECTED"%>>婚礼完成,已经成婚</OPTION>
				<OPTION VALUE="9" <%if rsm("marry")=9 then response.write "SELECTED"%>>已经登记,准备婚礼或婚礼进行中</OPTION>
				</SELECT></TD>
               <TD width="13%" align="center" >
				<INPUT TYPE="submit" VALUE="提交" NAME="submit">
				<INPUT TYPE="reset" VALUE="重置" NAME="reset"></TD>
               <TD width="12%" align="center" ><A HREF="plus_marry_admin.asp?action=marrylist_del&id=<%=rsm("marry_id")%>" onclick='javascript: return confirm("你确定要删除吗? ");'>删除</A></TD></TR>  
         </FORM>    
             </TABLE>
        
     <%
  if i>=rsm.PageSize then exit do
  rsm.movenext
loop
  %>
  <table WIDTH="100%" HEIGHT="20" BORDER="1" BORDERCOLORLIGHT="#000080" BORDERCOLORDARK="#808080"><TR>
  <TD ALIGN="right" HEIGHT="20" WIDTH="360">总共有<%=rsm.RecordCount%>条记录</TD>
  <TD ALIGN="right" WIDTH="400">&nbsp;
    <%if rsm.recordcount>rsm.pagesize then
          strUrl="?action=marrylist" 
          ShowPageBar iPageCount,CurPage,strUrl 
    end if%>               
  </TD></TR></table>
  <%
end if

rsm.close
set rsm=nothing
set sqlm=nothing
end sub
'=======================================婚姻编辑子程序
sub marrylist_edit()
  dim j,forname,toname,rsm7,sqlm7,k
  j=Dvbbs.CheckStr(request("id"))
  k=Dvbbs.CheckStr(request("marrytype"))
  
   set rsm7=server.createobject("adodb.recordset")
   sqlm7="select * from m_marry  where marry_id="&j
   rsm7.open sqlm7,connj,1,3	
   		if rsm7.eof or rsm7.bof then
   	     			rsm7.close
             		set rsm7=nothing
             		set sqlm7=nothing
             	      exit sub
           end if
	
        if clng(k)=clng(rsm7("marry")) then
             SendMsg="<li>资料无任何改变!"
             rsm7.close
             set rsm7=nothing
             set sqlm7=nothing
             exit sub
        end if
   forname=rsm7("forname")
   toname=rsm7("toname")
        rsm7("marry")=k
        if k=8 or k=9 then rsm7("oktime")=now()
        if IsNull(rsm7("oktime")) then rsm7("oktime")=now()
        if IsNull(rsm7("fentime")) then rsm7("fentime")=now()
        if IsNull(rsm7("marryphoto")) then rsm7("marryphoto")="dv_plus/marry/marryphoto.jpg"
        if IsNull(rsm7("msgfen")) then rsm7("msgfen")="管理员干预"
        if IsNull(rsm7("marrylong")) or rsm7("marrylong")="0" then rsm7("marrylong")="6"
        if IsNull(rsm7("marrylevel")) or rsm7("marrylevel")="0" then rsm7("marrylevel")="6"
 
   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&"改变了你和"&toname&"的婚姻状态','"&now()&"','1')"
  Dvbbs.execute(sqlm7)
  UPDATE_User_Msg forname

  sqlm7="insert into dv_message(sender,incept,title,content,sendtime,issend)values('婚姻管理处','"&toname&"','通知：','管理员"&Dvbbs.membername&"改变了你和"&forname&"的婚姻状态','"&now()&"','1')"
  Dvbbs.execute(sqlm7)
  UPDATE_User_Msg toname
  
      
  SendMsg="<li>编辑成功 "&forname&" 和 "&toname&" 已经收到短消息通知!"
  set sqlm7=nothing

end sub

'==========================婚姻删除
sub marrylist_del()
          dim j,forname,toname,rsm7,sqlm7,k
  		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
   		if rsm7.eof or rsm7.bof then
   	     			rsm7.close
             		set rsm7=nothing
             		set sqlm7=nothing
             		  sendmsg="记录已经被删除"
             	      exit sub
         end if

         forname=rsm7("forname")
   		 toname=rsm7("toname")
         '删除合影文件
         dim oldfilename,delold
         oldfilename=rsm7("marryphoto")
         delold=deloldfile("marry"&j,oldfilename)
   	         	
         forname=rsm7("forname")
   		 toname=rsm7("toname")

             rsm7.close
             set rsm7=nothing
             set sqlm7=nothing

        sqlm7 = "Delete  From m_marry Where marry_id="&Request("id")
        connj.Execute(sqlm7)
        
        	sqlm7="insert into dv_message(sender,incept,title,content,sendtime,issend)values('婚姻管理处','"&forname&"','通知：','管理员"&Dvbbs.membername&"删除了你和"&toname&"的婚姻信息','"&now()&"','1')"
  Dvbbs.execute(sqlm7)
  UPDATE_User_Msg forname

  		sqlm7="insert into dv_message(sender,incept,title,content,sendtime,issend)values('婚姻管理处','"&toname&"','通知：','管理员"&Dvbbs.membername&"删除了你和"&forname&"的婚姻信息','"&now()&"','1')"
  Dvbbs.execute(sqlm7)
  UPDATE_User_Msg toname

        sendmsg=SendMsg+"<br>"+"<li>删除成功 "&forname&" 和 "&toname&" 已经收到短消息通知!"
end sub




'================================管理列表
Sub Info()%>
	<br>
	<DIV ALIGN="center">
	<table width="100%" cellspacing="1" cellpadding="5" class=tableBorder BORDERCOLORLIGHT="#000080" BORDER="1" BORDERCOLORDARK="#808080">
		<!-- MSTableType="nolayout" -->
		<form action="?action=saveconfig" method="POST">
		<tr height=25>
			<th colspan="2"><font color="#0000FF">婚姻中心基本设置(请大家提交设置时绝对不要写错格式.否则会引起错误)</font></th>
		</tr>
		
		<tr height=25 valign=middle>
			<td width="20%" class=forumrowhighlight align=right>是否启用虚拟形象&nbsp;</td>
			<td class=forumrow width="78%">
			<input type=text name="isvisual" size=10 value="<%=isvisual%>">
			&nbsp; （这一选项目前没有什么用处,0为不启用,1为启用,下同.）</td>
		</tr>
		<tr height=25 valign=middle>
			<td width="20%" class=forumrowhighlight align=right>登记结婚后是否发布论坛公告&nbsp;</td>
			<td class=forumrow width="78%">
			<input type=text name="isann" size=10 value="<%=isann%>">
			&nbsp; （论坛首页公告功能.0为不发,1为发.这里指论坛的公告.不是插件的首页显示.）</td>
		</tr>
            <tr height=25 valign=middle>
			<td width="20%" class=forumrowhighlight align=right>是否必须法院才能离婚</td>
			<td class=forumrow width="78%">
			<input type=text name="isfayuan" size=10 value="<%=isfayuan%>">
			&nbsp; （是否通过法院才能离婚,0为不需要法院,1为必须有法院.）</td>
		</tr>

		<tr height=25 valign=middle>
			<td width="98%" class=forumrowhighlight align=center colspan="2">
			<font color="#FF0000">亲友团相关设置</font></td>
		</tr>

		
		<tr height=25 valign=middle>
			<td width="20%" class=forumrowhighlight align=right>是否开启亲友团功能&nbsp;</td>
			<td class=forumrow width="78%">
			<input type=text name="isfriend" size=10 value="<%=isfriend%>">&nbsp;&nbsp; 
			（指是否同意票数达到一定比例才允许登记结婚. 0为关闭,1 为开启.）</td>
		</tr>
            <tr height=25 valign=middle>
			<td width="20%" class=forumrowhighlight align=right>
			同意最低票数</td>
			<td class=forumrow width="78%">
			<input type=text name="friendlow" size=30 value="<%=friendlow%>">&nbsp;&nbsp; 
			（指同意票数达到 几才能结婚，在上面一项为1时有效）</td>
		</tr>
		 <tr height=25 valign=middle>
			<td width="20%" class=forumrowhighlight align=right>
			同意票数百分比</td>
			<td class=forumrow width="78%">
			<input type=text name="friend1" size=30 value="<%=friend1%>">&nbsp;&nbsp; （指同意票数达到百分之多少才能结婚，在
			上面一项为1时有效,大于零,小于100）</td>
		</tr>
       <tr height=25 valign=middle>
			<td width="98%" class=forumrowhighlight align=center colspan="2">
			<font color="#FF0000">时间相关设置</font></td>
		</tr>
		<tr height=25 valign=middle>
			<td width="20%" class=forumrowhighlight align=right>
			求爱过期时间</td>
			<td class=forumrow width="78%">
			<input type=text name="lovepass" size=30 value="<%=lovepass%>">(小时)</td>
		</tr>

		
		<tr height=25 valign=middle>
			<td width="20%" class=forumrowhighlight align=right>
			求婚过期时间</td>
			<td class=forumrow width="78%">
			<input type=text name="marrypass" size=30 value="<%=marrypass%>">(小时)</td>
		</tr>

		<tr height=25 valign=middle>
			<td width="20%" class=forumrowhighlight align=right>
			分手,离婚宣判过期时间</td>
			<td class=forumrow width="78%">
			<input type=text name="lipass" size=30 value="<%=lipass%>">&nbsp;(小时,过期自动判
			为分手或离婚）</td>
		</tr>
        <tr height=25 valign=middle>
			<td width="20%" class=forumrowhighlight align=right>
			恋爱阶段图片</td>
			<td class=forumrow width="78%">
			<input type=text name="lovetitle" size=50 value="<%=lovetitle%>">用|分隔，请上下对应.(这里要注意.| 
			分隔的数目上下要对应.)</td>
		</tr>
		<tr height=25 valign=middle>
			<td width="20%" class=forumrowhighlight align=right>
			恋爱时段&nbsp;</td>
			<td class=forumrow width="78%">
			<input type=text name="lovetime" size=50 value="<%=lovetime%>">用|分隔，请上下对应</td>
		</tr>
	    <tr height=25 valign=middle>
			<td width="20%" class=forumrowhighlight align=right>
			婚姻阶段图片&nbsp;</td>
			<td class=forumrow width="78%">
			<input type=text name="marrytitle" size=50 value="<%=marrytitle%>">用|分隔，请上下对应(这里要注意.| 
			分隔的数目上下要对应.)</td>
		</tr>
		<tr height=25 valign=middle>
			<td width="20%" class=forumrowhighlight align=right>
			婚姻时段&nbsp;</td>
			<td class=forumrow width="78%">
			<input type=text name="marrytime" size=50 value="<%=marrytime%>">用|分隔，请上下对应</td>
		</tr>
		<tr height=25 valign=middle>
			<td width="98%" class=forumrowhighlight align=center colspan="2">
			<font color="#FF0000">思想道德相关设置</font></td>
		</tr>
		
		<tr height=25 valign=middle>
			<td width="20%" class=forumrowhighlight align=right>是否允许多人恋爱&nbsp;</td>
			<td class=forumrow width="78%">
			<input type=text name="islovemore" size=10 value="<%=islovemore%>">
			&nbsp; （即是否允许脚踩N只船）(0为不允许, 1 为允许 ,以下都是这样)</td>
		</tr>

        <tr height=25 valign=middle>
			<td width="20%" class=forumrowhighlight align=right>是否允许多夫多妻&nbsp;</td>
			<td class=forumrow width="78%">
			<input type=text name="ismarrymore" size=10 value="<%=ismarrymore%>">
			&nbsp; （即是否允许三妻四妾或面首无数）</td>
		</tr>

		<tr height=25 valign=middle>
			<td width="20%" class=forumrowhighlight align=right>是否允许婚外情&nbsp;</td>
			<td class=forumrow width="78%">
			<input type=text name="isml" size=10 value="<%=isml%>">
			&nbsp; （即是否允许有配偶同时有恋人）</td>
		</tr>

		<tr height=25 valign=middle>
			<td width="20%" class=forumrowhighlight align=right>是否允许同性恋&nbsp;</td>
			<td class=forumrow width="78%">
			<input type=text name="isbl" size=10 value="<%=isbl%>">
			&nbsp; （这个。。你看着办）</td>
		</tr>
        <tr height=25 valign=middle>
			<td width="98%" class=forumrowhighlight align=center colspan="2">
			<font color="#FF0000">删除条目相关设置</font></td>
		</tr>

		<tr height=25 valign=middle>
			<td width="20%" class=forumrowhighlight align=right>过期后是否自动删除&nbsp;</td>
			<td class=forumrow width="78%">
			<input type=text name="ispassdel" size=20 value="<%=ispassdel%>">
			&nbsp; （设为0为不自动删除,信息会保留并显示, 直到有人出金币将其删除.）</td>
		</tr>
        
        <tr height=25 valign=middle>
			<td width="20%" class=forumrowhighlight align=right>拒绝后是否自动删除&nbsp;</td>
			<td class=forumrow width="78%">
			<input type=text name="isnodel" size=20 value="<%=isnodel%>">
			&nbsp; （同上）</td>
		</tr>

		<tr height=25 valign=middle>
			<td width="20%" class=forumrowhighlight align=right>离婚,分手后信息是否自动删除&nbsp;</td>
			<td class=forumrow width="78%">
			<input type=text name="isfendel" size=20 value="<%=isfendel%>">
			&nbsp; （同上）</td>
		</tr>

            <tr height=25 valign=middle>
			<td width="20%" class=forumrowhighlight align=right>离婚,分手后信息删除需要&nbsp;</td>
			<td class=forumrow width="78%">
			<input type=text name="delfengmoney" size=20 value="<%=delfengmoney%>">&nbsp; 
			金币数. 如果你不允许自动删除，那么就需要当事人花钱删除这不美好的回忆了。</td>
		</tr>

	    <tr height=25 valign=middle>
			<td width="98%" class=forumrowhighlight align=center colspan="2">
			<font color="#FF0000">魅力金币相关设置</font></td>
		</tr>


		
		<tr height=25 valign=middle>
			<td width="20%" class=forumrowhighlight align=right>
			求爱时的最低金币&nbsp;</td>
			<td class=forumrow width="78%">
			<input type=text name="lovemoney" size=30 value="<%=lovemoney%>">即使求爱失败，金币也是不退的哦。</td>
		</tr>


        <tr height=25 valign=middle>
			<td width="20%" class=forumrowhighlight align=right>
			求婚时的最低金币&nbsp;</td>
			<td class=forumrow width="78%">
			<input type=text name="marrymoney" size=30 value="<%=marrymoney%>">同上。</td>
		</tr>
        <tr height=25 valign=middle>
			<td width="20%" class=forumrowhighlight align=right>
			结婚费用时间加成系数&nbsp;</td>
			<td class=forumrow width="78%">
			<input type=text name="longm" size=30 value="<%=longm%>">(这里是一个乘法.比如一小时乘以5 
			,那么十小时就是50金币)</td>
		</tr>
        <tr height=25 valign=middle>
			<td width="20%" class=forumrowhighlight align=right>
			结婚费用规格加成系数&nbsp;</td>
			<td class=forumrow width="78%">
			<input type=text name="levelm" size=30 value="<%=levelm%>">(这里是一个乘法.比如一等级乘以5 
			,那么天长地久就是45金币)</td>
		</tr>

        <tr height=25 valign=middle>
			<td width="20%" class=forumrowhighlight align=right>
			求爱成功双方各增加的魅力值</td>
			<td class=forumrow width="78%">
			<input type=text name="lovecp1" size=30 value="<%=lovecp1%>">（失败后求爱者会减去同样数值）</td>
		</tr>
         <tr height=25 valign=middle>
			<td width="20%" class=forumrowhighlight align=right>
			分手时双方减少的魅力值&nbsp;</td>
			<td class=forumrow width="78%">
			<input type=text name="lovecp2" size=30 value="<%=lovecp2%>">用|分隔，先提出者在前，接受者在后</td>
		</tr>
        <tr height=25 valign=middle>
			<td width="20%" class=forumrowhighlight align=right>
			求婚成功双方各增加的魅力值</td>
			<td class=forumrow width="78%">
			<input type=text name="marrycp1" size=30 value="<%=marrycp1%>">（失败后求婚者会减去同样数值）</td>
		</tr>
        <tr height=25 valign=middle>
			<td width="20%" class=forumrowhighlight align=right>
			离婚时双方减少的魅力值&nbsp;</td>
			<td class=forumrow width="78%">
			<input type=text name="marrycp2" size=30 value="<%=marrycp2%>">用|分隔，起诉者在前，接受者在后</td>
		</tr>
        <tr height=25 valign=middle>
			<td width="20%" class=forumrowhighlight align=right>
			提出离婚方的必须金币</td>
			<td class=forumrow width="78%">
			<input type=text name="limoney" size=30 value="<%=limoney%>">将付给另一方</td>
		</tr>

		
		<tr height=25 valign=middle>
			<td colspan=2 class=forumrowhighlight align=center><input type=submit name="submit" value=" 提  交 ">
			<input type=reset name="reset" value=" 重  填 "></td>
		</tr>
		</form>
	</table>
	</DIV>
	<br>
	<table width="100%" cellspacing="1" cellpadding="5" align="center" class=tableBorder>
	</table>
	<%End Sub

sub getconfig()

      dim rsmad,sqlad
      set rsmad=server.createobject("ADODB.Recordset")
	sqlad="select * from m_config"
	rsmad.open sqlad,connj,1,1
	
	isvisual=rsmad("isvisual")
	isfriend=rsmad("isfriend")
	
	friendlow=rsmad("friendlow")
	
	friend1=rsmad("friend1")
	lovepass=rsmad("lovepass")
	marrypass=rsmad("marrypass")
	lipass=rsmad("lipass")
	
	islovemore=rsmad("islovemore")
	ismarrymore=rsmad("ismarrymore")
	isbl=rsmad("isbl")
	isml=rsmad("isml")
	ispassdel=rsmad("ispassdel")
	isnodel=rsmad("isnodel")
	isfendel=rsmad("isfendel")
	delfengmoney=rsmad("delfengmoney")
	
	lovetitle=rsmad("lovetitle")
	lovetime=rsmad("lovetime")
	marrytitle=rsmad("marrytitle")
	marrytime=rsmad("marrytime")
	
	lovemoney=rsmad("lovemoney")
	marrymoney=rsmad("marrymoney")
	
	lovecp1=rsmad("lovecp1")
	lovecp2=rsmad("lovecp2")
	marrycp1=rsmad("marrycp1")
	marrycp2=rsmad("marrycp2")
	limoney=rsmad("limoney")
	
	longm=rsmad("longm")
	levelm=rsmad("levelm")
	
	isann=rsmad("isann")
	isfayuan=rsmad("isfayuan")

	rsmad.close
	set rsmad=nothing
	set sqlad=nothing
	
	
end sub

sub saveconfig()
   
      isvisual=Dvbbs.CheckStr(Request("isvisual"))
                   if isvisual<>"0" and isvisual<>"1" then 
                        	sendmsg=SendMsg+"<br>"+"<li>虚拟形象支持设置错误.请重设！"
                              exit sub
                   end if
      isfriend=Dvbbs.CheckStr(Request("isfriend"))
                   if isfriend<>"0" and isfriend<>"1" then 
                        	sendmsg=SendMsg+"<br>"+"<li>亲友团支持设置错误.请重设！"
                              exit sub
                   end if
	friendlow=Dvbbs.CheckStr(Request("friendlow"))
	             if not IsNumeric(friendlow) then friendlow=999 
	             if friendlow<0 or friendlow>500 then 
                        	sendmsg=SendMsg+"<br>"+"<li>亲友团最低票数设置错误.请重设！"
                              exit sub
                   end if	
	friend1=Dvbbs.CheckStr(Request("friend1"))
	             if not IsNumeric(friend1) then friend1=999 
	             if friend1<1 or friend1>99 then 
                        	sendmsg=SendMsg+"<br>"+"<li>同意票数百分比设置错误.请重设！"
                              exit sub
                   end if
	
	lovepass=Dvbbs.CheckStr(Request("lovepass"))
		       if not IsNumeric(lovepass) then lovepass=999 
	             if lovepass<1 or lovepass>240 then 
                        	sendmsg=SendMsg+"<br>"+"<li>求爱过期时间设置错误.请重设！"
                              exit sub
                   end if
	marrypass=Dvbbs.CheckStr(Request("marrypass"))
		       if not IsNumeric(marrypass) then marrypass=999 
	             if marrypass<1 or marrypass>240 then 
                        	sendmsg=SendMsg+"<br>"+"<li>求婚过期时间设置错误.请重设！"
                              exit sub
                   end if

	lipass=Dvbbs.CheckStr(Request("lipass"))
		       if not IsNumeric(lipass) then lipass=999 
	             if lipass<1 or lipass>240 then 
                        	sendmsg=SendMsg+"<br>"+"<li>离婚过期时间设置错误.请重设！"
                              exit sub
                   end if
		
	islovemore=Dvbbs.CheckStr(Request("islovemore"))
			if islovemore<>"0" and islovemore<>"1" then 
                        	sendmsg=SendMsg+"<br>"+"<li>多人恋爱设置错误.请重设！"
                              exit sub
                   end if
	 	
	ismarrymore=Dvbbs.CheckStr(Request("ismarrymore"))
			if ismarrymore<>"0" and ismarrymore<>"1" then 
                        	sendmsg=SendMsg+"<br>"+"<li>多人结婚设置错误.请重设！"
                              exit sub
                   end if
		
	isbl=Dvbbs.CheckStr(Request("isbl"))
			if isbl<>"0" and isbl<>"1" then 
                        	sendmsg=SendMsg+"<br>"+"<li>同性恋设置错误.请重设！"
                              exit sub
                   end if		
	isml=Dvbbs.CheckStr(Request("isml"))
			if isml<>"0" and isml<>"1" then 
                        	sendmsg=SendMsg+"<br>"+"<li>婚外恋设置错误.请重设！"
                              exit sub
                   end if		
	ispassdel=Dvbbs.CheckStr(Request("ispassdel"))	
			if ispassdel<>"0" and ispassdel<>"1" then 
                        	sendmsg=SendMsg+"<br>"+"<li>过期删除设置错误.请重设！"
                              exit sub
                   end if	
                   
	isnodel=Dvbbs.CheckStr(Request("isnodel"))
			if isnodel<>"0" and isnodel<>"1" then 
                        	sendmsg=SendMsg+"<br>"+"<li>拒绝删除设置错误.请重设！"
                              exit sub
                   end if		
	isfendel=Dvbbs.CheckStr(Request("isfendel"))
			if isfendel<>"0" and isfendel<>"1" then 
                        	sendmsg=SendMsg+"<br>"+"<li>分手离婚删除设置错误.请重设！"
                              exit sub
                   end if		
	delfengmoney=Dvbbs.CheckStr(Request("delfengmoney"))
	             if not IsNumeric(delfengmoney) then delfengmoney=99999 
	             if delfengmoney<1 or delfengmoney>9999 then 
                        	sendmsg=SendMsg+"<br>"+"<li>删除分手所需金币设置错误.请重设！"
                              exit sub
                   end if	
	
	lovetitle=Dvbbs.CheckStr(Request("lovetitle"))
	             if instr(lovetitle,"|")<"0" then 
                           sendmsg=SendMsg+"<br>"+"<li>恋爱等级设置错误.请重设！"
                              exit sub
                    end if
	lovetime=Dvbbs.CheckStr(Request("lovetime"))
	            if instr(lovetime,"|")<"0" then 
                           sendmsg=SendMsg+"<br>"+"<li>恋爱等级时段设置错误.请重设！"
                              exit sub
                    end if
			dim ltemp1,ltemp2
			    ltemp1=split(lovetitle,"|")
			    ltemp2=split(lovetime,"|")
			      if ubound(ltemp1)<>ubound(ltemp2) then
			          sendmsg=SendMsg+"<br>"+"<li>恋爱等级和时段设置不相配.请重设！"
                              exit sub
                    	end if


	marrytitle=Dvbbs.CheckStr(Request("marrytitle"))
	            if instr(marrytitle,"|")<"0" then 
                           sendmsg=SendMsg+"<br>"+"<li>婚姻等级设置错误.请重设！"
                              exit sub
                    end if  	
	marrytime=Dvbbs.CheckStr(Request("marrytime"))
	             if instr(marrytime,"|")<"0" then 
                           sendmsg=SendMsg+"<br>"+"<li>婚姻等级时段设置错误.请重设！"
                              exit sub
                    end if
	          dim mtemp1,mtemp2
			    mtemp1=split(marrytitle,"|")
			    mtemp2=split(marrytime,"|")
			      if ubound(mtemp1)<>ubound(mtemp2) then
			          sendmsg=SendMsg+"<br>"+"<li>恋爱等级和时段设置不相配.请重设！"
                              exit sub
                    	end if

	lovemoney=Dvbbs.CheckStr(Request("lovemoney"))
	             if not IsNumeric(lovemoney) then lovemoney=10000
	             if lovemoney<1 or lovemoney>9999 then 
                        	sendmsg=SendMsg+"<br>"+"<li>求爱所需金币设置错误.请重设！"
                              exit sub
                   end if		
	marrymoney=Dvbbs.CheckStr(Request("marrymoney"))
	             if not IsNumeric(marrymoney) then marrymoney=10000
	             if marrymoney<1 or marrymoney>9999 then 
                        	sendmsg=SendMsg+"<br>"+"<li>求婚所需金币设置错误.请重设！"
                              exit sub
                   end if		
	lovecp1=Dvbbs.CheckStr(Request("lovecp1"))
	             if not IsNumeric(lovecp1) then lovecp1=10000 
	             if lovecp1<1 or lovecp1>9999 then 
                        	sendmsg=SendMsg+"<br>"+"<li>求爱成功魅力设置错误.请重设！"
                              exit sub
                   end if		
	lovecp2=Dvbbs.CheckStr(Request("lovecp2"))
	             if instr(lovecp2,"|")="0" then 
                           sendmsg=SendMsg+"<br>"+"<li>分手减魅力设置错误.请重设！"
                              exit sub
                    end if
	
	marrycp1=Dvbbs.CheckStr(Request("marrycp1"))
	             if not IsNumeric(marrycp1) then marrycp1=10000 
	             if marrycp1<1 or marrycp1>9999 then 
                        	sendmsg=SendMsg+"<br>"+"<li>求婚成功魅力设置错误.请重设！"
                              exit sub
                   end if		
	marrycp2=Dvbbs.CheckStr(Request("marrycp2"))
		      if instr(marrycp2,"|")="0" then 
                           sendmsg=SendMsg+"<br>"+"<li>离婚减魅力设置错误.请重设！"
                              exit sub
                    end if

	limoney=Dvbbs.CheckStr(Request("limoney"))
	             if not IsNumeric(limoney) then limoney=10000 
	             if limoney<1 or limoney>9999 then 
                        	sendmsg=SendMsg+"<br>"+"<li>离婚所需金币设置错误.请重设！"
                              exit sub
                   end if		
	longm=Dvbbs.CheckStr(Request("longm"))
	             if not IsNumeric(longm) then longm=10000
	             if longm<1 or longm>9999 then 
                        	sendmsg=SendMsg+"<br>"+"<li>婚礼时长加成设置错误.请重设！"
                              exit sub
                   end if		
	levelm=Dvbbs.CheckStr(Request("levelm"))
	             if not IsNumeric(levelm) then levelm=10000 
	             if levelm<1 or levelm>9999 then 
                        	sendmsg=SendMsg+"<br>"+"<li>婚礼规格加成设置错误.请重设！"
                              exit sub
                   end if	
      isann=Dvbbs.CheckStr(Request("isann"))
                   if isann<>"0" and isann<>"1" then 
                        	sendmsg=SendMsg+"<br>"+"<li>是否发布公告设置错误.请重设！"
                              exit sub
                   end if
      isfayuan=Dvbbs.CheckStr(Request("isfayuan"))
                    if isfayuan<>"0" and isfayuan<>"1" then 
                        	sendmsg=SendMsg+"<br>"+"<li>是否必须法院离婚设置错误.请重设！"
                              exit sub
                    end if

      dim rsmad,sqlad
      set rsmad=server.createobject("ADODB.Recordset")	
      sqlad="select * from m_config"
	rsmad.open sqlad,connj,1,3
	
      rsmad("isvisual")=isvisual
	rsmad("isfriend")=isfriend
	
	rsmad("friendlow")=friendlow
	
	rsmad("friend1")=friend1
	rsmad("lovepass")=lovepass
	rsmad("marrypass")=marrypass
	rsmad("lipass")=lipass
	
	rsmad("islovemore")=islovemore
	rsmad("ismarrymore")=ismarrymore
	rsmad("isbl")=isbl
	rsmad("isml")=isml
	rsmad("ispassdel")=ispassdel
	rsmad("isnodel")=isnodel
	rsmad("isfendel")=isfendel
	rsmad("delfengmoney")=delfengmoney
	
	rsmad("lovetitle")=lovetitle
	rsmad("lovetime")=lovetime
	rsmad("marrytitle")=marrytitle
	rsmad("marrytime")=marrytime
	
	rsmad("lovemoney")=lovemoney
	rsmad("marrymoney")=marrymoney
	
	rsmad("lovecp1")=lovecp1
	rsmad("lovecp2")=lovecp2
	rsmad("marrycp1")=marrycp1
	rsmad("marrycp2")=marrycp2
	rsmad("limoney")=limoney
	
	rsmad("longm")=longm
	rsmad("levelm")=levelm
	
	rsmad("isann")=isann
	rsmad("isfayuan")=isfayuan
 
      rsmad.update
      rsmad.close
      set rsmad=nothing
      set sqlad=nothing
      sendmsg=SendMsg+"<br>"+"<li>成功提交！"

end sub










%>