<!--#include file=../conn.asp-->
<!-- #include file="inc/const.asp" -->
<%Head()
	dim admin_flag
	admin_flag=",17,"
	if not master or instr(","&session("flag")&",",admin_flag)=0 then
		Errmsg=ErrMsg + "<BR><li>本页面为管理员专用，请<a href=../"&LoginUrl&" target=_top>登录</a>后进入。<br><li>您没有管理本页面的权限。"
		Call Ms_error()
	End If
		Main(1)
		Select Case Request("action")
		Case "parl"''读取数据列表
		call parl()
		Case "Toset"''执行操作
		call Toset()
		Case "edit"''修改约会
		call edit()
		Case "edit_s"''保存约会
		call edit_s()
		Case "view_j"''响应会员列表
		call view_j()
		Case "Tojoin"''响应会员管理
		call Tojoin()
		Case Else
		call sIndex()''搜索表单
		End Select
		Main(0)
		Footer()

sub main(Str)
if Str=1 then%>
<table width="95%" border="0" cellspacing="1" cellpadding="3"  align=center class="tableBorder">
  <tr> 
    <th height="23" colspan="8" class="tableHeaderText">同城约会中心</th>
  </tr>
  <tr> 
    <td width="18%" height="25" align="center" class="forumrow">注意事项</td>
    <td width="77%" height="25" class="forumrow" colspan="7">
	<li>删除约会此操作是不可逆的；</li>
	<li>可进行审核、删除操作；</li>
	<li>点击约会名称进入修改约会；</li>
	<li>取消提前结束约会系统默认为未审核；</li>
	<li>取消移为历史约会系统默认为未审核。</li>
	</td>
  </tr>
  <tr> 
    <td height="29" align="center" class="forumRowHighlight">快捷方式</td>
	<td width="77%" height="29" class="forumRowHighlight" colspan="7"><a href="party.asp">管理首页</a> 
      | <a href="?action=parl&t=1">所有约会</a> 
      | <a href="?action=parl&t=2">最新100</a> | <a href="?action=parl&t=3">人气100</a> 
      | <a href="?action=parl&t=4">未审约会</a> | <a href="?action=parl&t=5">历史约会</a> | <a href="?action=parl&t=6">提前结束</a></td>
  </tr>
  <%
	Else
%>
</table>
<p></p>
<%end if
end sub

sub sIndex()''搜索%>
<form action="?action=parl" method=post>
<input type=hidden name="t" value="7"> 
<tr>
<th align=left colspan=8 height=23>高级约会查询</th>
</tr>
<tr>
<td width=20% class=forumrow>注意事项</td>
<td width=80% class=forumrow colspan=7>在记录很多的情况下搜索条件越多查询越慢，请尽量减少查询条件</td>
</tr>
<tr>
<td width=20% class=forumrow>会员姓名</td>
<td width=80% class=forumrow colspan=7><input name="username" type="text" size="20">&nbsp;<input type=checkbox name="like" value="1" checked>
      完整匹配</td>
</tr>
<tr>
<td width=20% class=forumrow>约会名称</td>
<td width=80% class=forumrow colspan=7><input name="title" type="text" size="30">
</td>
</tr>
<tr>
<td width=20% class=forumrow>约会类别</td>
<td width=80% class=forumrow colspan=7>
<select name="Typeid">
<option value=""></option>
      <option value="1">征友</option>
	  <option value="2">恋人</option>
	  <option value="3">节日</option>
	  <option value="4">纪念</option>
	  <option value="5">旅游</option>
	  <option value="6">其它</option>
    </select></td>
</tr>
<tr>
<td width=100% class=forumrow align=center colspan=8><input name="submit" type=submit value="   搜  索   "></td>
</tr>
</form>
<%
end sub


sub parl()''列出所有约会数据
strFileName="party.asp?action="&Request("action") & "&t="&request("t")&"&LoN="&request("LoN")&"&Checked="&request("Checked")&""
call tumppages()
dim sql
sql = " Pid,Username,Title,Typeid,Minage,Maxage,Parsex,PartyDate,Hits,Checked,Userjoin "%>
<tr>
<th colspan=8 align=left height=23>搜索结果</th>
</tr>
<FORM METHOD=POST ACTION="?action=Toset">
<tr align=center height=23>
<td class=forumRowHighlight width="18%"><B>发起人</B></td>
<td class=forumRowHighlight width="28%"><B>约会名称</B></td>
<td class=forumRowHighlight width="6%"><B>性质</B></td>
<td class=forumRowHighlight width="12%"><B>要求</B></td>
<td class=forumRowHighlight width="14%"><B>约会时间</B></td>
<td class=forumRowHighlight width="6%"><B>状态</B></td>
<td class=forumRowHighlight width="6%"><B>人气</B></td>
<td class=forumRowHighlight><B>操作</B></td>
</tr>
<%dim sqlstr
set rs=server.createobject("adodb.recordset")
Select Case Request("t")
	Case 1
		Sql = "SELECT " & sql & " from Ms_party ORDER BY PID DESC"
	Case 2
		Sql = "SELECT top 100 " & sql & " from Ms_party ORDER BY PID DESC"
	case 3
		Sql = "SELECT top 100 " & sql & " from Ms_party ORDER BY hits DESC"
	case 4
		Sql = "SELECT " & sql & " from Ms_party where Checked=0 ORDER BY PID DESC"
	case 5
		Sql = "SELECT " & sql & " from Ms_party where Checked=3 ORDER BY PID DESC"
	case 6
		Sql = "SELECT " & sql & " from Ms_party where Checked=2 ORDER BY PID DESC"
	case 7''搜索开始
	sqlstr=""''搜索开始
		if request("username")<>"" then
			if request("like")=1 then
			sqlstr=" username='"&request("username")&"' "
			else
			sqlstr=" username like '%"&request("username")&"%' "
			end if
		end if
	if request("Typeid")<>"" then
			if sqlstr<>"" then
			sqlstr=sqlstr & " and Typeid="&request("Typeid")&" "
			else
			sqlstr=" Typeid="&request("Typeid")&" "
			end if
		end if
	if request("title")<>"" then
			if sqlstr<>"" then
			sqlstr=sqlstr & " and title like '%"&request("title")&"%' "
			else
			sqlstr=" title like '%"&request("title")&"%' "
			end if
		end if
		if sqlstr<>"" then
		Sql = "SELECT " & sql & " FROM Ms_party WHERE " & Sqlstr & " ORDER BY PID DESC"
		else
		Response.Write "<tr><td colspan=8 class=forumrow>搜索条件不能都为空。</td></tr>"
		Response.End
		end if			
	case else
		Response.Write "<tr><td colspan=8 class=forumrow>错误的参数。</td></tr>"
		Response.End
	End Select
	rs.Open sql,conn,1,1
if not (rs.eof and rs.bof) then
call rspages()
do while not rs.eof and page_count<Cint(MaxPerPage)%>
<tr align=center height=23>
<td class=forumrow width="12%"><a href="admin_user.asp?action=modify&username=<%=rs(1)%>"><%=rs(1)%></a></td>
<td class=forumrow width="28%" align="left"><a href=?action=edit&id=<%=rs(0)%> title="修改约会信息"><%=rs(2)%></a> <font color="#666666">[<a href=?action=view_j&pid=<%=rs(0)%> title="响应会员列表"><%=rs(10)%></a>]</font></td>
<td class=forumrow width="6%"><%if rs(3)=1 then
	response.write("征友")
	elseif rs(3)=2 then
	response.write("恋人")
	elseif rs(3)=3 then
	response.write("节日")
	elseif rs(3)=4 then
	response.write("纪念")
	elseif rs(3)=5 then
	response.write("旅游")
	else
	response.write("其它")
	end if%></td>
<td class=forumrow width="12%"><%if rs(6)=2 then
	response.Write("无要求")
	elseif rs(6)=1 then
	response.Write("男")
	else
	response.Write("女")
	end if%>
      (<%=rs(4)%>-<%=rs(5)%>)</td>
