<!--#include file="conn.asp"-->
<!--#include file="inc/md5.asp"-->
<!--#include file="inc/htmlencode2.asp" -->
<!--#include file="inc/ubbcode.asp" -->
<!--#include file="bbsuser.asp"-->
<!--#include file="inc/publicfun.asp" -->
<%
userid=request.cookies("clubuser_id")
if request.form("act")="Y" then
   dim msg,errorinfo
   clubuser_email=CheckStr(request.form("clubuser_email"))
   clubuser_address=CheckStr(request.form("clubuser_address"))
   clubuser_marriage=request.form("clubuser_marriage")
   homepagetitle=CheckStr(request.form("homepagetitle"))
   clubuser_note=CheckStr(ftHTMLCode(request.form("clubuser_note")))
   bstr=request("bstr")

   str="update "&ft&"clubuser set clubuser_email='"&clubuser_email&"',clubuser_marriage='"&clubuser_marriage&"',clubuser_address='"&clubuser_address&"',homepagetitle='"&homepagetitle&"',clubuser_note='"&clubuser_note&"',bokeer=1 where clubuser_id="&userid
   conn.execute str
   if bstr="1" then
   call setcookie(1,ckiesdomain,"bokeer",1)
   'call makefolder(userid,fso)
   msg="(<font color=red>恭喜你成为了博客!</font>)"
   else
   msg="(<font color=red>修改成功!</font>)"
   end if
end if
sql="select clubuser_name,clubuser_email,clubuser_sex,clubuser_address,clubuser_marriage,homepagetitle,bokeer,clubuser_note,cssfile from "&ft&"clubuser where clubuser_id="&userid
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,3,1
if not rs.eof then
   bokeer=rs("bokeer")
   cssfile="blogcss/"&rs("cssfile")
   if isNull(rs("cssfile")) or rs("cssfile")="" or cssfile="blogcss/" then cssfile="blogcss/2.css"
end if
%>
<html>
<head>
<meta http-equiv=content-type content="text/html; charset=gb2312">
<title>修改个人资料</title>
<link rel="stylesheet" type="text/css" href="<%=cssfile%>">
</head>
<script language=javascript src="js/publicfun.js"></script>
<body>
<center>
<!--#include file="usernav.asp" -->
<!--#include file="myhead.asp" -->
<div class="stage">
<table width="100%" border="0" cellspacing="0" cellpadding="0" id="layout">
<tr>
<td width="22%" valign="top" class="c2t3">
<div id="mod_profile" class="mod" rel="drag">
<!--#include file="usercalog.asp" -->
</div>
</td>
<td width="78%" valign="top" class="c2t1">
<div id="m_blog" class="modbox"><br>
              <table width="89%" border="0" align="center">
                <form name="form1" method="post" action="" onsubmit="return check(this)">
                  <tr> 
                    <td height="30"><div align="center"></div></td>
                    <td height="30" class="f14">
					<%
					if request("blogstr")="1" and bstr<>"1" then
					response.write "<strong><font color=red>你还没有成为博客，要成为博客请补填完以下信息</font></strong>"
					else
					response.write "<strong>修改资料</strong>"&msg
					end if
					%>
				    </td>
                  </tr>
                  <tr> 
                    <td width="17%" height="30"><div align="right">用户名:</div></td>
                    <td width="83%"><input name="clubuser_name" type="text" id="clubuser_name" value="<%=rs("clubuser_name")%>" size="40" disabled>
                    </td>
                  </tr>
                  <tr> 
                    <td height="30"><div align="right">性 别:</div></td>
                    <td><input name="clubuser_sex" type="radio" value="男" <%if rs("clubuser_sex")="男" then%>checked<%end if%>>
                      男
                      <input type="radio" name="clubuser_sex" value="女" <%if rs("clubuser_sex")="女" then%>checked<%end if%>>
                      女</td>
                  </tr>
                  <tr> 
                    <td height="30"><div align="right">Email:</div></td>
                    <td><input name="clubuser_email" type="text" id="clubuser_email" value="<%=rs("clubuser_email")%>" size="40"></td>
                  </tr>
                  <tr> 
                    <td height="30"><div align="right">婚姻状况:</div></td>
                    <td>
<input name="clubuser_marriage" type="radio" value="未婚" <%if rs("clubuser_marriage")="未婚" then%>checked<%end if%>>
                      未婚 
                      <input type="radio" name="clubuser_marriage" value="已婚" <%if rs("clubuser_marriage")="已婚" then%>checked<%end if%>>
                      已婚</td>
                  </tr>
                  <tr> 
                    <td height="30"><div align="right">地 址:</div></td>
                    <td><input name="clubuser_address" type="text" id="clubuser_address" value="<%=rs("clubuser_address")%>" size="40"></td>
                  </tr>
                  <tr> 
                    <td height="30"><div align="right">blog标题:</div></td>
                    <td><input name="homepagetitle" type="text" id="homepagetitle" value="<%=rs("homepagetitle")%>" size="40"></td>
                  </tr>
                  <tr> 
                    <td height="30"><div align="right">简 介:</div></td>
                    <td><textarea name="clubuser_note" cols="40" rows="12" id="clubuser_note"><%=rs("clubuser_note")%></textarea></td>
                  </tr>
                  <tr> 
                    <td height="45"></td>
                    <td><input type="submit" name="Submit" value="确认修改">
                      <input name="act" type="hidden" id="act" value="Y">
					  <input name="bstr" type="hidden" id="act" value="<%=request("blogstr")%>">
					</td>
                  </tr>
                </form>
              </table>
            </div>
</td>
</tr></table>
</div>
</div>
<br><center>
    <!--#include file="tail.asp" -->
  </center>
</center>
</body>
</html>
<%closedb%>