<!--#include file="sub/conn.asp"-->
<!--#include file="sub/webvar.asp"--> 
<!--#include file="sub/fun.asp"--> 
<!--#include file="chkerr.asp"--> 
<!--#include file="md5.asp"-->
<!--#include file="Inc/Upiconfig.asp"--><!-----恒浪整合文件----->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=webtitle%></title>
<link href="sub/main.css" rel="stylesheet" type="text/css">
</head>
<%=webbody%>
<!--#include file="top.asp"-->
<table width="778" height="7" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FF156D">
  <tr> 
    <td></td>
  </tr>
</table>
<table width="778" height="491" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border:#FFD7ED 1px solid;">
  <tr> 
    <td width="160" align="center" valign="top" bgcolor="#FFFFFF" style="border-right:#FFD7ED 1px solid;"> 
      <!--#include file="u_left.asp"-->
    </td>
    <td width="618" align=center valign="top">
<!--#include file="u_top.asp"-->
      <br>
      <%
If request("submitok")="one" Then
 call one()
Elseif request("submitok")="two" Then
 call two()
Elseif request("submitok")="four" Then
 call four()
Elseif request("submitok")="five" Then
 call five()
Elseif request("ifok")="a" Then
 call one_update()
    if founderr and errmsg<>"" then  response.write errmsg&"<br><br>　　　　　　　　　　　<a href='javascript:history.back(1)'>返　回</a> <br>"
Elseif request("ifok")="b" Then
 call two_update()
    if founderr and errmsg<>"" then  response.write errmsg&"<br><br>　　　　　　　　　　　<a href='javascript:history.back(1)'>返　回</a> <br>"
Elseif request("ifok")="d" Then
 call four_update()
    if founderr and errmsg<>"" then  response.write errmsg&"<br><br>　　　　　　　　　　　<a href='javascript:history.back(1)'>返　回</a> <br>"
Else
response.redirect"u_logined.asp"
End If
%>
 <br>
      <%