<td class=forumrow width="14%" align="left"><%=rs(7)%></td>
<td class=forumrow width="6%">
<%if rs(9)=0 then
response.Write("<font color=red>未审</font>")
elseif rs(9)=1 then
response.Write("<font color=green>已审</font>")
elseif rs(9)=2 then
response.Write("<font color=#FF9900>结束</font>")
elseif rs(9)=3 then
response.Write("<font color=#999999>历史</font>")
end if%></td>
<td class=forumrow width="6%"><%=rs(8)%></td>
<td class=forumrow><input type="checkbox" name="id" value="<%=rs(0)%>"></td>
</tr>
<%page_count=page_count+1
  rs.movenext
  loop
  else
  response.Write("<tr><td colspan=8 class=forumrow>暂时数据。</td></tr>")
  end if
  if totalrec>0 then%>
<tr align="center"> 
      <td height="24" colspan="8" class=forumrow><%
		  	call showpage(strFileName)
		  %></td>
    </tr>
<%end if%>
<tr align="center"> 
      <td height="24" colspan="8" class=forumrow align="right"><input type="radio" name="paction" value="1">删除记录
	  <input type="radio" name="paction" value="2">审核操作
	  <select name="chkset">
	  <option value=""></option>
	  <option value=1>选定审核</option>
	  <option value=2>全部审核</option>
	  <option value=3>选定撤消</option>
	  <option value=4>全部撤消</option>　
	  </select>
	  <input type="radio" name="paction" value="3">提前结束
	   <select name="overset1">
	  <option value=""></option>
	  <option value=1>提前</option>
	  <option value=2>取消</option>
	  </select>
	  <input type="radio" name="paction" value="4">移为历史
	  <select name="overset2">
	  <option value=""></option>
	  <option value=1>移入</option>
	  <option value=2>移出</option>
	  </select>
	  全部选定<input type=checkbox value="on" name="chkall" onclick="CheckAll(this.form)"></td>
    </tr>
	<tr align="center"> 
      <td height="24" colspan="8" class=forumRowHighlight><input type=submit name=submit value="执行操作"  onclick="{if(confirm('确定执行操作吗?')){return true;}return false;}"></td>
    </tr>
</form>
<%end sub

sub Toset()''执行操作
dim delid,fixid,Maxnum
response.write "<tr><th colspan=8 height=23 align=left>执行结果</th></tr>"
	if request("paction")="" then
		response.write "<tr><td colspan=8 class=forumrow>请指定相关参数。</td></tr>"
		founderr=true
	end if
	delid=replace(request.form("id"),"'","")
	delid=replace(delid,";","")
	delid=replace(delid,"--","")
	delid=replace(delid,")","")
	fixid=replace(delid,",","")
	fixid=Trim(replace(fixid," ",""))
