<!--#include file=conn.asp-->
<!--#include file=config.asp-->
<!--#include file=const.asp-->
<!--#include file=char.asp-->
<%
 '=========================================================
' File: partyshow.asp
' Version:3.0
' Date: 2005-9-17
' Script Written by xmrxw
'=========================================================
' Copyright (C) 2004,2005 Xmrxw.Com All rights reserved.
' Web: http://www.xmrxw.com,http://www.xmzxw.com
' Email: info@mssky.com,super@mssky.com
' QQ：10689579　Msn：zdlmicr@hotmail.com
'=========================================================
dim action,Pid
response.buffer=true
action=Trim(Request("action"))
	Pid=checkStr(trim(request("Pid")))'去除特殊字符
	if Pid="" or not isInteger(Pid) then
	errmsg=errmsg+"<br>"+"<li>参数错误。"
	founderr=true
	end if	
Pid=cint(Pid)
stats="浏览约会内容"
call nav()
if founderr=true then
	call head_var("","")
	call Mslove_error()
else
	call head_var("约会广场","party_index.asp")
if action="" then
call main()
elseif action="join" then
call addjoin()
elseif action="newsave" then
call newsave()
end if
if founderr then call Mslove_error()
end if
call activeonline()
call footer()

sub main()
	if split(Reflash,"|")(0)=1 then'防刷新点击
		  if not Request.ServerVariables("REMOTE_ADDR")=request.cookies("IP"&pid&"") then
		  response.cookies("IP"&pid&"")=Request.ServerVariables("REMOTE_ADDR")
		  conn.execute("UPDATE Ms_party set Hits=Hits+1 WHERE pid="&pid&"")
		  end if
		  else
		  conn.execute("UPDATE Ms_party set Hits=Hits+1 WHERE pid="&pid&"")
	end if
dim paruser,Typeid,parsex,Province,Maxnum,Userjoin,Conet,Title,Ispublic,PartyDate
dim Minage,Maxage,Content,City,Address,Others,Addtime,Hits,Checked,Mychara,Partname
	set rs=server.createobject("adodb.recordset")
	sql="select username,Typeid,parsex,Province,Maxnum,Userjoin,Conet,Title,Ispublic,PartyDate,Minage,Maxage,Content,City,Address,Others,Addtime,Hits,Checked,Mychara,Partname from Ms_party where pid="&pid&""
	rs.Open sql,conn,1,1
if rs.eof and rs.bof then
	response.write"<tr><td class=tablebody1 align=center valign=middle colspan=7>参数错误</td></tr>"
else
paruser=rs("username")
Typeid=rs("Typeid")
parsex=rs("Parsex")
Maxnum=rs("Maxnum")
Userjoin=rs("Userjoin")
Conet=rs("Conet")
Province=rs("Province")
Title=rs("Title")
Ispublic=rs("Ispublic")
PartyDate=rs("PartyDate")
Minage=rs("Minage")
Maxage=rs("Maxage")
Content=rs("Content")
City=rs("City")
Address=rs("Address")
Others=rs("Others")
Addtime=rs("Addtime")
Hits=rs("Hits")
Checked=rs("Checked")
Mychara=rs("Mychara")
Partname=rs("Partname")
rs.close
end if
%>
<table align=center cellpadding=0 cellspacing=1 class=tableborder1>
  <tr> 
    <td width="703" height="28" background="Skins/Default/party/titlebg.jpg"  class=tablebody1><img src="Skins/Default/party/md_viewdate.jpg" width="576" height="90"></td>
  </tr>
</table>
<TABLE cellSpacing=0 cellPadding=0 width=750 align=center border=0>
  <TBODY>
    <TR> 
      <TD vAlign=top width=480 height=231> 
        <TABLE cellSpacing=0 cellPadding=0 width="100%" align=left 
      border=0>
          <TBODY>
            <TR> 
              <TD vAlign=top height="231"> 
                <TABLE height="100%" cellSpacing=0 cellPadding=0 width=5 align=left 
            border=0>
                  <TBODY>
                    <TR> 
                      <TD><IMG height=10 src="Skins/Default/party/fr_r2_c1.gif" 
width=5></TD>
                    </TR>
                    <TR> 
                      <TD background=Skins/Default/party/bg.gif height="100%"></TD>
                    </TR>
                    <TR> 
                      <TD><IMG height=10 src="Skins/Default/party/fr_r5_c1.gif" 
              width=5></TD>
                    </TR>
                  </TBODY>
                </TABLE></TD>
              <TD width="100%"> 
                <TABLE height="100%" cellSpacing=0 cellPadding=0 width="100%" 
            align=left border=0>
                  <TBODY>
                    <TR> 
                      <TD> <TABLE cellSpacing=0 cellPadding=0 width="100%" align=left 
                  border=0>
                          <TBODY>
                            <TR> 
                              <TD><IMG height=5 src="Skins/Default/party/fr_r2_c2.gif" 
                      width=10></TD>
                              <TD width="100%" background=Skins/Default/party/bg.gif></TD>
                              <TD><IMG height=5 src="Skins/Default/party/fr_r2_c4.gif" 
                      width=10></TD>
                            </TR>
                          </TBODY>
                        </TABLE></TD>
                    </TR>
                    <TR> 
                      <TD vAlign=top background=Skins/Default/party/bg.gif> 
                        <TABLE cellSpacing=0 cellPadding=0 width=470 align=left 
                  border=0>
                          <TBODY>
                            <TR> 
                              <TD> <TABLE cellSpacing=0 cellPadding=0 width=470 align=left 
                        border=0>
                                  <TBODY>
                                    <TR> 
                                      <TD width=10 background=Skins/Default/party/cnt_r2_c2.gif 
                            height=41></TD>
                                      <TD class=txt_head width=450 
                            background=Skins/Default/party/cnt_r2_c3.gif><b><font color="#FFFFFF">约会主题：<%=Title%></font></b></TD>
                                      <TD width=10 background=Skins/Default/party/cnt_r2_c11.gif 
                            height=41></TD>
                                    </TR>
                                  </TBODY>
                                </TABLE></TD>
                            </TR>
                            <TR> 
                              <TD height=175 valign="top"> 
                                <TABLE cellSpacing=1 cellPadding=0 width=465 
                        border=0>
                                  <TBODY>
                                    <TR> 
                                      <TD width="90" height=20 align="center" class=txt_head><STRONG>发 
                                        起 人：</STRONG></TD>
                                      <TD height=20 class=txt_head><a href=dispuser.asp?username=<%=paruser%>><%=paruser%></a></TD>
                                    </TR>
                                    <tr> 
                                      <td height="20" align="center"><strong>约会类型：</strong></td>
                                      <td height="20"> <%if Ispublic=0 then
		  response.Write("公开约会")
		  else
		  response.Write("单独约会")
		  end if%> </td>
                                    </tr>
                                    <tr> 
                                      <td height="20" align="center"><strong>约会性质：</strong></td>
                                      <td height="20"> <%if Typeid=1 then
	response.write("征友")
	elseif Typeid=2 then
	response.write("恋人")
	elseif Typeid=3 then
	response.write("节日")
	elseif Typeid=4 then
	response.write("纪念")
	elseif Typeid=5 then
	response.write("旅游")
	else
	response.write("其它")
	end if%> </td>
                                    </tr>
                                    <tr> 
                                      <td height="20" align="center"><strong>约会时间：</strong></td>
                                      <td height="20"><%=PartyDate%></td>
                                    </tr>
                                    <TR> 
                                      <TD 
                              height=20 align="center" ><strong>约会对象：</strong></TD>
                                      <TD width=372 height=20> <%if parsex=2 then
	response.Write("无要求")
	elseif parsex=1 then
	response.Write("男")
	else
	response.Write("女")
	end if%>
                                        (<%=minage%> - <%=maxage%>岁)</TD>
                                    </TR>
                                    <tr> 
                                      <td align="center"><strong>约会人数：</strong></td>
                                      <td><%if Maxnum=0 then
									  response.Write("不限")
									  else
									  response.Write(Maxnum)
									  end if%> 人</td>
                                    </tr>
                                    <tr> 
                                      <td height="28" align="center"><strong>目前响应：</strong></td>
                                      <td><b><font color=red><%=Userjoin%></font></b>&nbsp;人</td>
                                    </tr>
                                    <TR> 
                                      <TD 
                              height=9 align="center" ><strong>城　　市：</strong></TD>
                                      <TD><%=Province%>－<%=city%></TD>
                                    </TR>
                                    <TR>
                                      <TD 
                              height=18 align="center" ><strong>具体地点：</strong></TD>
                                      <TD><%=Address%></TD>
                                    </TR>
                                  </TBODY>
                                </TABLE>
                              </TD>
                            </TR>
                          </TBODY>
                        </TABLE>
                      </TD>
                    </TR>
                    <TR> 
                      <TD> <TABLE cellSpacing=0 cellPadding=0 width="100%" align=left 
                  border=0>
                          <TBODY>
                            <TR> 
                              <TD><IMG height=5 src="Skins/Default/party/fr_r6_c2.gif" 
                      width=10></TD>
                              <TD width="100%" background=Skins/Default/party/bg.gif></TD>
                              <TD><IMG height=5 src="Skins/Default/party/fr_r6_c4.gif" 
                      width=10></TD>
                            </TR>
                          </TBODY>
                        </TABLE></TD>
                    </TR>
                  </TBODY>
                </TABLE>
              </TD>
              <TD vAlign=top height="231"> 
                <TABLE height="100%" cellSpacing=0 cellPadding=0 width=5 align=left 
            border=0>
                  <TBODY>
                    <TR> 
                      <TD><IMG height=10 src="Skins/Default/party/fr_r2_c5.gif" 
