<!--#include file=conn.asp-->
<!--#include file=config.asp-->
<!--#include file=const.asp-->
<!--#include file=char.asp-->
<%
 '=========================================================
' File: mymodify.asp
' Version:3.0
' Date: 2005-11-6
' Script Written by xmrxw
'=========================================================
' Copyright (C) 2004,2005 Xmrxw.Com All rights reserved.
' Web: http://www.xmrxw.com,http://www.xmzxw.com
' Email: info@mssky.com,super@mssky.com
' QQ：10689579　Msn：zdlmicr@hotmail.com
'=========================================================
response.buffer=true
stats="修改资料"
call nav()

if not chkpost then
 ErrMsg=ErrMsg+"<Br>"+"<li>您提交的数据不合法，请不要从外部提交发言。"
 FoundErr=True
end if

if not founduser then
	Errmsg=Errmsg+"<br>"+"<li>您还没有登陆，请登陆后进行修改。"
	founderr=true
end if

if founderr then
  	errmsg=errmsg+"<br>"+"<li>您没有<a href=login.asp target=_blank>登录</a>。"
	call head_var("","")
	call Mslove_error()
else
	call head_var(membername & "的帐号","mycount.asp")
	if request("action")="updat" then
		call updatereg()
			sucmsg="<li>更改资料成功！"
			call Mslove_suc()
	else
		call userinfo()
		if founderr then call Mslove_error()
	end if
end if

call activeonline()
call footer()

sub userinfo()
set rs=server.createobject("adodb.recordset")
sql="Select * from [Ms_User] where userid="&userid
rs.open sql,conn,1,1
if rs.eof and rs.bof then
	errmsg=errmsg+"<br>"+"<li>该用户名不存在。"
	founderr=true
	exit sub
else
%>
<script language="JavaScript" src="inc/Mymodify.js"></script>
<table cellpadding=3 cellspacing=1 align=center class=tableborder1>
<tr>
<th width=12% height=25 id=tabletitlelink><a href=mycount.asp>我的帐号</a></th>
<th width=11%  id=tabletitlelink><a href=mymodify.asp>基本资料</a></th>
<th width=11%  id=tabletitlelink><a href=modifypsw.asp>密码修改</a></th>
<th width=11%  id=tabletitlelink><a href=modifyfd.asp>交友资料</a></th>
<th width=11%  id=tabletitlelink><a href=modifyadd.asp>联系资料</a></th>
<th width=11%  id=tabletitlelink><a href=usersms.asp>短信服务</a></th>
<th width=11%  id=tabletitlelink><a href=friendlist.asp>我的好友</a></th>
<th width=11%  id=tabletitlelink><a href=favlist.asp>我的收藏</a></th>
<th width=11%  id=tabletitlelink><a href=userphoto.asp>我的相册</a></th>
</tr>
</table>
<form action="mymodify.asp?action=updat" method=POST name="theForm">
  <table cellpadding=3 cellspacing=1 border=0 align=center class=tableborder1>
    <tr align="left"> 
      <th width="100%" colspan="2">基本设置选项 </th>
    </tr>
    <tr> 
      <td width="100%" class=tablebody1><B>性&nbsp;&nbsp;&nbsp;&nbsp;别</B>：<BR> 
        <font color="#FF0000">此功能已关闭</font></td>
      <td width="60%" class=tablebody1><%if rs("Usersex")=1 then response.write "你好,帅哥，系统暂不能变性"  end if%> <%if rs("Usersex")=0 then response.write "你好,靓妹，系统暂不能变性" end if%></td>
    </tr>
    <tr> 
      <td width="100%" class=tablebody1><B>生&nbsp;&nbsp;&nbsp;&nbsp;日</B><BR>
        如不想填写，请全部留空</td>
      <td width="60%" class=tablebody1> <input name=birthday type=text onfocus="show_cele_date(birthday,'','',birthday)" size="20" value=<%=rs("UserBirthday")%>> 
      </td>
    </tr>
    <tr> 
      <%dim OpenFaces
