📄 consort.asp
字号:
<!-- #include file="Setup.asp" --><%
id=int(Request("id"))
content=HTMLEncode(Request.Form("content"))
HtmlTop
if CookieUserName=empty then error("<li>您还未<a href=Login.asp>登录</a>")
Consort=Conn.Execute("Select Consort From [Wo_Users] where UserID="&CookieUserID&"")(0)
select case Request("menu")
case "add"
aim=HTMLEncode(Request("aim"))
if content=empty then error("<li>表白内容不能为空")
if aim=CookieUserName then error("<li>不能自己追求自己!")
If Conn.Execute("Select count(UserID) From [Wo_Users] where UserName='"&aim&"'" ).eof Then error("<li>系统不存在"&aim&"的资料")
If Not Conn.Execute("Select id From [Wo_Consort] where UserName='"&CookieUserName&"' and aim='"&aim&"'" ).eof Then error("<li>"&aim&"已经在您的追求列表当中")
sql="insert into [Wo_Consort] (UserName,aim,unburden) values ('"&CookieUserName&"','"&aim&"','"&content&"')"
Conn.Execute(SQL)
sql="insert into [Wo_PrivateMessages](SenderUserName,RecipientUserName,Subject,Body,IsSenderDelete) values ('"&CookieUserName&"','"&aim&"','社区配偶系统消息','<font color=0000FF>【社区配偶】:"&content&"</font>','0')"
Conn.Execute(SQL)
Conn.execute("update [Wo_Users] set NewMessage=NewMessage+1 where UserName='"&aim&"'")
case "accept"
if Consort<>empty then error("<li>您当前已有配偶")
aim=Conn.Execute("Select aim From [Wo_Consort] where id="&id&"")(0)
if aim<>CookieUserName then error("<li>非法操作")
Consort=Conn.Execute("Select UserName From [Wo_Consort] where id="&id&"")(0)
if Conn.Execute("Select Consort From [Wo_Users] where UserName='"&Consort&"'")(0)<>empty then error("<li>"&Consort&"已经有配偶了")
Conn.execute("update [Wo_Users] set Consort='"&aim&"' where UserName='"&Consort&"'")
Conn.execute("update [Wo_Users] set Consort='"&Consort&"' where UserName='"&aim&"'")
Conn.execute("Delete from [Wo_Consort] where id="&id&"")
Message="您已经接受了"&Consort&"的追求"
succeed Message,"Consortia.asp"
case "Del"
Conn.execute("Delete from [Wo_Consort] where id="&id&" and (UserName='"&CookieUserName&"' or aim='"&CookieUserName&"') ")
case "part"
Conn.execute("update [Wo_Users] set Consort='' where UserName='"&Consort&"'")
Conn.execute("update [Wo_Users] set Consort='' where UserID="&CookieUserID&"")
Message="分手成功"
succeed Message,"Consortia.asp"
end select
%>
<div id="CommonBreadCrumbArea"><%ClubTree%> → <a href="Consort.asp">社区配偶</a></div>
<table cellspacing=1 cellpadding=5 border=0 width=100% id=CommonListArea>
<tr>
<td width="100%" align="center" id=CommonListTitle colspan="4">
<font face="宋体">我的追求者</font></td>
</tr>
<tr id=CommonListCell>
<td width="10%" height="5" align="center">窝友名</td>
<td height="5" align="center">爱的表白</td>
<td width="20%" height="5" align="center"><font face="宋体">追求</font>时间</td>
<td width="15%" height="5" align="center">操作</td>
</tr>
<%
sql="select * from [Wo_Consort] where aim='"&CookieUserName&"' order by id Desc"
Set Rs=Conn.Execute(sql)
Do While Not Rs.EOF
%>
<tr id=CommonListTitle>
<td height="5" align="center">
<a href="Profile.asp?UserName=<%=Rs("UserName")%>"><%=Rs("UserName")%></a></td>
<td height="5" align="center"><%=Rs("unburden")%></td>
<td height="5" align="center"><%=Rs("DateCreated")%></td>
<td height="5" align="center"><%if Consort=Rs("UserName") then%>
<a href="?menu=part">分 手</a> <%else%>
<a href="?menu=accept&id=<%=Rs("id")%>">接受</a>
<a href="?menu=Del&id=<%=Rs("id")%>">拒绝</a> <%end if%></td>
</tr>
<%
Rs.MoveNext
loop
Rs.Close
%>
</table>
<br>
<table cellspacing=1 cellpadding=5 border=0 width=100% id=CommonListArea>
<tr id=CommonListTitle>
<td width="100%" align="center" colspan="4">我追求的人</td>
</tr>
<tr id=CommonListCell>
<td width="10%" height="5" align="center">窝友名</td>
<td height="5" align="center">爱的表白</td>
<td width="20%" height="5" align="center"><font face="宋体">追求</font>时间</td>
<td width="15%" height="5" align="center">操作</td>
</tr>
<%
sql="select * from [Wo_Consort] where UserName='"&CookieUserName&"' order by id Desc"
Set Rs=Conn.Execute(sql)
Do While Not Rs.EOF
%>
<tr>
<td height="5" align="center">
<a href="Profile.asp?UserName=<%=Rs("aim")%>"><%=Rs("aim")%></a></td>
<td height="5" align="center"><%=Rs("unburden")%></td>
<td height="5" align="center"><%=Rs("DateCreated")%></td>
<td height="5" align="center"><%if Consort=Rs("aim") then%>
<a href="?menu=part">分 手</a> <%else%>
<a href="?menu=Del&id=<%=Rs("id")%>">取消追求</a> <%end if%> </td>
</tr>
<%
Rs.MoveNext
loop
Rs.Close
%>
</table>
<br>
<%if Consort<>empty then
sql="select * from [Wo_Users] where UserName='"&Consort&"'"
Set Rs=Conn.Execute(sql)
if Rs.eof then Conn.execute("update [Wo_Users] set Consort='' where UserID="&CookieUserID&"")
ShowRank(Rs("experience"))
select case Rs("UserSex")
case 0
UserSex="未设置"
case 1
UserSex="男"
case 2
UserSex="女"
end select
select case Rs("UserAccountStatus")
case "0"
UserAccountStatus="正等待审核"
case "1"
UserAccountStatus="已通过审核"
case "2"
UserAccountStatus="已禁用"
case "3"
UserAccountStatus="未通过审核"
end select
XMLDOM.loadxml("<Wo>"&Rs("UserInfo")&"</WO>")
QQ=SelectSingleNode("QQ")
ICQ=SelectSingleNode("ICQ")
AIM=SelectSingleNode("AIM")
MSN=SelectSingleNode("MSN")
Yahoo=SelectSingleNode("Yahoo")
Skype=SelectSingleNode("Skype")
Set XMLDOM=Nothing
%>
<TABLE WIDTH=100% cellSpacing=1 cellPadding=5 align=center border=0 id=CommonListArea>
<TR id=CommonListTitle>
<TD align=Left>我的配偶个人资料</TD>
</TR>
<TR id=CommonListCell>
<TD>
<table border="0" width="100%" cellspacing="0">
<tr>
<td>昵 称:<%=Rs("UserName")%></td>
</tr>
<tr>
<td>名 字:<%=Rs("RealName")%></td>
</tr>
<tr><td>性 别:<%=UserSex%></td></tr>
<tr><td>生 日:<%=Rs("birthday")%></td></tr>
<tr><td>生 肖:<%=Zodiac(Rs("birthday"))%></td></tr>
<tr><td>星 座:<%=constellation(Rs("birthday"))%></td></tr>
<tr><td>职 业:<%=Rs("Occupation")%></td></tr>
<tr><td>兴 趣:<%=Rs("Interests")%></td></tr>
<tr><td>地 址:<%=Rs("Address")%></td></tr>
</table>
</TD>
</TR>
</TD>
</TR>
</TABLE>
<%if Rs("UserBio")<>"" then%>
<TABLE WIDTH=100% cellSpacing=1 cellPadding=5 align=center border=0 id=CommonListArea>
<TR id=CommonListTitle>
<TD align=Left>简介</TD>
</TR>
<TR id=CommonListCell>
<TD><%=Rs("UserBio")%></TD>
</TR>
</TABLE>
<BR>
<%end if%>
<%if SiteConfig("EnableSignatures")=1 and Rs("UserSign")<>"" then%>
<TABLE WIDTH=100% cellSpacing=1 cellPadding=5 align=center border=0 id=CommonListArea>
<TR id=CommonListTitle>
<TD align=Left>签名</TD>
</TR>
<TR id=CommonListCell>
<TD><%=YbbEncode(Rs("UserSign"))%></TD>
</TR>
</TABLE>
<%end if%>
<TABLE WIDTH=100% cellSpacing=1 cellPadding=5 align=center border=0 id=CommonListArea>
<tr>
<td align="center" class="a4" valign="top" colspan="7">
<a onclick="return confirm('您确定不顾一切要与当前配偶分手?')" href="?menu=part">与当前配偶分手</a></td>
</tr>
</TABLE>
<%
Rs.close
else%>
<table cellspacing=1 cellpadding=5 border=0 width=100% id=CommonListArea>
<form action="Consort.asp" method="POST">
<input type="hidden" value="add" name="menu">
<tr id=CommonListTitle>
<td width="77%" align="center" id=CommonListTitle colspan="2">添加我想追求的人</td>
</tr>
<tr id=CommonListCell>
<td width="12%" align="Left">对方窝友名:</td>
<td width="64%" align="Left">
<input maxlength="30" size="15" name="aim"></td>
</tr>
<tr id=CommonListCell>
<td width="12%" align="Left" valign="top">爱的表白:</td>
<td width="64%" align="Left">
<textarea name="content" rows="5" style="width:95%"></textarea></td>
</tr>
<tr>
<td width="77%" align="center" colspan="2">
<input type="submit" value=" 确 定 ">
<input onclick="return confirm('该项操作要清除全部的内容,您确定要清除吗?');" type="reset" value=" 重 写 "></td>
</tr>
</form>
</table>
<%end if%>
<%HtmlBottom%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -