<!--#include file="inc/conn.asp"-->
<!--#include file="inc/safe.asp"-->
<!--#include file="inc/config.asp"-->
<!--#include file="inc/const.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>红嫂视屏交友网</title>
<meta name="keywords" content="情感,在线,新新,照片,动感影片,诗歌,爱情,纯洁,心连心">
<meta name="description" content="红嫂视屏交友情缘 情感在线">
<link href="style.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body {
	background-image: url();
}
.STYLE8 {
	color: #CC0099;
	font-size: 12px;
	font-weight: bold;
}
.STYLE31 {color: #666666; font-size: 12px;}
.style91 {color: #60A7E5}
-->
</style>
</head>
<body>
<%
if MemberName="" then%>
 <p align="center" class="STYLE31"><br><br> 对不起！游客无法留言。如果你还是不是本站会员，请您<a href="newsreg.asp" target="_blank">注册</a>后登陆本站进行此操作。如果您已经是本站会员，请<a href="userlogin.asp" target="_blank">登陆</a>。<br> <br> </p>
<%  response.end
end if
%><br>
<br>
<%
dim errmsg,sex1,sex2,marryid
errmsg=""

marryid=request.QueryString("userid")

ChkNumber(marryid) 

if clng(marryid)=clng(userid) then
  errmsg=errmsg+"<br><li>追求自己没什么意思吧？"
end if

 set rs=server.CreateObject("adodb.recordset") 
  sql="select * from sd_hunyin where applyid="& userid &" and marryid="& marryid &""
  rs.open sql,conn,1
  if not rs.eof then
    errmsg=errmsg+"<br><li>您已经追求过此会员！"
  end if
 rs.close
 
 sql="select sex from user_info where userid="& userid
 rs.open sql,conn,1
 sex1=rs("sex") 
 rs.close
 
 set rs1=server.CreateObject("adodb.recordset")
 sql1="select sex from user_info where userid="& marryid &""
 rs1.open sql1,conn,1
 if rs1.eof and rs1.bof then
   errmsg=errmsg+"<br><li>没有找到你要追求的对象！"
 else
   if rs1("sex")=sex1 then
     errmsg=errmsg+"<br><li>你们俩个性别一样，别追求了吧？"
   end if    
 end if
 rs1.close
 set rs1=nothing
  
 if errmsg<>"" then 
  response.Write "<br><table align=center><tr><td style='font-size:14px'>错误信息：<br></td></tr>"
  response.write("<tr><td style='font-size:12px'><br>"+ errmsg+"<br><br></td></tr>")
  response.Write "<tr><td align='center'><input type='button' value='确定返回' onClick='javascript:window.history.back(-1);'>"
  response.Write "</td></tr></table>"
  response.end
 end if 
 
 sql="select * from sd_hunyin"
 rs.open sql,conn,1,3
 rs.addnew
 rs("applyid")=userid
 rs("marryid")=marryid
 rs("status")=0
 rs("dtime")=now()
 rs.update
 rs.close
 set rs=nothing
 conn.close
 set conn=nothing
response.Write "<div align='center' style='font-size:14px'><p><br><br>恭喜，已经成功的将您的追求信息发送给此会员！<br><br><a href='userzq.asp?user_id="&marryid&"' class='a5'>确定返回</a>&nbsp;&nbsp;</p></div>"
%>