OpenFaces=split(OpenFace,"|")%>
      <td width="100%" valign=top class=tablebody1><B>头&nbsp;&nbsp;&nbsp;&nbsp;像</B>：<BR>
        您可以选择一个个性图片，当你发表时将显示在您的名字下方。<BR> <%if Cint(OpenFaces(0))=1 then%>
        如果你填写了下面的自定义头像部分，那么你的头像以自定义的为准。否则，请你留空自定义头像的所有栏目！<BR> <B>关于自定义头像</B>：<BR>
        你也可以在这里给出你自定义头像的 URL 地址，头像的高度和宽度(像素)。 如果不想要自定义头像，请将相应栏目全部留空！ 
        <%end if%> </td>
      <td width="60%" class=tablebody1> <table border="0" cellpadding="0" cellspacing="1" width="98%" >
          <tr> 
            <td width="*"  class=tablebody1>头像选择 
              <select name=Userface size=1 id="Userface" style="font-family:arial" onChange="document.images['face'].src=options[selectedIndex].value; parent.document.theForm.myface.value=options[selectedIndex].value">
                <%for i=1 to Cint(OpenFaces(2))
			if trim(rs("Userface"))="images/userface/image"&(i)&".gif" then%>
                <option value="images/userface/image<%=(i)%>.gif"  selected>image<%=(i)%>.gif</option>
                <%else%>
                <option value="images/userface/image<%=(i)%>.gif">image<%=(i)%>.gif</option>
                <%end if
		next%>
              </select>
              &nbsp;<a href=allface.asp target=_blank title="头像预览列表">查看所有头像</a></td>
            <td width="180"  rowspan="2"  valign=top align=center> <img id=face src="<%=rs("Userface")%>" width=<%=Cint(split(rs("Faceinfo"),"|||")(0))%> height=<%=Cint(split(rs("Faceinfo"),"|||")(1))%>> 
            </td>
          </tr>
          <%if Cint(OpenFaces(0))=1 then%>
          <tr> 
            <td width="*" class=tablebody1> <%if cint(OpenFaces(1))=1 then%> <iframe name=ad frameborder=0 width=300 height=30 scrolling=no src=reg_upload.asp></iframe><%end if%><br>
              <font color="#ff0000">（上传头像需要金币：<%=GroupSetting(12)%>元，格式：jpg,gif）</font> <br>
              自定义头像地址：
              <input class=2 type="TEXT" name="myface" size=30 maxlength=100 value=<%=rs("Userface")%>> 
              <br>
              宽&nbsp;&nbsp;&nbsp;&nbsp;度：
              <input class=2 type="TEXT" name=Facewidth size=3 maxlength=3 value=<%=Cint(split(rs("Faceinfo"),"|||")(0))%>>
              0---<%=OpenFaces(3)%>的整数 <br>
              高&nbsp;&nbsp;&nbsp;&nbsp;度：
              <input class=2 type="TEXT" name=Faceheight size=3 maxlength=3 value=<%=Cint(split(rs("Faceinfo"),"|||")(1))%>>
              0---<%=OpenFaces(4)%>的整数 <br> </td>
          </tr>
          <%end if%>
        </table></td>
    </tr>
    <%if Cint(Signset)=1 then%>
    <tr> 
      <td valign=top width="100%" class=tablebody1><B>签&nbsp;&nbsp;&nbsp;&nbsp;名</B>：<BR>
        不能超过 250 个字符 <br>
        文字将出现在您发表的文章的结尾处。</td>
      <td width="60%" class=tablebody1> <textarea name="Signature" rows=5 cols=60 wrap=PHYSICAL><%if rs("UserSign")<>"" then