width=5></TD>
                    </TR>
                    <TR> 
                      <TD background=Skins/Default/party/bg.gif height="100%"></TD>
                    </TR>
                    <TR> 
                      <TD><IMG height=10 src="Skins/Default/party/fr_r5_c5.gif" 
              width=5></TD>
                    </TR>
                  </TBODY>
                </TABLE></TD>
            </TR>
          </TBODY>
        </TABLE></TD>
      <TD width=10></TD>
      <TD vAlign=top width=260><TABLE height="100%" cellSpacing=0 cellPadding=0 width="100%" align=left 
      border=0>
          <TBODY>
            <TR> 
              <TD vAlign=top height="100%"> <TABLE height="100%" cellSpacing=0 cellPadding=0 width=5 align=left 
            border=0>
                  <TBODY>
                    <TR> 
                      <TD><IMG height=10 src="Skins/Default/party/fr_r2_c1.gif" 
width=5></TD>
                    </TR>
                    <TR> 
                      <TD background=Skins/Default/party/bg.gif height="100%"></TD>
                    </TR>
                    <TR> 
                      <TD><IMG height=10 src="Skins/Default/party/fr_r5_c1.gif" 
              width=5></TD>
                    </TR>
                  </TBODY>
                </TABLE></TD>
              <TD width="100%" height="100%"> <TABLE height="100%" cellSpacing=0 cellPadding=0 width="100%" 
            align=left border=0>
                  <TBODY>
                    <TR> 
                      <TD> <TABLE cellSpacing=0 cellPadding=0 width="100%" align=left 
                  border=0>
                          <TBODY>
                            <TR> 
                              <TD><IMG height=5 src="Skins/Default/party/fr_r2_c2.gif" 
                      width=10></TD>
                              <TD width="100%" background=Skins/Default/party/bg.gif></TD>
                              <TD><IMG height=5 src="Skins/Default/party/fr_r2_c4.gif" 
                      width=10></TD>
                            </TR>
                          </TBODY>
                        </TABLE></TD>
                    </TR>
                    <TR> 
                      <TD vAlign=top background=Skins/Default/party/bg.gif height="100%"> 
                        <TABLE cellSpacing=0 cellPadding=0 width=250 
                  align=left border=0>
                          <TBODY>
                            <TR> 
                              <TD vAlign=top width=250> 
                                <TABLE cellSpacing=0 cellPadding=0 width="100%" 
border=0>
                                  <TBODY>
                                    <TR> 
                                      <TD align=middle 
                            height=41><%if datediff("d",PartyDate,date())>=1 or Checked=2 or Checked=3 then
							response.Write("<b>报名已结束</b>")
							else
							response.Write("<b>报名进行中</b>")
							end if%></TD>
                                    </TR>
                                    <TR> 
                                      <TD height=2></TD>
                                    </TR>
                                    <TR> 
                                      <TD  bgColor=#ffffff 
                              height=26>&nbsp;<img src="Skins/Default/party/icon_a.gif" width="14" height="14" align="absmiddle">&nbsp;<STRONG><%=hits%></STRONG> 人浏览过此约会</TD>
                                    </TR>
                                    <TR> 
                                      <TD  height=2></TD>
                                    </TR>
                                    <TR> 
                                      <TD  bgColor=#ffffff 
                              height=26>&nbsp;<img src="Skins/Default/party/icon_a.gif" width="14" height="14" align="absmiddle">&nbsp;<STRONG><b><font color=red><%=Userjoin%></font></b></STRONG> 人报名参与此约会</TD>
                                    </TR>
                                    <TR> 
                                      <TD  height=2></TD>
                                    </TR>
                                    <TR> 
                                      <TD  bgColor=#ffffff height=26>&nbsp;<img src="Skins/Default/party/icon_a.gif" width="14" height="14" align="absmiddle">&nbsp;<a href=dispuser.asp?username=<%=paruser%>>查看发起人的详细资料</a></TD>
                                    </TR>
                                    <TR> 
                                      <TD  height=2></TD>
                                    </TR>
                                    <TR> 
                                      <TD  bgColor=#ffffff height=33>&nbsp;<img src="Skins/Default/party/icon_a.gif" width="14" height="14" align="absmiddle">&nbsp;<STRONG></STRONG><A 
                              href="userbook.asp?action=add&ClassID=1&touser=<%=paruser%>" 
                              target=_blank>向发起人发送留言</A></TD>
                                    </TR>
                                    <TR> 
                                      <TD  height=2></TD>
                                    </TR>
                                    <TR> 
                                      <TD  bgColor=#ffffff height=26><STRONG>&nbsp;<img src="Skins/Default/party/icon_a.gif" width="14" height="14" align="absmiddle">&nbsp;</STRONG><A 
                              href="favlist.asp?action=addU&favurl=partyshow.asp?pid=<%=pid%>" 
                              target=_blank>收藏此约会</A></TD>
                                    </TR>
                                    <TR> 
                                      <TD  height=2></TD>
                                    </TR>
                                    <TR> 
                                      <TD vAlign=center bgColor=#ffffff 
                            height=26>&nbsp;<img src="Skins/Default/party/icon_a.gif" width="14" height="14" align="absmiddle">&nbsp;<A href="partylist.asp?action=youpart&partuser=<%=paruser%>" 
                              target=_blank>查看发起人所有活动</A></TD>
                                    </TR>
                                  </TBODY>
                                </TABLE>
                              </TD>
                            </TR>
                            <TR> 
                              <TD height=5> <TABLE cellSpacing=0 cellPadding=0 width=250 align=left 
                        border=0>
                                  <TBODY>
                                    <TR> 
                                      <TD width=10 background=Skins/Default/party/cnt_r10_c2.gif 
                            height=5></TD>
                                      <TD width=230 bgColor=#ffffff height=5></TD>
                                      <TD width=10 background=Skins/Default/party/cnt_r10_c14.gif 
                            height=5></TD>
                                    </TR>
                                  </TBODY>
                                </TABLE></TD>
                            </TR>
                          </TBODY>
                        </TABLE></TD>
                    </TR>
                    <TR> 
                      <TD> <TABLE cellSpacing=0 cellPadding=0 width="100%" align=left 
                  border=0>
                          <TBODY>
                            <TR> 
                              <TD><IMG height=5 alt="" src="Skins/Default/party/fr_r6_c2.gif" 
                        width=10 border=0 name=fr_r6_c2></TD>
                              <TD width="100%" background=Skins/Default/party/bg.gif></TD>
                              <TD><IMG height=5 alt="" src="Skins/Default/party/fr_r6_c4.gif" 
                        width=10 border=0 
              name=fr_r6_c4></TD>
                            </TR>
                          </TBODY>
                        </TABLE></TD>
                    </TR>
                  </TBODY>
                </TABLE></TD>
              <TD vAlign=top height="100%"> <TABLE height="100%" cellSpacing=0 cellPadding=0 width=5 align=left 
            border=0>
                  <TBODY>
                    <TR> 
                      <TD><IMG height=10 alt="" src="Skins/Default/party/fr_r2_c5.gif" 
                  width=5 border=0 name=fr_r2_c5></TD>
                    </TR>
                    <TR> 
                      <TD background=Skins/Default/party/bg.gif height="100%"></TD>
                    </TR>
                    <TR> 
                      <TD><IMG height=10 alt="" src="Skins/Default/party/fr_r5_c5.gif" 
                  width=5 border=0 
        name=fr_r5_c5></TD>
                    </TR>
                  </TBODY>
                </TABLE></TD>
            </TR>
          </TBODY>
        </TABLE> </TD>
    </TR>
  </TBODY>
</TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=750 align=center border=0>
  <TBODY>
    <TR> 
      <TD align=middle width=480 height=10><IMG height=10 
      src="Skins/Default/party/bg_link_a.gif" width=211></TD>
      <TD width=270></TD>
    </TR>
  </TBODY>
</TABLE>
<TABLE height=159 cellSpacing=0 cellPadding=0 width=750 align=center border=0>
  <TBODY>
    <TR> 
      <TD width=15 background=Skins/Default/party/tb5.gif height=43><IMG height=43 
      src="Skins/Default/party/tb1.gif" width=15></TD>
      <TD width=150 background=Skins/Default/party/tb5.gif><IMG height=43 
      src="Skins/Default/party/tb9.gif" width=146></TD>
      <TD width=575 background=Skins/Default/party/tb5.gif><FONT 
      color=#ffffff><B>报名参加本约会</B></FONT></TD>
      <TD width=10 background=Skins/Default/party/tb5.gif><IMG height=43 
      src="Skins/Default/party/tb2.gif" width=15></TD>
    </TR>
    <TR> 
      <TD background=Skins/Default/party/tb7.gif rowSpan=4>&nbsp;</TD>
      <TD colSpan=2 height=74> <TABLE height=70 cellSpacing=5 cellPadding=0 width=632 align=center 
      border=0>
          <%if datediff("d",PartyDate,date())<=1 and Checked=1 then%>
          <FORM name=joinform action=partyshow.asp?action=join method=post>
            <TBODY>
              <TR> 
                <TD width="528">电话： 
                  <input name="Telephone" type="text" id="Telephone" size="18" maxlength="50">
                  邮件： 
                  <input name="Email" type="text" id="Email" size="18" maxlength="100"> 
                  <input name="pid" type="hidden" value=<%=pid%>>
                  检验码：
                  <%if Cint(Codeshow(4))=1 then%>
                  <input type="text" name="codestr" maxlength="4" size="4"> &nbsp;<%=GetCode()%>
                  <%end if%></TD>
                <TD width="89" rowspan="2"><input type="image" name="Submit" src="Skins/Default/party/enter.gif" value="Submit" class=notinput></TD>
              </TR>
              <TR> 
                <TD>请填写有效联系电话和电子邮箱地址（只有发起者可见）按确定即可报名成功。</TD>
              </TR>
            </TBODY>
          </FORM>
          <%
		  else
		  response.Write("<tr><td height=28><font color=red>报名已经结束！</font></td></tr>")
		  end if
		  %>
        </TABLE></TD>
      <TD background=Skins/Default/party/tb8.gif rowSpan=4>&nbsp;</TD>
    </TR>
    <TR> 
      <TD background=Skins/Default/party/line.gif colSpan=2 height=1><IMG height=1 
      src="Skins/Default/party/line.gif" width=3></TD>
    </TR>
    <TR> 
      <TD colSpan=2> <TABLE class=t2 height=26 cellSpacing=5 cellPadding=0 width=618 
      align=center border=0>
          <%dim chknum
	  sql="select count(JID) from [Ms_partyj] where Checked=1 and pid="&Pid&""
set rs=conn.execute(sql)
if not (rs.eof and rs.bof) then
chknum=rs(0)
else
chknum=0
end if
rs.close%>
          <TBODY>
            <TR> 
              <TD width="210" height=16><STRONG><FONT color=#e74a83>|</FONT></STRONG> 
                限制参加人数： <FONT 
            color=#ff0000>
                <%if Maxnum=0 then
									  response.Write("不限")
									  else
									  response.Write(Maxnum)
									  end if%>
                </font> 人 </TD>
              <TD width="187"><STRONG><FONT color=#e74a83>|</FONT></STRONG> 未审核人数 
                <FONT 
            color=#ff0000><%=(Userjoin-chknum)%></FONT> 人</TD>
              <TD width="201"><STRONG><FONT color=#e74a83>|</FONT></STRONG> 已审核的人数 
                <FONT 
            color=#ff0000><%=chknum%></FONT> 人</TD>
            </TR>
          </TBODY>
        </TABLE></TD>
    </TR>
    <TR>
      <TD colSpan=2 align="center">响应约会金钱/篇 <b><%=GroupSetting(41)%> <%=GroupSetting(42)%></b> 
        元　响应约会魅力/篇 <b><%=GroupSetting(43)%> <%=GroupSetting(44)%></b> 点　响应约会经验/篇 
        <b><%=GroupSetting(45)%> <%=GroupSetting(46)%></b> 点</TD>
    </TR>
    <TR> 
      <TD vAlign=top background=Skins/Default/party/tb6.gif><IMG height=15 
      src="Skins/Default/party/tb3.gif" width=15></TD>
      <TD background=Skins/Default/party/tb6.gif colSpan=2>&nbsp;</TD>
      <TD vAlign=top background=Skins/Default/party/tb6.gif><IMG height=15 
      src="Skins/Default/party/tb4.gif" width=15></TD>
    </TR>
  </TBODY>