if not founderr then
		if request("paction")=1 then''删除操作
				Maxnum=ubound(split(delid,","))
				Conn.Execute("delete from Ms_party where Pid in ("&delid&")")
				Conn.Execute("delete from Ms_partyj where Pid in ("&delid&")")''删除加入的用户
				conn.execute("Update Ms_setup set Partynum=Partynum-"&Maxnum&" where Cid=1")
				response.write "<tr><td colspan=8 class=forumrow>删除约会成功。</td></tr>"
		elseif request("paction")=2 then''审核操作
			if Cint(request("chkset"))=1 then
			Conn.Execute("update Ms_party set Checked=1 where Pid in ("&delid&")")''审核约会记录
		response.write "<tr><td colspan=8 class=forumrow>选定审核约会成功。</td></tr>"
			elseif Cint(request("chkset"))=2 then
			Conn.Execute("update Ms_party set Checked=1 where Checked=0")''审核约会记录
		response.write "<tr><td colspan=8 class=forumrow>全部审核约会成功。</td></tr>"
			elseif Cint(request("chkset"))=3 then
			Conn.Execute("update Ms_party set Checked=0 where Pid in ("&delid&")")''撤消约会记录
		response.write "<tr><td colspan=8 class=forumrow>选定撤消约会成功。</td></tr>"
			elseif Cint(request("chkset"))=4 then
			Conn.Execute("update Ms_party set Checked=0 where Checked=1")''撤消约会记录
		response.write "<tr><td colspan=8 class=forumrow>全部撤消约会成功。</td></tr>"
			end if
		elseif request("paction")=3 then''提前结束
			if request("overset1")=1 then
			Conn.Execute("update Ms_party set Checked=2 where Pid in ("&delid&")")''提前结束记录
			response.write "<tr><td colspan=8 class=forumrow>提前结束约会成功。</td></tr>"
			else
			Conn.Execute("update Ms_party set Checked=0 where Pid in ("&delid&")")''提前结束记录
			response.write "<tr><td colspan=8 class=forumrow>取消提前结束约会成功。</td></tr>"
			end if
		elseif request("paction")=4 then''移为历史
			if request("overset2")=1 then
			Conn.Execute("update Ms_party set Checked=3 where Pid in ("&delid&")")''移为历史
			response.write "<tr><td colspan=8 class=forumrow>移为历史约会成功。</td></tr>"
			else
			Conn.Execute("update Ms_party set Checked=0 where Pid in ("&delid&")")''移出历史
			response.write "<tr><td colspan=8 class=forumrow>移出历史约会成功。</td></tr>"
			end if
		else
		response.write "<tr><td colspan=8 class=forumrow>错误的参数。</td></tr>"
		end if
end if
end sub

sub view_j()''查看响应会员列表
strFileName="party.asp?action="&request("view_j")&"&Pid="&Request("Pid") & ""
call tumppages()
dim sql
sql = " JID,Username,Telephone,EMail,Checked,Addtime "
%>
<tr>
<th colspan=8 align=left height=23>响应会员列表</th>
</tr>
<FORM METHOD=POST ACTION="?action=Tojoin">
<tr align="center"> 
      <td width="17%" height="27" class=forumRowHighlight>会员名称</td>
      <td width="16%" class=forumRowHighlight>联系电话</td>
      <td width="17%" class=forumRowHighlight>联系邮件</td>
      <td width="18%" class=forumRowHighlight>响应时间</td>
      <td width="10%" class=forumRowHighlight>状态</td>
      <td width="10%" class=forumRowHighlight>通知</td>
      <td class=forumRowHighlight>操作</td>
    </tr>
	<%set rs=server.createobject("adodb.recordset")
  sql="select " & sql & " from Ms_partyj where PID="&request("Pid")&""
rs.Open sql,conn,1,1
if not (rs.eof and rs.bof) then
call rspages()
do while not rs.eof and page_count<Cint(MaxPerPage)%>
<tr align=center height=23>
  <td class=forumrow width="17%"><a href="admin_user.asp?action=modify&username=<%=rs(1)%>"><%=rs(1)%></a></td>
  <td class=forumrow width="16%"><%=rs(2)%></td>
  <td class=forumrow width="17%"><%=rs(3)%></td>
  <td class=forumrow width="18%"><%=rs(5)%></td>
  <td class=forumrow width="10%"><%if rs(4)=0 then
	response.Write("<font color=#999999>未审核</font>")
	elseif rs(4)=1 then
	response.Write("<font color=red>已审核</font>")
	elseif rs(4)=2 then
	response.Write("<font color=red>被拒绝</font>")
	elseif rs(4)=3 then
	response.Write("<font color=blue>主动拒绝</font>")
	end if%></td>
  <td class=forumrow width="10%"></td>
  <td class=forumrow><input type="checkbox" name="id" value="<%=rs(0)%>"></td>
</tr>
<%page_count=page_count+1
  rs.movenext
  loop
  end if
  if totalrec>0 then%>
  <tr align="center"> 
      <td height="24" colspan="8" class=forumrow> <%
		  	call showpage(strFileName)
		  %></td>
    </tr>
<%end if%>
<tr align="center"> 
      <td height="24" colspan="8" class=forumrow align=right><input type="radio" name="jaction" value=1>删除记录
	  <input type="radio" name="jaction" value="2">审核操作
	  <select name="chkset">
	  <option value=""></option>
	  <option value=1>选定审核</option>
	  <option value=2>全部审核</option>
	  <option value=3>选定撤消</option>
	  <option value=4>全部撤消</option>　
	  </select>
	  <input type="hidden" name="pid" value="<%=request("pid")%>">