dim signture
signture=replace(trim(rs("UserSign")),"<BR>",chr(13))
signture=replace(signture,"&nbsp;","")
response.write(signture)
end if%></textarea> </td>
    </tr>
    <%end if%>
    <tr align="left"> 
      <th width="100%" colspan="2">其他选项 </th>
    </tr>
    <tr> 
      <td width="100%" class=tablebody1><B>选择Cookie的保留时间</B>：</td>
      <td width="60%" class=tablebody1> <input type="radio" name="usercookies" value="1" <% if request.cookies(Forum_sn)("usercookies")=1 then response.write "checked" %> > 
        <font color=red>1天</font> <input type="radio" name="usercookies" value="2" <% if request.cookies(Forum_sn)("usercookies")=2 then response.write "checked" %> >
        1个月 
        <input type="radio" name="usercookies" value="3" <% if request.cookies(Forum_sn)("usercookies")=3 then response.write "checked" %>>
        1年 
        <input type="radio" name="usercookies" value="0" <% if request.cookies(Forum_sn)("usercookies")=0 then response.write "checked" %>>
        不保留 </td>
    </tr>
    <tr> 
        <td width=41%  class=tablebody1><B>我的模板</B>：<BR>
          本系统允许选择个人展示页模板，选择属于自己的个性模板</td>
        <td width=60%  class=tablebody1>
		<select name=TemplateId>
	<%dim rst
	set rst=server.createobject("adodb.recordset")
	sql="select Tempname,id,Levels from Ms_Template order by id asc"
rst.Open sql,conn,1,1
if not (rst.eof and rst.bof) then
response.Write("<option value=1>默认模板</option>")
do while not rst.eof
response.Write("<option value="&rst(1)&" style=""background-color:#ffffff;color:#000000"">"&rst(0)&"</option>")	
rst.movenext
loop
else
end if
rst.close%>
          </select></td>
      </tr>
	 <tr> 
      <td width="100%" class=tablebody1><B>展示页投票</B>：<BR>
	  提供个人展示页投票功能</td>
      <td width="60%" class=tablebody1><a href=Uservote.asp?action=active target="_blank"><font color=red>点击这里激活投票</font></a></td>
    </tr>
	<tr> 
      <td width="100%" class=tablebody1><B>首页之星推荐</B>：<BR>
	  提供给会员推荐自我的地方</td>
      <td width="60%" class=tablebody1><a href=Usertj.asp?action=active target="_blank">我要推荐自己</a> <font color=red>（金币：<%=GroupSetting(189)&GroupSetting(190)%> 经验：<%=GroupSetting(191)&GroupSetting(192)%> 魅力：<%=GroupSetting(193)&GroupSetting(194)%>）</font></td>
    </tr>
    <%
dim userinfo
dim realname,character,personal,country,province,city,shengxiao,Userstars,blood,Folk,belief,occupation,dutytype,marital,education,college,userphone,address
if rs("UserInfo")<>"" then
	userinfo=split(rs("UserInfo"),"|||")
	if ubound(userinfo)=17 then
		realname=userinfo(0)
		character=userinfo(1)
		personal=userinfo(2)
		country=userinfo(3)
		province=userinfo(4)
		city=userinfo(5)
		shengxiao=userinfo(6)
		Userstars=userinfo(7)
		blood=userinfo(8)
		Folk=userinfo(9)
		belief=userinfo(10)
		occupation=userinfo(11)
		dutytype=userinfo(12)
		marital=userinfo(13)
		education=userinfo(14)
		college=userinfo(15)
		userphone=userinfo(16)
		address=userinfo(17)
	else
		realname=""
		character=""
		personal=""
		country=""
		province=""
		city=""
		shengxiao=""
		Userstars=""
		blood=""
		Folk=""
		belief=""
		occupation=""
		dutytype=""
		marital=""
		education=""
		college=""
		userphone=""
		address=""
	end if
else
		realname=""
		character=""
		personal=""
		country=""
		province=""
		city=""
		shengxiao=""
		Userstars=""
		blood=""
		Folk=""
		belief=""
		occupation=""
		dutytype=""
		marital=""
		education=""
		college=""
		userphone=""
		address=""