Sub one()
set rs=Server.CreateObject("ADODB.recordset")
rs.open"select sex,birthday,love,kind,area,truename,loveb from love_main where id="&userid&"",conn,1,1
%>
      <table width="529" border="0" align="center" cellpadding="12" cellspacing="1" bgcolor="efefef" >
        <form method="post"  action="u_mod.asp" name=frmAnnounce>
          <tr valign="top"> 
            <td height="40" align="center" bgcolor="#FFFFFF">注：修改一次将扣除<font color="#FF6699">Love</font>币<b><font color="#FF0000"><%=loveb_jb%></font></b>，如果你是诚信会员以上级别只扣除<b><font color="#FF0000"><%=loveb_jb_cx%></font></b>，请慎重之。<br>
              <br>
              [<a href="l_3.asp"><u><font color="409FCF">我要充值Love币</font></u></a>]　[<a href="u_trueuser.asp"><u><font color="409FCF">我要升级诚信会员</font></u></a>]　[<a href="u_mod.asp?submitok=two"><u><font color="409FCF">修改我的登录密码</font></u></a>]　[<a href="u_mod.asp?submitok=four"><u><font color="409FCF">修改我的联系方式</font></u></a>]</td>
          </tr>
          <tr> 
            <td bgcolor="F2F9FB"><font color="#666666">　　<b>用 户 名</b>：</font> 
              <%=username%> <font color="#666666">　　　　</font><font color="#666666"><b>交友目的</b>：<%=rs("kind")%>　　　　<b>真实姓名</b>： </font> <font color="#666666"> 
              <input name=truename type="text" 
 class=tx id="truename" style="font-size: 9pt;" value="<%=rs("truename")%>" size="8" maxlength="10">
              </font></td>
          </tr>
          <tr> 
            <td bgcolor="#FFFFFF"><font color="#666666">　　<b>性　　别</b>：　<%=rs("sex")%>　　　　　<b>生　　日</b>： </font> 
              <input name=year type="text" class=tx id="year" style="font-size: 9pt;" value="<%=split(rs("birthday"),"-")(0)%>" size="6" maxlength="4">
              年 
              <select name="month" size="1" id="select6"  style="font-family: 宋体;border:1px solid; font-size: 9pt">
                <%for i=1 to 12 %>
                <%if i=cint(split(rs("birthday"),"-")(1)) then%>
                <option value=<%=i%> selected><%=i%></option>
                <%else%>
                <option value=<%=i%> ><%=i%></option>
                <%end if%>
                <%next%>
              </select>
              月 
              <select name="day" size="1" id="select7"  style="font-family: 宋体;border:1px solid; font-size: 9pt">
                <%for i=1 to 31 %>
                <%if i=cint(split(rs("birthday"),"-")(2)) then%>
                <option value=<%=i%> selected><%=i%></option>
                <%else%>
                <option value=<%=i%> ><%=i%></option>
                <%end if%>
                <%next%>
              </select>
              日</td>
          </tr>
          <tr> 
            <td bgcolor="F2F9FB"> <font color="#666666">　　<b>婚姻状况</b>：</font> 
              <select name="love" size="1" id="love"  style="font-family: 宋体;border:1px solid; font-size: 9pt">
                <option value="">请选择</option>
				<option value="未婚" <%if rs("love")="未婚" then%>selected<%end if%>>未婚</option>
                <option value="已婚" <%if rs("love")="已婚" then%>selected<%end if%>>已婚</option>
                <option value="离异有子女" <%if rs("love")="离异有子女" then%>selected<%end if%>>离异有子女</option>
                <option value="离异无子女" <%if rs("love")="离异无子女" then%>selected<%end if%>>离异无子女</option>
                <option value="丧偶有子女" <%if rs("love")="丧偶有子女" then%>selected<%end if%>>丧偶有子女</option>
                <option value="丧偶无子女" <%if rs("love")="丧偶无子女" then%>selected<%end if%>>丧偶无子女</option>
              </select>
              <b><font color="#666666">　　</font></b><font color="#666666"><b>所在地区</b>：</font> 
              <select name="area" id="area"  style="font-family: 宋体;border:1px solid; font-size: 9pt">
                <option value="">---请选择---</option>
                <option value="江苏" <% if rs("area")="江苏" then response.write "selected" end if%>>江苏</option>
                <option value="北京市" <% if rs("area")="北京市" then response.write "selected" end if%>>北京市</option>
                <option value="上海市" <% if rs("area")="上海市" then response.write "selected" end if%>>上海市</option>
                <option value="天津" <% if rs("area")="天津" then response.write "selected" end if%>>天津市</option>
                <option value="重庆市" <% if rs("area")="重庆市" then response.write "selected" end if%>>重庆市</option>
                <option value="河北" <% if rs("area")="河北" then response.write "selected" end if%>>河北</option>
                <option value="山西" <% if rs("area")="山西" then response.write "selected" end if%>>山西</option>
                <option value="内蒙古" <% if rs("area")="内蒙古" then response.write "selected" end if%>>内蒙古</option>
                <option value="河南" <% if rs("area")="河南" then response.write "selected" end if%>>河南</option>
                <option value="辽宁" <% if rs("area")="辽宁" then response.write "selected" end if%>>辽宁</option>
                <option value="黑龙江" <% if rs("area")="黑龙江" then response.write "selected" end if%>>黑龙江</option>
                <option value="吉林" <% if rs("area")="吉林" then response.write "selected" end if%>>吉林</option>
                <option value="山东" <% if rs("area")="山东" then response.write "selected" end if%>>山东</option>
                <option value="安徽" <% if rs("area")="安徽" then response.write "selected" end if%>>安徽</option>
                <option value="江西" <% if rs("area")="江西" then response.write "selected" end if%>>江西</option>
                <option value="福建" <% if rs("area")="福建" then response.write "selected" end if%>>福建</option>
                <option value="浙江" <% if rs("area")="浙江" then response.write "selected" end if%>>浙江</option>
                <option value="湖北" <% if rs("area")="湖北" then response.write "selected" end if%>>湖北</option>
                <option value="湖南" <% if rs("area")="湖南" then response.write "selected" end if%>>湖南</option>
                <option value="湖南" <% if rs("area")="湖南" then response.write "selected" end if%>>湖南</option>
                <option value="广东" <% if rs("area")="广东" then response.write "selected" end if%>>广东</option>
                <option value="广西" <% if rs("area")="广西" then response.write "selected" end if%>>广西</option>
                <option value="海南" <% if rs("area")="海南" then response.write "selected" end if%>>海南</option>
                <option value="四川" <% if rs("area")="四川" then response.write "selected" end if%>>四川</option>
                <option value="贵州" <% if rs("area")="贵州" then response.write "selected" end if%>>贵州</option>
                <option value="云南" <% if rs("area")="云南" then response.write "selected" end if%>>云南</option>
                <option value="西藏" <% if rs("area")="西藏" then response.write "selected" end if%>>西藏</option>
                <option value="陕西" <% if rs("area")="陕西" then response.write "selected" end if%>>陕西</option>
                <option value="甘肃" <% if rs("area")="甘肃" then response.write "selected" end if%>>甘肃</option>
                <option value="宁夏" <% if rs("area")="宁夏" then response.write "selected" end if%>>宁夏</option>
                <option value="青海" <% if rs("area")="青海" then response.write "selected" end if%>>青海</option>
                <option value="新疆" <% if rs("area")="新疆" then response.write "selected" end if%>>新疆</option>
                <option value="香港" <% if rs("area")="香港" then response.write "selected" end if%>>香港</option>
                <option value="澳门" <% if rs("area")="澳门" then response.write "selected" end if%>>澳门</option>
                <option value="台湾" <% if rs("area")="台湾" then response.write "selected" end if%>>台湾</option>
                <option value="海外" <% if rs("area")="海外" then response.write "selected" end if%>>海外</option>
              </select></td>
          </tr>
          <tr> 
            <td align="center" bgcolor="#FFFFFF"><font color="#FF0000"><b>注意：“所在地区”要重新选择！</b></font></td>
          </tr>
          <tr> 
            <td height="50" align="center" bgcolor="#FFFFFF"> 
              <input name=ifok type="hidden" id="ifok2" value="a"> 
              <input name="Submit" type="image" onClick="return confirm('★确认修改？ 此操作将扣除部分Love币。')" src="images/06/tjj.gif" width="131" height="36">
            </td>
          </tr>
        </form>
      </table>