全部选定<input type=checkbox value="on" name="chkall" onclick="CheckAll(this.form)"></td>
    </tr>
	<tr align="center"> 
      <td height="24" colspan="8" class=forumRowHighlight><input type=submit name=submit value="执行操作"  onclick="{if(confirm('确定执行操作吗?')){return true;}return false;}"></td>
    </tr>
</form>
<%end sub

sub Tojoin()''加入操作
dim delid,fixid,Maxnum
response.write "<tr><th colspan=8 height=23 align=left>执行结果</th></tr>"
	if request("jaction")="" then
		response.write "<tr><td colspan=8 class=forumrow>请指定相关参数。</td></tr>"
		founderr=true
	end if
	delid=replace(request.form("id"),"'","")
	delid=replace(delid,";","")
	delid=replace(delid,"--","")
	delid=replace(delid,")","")
	fixid=replace(delid,",","")
	fixid=Trim(replace(fixid," ",""))
if not founderr then
		if request("jaction")=1 then''删除操作
				Maxnum=ubound(split(delid,","))
				Conn.Execute("delete from Ms_partyj where JID in ("&delid&")")''删除加入的用户
				conn.execute("Update Ms_party set Userjoin=Userjoin-"&(Maxnum+1)&" where Pid="&request("Pid")&"")
				response.write "<tr><td colspan=8 class=forumrow>删除响应会员成功。</td></tr>"
		elseif request("jaction")=2 then''审核操作
			if Cint(request("chkset"))=1 then
			Conn.Execute("update Ms_partyj set Checked=1 where JID in ("&delid&")")''审核响应约会记录
		response.write "<tr><td colspan=8 class=forumrow>选定审核响应约会成功。</td></tr>"
			elseif Cint(request("chkset"))=2 then
			Conn.Execute("update Ms_partyj set Checked=1 where Checked=0")''审核响应约会记录
		response.write "<tr><td colspan=8 class=forumrow>全部审核响应约会成功。</td></tr>"
			elseif Cint(request("chkset"))=3 then
			Conn.Execute("update Ms_partyj set Checked=0 where JID in ("&delid&")")''撤消响应约会记录
		response.write "<tr><td colspan=8 class=forumrow>选定撤消响应约会成功。</td></tr>"
			elseif Cint(request("chkset"))=4 then
			Conn.Execute("update Ms_partyj set Checked=0 where Checked=1")''撤消响应约会记录
		response.write "<tr><td colspan=8 class=forumrow>全部撤消响应约会成功。</td></tr>"
			end if
		else
		response.write "<tr><td colspan=8 class=forumrow>错误的参数。</td></tr>"
		end if
end if
end sub

sub edit()''修改约会
dim Conet,Typeid
sql="select * from [Ms_party] where Pid="&request("id")&""
		set rs=conn.execute(Sql)
		if not (rs.eof and rs.bof) then
		Conet=rs("Conet")
Typeid=rs("Typeid")
%><tr><th colspan=8 height=23 align=center><%=rs("Username")%> 的约会</th></tr>
<FORM METHOD=POST ACTION="?action=edit_s">
<tr> 
      <td width="25%" height="13" align="right" class=forumRowHighlight> 约会名称：</td>
      <td width="75%" align="left" class=forumRowHighlight colspan="7" > <input name="Title" type="text" id="Title" size="40" maxlength="200" value="<%=rs("Title")%>"></td>
    </tr>
    <tr> 
      <td width="25%" height="14" align="right" class=forumRowHighlight>邀请对象：</td>
      <td align="left" class=forumRowHighlight colspan="7"><input name="Partname" type="text" id="Partname" size="20" maxlength="20" value="<%=rs("Partname")%>"> 
       </td>
    </tr>
    <input name="Pid" type="hidden" id="Pid" value="<%=request("id")%>">
    <tr> 
      <td width="25%" align="right" class=forumrow>约会种类： </td>
      <td width="75%" class=forumrow colspan="7">
	  <select name="Typeid">
          <option value="1" <%if Typeid=1 then%>selected<%end if%>>征友</option>
          <option value="2" <%if Typeid=2 then%>selected<%end if%>>恋人</option>
          <option value="3" <%if Typeid=3 then%>selected<%end if%>>节日</option>
          <option value="4" <%if Typeid=4 then%>selected<%end if%>>纪念</option>
          <option value="5" <%if Typeid=5 then%>selected<%end if%>>旅游</option>
          <option value="6" <%if Typeid=6 then%>selected<%end if%>>其它</option>
        </select>
        　约会类型： 
        <input name="Ispublic" type="radio" value="0" <%if rs("Ispublic")=0 then%>checked<%end if%>>
        公开约会 
        <input type="radio" name="Ispublic" value="1" <%if rs("Ispublic")=1 then%>checked<%end if%>>
        单独约会</td>
    </tr>
    <tr> 
      <td align="right" class=forumrow>约会日期：</td>
      <td class=forumrow colspan="7"><input name=Partydate type=text value="<%=split(rs("PartyDate")," ")(0)%>">
        时间： 
        <input name="partytime" type="text" id="partytime" size="10" maxlength="20" value="<%=split(rs("PartyDate")," ")(1)%>"></td>
    </tr>
    <tr> 
      <td align="right" class=forumrow>对约会对象性别的要求：</td>
      <td class=forumrow colspan="7"><select name="Usersex">
          <option value="2" <%if rs("Parsex")=2 then%>selected<%end if%>>无要求</option>
          <option value="1" <%if rs("Parsex")=1 then%>selected<%end if%>>男</option>
          <option value="0" <%if rs("Parsex")=0 then%>selected<%end if%>>女</option>
        </select> </td>
    </tr>
    <tr> 
      <td align="right" class=forumrow>对约会对象年龄的要求：</td>
      <td class=forumrow colspan="7">从 
        <select name="Minage" class="put" id="Minage">
		<option value="<%=rs("Minage")%>" selected><%=rs("Minage")%></option>
          <option value="16">16 </option>
          <option value="17">17 </option>
          <option value="18">18 </option>
          <option value="19">19 </option>
          <option value="20">20 </option>
          <option value="21">21 </option>
          <option value="22">22 </option>
          <option value="23">23 </option>
          <option value="24">24 </option>
          <option value="25">25 </option>
          <option value="26">26 </option>
          <option value="27">27 </option>
          <option value="28">28 </option>
          <option value="29">29 </option>
          <option value="30">30 </option>
          <option value="31">31 </option>
          <option value="32">32 </option>
          <option value="33">33 </option>
          <option value="34">34 </option>
          <option value="35">35 </option>
          <option value="36">36 </option>
          <option value="37">37 </option>
          <option value="38">38 </option>
          <option value="39">39 </option>
          <option value="40">40 </option>
          <option value="41">41 </option>
          <option value="42">42 </option>
          <option value="43">43 </option>
          <option value="44">44 </option>
          <option value="45">45 </option>
          <option value="46">46 </option>
          <option value="47">47 </option>
          <option value="48">48 </option>
          <option value="49">49 </option>
          <option value="50">50 </option>
          <option value="51">51 </option>
          <option value="52">52 </option>
          <option value="53">53 </option>
          <option value="54">54 </option>
          <option value="55">55 </option>
          <option value="56">56 </option>
          <option value="57">57 </option>
          <option value="58">58 </option>
          <option value="59">59 </option>
          <option value="60">60 </option>
        </select>
        岁到 
        <select name="Maxage" class="put" id="Maxage">
		<option value="<%=rs("Maxage")%>" selected><%=rs("Maxage")%> </option>
          <option value="16">16 </option>
          <option value="17">17 </option>
          <option value="18">18 </option>
          <option value="19">19 </option>
          <option value="20">20 </option>
          <option value="21">21 </option>
          <option value="22">22 </option>
          <option value="23">23 </option>
          <option value="24">24 </option>
          <option value="25">25 </option>
          <option value="26">26 </option>
          <option value="27">27 </option>
          <option value="28">28 </option>
          <option value="29">29 </option>
          <option value="30">30 </option>
          <option value="31">31 </option>
          <option value="32">32 </option>
          <option value="33">33 </option>
          <option value="34">34 </option>
          <option value="35">35 </option>
          <option value="36">36 </option>
          <option value="37">37 </option>
          <option value="38">38 </option>
          <option value="39">39 </option>
          <option value="40">40 </option>
          <option value="41">41 </option>
          <option value="42">42 </option>
          <option value="43">43 </option>
          <option value="44">44 </option>
          <option value="45">45 </option>
          <option value="46">46 </option>
          <option value="47">47 </option>
          <option value="48">48 </option>
          <option value="49">49 </option>
          <option value="50">50 </option>
          <option value="51">51 </option>
          <option value="52">52 </option>
          <option value="53">53 </option>
          <option value="54">54 </option>
          <option value="55">55 </option>
          <option value="56">56 </option>
          <option value="57">57 </option>
          <option value="58">58 </option>
          <option value="59">59 </option>
          <option value="60">60 </option>
        </select>
        岁之间</td>
    </tr>
    <tr> 
      <td align="right" class=forumrow>对约会的描述：</td>
      <td class=forumrow colspan="7"><textarea name="Content" cols="60" rows="5" id="IDContent"><%=rs("Content")%></textarea> 
        <a style=cursor:hand onclick="if (parseInt(IDContent.rows)-3>0)(IDContent.rows=parseInt(IDContent.rows)-3)"><img src="../Skins/Default/minus.gif" unselectable="on" border='0'></a> 
        <a style=cursor:hand onclick="if (parseInt(IDContent.rows)+3>3)(IDContent.rows=parseInt(IDContent.rows)+3)"><img src="../Skins/Default/plus.gif" unselectable="on" border='0'></a><br>
        描述内容不能大于200个字符。</td>
    </tr>
    <tr> 
      <td height="12" align="right" class=forumrow>约会限制人数：</td>
      <td class=forumrow colspan="7"><input name="Maxnum" type="text" id="Maxnum" size="5" maxlength="10" value="<%=rs("Maxnum")%>" > 人（选择单独约会，只允许一个响应）</font></td>
    </tr>
    <tr> 
      <td height="5" align="right" class=forumrow>省　　份：</td>
      <td class=forumrow colspan="7"><input type=text name=province size=12 value="<%=rs("Province")%>"></td>
    </tr>
    <tr> 
      <td height="2" align="right" class=forumrow>城　　市：</td>
      <td class=forumrow colspan="7"><input type=text name=city size=12 value="<%=rs("City")%>"></td>
    </tr>
    <tr> 
      <td height="1" align="right" class=forumrow>约会地点：</td>
      <td class=forumrow colspan="7"><input name="Address" type="text" id="Address" size="20" maxlength="100" value="<%=rs("Address")%>">
        最好指定一个特殊地标等等。</td>
    </tr>
    <tr> 
      <td height="1" align="right" class=forumrow>接头暗号或我的特征：</td>
      <td class=forumrow colspan="7"><input name="sign" type="text" id="sign" size="20" value="<%=rs("Mychara")%>"></td>
    </tr>
    <tr> 
      <td height="26" colspan="8" align="center" class=forumRowHighlight>请您如实填写联系方式，别担心，只有被您确定邀请的人才能看到这些信息。</td>
    </tr>
    <tr> 
      <td rowspan="3" align="right" class=forumrow>联系方式：</td>
      <td class=forumrow colspan="7"><input name="Telphone" type="text" id="Telphone" size="20" maxlength="20" value="<%=split(Conet,"|")(0)%>">
        电话</td>
    </tr>
    <tr> 
      <td class=forumrow colspan="7"><input name="mobie" type="text" id="mobie" size="20" maxlength="20" value="<%=split(Conet,"|")(1)%>">
        手机</td>
    </tr>
    <tr> 
      <td class=forumrow colspan="7"><input name="UserEmail" type="text" id="UserEmail"  value="<%=split(Conet,"|")(2)%>" size="20">
        邮件</td>
    </tr>
    <tr> 
      <td align="right" class=forumrow>其他要求：</td>
      <td class=forumrow colspan="7"><textarea name="Others" cols="60" rows="4" id="OthersID"><%=rs("Others")%></textarea> 
        <a style=cursor:hand onclick="if (parseInt(OthersID.rows)-3>0)(OthersID.rows=parseInt(OthersID.rows)-3)"><img src="../Skins/Default/minus.gif" unselectable="on" border='0'></a> 
        <a style=cursor:hand onclick="if (parseInt(OthersID.rows)+3>3)(OthersID.rows=parseInt(OthersID.rows)+3)"><img src="../Skins/Default/plus.gif" unselectable="on" border='0'></a><br>
        其它要求不能大于200个字符。</td>
    </tr>
    <tr> 
      <td colspan="8" align="center" class=forumRowHighlight> <input class=2 type=Submit value="　更 新　" name=Submit></td>
    </tr>
	</form>
<%end if
rs.close
end sub

sub edit_s()''修改保存
dim Pid
Pid=Request("Pid")
if Pid="" or not isnumeric(Pid) then
	response.write "<tr><td colspan=8 class=forumrow>请指定相关参数。</td></tr>"
	founderr=true
end if
if request("Content")<>"" and strLength(request("Content"))>200 then
response.write "<tr><td colspan=8 class=forumrow>约会描述长度不大于200个字符</td></tr>"
	founderr=true
end if
if trim(request("Maxnum"))="" or not isnumeric(trim(request("Maxnum"))) then
response.write "<tr><td colspan=8 class=forumrow>约会限制人数不能为空数字型</td></tr>"
	founderr=true
end if
if request("Address")="" or strLength(request("Address"))>100 then
response.write "<tr><td colspan=8 class=forumrow>约会具体地点不能为空长度不大于100个字符</td></tr>"
	founderr=true
end if
if request("UserEmail")="" and request("Telphone")="" and request("mobie")="" then
response.write "<tr><td colspan=8 class=forumrow>联系方式不能为空长度。</td></tr>"
	founderr=true
end if
if request("sign")<>"" and strLength(request("sign"))>100 then
response.write "<tr><td colspan=8 class=forumrow>接头暗号或我的特征长度不大于100个字符。</td></tr>"
	founderr=true