end if
%>
    <tr> 
      <th height=25 align=left valign=middle colspan=2>&nbsp;个人真实信息（以下内容建议填写）</th>
    </tr>
    <tr> 
      <td valign=top width=100% class=tablebody1> 　<b>真实姓名：</b> <input class=2 type=text name=realname size=18 value="<%=realname%>"> 
      </td>
      <td height=71 align=left valign=top  class=tablebody1 rowspan=14 width=60% > 
        <table width=100% border=0 cellspacing=0 cellpadding=5>
          <tr> 
            <td class=tablebody1><b>性　格： &nbsp; </b><br> <% dim KidneyType,theKidney
  KidneyType="多重性格,乐天达观,成熟稳重,幼稚调皮,温柔体贴,活泼可爱,普普通通,内向害羞,外向开朗,心地善良,聪明伶俐,善解人意,风趣幽默,思想开放,积极进取,小心谨慎,郁郁寡欢,正义正直,悲观失意,好吃懒做,处事洒脱,疑神疑鬼,患得患失,异想天开,多愁善感,淡泊名利,见利忘义,瞻前顾后,循规蹈矩,热心助人,快言快语,少言寡语,爱管闲事,追求刺激,豪放不羁,狡猾多变,贪小便宜,见异思迁,情绪多变,水性扬花,重色轻友,胆小怕事,积极负责,勇敢正义,聪明好学,实事求是,务实实际,老实巴交,圆滑老练,脾气暴躁,慢条斯理,诚实坦白,婆婆妈妈,急性子"
  theKidney=split(KidneyType, ",")
	   for i = 0 to ubound(theKidney)	
	   response.write "<input type=""checkbox"" name=""character"" value="""&trim(theKidney(i))&""" "
	 
	       if instr(character,trim(theKidney(i)))>0 then '如果有此项性格
		   response.write "checked" 
		   end if
	  
	   response.write ">"&trim(theKidney(i))&" "
	   if ((i+1) mod 5)=0 then response.write "<br>"  '每行显示六个性格进行换行
	   next   
  %> </td>
          </tr>
          <tr> 
            <td class=tablebody1><b>个人独白： &nbsp;</b><br> <textarea name=personal cols="70" rows=6><%if personal<>"" then
dim personalr
personalr=replace(trim(personal),"<BR>",chr(13))
personalr=replace(personalr,"&nbsp;","")
response.write(personalr)
end if%></textarea>
              <br>
              　　请您认真填写，未来意中人对您的第一印象也许就从这里产生。请不要为了凑字数而重复粘贴。您的真诚，也许就会收获你一生的幸福！注意：不要留任何联系方式！ 
            </td>
          </tr>
        </table></td>
    </tr>
    <tr> 
      <td valign=top width=100%  class=tablebody1>　<b>国　　家：</b> <b> 
        <input class=2 type=text name=country size=18 value="<%=country%>">
        </b> </td>
    </tr>
    <tr> 
      <td valign=top width=100%  class=tablebody1>　<b>联系电话：</b> <b> 
        <input class=2 type=text name=userphone size=18 value="<%=userphone%>">
        </b> </td>
    </tr>
    <tr> 
      <td valign=top width=100% class=tablebody1>　<b>通信地址：</b> <b> 
        <input class=2 type=text name=address size=18 value="<%=address%>">
        </b> </td>
    </tr>
    <tr> 
      <td valign=top width=100% class=tablebody1>　<b>省　　份：</b> <input type=text name=province size=12 value="<%=province%>"> 
        <select name="selectp" onChange="selectcityarea('selectp','selectc','theForm');theForm.province.value=this.value;">
          <option value="0" selected>请选择..</option>
        </select> </td>
    </tr>
    <tr> 
      <td valign=top width=100% class=tablebody1>　<b>城　　市： </b> <input class=2 type=text name=city size=18 value="<%=city%>"> 
        <select name="selectc" onChange="theForm.city.value=this.value;">
          <option value="0" selected>请选择..</option>
        </select> </td>
    </tr>
    <tr> 
      <td valign=top width=100% class=tablebody1>　<b>生　　肖： </b> <select size=1 name=shengxiao>
          <option value="" <%if shengxiao="" then%>selected<%end if%>></option>
          <option value=鼠 <%if shengxiao="鼠" then response.write "selected"%>>鼠</option>
          <option value=牛 <%if shengxiao="牛" then response.write "selected"%>>牛</option>
          <option value=虎 <%if shengxiao="虎" then response.write "selected"%>>虎</option>
          <option value=兔 <%if shengxiao="兔" then response.write "selected"%>>兔</option>
          <option value=龙 <%if shengxiao="龙" then response.write "selected"%>>龙</option>
          <option value=蛇 <%if shengxiao="蛇" then response.write "selected"%>>蛇</option>
          <option value=马 <%if shengxiao="马" then response.write "selected"%>>马</option>
          <option value=羊 <%if shengxiao="羊" then response.write "selected"%>>羊</option>
          <option value=猴 <%if shengxiao="猴" then response.write "selected"%>>猴</option>
          <option value=鸡 <%if shengxiao="鸡" then response.write "selected"%>>鸡</option>
          <option value=狗 <%if shengxiao="狗" then response.write "selected"%>>狗</option>
          <option value=猪 <%if shengxiao="猪" then response.write "selected"%>>猪</option>
        </select>
        星　　座： 
        <select name=Userstars size=1 id="Userstars">
          <option value="" <%if Userstars="" then%>selected<%end if%>></option>
          <option value=白羊座 <%if Userstars="白羊座" then response.write "selected"%>>白羊座</option>
          <option value=金牛座 <%if Userstars="金牛座" then response.write "selected"%>>金牛座</option>
          <option value=双子座 <%if Userstars="双子座" then response.write "selected"%>>双子座</option>
          <option value=巨蟹座 <%if Userstars="巨蟹座" then response.write "selected"%>>巨蟹座</option>
          <option value=狮子座 <%if Userstars="狮子座" then response.write "selected"%>>狮子座</option>
          <option value=处女座 <%if Userstars="处女座" then response.write "selected"%>>处女座</option>
          <option value=天秤座 <%if Userstars="天秤座" then response.write "selected"%>>天秤座</option>
          <option value=天蝎座 <%if Userstars="天蝎座" then response.write "selected"%>>天蝎座</option>
          <option value=射手座 <%if Userstars="射手座" then response.write "selected"%>>射手座</option>
          <option value=摩羯座 <%if Userstars="摩羯座" then response.write "selected"%>>摩羯座</option>
          <option value=水瓶座 <%if Userstars="水瓶座" then response.write "selected"%>>水瓶座</option>
          <option value=双鱼座 <%if Userstars="双鱼座" then response.write "selected"%>>双鱼座</option>
        </select></td>
    </tr>
    <tr> 
      <td valign=top width=100% class=tablebody1>　<b>血　　型：</b> <select size=1 name=blood>
          <option value="" <%if blood="" then%>selected<%end if%>></option>
          <option value=A <%if blood="A" then response.write "selected"%>>A</option>
          <option value=B <%if blood="B" then response.write "selected"%>>B</option>
          <option value=AB <%if blood="AB" then response.write "selected"%>>AB</option>
          <option value=O <%if blood="O" then response.write "selected"%>>O</option>
          <option value=其他 <%if blood="其他" then response.write "selected"%>>其他</option>
        </select>
        民　　族：
        <select name=Folk>
          <option value="" <%if Folk="" then%>selected<%end if%>></option>
          <option value=汉族 <%if Folk="汉族" then%>selected<%end if%>>汉族</option>
          <option value=藏族 <%if Folk="藏族" then%>selected<%end if%>>藏族</option>
          <option value=朝鲜族 <%if Folk="朝鲜族" then%>selected<%end if%>>朝鲜族</option>
          <option value=蒙古族 <%if Folk="蒙古族" then%>selected<%end if%>>蒙古族</option>
          <option value=回族 <%if Folk="回族" then%>selected<%end if%>>回族</option>
          <option value=满族 <%if Folk="满族" then%>selected<%end if%>>满族</option>
          <option value=维吾尔族 <%if Folk="维吾尔族" then%>selected<%end if%>>维吾尔族</option>
          <option value=壮族 <%if Folk="壮族" then%>selected<%end if%>>壮族</option>
          <option value=彝族 <%if Folk="彝族" then%>selected<%end if%>>彝族</option>
          <option value=苗族 <%if Folk="苗族" then%>selected<%end if%>>苗族</option>
          <option value=其他民族 <%if Folk="其他民族" then%>selected<%end if%>>其他民族</option>
        </select></td>
    </tr>
    <tr> 
      <td valign=top width=100% class=tablebody1>　<b>信　　仰：</b> <select size=1 name=belief>
          <option value="" <%if belief="" then%>selected<%end if%>></option>
          <option value=佛教 <%if belief="佛教" then%>selected<%end if%>>佛教</option>
          <option value=道教 <%if belief="道教" then%>selected<%end if%>>道教</option>
          <option value=基督教 <%if belief="基督教" then%>selected<%end if%>>基督教</option>
          <option value=天主教 <%if belief="天主教" then%>selected<%end if%>>天主教</option>
          <option value=回教 <%if belief="回教" then%>selected<%end if%>>回教</option>
          <option value=无神论者 <%if belief="无神论者" then%>selected<%end if%>>无神论者</option>
          <option value=共产主义者 <%if belief="共产主义者" then%>selected<%end if%>>共产主义者</option>
          <option value=其他 <%if belief="其他" then%>selected<%end if%>>其他</option>
        </select> </td>
    </tr>
    <tr> 
      <td valign=top width=100% class=tablebody1>　<b>职　　业： </b> <select name=occupation>
          <option value="" <%if occupation="" then%>selected<%end if%>> </option>
          <option value=学生 <%if occupation="学生" then%>selected<%end if%>>学生</option>
          <option value=高层管理 <%if occupation="高层管理" then%>selected<%end if%>>高层管理</option>
          <option value=中层干部 <%if occupation="中层干部" then%>selected<%end if%>>中层干部</option>
          <option value=私营业主 <%if occupation="私营业主" then%>selected<%end if%>>私营业主</option>
          <option value=个体业主 <%if occupation="个体业主" then%>selected<%end if%>>个体业主</option>
          <option value=销售 <%if occupation="销售" then%>selected<%end if%>>销售</option>
          <option value=市场 <%if occupation="市场" then%>selected<%end if%>>市场</option>
          <option value=策划 <%if occupation="策划" then%>selected<%end if%>>策划</option>
          <option value=研发 <%if occupation="研发" then%>selected<%end if%>>研发</option>
          <option value=技术 <%if occupation="技术" then%>selected<%end if%>>技术</option>
          <option value=科研 <%if occupation="科研" then%>selected<%end if%>>科研</option>
          <option value=设计 <%if occupation="设计" then%>selected<%end if%>>设计</option>
          <option value=生产采购 <%if occupation="生产采购" then%>selected<%end if%>>生产采购</option>
          <option value=财务 <%if occupation="财务" then%>selected<%end if%>>财务</option>
          <option value=人事行政 <%if occupation="人事行政" then%>selected<%end if%>>人事行政</option>
          <option value=后勤 <%if occupation="后勤" then%>selected<%end if%>>后勤</option>
          <option value=文秘助理 <%if occupation="文秘助理" then%>selected<%end if%>>文秘助理</option>
          <option value=咨询培训 <%if occupation="咨询培训" then%>selected<%end if%>>咨询培训</option>
          <option value=普通职员 <%if occupation="普通职员" then%>selected<%end if%>>普通职员</option>
          <option value=高级职员 <%if occupation="高级职员" then%>selected<%end if%>>高级职员</option>
          <option value=公务员 <%if occupation="公务员" then%>selected<%end if%>>公务员</option>
          <option value=机关干部 <%if occupation="机关干部" then%>selected<%end if%>>机关干部</option>
          <option value=教师 <%if occupation="教师" then%>selected<%end if%>>教师</option>
          <option value=服务 <%if occupation="服务" then%>selected<%end if%>>服务</option>
          <option value=工人 <%if occupation="工人" then%>selected<%end if%>>工人</option>
          <option value=技工 <%if occupation="技工" then%>selected<%end if%>>技工</option>
          <option value=农民 <%if occupation="农民" then%>selected<%end if%>>农民</option>
          <option value=军人 <%if occupation="军人" then%>selected<%end if%>>军人</option>
          <option value=警察 <%if occupation="警察" then%>selected<%end if%>>警察</option>
          <option value=医生 <%if occupation="医生" then%>selected<%end if%>>医生</option>
          <option value=护士 <%if occupation="护士" then%>selected<%end if%>>护士</option>
          <option value=艺术 <%if occupation="艺术" then%>selected<%end if%>>艺术</option>
          <option value=演艺 <%if occupation="演艺" then%>selected<%end if%>>演艺</option>
          <option value=记者编辑 <%if occupation="记者编辑" then%>selected<%end if%>>记者编辑</option>
          <option value=体育 <%if occupation="体育" then%>selected<%end if%>>体育</option>
          <option value=律师 <%if occupation="律师" then%>selected<%end if%>>律师</option>
          <option value=专业人士 <%if occupation="专业人士" then%>selected<%end if%>>专业人士</option>
          <option value=自由职业 <%if occupation="自由职业" then%>selected<%end if%>>自由职业</option><option value=待业 <%if occupation="待业" then%>selected<%end if%>>待业</option> 
          <option value=退休 <%if occupation="退休" then%>selected<%end if%>>退休</option>
          <option value=其他职业 <%if occupation="其他职业" then%>selected<%end if%>>其他职业</option>
        </select>
        职称： 
        <input name=dutytype type="text" size="10" maxlength="8" value=<%=dutytype%>></td>
    </tr>
    <tr> 
      <td valign=top width=100% class=tablebody1>　<b>婚姻状况：</b> <select size=1 name=marital>
          <option value="" <%if marital="" then%>selected<%end if%>></option>
          <option value=未婚 <%if marital="未婚" then%>selected<%end if%>>未婚</option>
          <option value=已婚 <%if marital="已婚" then%>selected<%end if%>>已婚</option>
          <option value=离异 <%if marital="离异" then%>selected<%end if%>>离异</option>
          <option value=丧偶 <%if marital="丧偶" then%>selected<%end if%>>丧偶</option>
        </select></td>
    </tr>
    <tr> 
      <td valign=top width=100% class=tablebody1>　<b>最高学历：</b> <select size=1 name=education>
          <option value="" <%if education="" then%>selected<%end if%>></option>
          <option value=小学 <%if education="小学" then%>selected<%end if%>>小学</option>
          <option value=初中 <%if education="初中" then%>selected<%end if%>>初中</option>
          <option value=高中 <%if education="高中" then%>selected<%end if%>>高中</option>
          <option value=中专 <%if education="中专" then%>selected<%end if%>>中专</option>
          <option value=大专 <%if education="大专" then%>selected<%end if%>>大专</option>
          <option value=大学 <%if education="大学" then%>selected<%end if%>>大学</option>
          <option value=硕士 <%if education="硕士" then%>selected<%end if%>>硕士</option>
          <option value=博士 <%if education="博士" then%>selected<%end if%>>博士</option>
          <option value=其它 <%if education="其它" then%>selected<%end if%>>其它</option>
        </select></td>
    </tr>
    <tr> 
      <td valign=top width=100% class=tablebody1>　<b>毕业院校：</b> <input class=2 type=text name=college size=18 value="<%=college%>"></td>
    </tr>
    <tr align="center"> 
      <td colspan="2" width="100%" class=tablebody2> <input class=2 type=Submit value="更 新" name="Submit"> 
        &nbsp; <input class=2 type="reset" name="Submit2" value="清 除"> </td>
    </tr>
  </table>
</form>
   
</body>
</html> 
<script>
first("selectp","selectc","theForm",0,0);
</script>
<%
end if
rs.close
set rs=nothing
end sub

sub updatereg()
dim Userface,Faceinfo,Userphoto
dim showRe,birthday,Facewidth,Faceheight
if Not ChkPost then'查检提交数据
	ErrMsg=ErrMsg+"<Br>"+"<li>您提交的数据不合法，请不要从外部提交发言。"
   	FoundErr=True
end if
				
dim OpenFaces'头像处理
OpenFaces=split(OpenFace,"|")
if request.form("myface")<>"" and Cint(OpenFaces(0))=1 then
	if request("Facewidth")="" or request("Faceheight")="" then
		errmsg=errmsg+"<br>"+"<li>请输入图片的宽度和高度。"
		founderr=true
	elseif not isInteger(request("Facewidth")) or not isInteger(request("Faceheight")) then
		errmsg=errmsg+"<br>"+"<li>您输入的字符不合法。"
		founderr=true
	elseif Cint(request("Facewidth"))>Cint(OpenFaces(3)) then
		errmsg=errmsg+"<br>"+"<li>您输入的图片宽度不符合标准。"
		founderr=true
	elseif Cint(request("Faceheight"))>Cint(OpenFaces(4)) then
		errmsg=errmsg+"<br>"+"<li>您输入的图片高度不符合标准。"
		founderr=true
	else
		if Cint(OpenFaces(0))=0 then
			if instr(lcase(request("myface")),"http://")>0 or instr(lcase(request("myface")),"www.")>0 then
				errmsg=errmsg+"<br>"+"<li>本交友设置了不允许连接外部网址做头像。"
				founderr=true
			end if
		end if
		Userface=request("myface")
	end if
else
	if request("Userface")<>"" then
		Userface=request("Userface")
	end if
end if
		Facewidth=request("Facewidth")
		Faceheight=request("Faceheight")

if strLength(trim(request("Userphoto")))>100 then
	errmsg=errmsg+"<br>"+"<li>用户照片地址只能在100个字符以内。"
	founderr=true
end if

if strLength(request("Signature"))>250 then
	errmsg=errmsg+"<br>"+"<li>签名只能在250个字符以内。"
	founderr=true
end if

if checkstr(trim(request("birthday")))="" then'检查生日
birthday=""
else
birthday=checkstr(trim(request("birthday")))
if not isdate(birthday) then birthday=""
end if

if strLength(request("personal"))>250 then
	errmsg=errmsg+"<br>"+"<li>个人独白只能在250个字符以内。"
	founderr=true
end if

if founderr then
call Mslove_error()
exit sub
end if
dim userinfo
	Userinfo=checkreal(Request.Form("realname")) & "|||" & checkreal(Request.Form("character")) & "|||" & Htmlencode(trim(checkreal(Request.Form("personal")))) & "|||" & checkreal(Request.Form("country")) & "|||" & checkreal(Request.Form("province")) & "|||" & checkreal(Request.Form("city")) & "|||" & Request.Form("shengxiao") & "|||" & Request.Form("Userstars") & "|||" & Request.Form("blood") & "|||" & Request.Form("Folk") & "|||" & Request.Form("belief") & "|||" & Request.Form("occupation") & "|||" & checkreal(Request.Form("dutytype"))& "|||" & Request.Form("marital") & "|||" & Request.Form("education") & "|||" & checkreal(Request.Form("college")) & "|||" & checkreal(Request.Form("userphone")) & "|||" & checkreal(Request.Form("address"))
set rs=server.createobject("adodb.recordset")
sql="Select * from [Ms_User] where userid="&userid
rs.open sql,conn,1,3
if rs.eof and rs.bof then
	errmsg=errmsg+"<br>"+"<li>该用户名不存在。"
	founderr=true
else
If birthday<>"" Then rs("UserBirthday")=birthday
If Request.form("myface")<>"" Then
			rs("UserFace")=replace(Userface,"'","")
		Else
			rs("UserFace")=replace(Userface,"'","")
		End If
	rs("Faceinfo")=Facewidth& "|||"&Faceheight
	rs("Usersign")=HTMLEncode(Trim(request.form("Signature")))
	rs("UserInfo")=userinfo
	if Request.Form("TemplateId")="" then
	rs("TemplateId")=1
	else
	rs("TemplateId")=Request.Form("TemplateId")
	end if
	rs.Update
	usercookies=request("usercookies")
	select case usercookies
	case 0
		Response.Cookies(Forum_sn)("usercookies") = usercookies
	case 1
		Response.Cookies(Forum_sn).Expires=Date+1
		Response.Cookies(Forum_sn)("usercookies") = usercookies
	case 2
		Response.Cookies(Forum_sn).Expires=Date+31
		Response.Cookies(Forum_sn)("usercookies") = usercookies
	case 3
		Response.Cookies(Forum_sn).Expires=Date+365
		Response.Cookies(Forum_sn)("usercookies") = usercookies
	end select
	Response.Cookies(Forum_sn).path=cookiepath
end if
rs.close
set rs=nothing
end sub

function checkreal(v)
dim w
if not isnull(v) then
	w=replace(v,"|||","§§§")
	checkreal=w
end if
end function
%>