</TABLE>
<table width="750" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><TABLE cellSpacing=0 cellPadding=0 width=740 align=left 
                        border=0>
        <TBODY>
          <TR> 
            <TD width=10 
                            height=8></TD>
            <TD width=720 bgColor=#ffffff height=8></TD>
            <TD width=10 
                            height=8></TD>
          </TR>
        </TBODY>
      </TABLE></td>
  </tr>
</table>
<TABLE cellSpacing=0 cellPadding=0 width=750 align=center border=0>
  <TBODY>
    <TR> 
      <TD width="746" height="100%" vAlign=top> <TABLE height="100%" cellSpacing=0 cellPadding=0 width=5 align=left 
      border=0>
          <TBODY>
            <TR> 
              <TD><IMG height=10 alt="" src="Skins/Default/party/fr_r2_c1.gif" width=5 
            border=0 name=fr_r2_c1></TD>
            </TR>
            <TR> 
              <TD background=Skins/Default/party/bg.gif height="100%"></TD>
            </TR>
            <TR> 
              <TD><IMG height=10 alt="" src="Skins/Default/party/fr_r5_c1.gif" width=5 
            border=0 name=fr_r5_c1></TD>
            </TR>
          </TBODY>
        </TABLE>
        <TABLE height="100%" cellSpacing=0 cellPadding=0 width="51%" align=left 
      border=0>
          <TBODY>
            <TR> 
              <TD width="740"> <TABLE cellSpacing=0 cellPadding=0 width="100%" align=left 
              border=0>
                  <TBODY>
                    <TR> 
                      <TD><IMG height=5 alt="" src="Skins/Default/party/fr_r2_c2.gif" 
                  width=10 border=0 name=fr_r2_c2></TD>
                      <TD width="100%" background=Skins/Default/party/bg.gif></TD>
                      <TD><IMG height=5 alt="" src="Skins/Default/party/fr_r2_c4.gif" 
                  width=10 border=0 name=fr_r2_c4></TD>
                    </TR>
                  </TBODY>
                </TABLE></TD>
            </TR>
            <TR> 
              <TD vAlign=top background=Skins/Default/party/bg.gif height="50%"> 
                <TABLE height=80 cellSpacing=0 cellPadding=0 width=740 align=left 
            bgColor=#ffffff border=0>
                  <TBODY>
                    <TR 
              background="Skins/Default/party/bg.gif"> 
                      <TD colSpan=2 height=30> <TABLE height=30 cellSpacing=0 cellPadding=0 width="100%" 
                  align=left bgColor=#ffffff border=0>
                          <TBODY>
                            <TR> 
                              <TD width=106 height=30><IMG height=30 
                        src="Skins/Default/party/btn_userlist.gif" width=106></TD>
                              <TD width="215" background=Skins/Default/party/bg.gif><%if (master or standmaster or supermaster) or paruser=trim(membername) then%><a href="userparty.asp?action=power&pid=<%=pid%>" target="_blank">管理报名&gt;&gt;&gt;</a><%end if%></TD>
                              <TD width="419" 
              background=Skins/Default/party/bg.gif>&nbsp;</TD>
                            </TR>
                          </TBODY>
                        </TABLE></TD>
                    </TR>
                    <TR> 
                      <TD height=5><IMG height=5 alt="" 
                  src="Skins/Default/party/cnt_form_r3_c2.gif" width=10 border=0 
                  name=cnt_form_r3_c2></TD>
                      <TD width=730> <TABLE height=5 cellSpacing=0 cellPadding=0 width=730 
                  align=left bgColor=#ffffff border=0>
                          <TBODY>
                            <TR> 
                              <TD width=720 height=5></TD>
                              <TD width=10><IMG height=5 alt="" 
                        src="Skins/Default/party/cnt_form_r3_c6.gif" width=10 border=0 
                        name=cnt_form_r3_c6></TD>
                            </TR>
                          </TBODY>
                        </TABLE></TD>
                    </TR>
                    <TR> 
                      <TD width=10 bgColor=#ffffff height=40></TD>
                      <TD> <TABLE height=56 cellSpacing=0 cellPadding=0 width=730 
                  align=left bgColor=#ffffff border=0>
                          <TBODY>
                            <TR> 
                              <TD class=txt_cntList vAlign=top width=720 bgColor=#ffffff 
                      height=18> <TABLE class=txt_cntList cellSpacing=0 cellPadding=0 
                        width=720 border=0>
                                  <TBODY>
                                    <TR> 
                                      <TD colSpan=2><B>待审批参与者 <FONT 
            color=#ff0000><%=(Userjoin-chknum)%></FONT> 人</B></TD>
                                    </TR>
                                    <TR> 
                                      <TD colSpan=2><TABLE cellSpacing=0 cellPadding=0 align=left 
                        border=0>
                                          <TBODY>
                                            <TR> 
                                              <TD width=10 
                            height=5></TD>
                                              <TD width=720 bgColor=#ffffff height=5></TD>
                                              <TD width=10 
                            height=5></TD>
                                            </TR>
                                          </TBODY>
                                        </TABLE></TD>
                                    </TR>
                                    <TR> 
                                      <TD></TD>
                                </table></TD>
                            <TR> 
                              <TD class=txt_cntList vAlign=top bgColor=#ffffff> 
                                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                  <%dim ich
								sql="select j.username,j.Addtime,u.Usersex from [Ms_partyj] j inner join Ms_user u on j.username=u.username where j.Checked=0 and j.pid="&Pid&""
set rs=conn.execute(sql)
if not (rs.eof and rs.bof) then
ich=0
%>
                                  <tr> 
                                    <%do while not rs.eof%>
                                    <td><a href=dispuser.asp?username=<%=rs("username")%> target=_blank><%=rs("username")%></a> <%=iif(rs("Usersex"),"男","女")%> <font color="#999999">[<%=datevalue(rs("Addtime"))%>]</font></td>
                                    <%  ich=ich+1
									if ich>0 and ich mod 4=0 then
									response.write("</tr><tr>")
									end if
rs.movenext
loop%>
                                  </tr>
                                  <%
end if
rs.close%>
                                </table></TD>
                            <TR> 
                              <TD colSpan=2><B>已审批参与者 <FONT 
            color=#ff0000><%=chknum%></FONT> 人</B></TD>
                            </TR>
                            <TR> 
                              <TD colSpan=2><TABLE cellSpacing=0 cellPadding=0 align=left 
                        border=0>
                                  <TBODY>
                                    <TR> 
                                      <TD width=10 
                            height=5></TD>
                                      <TD width=720 bgColor=#ffffff height=5></TD>
                                      <TD width=10 
                            height=5></TD>
                                    </TR>
                                  </TBODY>
                                </TABLE></TD>
                            </TR>
                            <TR> 
                              <TD colSpan=2><table width="100%" border="0" cellspacing="0" cellpadding="0">
                                  <%dim ichk
								sql="select j.username,j.Addtime,u.Usersex from [Ms_partyj] j inner join Ms_user u on j.username=u.username where j.Checked=1 and j.pid="&Pid&""