end if
if trim(request("Others"))<>"" and strLength(trim(request("Others")))>200 then
response.write "<tr><td colspan=8 class=forumrow>其他要求长度不大于200个字符。</td></tr>"
	founderr=true
end if
dim UserIM
UserIM=Request.Form("Telphone")&"|"&Request.Form("mobie")&"|"&Request.Form("Useremail")
if founderr=true then exit sub
set rs=server.createobject("adodb.recordset")''保存入库
sql="select * from [Ms_party] where Pid="&Pid&""
rs.open sql,conn,1,3
if rs.eof or rs.bof then
	response.write "<tr><td colspan=8 class=forumrow>对不起，数据库中没有该记录</td></tr>"
		founderr=true
		exit sub
else
rs("Partname")=trim(request("Partname"))
if Request("Minage")>Request("Maxage") then
rs("minage")=Request("Maxage")
rs("maxage")=Request("Minage")
else
rs("minage")=Request("Minage")
rs("maxage")=Request("Maxage")
end if
if Request.Form("Address")<>"" then
rs("Address")=Request.Form("Address")
end if
rs("Content")=Request("Content")
if trim(request("sign"))<>"" then
rs("Mychara")=trim(request("sign"))
end if
rs("Conet")=UserIM
if trim(request("Others"))<>"" then
rs("Others")=trim(request("Others"))
end if
if Request("Ispublic")=1 then
rs("Maxnum")=1
else
rs("Maxnum")=0
end if
end if
rs.update
rs.close
response.write "<tr><td colspan=8 class=forumrow>更新成功。</td></tr>"
end sub%>