<%
rs.close
End Sub
Sub one_update
IF request.form("ifok")="a" THEN
'检查生年
if request("year")="" then
		errmsg=errmsg+"<br>"+"<li>出生的年份为空。必须输入4位数字"
		founderr=true
elseif not isnumeric(request("year")) or len(request("year"))<>4 then
		errmsg=errmsg+"<br>"+"<li>生年只能是4位数字，请重新输入。"
		founderr=true
else
	birthday=trim(Request.Form("year"))&"-"&trim(Request.Form("month"))&"-"&trim(Request.Form("day"))
end if

'检查所在地
if request("area")="" or strLength(request("area"))>20 or strLength(request("area"))<2 then
	errmsg=errmsg+"<br>"+"<li>请选择你的所在地。"
	founderr=true
else
	area=trim(replace(replace(replace(request.form("area"),"'",""),"[",""),"]",""))
	'city=trim(replace(request.form("city"),"'",""))
end if
'检查婚姻状况
if request("love")="" then
	errmsg=errmsg+"<br>"+"<li>请选择你的婚姻状况。"
	founderr=true
else
	love=trim(replace(replace(replace(request.form("love"),"'",""),"[",""),"]",""))
end if
'检查真实姓名
    if request.form("truename")<>"" and len(request.form("truename"))>10 then
		errmsg=errmsg+"<br>"+"<li>真实姓名只能小于10个字符，请检查。"
		founderr=true
    else
	    truename=trim(replace(replace(replace(request.form("truename"),"'",""),"[",""),"]",""))
    end if
if founderr then exit sub
'准备更新数据
  If (loveb>=abs(loveb_jb_cx)) and (int(grade) >=2 ) Then '诚信会员
            conn.execute "update love_main set birthday='"&birthday&"',love='"&love&"',area='"&area&"',truename='"&truename&"',loveb=loveb"&loveb_jb_cx&" where id="&userid&""
			call loveb_add(username,loveb_jb_cx,"诚信会员以上级别修改注册资料扣除")
			response.write "<br>操作成功！　扣除Love金币：<font color=red>"&loveb_jb/2&"</font>"
  Elseif loveb>=abs(loveb_jb) then'普通会员扣全部
            conn.execute "update love_main set birthday='"&birthday&"',love='"&love&"',area='"&area&"',truename='"&truename&"',loveb=loveb"&loveb_jb&" where id='"&userid&"'"
            call loveb_add(username,loveb_jb,"普通会员修改注册资料扣除")
			response.write "<br>操作成功！　扣除Love金币：<font color=red>"&loveb_jb&"</font>"
  Else
            response.write "<br><br>你的<font color=FF6699>Love</font>币不足，无法修改基本资料！<br><br>请在线时间泡币或充值Love币<br><br><a href='javascript:history.back(1)'>返　回</a> <br>"
  End If
END IF
End Sub%>
      <br>
      <%Sub two()%>
	  
	  <%
	      '//==恒浪整合修改密码开始==By Howave.Net&SeaShell 2007/05/10==
		  If HLIntegration = True Then
	  %>
      <table width="529" border="0" align="center" cellpadding="8" cellspacing="1" bgcolor="efefef">
          <tr align="center" bgcolor="E2F0F4"> 
            <td height="55" colspan="3">请牢记您好的密码，如果忘记密码，请前往客服中心。　　　　　　[<a href="gbook" target="_blank"><U><font color="409FCF">客服中心</font></U></a>]</td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td height="55" align="right"><font color="#666666"><b>新 密 码</b>：</font></td>
            <td width="150"> <INPUT name=password1 type="password" 
 class=tx id="password1" style="font-size: 9pt;" size="25" maxlength="16" readonly="only"> </td>
            <td width="161">6-20个字符。</td>
          </tr>
          <tr bgcolor="F2F9FB"> 
            <td height="55" align="right"><font color="#666666"><b>确认密码</b>：</font></td>
            <td> <input name=password2 type="password" 
 class=tx id="password2" style="font-size: 9pt;" size="25" maxlength="16" readonly="only"> </td>
            <td>6-20个字符。</td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td height="66" colspan="3" align="center"><a href="<%=HowaveChangePasswordUrl%>" target="_blank"><font color="#FF0000">请到通行证修改</font></a></td>
          </tr>
      </table> 
	  <%
	  Else
	  %>
      <table width="529" border="0" align="center" cellpadding="8" cellspacing="1" bgcolor="efefef">
        <form method="post"  action="u_mod.asp" name=form>
          <tr align="center" bgcolor="E2F0F4"> 
            <td height="55" colspan="3">请牢记您好的密码，如果忘记密码，请前往客服中心。　　　　　　[<a href="gbook" target="_blank"><U><font color="409FCF">客服中心</font></U></a>]</td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td height="55" align="right"><font color="#666666"><b>新 密 码</b>：</font></td>
            <td width="150"> <INPUT name=password1 type="password" 
 class=tx id="password1" style="font-size: 9pt;" size="25" maxlength="16">
              <input name=password22 type="password" 
 class=tx id="password22" style="font-size: 9pt;" size="25" maxlength="16"></td>
            <td width="161">6-20个字符。</td>
          </tr>
          <tr bgcolor="F2F9FB"> 
            <td height="55" align="right"><font color="#666666"><b>确认密码</b>：</font></td>
            <td>&nbsp;</td>
            <td>6-20个字符。</td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td height="66" colspan="3" align="center">
<input name=ifok type="hidden" value="b"> 
              <input name="Submit2" type="image" src="images/06/tjj.gif" width="131" height="36" ></td>
          </tr>
        </form>
      </table> 
	  <%
	  End If
	  '//==恒浪整合修改密码结束====
	  %>
	  
<%
End Sub
Sub two_update()
 IF request.form("ifok")="b" THEN
   '检查密码
	if request("password1")="" or len(request("password1"))>20 or len(request("password1"))<6 then
		errmsg=errmsg+"<br>"+"<li>请输入您的密码(长度不能大于20小于6)。"
		founderr=true
	else
	pass1=request("password1")
	end if
	if request("password2")="" or strLength(request("password2"))>20 or len(request("password2"))<6 then
		errmsg=errmsg+"<br>"+"<li>请输入确认密码(长度不能大于20小于6)。"
		founderr=true
	else
		pass2=request("password2")
	end if
	if pass1<>pass2 then
		errmsg=errmsg+"<br>"+"<li>您输入的密码和确认密码不一致。"
		founderr=true
	else
	password=pass1
	end if
    if founderr then exit sub


password=request("pass1")
 password=md5(pass1)
 	set rs=server.createobject("adodb.recordset")
	sql="select * from love_main where username='"&username&"'" 
	rs.open sql,conn,3,3 
        rs("password")=password
        rs.update  
	rs.Close
	Set rs=Nothing
   	Response.Cookies("love")("password") = password
   response.write "<br>操作成功！"
	set rs=Server.CreateObject("ADODB.recordset")
	rs.open"select username from love_online where username='"&request.Cookies("yzlove")("username")&"'",conn,1,1
		if not rs.bof and not rs.eof then
			conn.execute("delete from love_online where username='"&rs("username")&"'")'删除在线名单
		end if
	rs.close:set rs=nothing
	Response.Cookies("yzlove")("username") = ""
	Response.Cookies("yzlove")("password") = ""
	Response.Cookies("yzlove")("sex") = ""
	Response.Cookies("yzlove")("grade") = 0
	Response.Cookies("yzlove")("usercookies")= 0
response.redirect("./")
end if

End sub
%>
  
<%
Sub four()
set rs=Server.CreateObject("ADODB.recordset")
rs.open"select email,address,post,tel,oicq,msn,popo,homepage,ifopencontact from love_main where id="&userid&"",conn,1,1
%>
      [<a href="l_3.asp"><u><font color="409FCF">我要充值<font color="#FF6699">Love</font>币</font></u></a>]　[<a href="u_trueuser.asp"><u><font color="409FCF">我要升级诚信会员</font></u></a>]<br>
      <br>
      <table width="529" border="0" cellpadding="8" cellspacing="1" bgcolor="efefef">
        <form name="form" action="u_mod.asp" method="post" >
          <tr align="center" > 
            <td height="40" colspan="2" bgcolor="#FFFFFF">注：修改一次将扣除<font color="#FF6699">Love</font>币<b><font color="#FF0000"><%=loveb_lx%></font></b>，如果你是诚信会员只扣除<b><font color="#FF0000"><%=loveb_lx_cx%></font></b>，请慎重之 </td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td width="107" align="right"><font color="409FCF"><b>我的联系方式</b>：</font></td>
            <td width="390"><font color="#666666"> 
              <input name="opencontact" type="radio" value="0" <%if rs("ifopencontact")=0 then response.write"checked"%>>
              <b><font color="008FBF">开放</font></b>(所有会员可见) 
              <input type="radio" name="opencontact" value="1" <%if rs("ifopencontact")=1 then response.write"checked"%>>
              <b><font color="008FBF">仅好友可见</font></b> 
              <input type="radio" name="opencontact" value="2" <%if rs("ifopencontact")=2 then response.write"checked"%>>
              <b><font color="008FBF">保密</font></b>(只有自已能看见)</font></td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td align="right"><font color="409FCF"><b>详细联系地址</b>：</font></td>
            <td width="390"><font color="#666666"> 
              <input name=address type="text" 
 class=tx id="address" style="font-size: 9pt;" value="<%=rs("address")%>" size="50" maxlength="100">
              &lt; 100个字符</font></td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td align="right"><font color="409FCF"><b>邮政编码</b>：</font></td>
            <td><font color="#666666"> 
              <input name=post type="text" 
 class=tx id="pass2222" style="font-size: 9pt;" value="<%=rs("post")%>" size="6" maxlength="6">
              6位数字</font></td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td align="right"><font color="409FCF"><b>电话/手机</b>：</font></td>
            <td> <font color="#666666"> 
              <INPUT name=tel type="text" 
 class=tx id="tel" style="font-size: 9pt;" value="<%=rs("tel")%>" size="30" maxlength="100">
              &lt; 100个字符</font></td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td align="right"><font color="409FCF"><b>电子邮箱</b>：</font></td>
            <td> 
			<%
			  '//==恒浪整合修改Email开始==By Howave.Net&Seashell 2007/05/10==
			  If HLIntegration = True Then
			  
			%>
              <input name=email type="text" 
 class=tx id="email" style="font-size: 9pt;" value="<%=rs("email")%>" size="30" maxlength="50" readonly="only">
             <a href="<%=HowaveChangeEmailUrl%>" target="_blank"><font color="#FF0000">请到通行证修改</font></a>
			 <%
			  Else
			 %>
              <input name=email type="text" 
 class=tx id="email" style="font-size: 9pt;" value="<%=rs("email")%>" size="40" maxlength="50">
			 <%
			  End IF
			  '//==恒浪整合修改email结束====
			 %>
			 </td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td align="right"><font color="409FCF">ＱＱ：</font></td>
            <td> <font color="#666666"> 
              <input name=oicq type="text" 
 class=tx id="pass2223" style="font-size: 9pt;" value="<%=rs("oicq")%>" size="17" maxlength="16">
              &lt; 15数字</font></td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td align="right"><font color="409FCF"><b>MSN</b>：</font></td>
            <td> <font color="#666666"> 
              <INPUT name=msn type="text" 
 class=tx id="msn" style="font-size: 9pt;" value="<%=rs("msn")%>" size="30" maxlength="100">
              &lt; 100个字符</font></td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td align="right"><font color="409FCF"><b>网易POPO</b>：</font></td>
            <td> <font color="#666666"> 
              <INPUT name=popo type="text" 
 class=tx id="popo" style="font-size: 9pt;" value="<%=rs("popo")%>" size="30" maxlength="100">
              &lt; 100个字符</font></td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td align="right"><font color="409FCF"><b>个人主页</b>：</font></td>
            <td><font color="#666666"> 
              <INPUT name=homepage type="text" 
 class=tx id="homepage" style="font-size: 9pt;" value="<%=rs("homepage")%>" size="60" maxlength="300">
              <br>
              (必须加有http://才能生效)&lt; 100个字符</font></td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td height="43" colspan="2" align="center"><font color="#666666"> 
              <input name=ifok type="hidden" value="d">
              <input name="Submit32" type="image" onClick="return confirm('请 慎 重 ！\n\n★确认修改？ 此操作将扣除部分Love币。')" src="images/06/tjj.gif" width="131" height="36">
              </font></td>
          </tr>
        </form>
      </table> 
<%
rs.close:set rs=nothing
End Sub
Sub four_update()
IF request.form("ifok")="d" THEN
dim email,address,post,tel,oicq,msn,popo,homepage,opencontact
opencontact=trim(replace(replace(replace(request.form("opencontact"),"'",""),"[",""),"]",""))

'详细联系地址
    if request.form("address")<>"" and len(request.form("address"))>120 then
		errmsg=errmsg+"<br>"+"<li>详细联系地址只能小于120个字，请检查。"
		founderr=true
    else
	    address=replace(trim(Request.Form("address")),"'","")
    end if
'邮政编码
    if request.form("post")<>"" and (not isnumeric(request.form("post")) or len(request.form("post"))<>6) then
		errmsg=errmsg+"<br>"+"<li>邮政编码只能为6位数字，请检查。"
		founderr=true
    else
	    post=trim(Request.Form("post"))
    end if
'电话/手机
    if request.form("tel")<>"" and len(request.form("aboutus"))>100 then
		errmsg=errmsg+"<br>"+"<li>电话/手机只能小于100个字，请检查。"
		founderr=true
    else
	    tel=replace(trim(Request.Form("tel")),"'","")
    end if
'检查email
if IsValidEmail(trim(request("email")))=false or len(request.form("email"))>50 then
	errmsg=errmsg+"<br>"+"<li>您的Email有错误。或只能小于50个字，请检查。"
   	founderr=true
else
	email=replace(trim(request("email")),"'","''")
end if
'OICQ
    if request.form("oicq")<>"" and (not isnumeric(request.form("oicq")) or len(request.form("oicq"))>50) then
		errmsg=errmsg+"<br>"+"<li>OICQ只能只能小于50个数字，请检查。"
		founderr=true
    else
	    oicq=trim(Request.Form("oicq"))
    end if
'MSN
    if request.form("msn")<>"" and len(request.form("msn"))>100 then
		errmsg=errmsg+"<br>"+"<li>MSN只能小于100个字符，请检查。"
		founderr=true
    else
	    msn=replace(trim(Request.Form("msn")),"'","")
    end if
'popo
    if request.form("popo")<>"" and len(request.form("popo"))>100 then
		errmsg=errmsg+"<br>"+"<li>POPO只能小于100个字符，请检查。"
		founderr=true
    else
	    popo=replace(trim(Request.Form("popo")),"'","")
    end if
'个人主页
    if request.form("homepage")<>"" and len(request.form("homepage"))>300 then
		errmsg=errmsg+"<br>"+"<li>个人主页只能小于100个字符，请检查。"
		founderr=true
    else
	    homepage=replace(trim(Request.Form("homepage")),"'","")
    end if
if founderr then exit sub

'准备更新数据
   If (loveb>=abs(loveb_lx_cx)) and (int(grade)>=2) Then '诚信会员以上级别
      conn.execute "update love_main set email='"&email&"',address='"&address&"',post='"&post&"',tel='"&tel&"',oicq='"&oicq&"',msn='"&msn&"',popo='"&popo&"',homepage='"&homepage&"',loveb=loveb"&loveb_lx_cx&",ifopencontact='"&opencontact&"' where id="&userid&""
	  call loveb_add(username,loveb_lx_cx,"诚信会员以上级别修改联系方法扣除")
	  response.write "<br>操作成功！　扣除Love金币：<font color=red>"&loveb_lx_cx&"</font>"
   Elseif (loveb>=abs(loveb_lx)) then'普通会员扣全部
     conn.execute "update love_main set email='"&email&"',address='"&address&"',post='"&post&"',tel='"&tel&"',oicq='"&oicq&"',msn='"&msn&"',popo='"&popo&"',homepage='"&homepage&"',loveb=loveb"&loveb_lx&",ifopencontact='"&opencontact&"' where  id="&userid&""
     call loveb_add(username,loveb_lx,"普通会员修改联系方法扣除")
	 response.write "<br>操作成功！　扣除Love金币：<font color=red>"&loveb_lx&"</font>"
   Else
      response.write "<br><br><br>你的<font color=FF6699>Love</font>币不足，无法修改联系方法！<br><br>请在线时间泡币或充值Love币<br><br><a href='javascript:history.back(1)'>返　回</a> <br>"
   End If

 END IF
End Sub
%>
    </td>
  </tr>
</table>
<table width="778" height="5" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" >
  <tr> 
    <td></td>
  </tr>
</table>
<!--#include file="bottom.asp"-->
</body>
</html>
<%set rs=nothing
Closeconn%>