set rs=conn.execute(sql)
if not (rs.eof and rs.bof) then
ichk=0
%>
                                  <tr> 
                                    <%do while not rs.eof%>
                                    <td><a href=dispuser.asp?username=<%=rs("username")%> target=_blank><%=rs("username")%></a> <%=iif(rs("Usersex"),"男","女")%> <font color="#999999">[<%=datevalue(rs("Addtime"))%>]</font></td>
                                    <%  ichk=ichk+1
									if ichk>0 and ichk mod 4=0 then
									response.write("</tr><tr>")
									end if
rs.movenext
loop%>
                                  </tr>
                                  <%
end if
rs.close%>
                                </table></TD>
                            </TR>
                        </table></TD>
                    </TR>
                  </TBODY>
                </TABLE></TD>
              <TD width=1 rowspan="3" bgColor=#ffffff></TD>
            </TR>
            <TR> 
              <TD vAlign=top background=Skins/Default/party/bg.gif><TABLE cellSpacing=0 cellPadding=0 width=740 align=left 
                        border=0>
                  <TBODY>
                    <TR> 
                      <TD width=10 background=Skins/Default/party/cnt_r10_c2.gif 
                            height=5></TD>
                      <TD width=720 bgColor=#ffffff height=5></TD>
                      <TD width=10 background=Skins/Default/party/cnt_r10_c14.gif 
                            height=5></TD>
                    </TR>
                  </TBODY>
                </TABLE></TD>
            </TR>
            <TR>
              <TD vAlign=top background=Skins/Default/party/bg.gif height=5></TD>
            </TR>
          </TBODY>
        </TABLE></TD>
      <TD width="15" height="100%"><TABLE height="100%" cellSpacing=0 cellPadding=0 width=5 align=left 
      border=0>
          <TBODY>
            <TR> 
              <TD><IMG height=10 src="Skins/Default/party/fr_r2_c5.gif" width=4 
        border=0></TD>
            </TR>
            <TR> 
              <TD background=Skins/Default/party/bg.gif height="100%"></TD>
            </TR>
            <TR> 
              <TD><IMG height=10 alt="" src="Skins/Default/party/fr_r5_c5.gif" width=4 
            border=0></TD>
            </TR>
          </TBODY>
        </TABLE> </TD>
    </TR>
  </TBODY>
</TABLE>
        
    
<table width="750" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td><TABLE cellSpacing=0 cellPadding=0 width=740 align=left 
                        border=0>
        <TBODY>
          <TR> 
            <TD width=10 
                            height=5></TD>
            <TD width=720 bgColor=#ffffff height=5></TD>
            <TD width=10 
                            height=5></TD>
          </TR>
        </TBODY>
      </TABLE></td>
  </tr>
</table>
<TABLE cellSpacing=0 cellPadding=0 width=750 align=center border=0>
  <TBODY>
    <TR> 
      <TD vAlign=top height="100%"> <TABLE height="100%" cellSpacing=0 cellPadding=0 width=5 align=left 
      border=0>
          <TBODY>
            <TR> 
              <TD><IMG height=10 alt="" src="Skins/Default/party/fr_r2_c1.gif" width=5 
            border=0 name=fr_r2_c1></TD>
            </TR>
            <TR> 
              <TD background=Skins/Default/party/bg.gif height="100%"></TD>
            </TR>
            <TR> 
              <TD><IMG height=10 alt="" src="Skins/Default/party/fr_r5_c1.gif" width=5 
            border=0 name=fr_r5_c1></TD>
            </TR>
          </TBODY>
        </TABLE></TD>
      <TD width="100%" height="100%"> <TABLE height="100%" cellSpacing=0 cellPadding=0 width="100%" align=left 
      border=0>
          <TBODY>
            <TR> 
              <TD> <TABLE cellSpacing=0 cellPadding=0 width="100%" align=left 
              border=0>
                  <TBODY>
                    <TR> 
                      <TD><IMG height=5 alt="" src="Skins/Default/party/fr_r2_c2.gif" 
                  width=10 border=0 name=fr_r2_c2></TD>
                      <TD width="100%" background=Skins/Default/party/bg.gif></TD>
                      <TD><IMG height=5 alt="" src="Skins/Default/party/fr_r2_c4.gif" 
                  width=10 border=0 name=fr_r2_c4></TD>
                    </TR>
                  </TBODY>
                </TABLE></TD>
            </TR>
            <TR> 
              <TD vAlign=top background=Skins/Default/party/bg.gif height="100%"> <TABLE cellSpacing=0 cellPadding=0 width=740 border=0>
                  <TBODY>
                    <TR> 
                      <TD width="740"> <TABLE cellSpacing=0 cellPadding=0 width=740 align=left 
                  border=0>
                          <TBODY>
                            <TR> 
                              <TD width=10 background=Skins/Default/party/cnt_r12_c2.gif 
                      height=34></TD>
                              <TD width=25 background=Skins/Default/party/cnt_r12_c3.gif></TD>
                              <TD class=txt_head width=720 
                      background=Skins/Default/party/cnt_r12_c4.gif>约会内容：</TD>
                              <TD width=10 
background=Skins/Default/party/cnt_r12_c14.gif></TD>
                            </TR>
                            <TR align="center" bgcolor="#ffffff"> 
                              <TD 
                    height=34 colSpan=4 > 
                                <table width="99%" border="0" cellspacing="0" cellpadding="0">
                                  <tr>
                                    <td><%=Content%></td>
                                  </tr>
                                </table>
                              </TD>
                            </TR>
                            <TR> 
                              <TD colSpan=4> <TABLE cellSpacing=0 cellPadding=0 width=740 align=left 
                        border=0>
                                  <TBODY>
                                    <TR> 
                                      <TD width=10 background=Skins/Default/party/cnt_r10_c2.gif 
                            height=5></TD>
                                      <TD width=720 bgColor=#ffffff height=5></TD>
                                      <TD width=10 background=Skins/Default/party/cnt_r10_c14.gif 
                            height=5></TD>
                                    </TR>
                                  </TBODY>
                                </TABLE></TD>
                            </TR>
                          </TBODY>
                        </TABLE></TD>
                    </TR>
                    <TR> 
                      <TD height=5></TD>
                    </TR>
                    <TR> 
                      <TD> <TABLE cellSpacing=0 cellPadding=0 width=740 align=left 
                  border=0>
                          <TBODY>
                            <TR> 
                              <TD width=10 background=Skins/Default/party/cnt_r8_c2.gif 
                      height=34></TD>
                              <TD width=25 background=Skins/Default/party/cnt_r8_c3.gif></TD>
                              <TD class=txt_head width=720 
                      background=Skins/Default/party/cnt_r8_c4.gif>联系方式：</TD>
                              <TD width=10 background=Skins/Default/party/cnt_r8_c14.gif></TD>
                            </TR>
                            <TR align="center"> 
                              <TD 
                    height=34 colSpan=4 bgColor=#ffffff >
					<%dim chkuserpart
	  sql="select jid from [Ms_partyj] where Checked=1 and pid="&Pid&" and username='"&trim(membername)&"'"
set rs=conn.execute(sql)
if not (rs.eof and rs.bof) then
chkuserpart=rs(0)
else
chkuserpart=0
end if
rs.close%>
					<%if chkuserpart<>0 or (master or standmaster or supermaster) then%>
                                <table width="99%" border="0" cellspacing="0" cellpadding="0">
                                  <tr> 
                                    <td height="28">电话：<%=split(Conet,"|")(0)%>　手机：<%=split(Conet,"|")(1)%>　邮件：<%=split(Conet,"|")(2)%></td>
                                  </tr>
                                  <tr>
                                    <td height="25">接头暗号或我的特征：<%=Mychara%></td>
                                  </tr>
                                </table>
								<%end if%>
                              </TD>
                            </TR>
                            <TR> 
                              <TD colSpan=4> <TABLE cellSpacing=0 cellPadding=0 width=740 align=left 
                        border=0>
                                  <TBODY>
                                    <TR> 
                                      <TD width=10 background=Skins/Default/party/cnt_r10_c2.gif 
                            height=5></TD>
                                      <TD width=720 bgColor=#ffffff height=5></TD>
                                      <TD width=10 background=Skins/Default/party/cnt_r10_c14.gif 
                            height=5></TD>
                                    </TR>
                                  </TBODY>
                                </TABLE></TD>
                            </TR>
                          </TBODY>
                        </TABLE></TD>
                    </TR>
                    <TR> 
                      <TD height=5></TD>
                    </TR>
                    <TR> 
                      <TD> <TABLE cellSpacing=0 cellPadding=0 width=740 align=left 
                  border=0>
                          <TBODY>
                            <TR> 
                              <TD width=10 background=Skins/Default/party/cnt_r16_c2.gif 
                      height=34></TD>
                              <TD width=25 background=Skins/Default/party/cnt_r16_c3.gif></TD>
                              <TD class=txt_head width=720 
                      background=Skins/Default/party/cnt_r16_c4.gif>其它要求：</TD>
                              <TD width=10 
background=Skins/Default/party/cnt_r16_c14.gif></TD>
                            </TR>
                            <TR align="center" bgcolor="#ffffff"> 
                              <TD 
                    height=34 colSpan=4 class=txt_red> 
                                <table width="99%" border="0" cellspacing="0" cellpadding="0">
                                  <tr> 
                                    <td><%=Others%></td>
                                  </tr>
                                </table>
                              </TD>
                            </TR>
                            <TR> 
                              <TD colSpan=4> <TABLE cellSpacing=0 cellPadding=0 width=740 align=left 
                        border=0>
                                  <TBODY>
                                    <TR> 
                                      <TD width=10 background=Skins/Default/party/cnt_r10_c2.gif 
                            height=5></TD>
                                      <TD width=720 bgColor=#ffffff height=5></TD>
                                      <TD width=10 background=Skins/Default/party/cnt_r10_c14.gif 
                            height=5></TD>
                                    </TR>
                                  </TBODY>
                                </TABLE></TD>
                            </TR>
                          </TBODY>
                        </TABLE></TD>
                    </TR>
                    <TR> 
                      <TD height=5></TD>
                    </TR>
                  </TBODY>
                </TABLE></TD>
            </TR>
            <TR> 
              <TD> <TABLE cellSpacing=0 cellPadding=0 width="100%" align=left 
              border=0>
                  <TBODY>
                    <TR> 
                      <TD><IMG height=5 alt="" src="Skins/Default/party/fr_r6_c2.gif" 
                  width=10 border=0 name=fr_r6_c2></TD>
                      <TD width="100%" background=Skins/Default/party/bg.gif></TD>
                      <TD><IMG height=5 alt="" src="Skins/Default/party/fr_r6_c4.gif" 
                  width=10 border=0 
        name=fr_r6_c4></TD>
                    </TR>
                  </TBODY>
                </TABLE></TD>
            </TR>
          </TBODY>
        </TABLE></TD>
      <TD vAlign=top height="100%"> <TABLE height="100%" cellSpacing=0 cellPadding=0 width=5 align=left 
      border=0>
          <TBODY>
            <TR> 
              <TD><IMG height=10 src="Skins/Default/party/fr_r2_c5.gif" width=4 
        border=0></TD>
            </TR>
            <TR> 
              <TD background=Skins/Default/party/bg.gif height="100%"></TD>
            </TR>
            <TR> 
              <TD><IMG height=10 alt="" src="Skins/Default/party/fr_r5_c5.gif" width=4 
            border=0></TD>
            </TR>
          </TBODY>
        </TABLE></TD>
    </TR>
    <TR> 
      <TD height=5></TD>
      <TD></TD>
      <TD></TD>
    </TR>
  </TBODY>
</TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=750 align=center border=0>
  <TBODY>
    <TR> 
      <TD vAlign=top height="100%"> <TABLE height="100%" cellSpacing=0 cellPadding=0 width=5 align=left 
      border=0>
          <TBODY>
            <TR> 
              <TD><IMG height=10 alt="" src="Skins/Default/party/fr_r2_c1.gif" width=5 
            border=0 name=fr_r2_c1></TD>
            </TR>
            <TR> 
              <TD background=Skins/Default/party/bg.gif height="100%"></TD>
            </TR>
            <TR> 
              <TD><IMG height=10 alt="" src="Skins/Default/party/fr_r5_c1.gif" width=5 
            border=0 name=fr_r5_c1></TD>
            </TR>
          </TBODY>
        </TABLE></TD>
      <TD width="100%" height="100%"> <TABLE height="100%" cellSpacing=0 cellPadding=0 width="100%" align=left 
      border=0>
          <TBODY>
            <TR> 
              <TD> <TABLE cellSpacing=0 cellPadding=0 width="100%" align=left 
              border=0>
                  <TBODY>
                    <TR> 
                      <TD><IMG height=5 alt="" src="Skins/Default/party/fr_r2_c2.gif" 
                  width=10 border=0 name=fr_r2_c2></TD>
                      <TD width="100%" background=Skins/Default/party/bg.gif></TD>
                      <TD><IMG height=5 alt="" src="Skins/Default/party/fr_r2_c4.gif" 
                  width=10 border=0 name=fr_r2_c4></TD>
                    </TR>
                  </TBODY>
                </TABLE></TD>
            </TR>
            <TR> 
              <TD vAlign=top background=Skins/Default/party/bg.gif height="100%"> <TABLE height=80 cellSpacing=0 cellPadding=0 width=740 align=left 
            bgColor=#ffffff border=0>
                  <TBODY>
                    <TR> 
                      <TD width=10 height=30><IMG height=30 alt="" 
                  src="Skins/Default/party/cnt_form_r2_c2.gif" width=10 border=0 
                  name=cnt_form_r2_c2></TD>
                      <TD width=730> <TABLE height=30 cellSpacing=0 cellPadding=0 width=730 
                  align=left bgColor=#ffffff border=0>
                          <TBODY>
                            <TR> 
                              <TD width=154 height=30><IMG height=30 alt="" 
                        src="Skins/Default/party/cnt_form_r2_c3.gif" width=154 border=0 
                        name=cnt_form_r2_c3></TD>
                              <TD width=14><IMG height=30 alt="" 
                        src="Skins/Default/party/cnt_form_r2_c4.gif" width=14 border=0 
                        name=cnt_form_r2_c4></TD>
                              <TD width=562 
                  background=Skins/Default/party/bg.gif></TD>
                            </TR>
                          </TBODY>
                        </TABLE></TD>
                    </TR>
                    <TR> 
                      <TD height=5><IMG height=5 alt="" 
                  src="Skins/Default/party/cnt_form_r3_c2.gif" width=10 border=0 
                  name=cnt_form_r3_c2></TD>
                      <TD> <TABLE height=5 cellSpacing=0 cellPadding=0 width=730 
                  align=left bgColor=#ffffff border=0>
                          <TBODY>
                            <TR> 
                              <TD width=720 height=5></TD>
                              <TD width=10><IMG height=5 alt="" 
                        src="Skins/Default/party/cnt_form_r3_c6.gif" width=10 border=0 
                        name=cnt_form_r3_c6></TD>
                            </TR>
                          </TBODY>
                        </TABLE></TD>
                    </TR>
                    <TR> 
                      <TD width=10 bgColor=#ffffff height=40></TD>
                      <TD>
					  <%if chkuserpart<>0 or (master or standmaster or supermaster) or paruser=trim(membername) then%>
					 <TABLE height=40 cellSpacing=0 cellPadding=0 width=730 
                  align=left bgColor=#ffffff border=0>
                          <TBODY>
                            <TR> 
                              <TD  width=720 bgColor=#ffffff 
                        height=40><table width="100%" border="0" cellspacing="0" cellpadding="3" style="width:100%">
                                  <form action="partyshow.asp?action=newsave" method=POST name="theForm">
                                    <tr> 
                                      <td width="18%" height="29" align="right">标题：</td>
                                      <td><input name="Title" type="text" id="Title" size="33" maxlength="100">
                                        好友：<SELECT name=myfriend>
              <OPTION selected value="">选择</OPTION>
<%
set rs=server.createobject("adodb.recordset")
sql="select friend from Ms_Friend where username='"&trim(membername)&"' and Fsub=1 order by Addtime desc"
rs.open sql,conn,1,1
do while not rs.eof
%>
			  <OPTION value="<%=rs(0)%>"><%=rs(0)%></OPTION> 
<%
rs.movenext
loop
rs.close
%>
			  </SELECT></td>
                                      <td>&nbsp;</td>
                                    </tr>
                                    <input name="Pid" type="hidden" id="Pid" value=<%=pid%>>
                                    <tr> 
                                      <td height="74" align="right">内容：</td>
                                      <td width="55%"><textarea name="Content" cols="60" rows="4" id="Content"></textarea> 
                                        <br>
                                        不能为空长度不大于200个字符。 </td>
                                      <td width="27%" valign="top"> <input name=emailflag type="radio" value="0" checked>
                                        留言通知<br>
                                        <input type="radio" name=emailflag value="1">
                                        邮件通知<br> <input type="radio" name=emailflag value="2">
                                        短信通知<br> <input type="radio" name=emailflag value="3">
                                        邮件和短信通知</td>
                                    </tr>
                                    <tr> 
                                      <td height="33" colspan="3" align="center"> 
                                        <input class=2 type=Submit value="保存" name=Submit2> 
                                        &nbsp; <input class=2 type="reset" name="Clear" value="清除"></td>
                                    </tr>
                                  </form>
                                  <TR> 
                                    <TD BACKGROUND="Skins/Default/diary/x_line3.gif" HEIGHT=1 colspan="3"></TD>
                                  </TR>
                                </table></TD>
                              <TD width=10 bgColor=#ffffff></TD>
                            </TR>
                          </TBODY>
                        </TABLE>
						<%else
						response.write("<TABLE height=40 cellSpacing=0 cellPadding=0 width=730 align=left bgColor=#ffffff border=0><TBODY>")
                            response.write("<TR><TD  width=720 bgColor=#ffffff height=40>您未参与本约会不能使用邀请功能 <a href=userparty.asp?action=add><FONT color=#ff0000>现在去发布新约会</FONT></a></TD><TD width=10 bgColor=#ffffff></TD></TR></TBODY></TABLE>")
						end if%>
						</TD>
                    </TR>
                    <TR> 
                      <TD height=5><IMG height=5 alt="" 
                  src="Skins/Default/party/cnt_form_r5_c2.gif" width=10 border=0 
                  name=cnt_form_r5_c2></TD>
                      <TD> <TABLE height=5 cellSpacing=0 cellPadding=0 width=730 
                  align=left bgColor=#ffffff border=0>
                          <TBODY>
                            <TR> 
                              <TD width=720 bgColor=#ffffff height=5></TD>
                              <TD width=10><IMG height=5 alt="" 
                        src="Skins/Default/party/cnt_form_r5_c6.gif" width=10 border=0 
                        name=cnt_form_r5_c6></TD>
                            </TR>
                          </TBODY>
                        </TABLE></TD>
                    </TR>
                  </TBODY>
                </TABLE></TD>
            </TR>
            <TR> 
              <TD> <TABLE cellSpacing=0 cellPadding=0 width="100%" align=left 
              border=0>
                  <TBODY>
                    <TR> 
                      <TD><IMG height=5 alt="" src="Skins/Default/party/fr_r6_c2.gif" 
                  width=10 border=0 name=fr_r6_c2></TD>
                      <TD width="100%" background=Skins/Default/party/bg.gif></TD>
                      <TD><IMG height=5 alt="" src="Skins/Default/party/fr_r6_c4.gif" 
                  width=10 border=0 
        name=fr_r6_c4></TD>
                    </TR>
                  </TBODY>
                </TABLE></TD>
            </TR>
          </TBODY>
        </TABLE></TD>
      <TD vAlign=top height="100%"> <TABLE height="100%" cellSpacing=0 cellPadding=0 width=5 align=left 
      border=0>
          <TBODY>
            <TR> 
              <TD><IMG height=10 alt="" src="Skins/Default/party/fr_r2_c5.gif" width=5 
            border=0 name=fr_r2_c5></TD>
            </TR>
            <TR> 
              <TD background=Skins/Default/party/bg.gif height="100%"></TD>
            </TR>
            <TR> 
              <TD><IMG height=10 alt="" src="Skins/Default/party/fr_r5_c5.gif" width=5 
            border=0 name=fr_r5_c5></TD>
            </TR>
          </TBODY>
        </TABLE></TD>
    </TR>
    <TR> 
      <TD vAlign=top height="100%"></TD>
      <TD height="100%">&nbsp; </TD>
      <TD vAlign=top height="100%"></TD>
    </TR>
  </TBODY>
</TABLE>
<%
end sub

sub addjoin()''报名
if Not ChkPost then'查检提交数据
	ErrMsg=ErrMsg+"<Br>"+"<li>您提交的数据不合法，请不要从外部提交发言。"
   	FoundErr=True
end if
if Cint(Codeshow(4))=1 then
	if Not CodeIsTrue() then
		errmsg=errmsg+"<br>"+"<li>验证码校验失败，请返回刷新页面后再输入验证码。"
		founderr=true
	end if
end if
if Cint(GroupSetting(40))=0 then
  	errmsg=errmsg+"<br>"+"<li>您没有权限响应约会，请与管理员联系。"
	founderr=true
end if
dim Telephone,email
Telephone=checkStr(trim(request("Telephone")))
email=checkStr(trim(request("email")))
if Telephone<>"" and strLength(request("Telephone"))>50 then
	errmsg=errmsg+"<br>"+"<li>电话长度不大于50个字符。"
	founderr=true
end if
if email<>"" and strLength(request("email"))>100 then
	errmsg=errmsg+"<br>"+"<li>邮件长度不大于100个字符。"
	founderr=true
end if
if Telephone="" and email="" then
	errmsg=errmsg+"<br>"+"<li>电话与邮件不能两个都为空。"
	founderr=true
end if
''开始判断约会要求
dim Minage,Maxage,Checked,City
sql="select Username,Partname,Ispublic,PartyDate,Parsex,Minage,Maxage,Maxnum,Userjoin,Checked,City from Ms_party where pid="&pid&""
set rs=conn.execute(sql)
if not (rs.eof and rs.bof) then
if rs("Username")=trim(membername) then''判断是否自己的约会
	errmsg=errmsg+"<br>"+"<li>您不能报名自己约会。"
	founderr=true
end if
if rs("Ispublic")=1 then''判断是否为单独约会
if rs("Partname")<>trim(membername) then
	errmsg=errmsg+"<br>"+"<li>您不是该约会所要邀请的人。"
	founderr=true
end if
else''如果不是单独约会判断报名是否满
if rs("Maxnum")<>0 and rs("Maxnum")<=rs("Userjoin") then
	errmsg=errmsg+"<br>"+"<li>约会报名已经满。"
	founderr=true
end if
end if
if datediff("d",rs("PartyDate"),date())<1 then''判断约会是否结束
	errmsg=errmsg+"<br>"+"<li>该约会已经结束。"
	founderr=true
end if
if rs("Parsex")<>2 and rs("parsex")<>mysex then''判断性别限制
	errmsg=errmsg+"<br>"+"<li>该约会采用性别限制。"
	founderr=true
end if
Minage=rs("Minage")
Maxage=rs("Maxage")
Checked=rs("Checked")
City=rs("City")
else
	errmsg=errmsg+"<br>"+"<li>对不起，参数错误。"
	founderr=true
end if
rs.close
if Checked=0 then
	errmsg=errmsg+"<br>"+"<li>该约会未审核。"
	founderr=true
end if
if Checked=2 then
	errmsg=errmsg+"<br>"+"<li>该约会已提前结束。"
	founderr=true
end if
if Checked=3 then
	errmsg=errmsg+"<br>"+"<li>该约会已结束。"
	founderr=true
end if
dim myBirthday,myinfolist
sql="select UserBirthday,UserInfo from [Ms_User] where Username='"&trim(membername)&"'"
set rs=conn.execute(sql)
if not (rs.eof and rs.bof) then
myBirthday=rs(0)
myinfolist=rs(1)
else
	errmsg=errmsg+"<br>"+"<li>您未注册，请先注册后再参加约会。"
	founderr=true
exit sub
end if
rs.close
if split(myinfolist,"|||")(5)="" or City<>split(myinfolist,"|||")(5) then
	errmsg=errmsg+"<br>"+"<li>您与该约会不是同一个城市。"
	founderr=true
end if
if datediff("yyyy",myBirthday,Now())<Minage or datediff("yyyy",myBirthday,Now())>Maxage then
  	errmsg=errmsg+"<br>"+"<li>该您的年龄不符合约会年龄要求。"
	founderr=true
end if
sql="select Username from [Ms_partyj] where Username='"&trim(membername)&"' and pid="&Pid&""
set rs=conn.execute(sql)
if not (rs.eof and rs.bof) then
  	errmsg=errmsg+"<br>"+"<li>您已经报名了，请不要重复报名。"
	founderr=true
end if
rs.close
''报名判断结束

if founderr=true then exit sub
	conn.execute("Insert into Ms_partyj (Username,PID,Checked,Addtime,Telephone,EMail) VALUES ('"&trim(MemberName)&"',"&PID&",0,'"&now()&"','"&Telephone&"','"&Email&"')")
	conn.execute("Update Ms_party set Userjoin=Userjoin+1 where Pid="&Pid&"")
	conn.execute("update Ms_user set UserWealth=UserWealth "&GroupSetting(41)&Cint(GroupSetting(42))&",UserEP=UserEP "&GroupSetting(43)&Cint(GroupSetting(44))&",UserCP=UserCP "&GroupSetting(45)&Cint(GroupSetting(46))&" where username='"&trim(MemberName)&"'")
	sucmsg=sucmsg+"<br>"+"<li><b>您已经成功响应该约会，请等待约会人的审核。"
		call Mslove_suc()
end sub


sub newsave()
dim Title,Content,myfriend,emailflag
Title=checkStr(trim(request("Title")))
Content=checkStr(trim(request("Content")))
myfriend=checkStr(trim(request("myfriend")))
emailflag=checkStr(trim(request("emailflag")))
if Title="" or strLength(request("Title"))>100 then
	errmsg=errmsg+"<br>"+"<li>标题不能为空长度不大于100个字符。"
	founderr=true
end if
if Content="" or strLength(request("Content"))>200 then
	errmsg=errmsg+"<br>"+"<li>内容不能为空长度不大于200个字符。"
	founderr=true
end if
if myfriend="" then
	errmsg=errmsg+"<br>"+"<li>接受邀请的好友用户名不能为空。"
	founderr=true
end if
if founderr=true then exit sub
dim topic,email,mailbody,UserEmail''读出好友的邮件地址
sql="select UserEmail from [Ms_User] where Username='"&myfriend&"'"
set rs=conn.execute(sql)
if not (rs.eof and rs.bof) then
UserEmail=rs(0)
else
UserEmail=0
end if
rs.close
if emailflag=0 then
dim conmes
conmes=conmes& ""&Content&""
conmes=conmes & "请到以下地址浏览该约会内容。<br>"
conmes=conmes& "<a href=http://"&request.servervariables("server_name")&replace(lcase(request.servervariables("script_name")),"partyshow.asp","")&"partyshow.asp?Pid="&Pid&" target=_blank>查看约会内容</a>"
	conn.execute("Insert into Ms_Note (TypeID,Title,Content,Username,Postname,Flag,Addtime) VALUES (1,'"&Title&"','"&conmes&"','"&myfriend&"','"&trim(MemberName)&"',0,'"&now()&"')")
end if
if emailflag=1 or emailflag=3 then
		topic=""&Title&""
		email=UserEmail
		mailbody=mailbody & ""&myfriend&"，您好：<br>"
		mailbody=mailbody & "您在"&webname&"的好友"&trim(MemberName)&"邀请您来参加约会<br>"
		mailbody=mailbody & ""&Content&"<br>"
		mailbody=mailbody & "请到以下地址浏览该约会内容。<br>"
		mailbody=mailbody & "<a href=http://"&request.servervariables("server_name")&replace(lcase(request.servervariables("script_name")),"partyshow.asp","")&"partyshow.asp?Pid="&Pid&" target=_blank>查看约会内容</a>"
		if Mailtype=0 then             
		elseif Mailtype=1 then
			call jmail(email,topic,mailbody)
		elseif Mailtype=2 then
			call Cdonts(email,topic,mailbody)
		elseif Mailtype=3 then
			call aspemail(email,topic,mailbody)
		end if
end if
if emailflag=2 or emailflag=3 then''站内短信
	dim mtitle,messages
		mtitle=""&Title&""
		messages=messages &""&Content&"</br>"
		messages=messages & "请到以下地址浏览该约会内容。<br>"
		messages=messages & "<a href=http://"&request.servervariables("server_name")&replace(lcase(request.servervariables("script_name")),"partyshow.asp","")&"partyshow.asp?Pid="&Pid&" target=_blank>查看约会内容</a>"
		sql="insert into Ms_message (incept,sender,title,content,sendtime,flag,issend) values ('"&myfriend&"','"&trim(membername)&"','"&mtitle&"','"&messages&"',Now(),0,1)"
		conn.execute(sql)
end if
	sucmsg=sucmsg+"<br>"+"<li><b>您已向您的好友"&myfriend&"发送邀请。"
		call Mslove_suc()
end sub%>
</body>
</html>