<!--#include file="inc/conn.asp"-->
<!--#include file="inc/safe.asp"-->
<!--#include file="inc/config.asp"-->
<!--#include file="inc/const.asp"-->
<%
if MemberName="" then
  response.Redirect("userlogin.asp")
  response.end
end if
%>
<%
if request.QueryString("action")="save" then
  dim errmsg
  errmsg=""

dim friendrelation,declaration,dubai,zeyou

friendrelation=request.Form("mudi")
declaration=request.Form("xuanyan")
dubai=convert(request.Form("dubai"))
zeyou=convert(request.Form("zeyou"))

'on error resume next

if invalidch(dubai) then errmsg=errmsg+"<br>"+"<li>您的个人独白可能含特殊符号，请检查！"
if checkshit(dubai) then  errmsg=errmsg+"<br>"+"<li>个人独白可能含不文明词语，请检查！"
if invalidch(zeyou) then errmsg=errmsg+"<br>"+"<li>您的择友要求可能含特殊符号，请检查！"
if checkshit(zeyou) then  errmsg=errmsg+"<br>"+"<li>择友要求可能含不文明词语，请检查！</li>"

if errmsg<>"" then 
response.Write "错误信息：<br>"
response.write("　　　"+ errmsg)
response.Write "<input type='button' value='返回修改' onClick='javascript:window.history.back();'>"
response.Write "<input type='button' value='关闭窗口' onClick='javascript:window.close();'>"
response.end
end if

set rst=server.CreateObject("adodb.recordset")   '添加交友帐号
sql1="select * from user_info where userid = "& userid &""
rst.open sql1,conn,1,3
rst("friendrelation")=friendrelation
rst("declaration")=declaration
rst("dubai")=dubai
rst("zeyou")=zeyou
rst.update
rst.close
set rst=nothing
response.Redirect("detailinfo.asp")
response.end
end if
%>
<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;}
.STYLE5 {
	font-size: 13px;
	color: #A30C78;
	font-weight: bold;
}
-->
</style>
<script language="javascript">
<!--
function isTelOrMobile(byVal) { return (/[^\d-－（）\(\)]/g.test(byVal));}
//检测合法email;--demo   sxg

function checkInput(nForm)  
{
  var xuanyan=nForm.xuanyan.value.trim(); 
 if(xuanyan=="") { alert("请选择您的交友宣言！");return false;}
 //独白字数
 if(nForm.dubai.value.length>195){alert("个人独白字数不能超过200！");return false;}  
 return true;
}
//-->
</script>
</head>
<body>
<table width="1002" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><!--#include file="top.asp"--></td>
  </tr>
</table>
<table width="950" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="204" height="328" valign="top"><!--#include file="memberleft.asp"-->
</td>
    <td width="583" valign="top"><table width="565" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td><TABLE width="100%" border=0 
            cellPadding=0 cellSpacing=0 bgColor=white class="STYLE4" style="BORDER-BOTTOM: #9DCCF6 1px solid">
              <TBODY>
                <TR>
                  <TD width="2%" align=left background="image/tiao_4.gif"><img src="image/tiao_3.gif" width="10" height="31"></TD>
                  <TD width="21%" align=center background="image/tiao_4.gif"><table width="93" height="25" border="0" cellpadding="0" cellspacing="0">
                      <tr>
                        <td width="93" align="center" class="pgd"><div align="left">补充资料</div></td>
                      </tr>
                  </table></TD>
                  <TD width="43%" height="20" align="center" background="image/tiao_4.gif">&nbsp; </TD>
                  <TD width="32%" align="center" background="image/tiao_4.gif">&nbsp;</TD>
                  <TD width="2%" align="right" background="image/tiao_4.gif"><img src="image/tiao_2.gif" width="10" height="31"></TD>
                </TR>
              </TBODY>
          </TABLE></td>
        </tr>
        <tr>
          <td height="435" valign="top" style="border-left:#C7C8CC 1px solid;border-right:#C7C8CC 1px solid;border-bottom:#C7C8CC 1px solid"><br>
            <%
sql="select friendrelation,declaration,dubai,zeyou from user_info where userid="& userid &""
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn,1
if not rs.eof then
%>
            <table width="530" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#cccccc"  bordercolordark="#FFFFFF" class="STYLE4">
              <form name="frmreg" method="post" action="detailinfo.asp?action=save" onSubmit="return checkInput(this)">
                <tr>
                  <td height="32"><div align="right">交友宣言：</div></td>
                  <td colspan="3"><select name="xuanyan" id="xuanyan">
                      <option value="">请选择交友宣言</option>
                      <%
					set rs1=server.CreateObject("adodb.recordset")
					sql1="select * from friendannounce order by id"
					rs1.open sql1,conn,1
					do while not rs1.eof
					  response.Write "<option value='"& rs1("announce") &"'"
					  if rs1("announce")=rs("declaration") then response.Write " selected"
					  response.Write ">"& rs1("announce") &"</option>"
					  rs1.movenext
					loop
					rs1.close
					set rs1=nothing
					%>
                    </select>
                       <font color="#FF0000"> *</font> </td>
                </tr>
                <tr>
                  <td height="100"><div align="right">个人独白：</div></td>
                  <td colspan="3"><span class="STYLE1">这是您的爱情宣言，请认真填写，要求汉字200字之间</span><br>
                      <textarea name="dubai" cols="60" rows="5" class="st" id="dubai"><%
					if not isnull(rs("dubai")) and rs("dubai")<>"" then
					response.Write inconvert(rs("dubai"))
					end if
					%>
              </textarea></td>
                </tr>
                <tr>
                  <td height="100"><div align="right">择友要求：</div></td>
                  <td height="100" colspan="3"><span class="STYLE1">写好本栏很重要，别人会据此判断是否愿意与您交往，要求汉字200字之间</span><br>
                      <textarea name="zeyou" cols="60" rows="5" class="st" id="zeyou"><%
					if not isnull(rs("zeyou")) and rs("zeyou")<>"" then
					response.Write inconvert(rs("zeyou"))
					end if
					%>
              </textarea></td>
                </tr>
                <tr>
                  <td height="32">&nbsp;</td>
                  <td height="32" colspan="3" class="STYLE1"><div align="center">
                      <input type="submit" name="Submit" value="提交更新">
                  </div></td>
                </tr>
              </form>
            </table>
          <%end if%>                        </td>
        </tr>
    </table></td>
    <td width="163" valign="top"><!--#include file="fenlei.asp"-->
</td>
  </tr>
</table>
<table width="1002" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><!--#include file="root.asp"--></td>
  </tr>
</table>
</body>
</html>
<%
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
