myinfo.asp
上传用户:jisenq
上传日期:2014-06-29
资源大小:7216k
文件大小:13k
源码类别:

数据库编程

开发平台:

ASP/ASPX

  1. <% Option Explicit %>
  2. <!--#include file="../FS_Inc/Const.asp" -->
  3. <!--#include file="../FS_InterFace/MF_Function.asp" -->
  4. <!--#include file="../FS_Inc/Function.asp" -->
  5. <!--#include file="lib/strlib.asp" -->
  6. <!--#include file="lib/UserCheck.asp" -->
  7. <%
  8. Dim str_CurrPath
  9. str_CurrPath = Replace("/"&G_VIRTUAL_ROOT_DIR &"/"&G_USERFILES_DIR&"/"&Session("FS_UserNumber"),"//","/")
  10. If Request.Form("Action") = "Save" then
  11. Dim p_NickName,p_BothYear,p_picsizew,p_picsizeh
  12. p_NickName = NoSqlHack(Replace(Request.Form("NickName"),"''",""))
  13. p_BothYear = NoSqlHack(Replace(Request.Form("BothYear"),"''",""))
  14. p_picsizew = NoSqlHack(Replace(Request.Form("HeadPicSizew"),"''",""))
  15. p_picsizeh = NoSqlHack(Replace(Request.Form("HeadPicSizeh"),"''",""))
  16. if trim(p_NickName) ="" then 
  17. strShowErr = "<li>请填写用户昵称</li>"
  18. Response.Redirect("lib/Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  19. Response.end
  20. Elseif isdate(p_BothYear) = false then
  21. strShowErr = "<li>您填写的日期是无效的。正确格式为:1980-7-7</li>"
  22. Response.Redirect("lib/Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  23. Response.end
  24. Elseif  isNumeric(p_picsizew) =false  then
  25. strShowErr = "<li>头像宽度输入的不是有效数字</li>"
  26. Response.Redirect("lib/Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  27. Response.end
  28. Elseif isNumeric(p_picsizeh) =false then
  29. strShowErr = "<li>头像高度输入的不是有效数字</li>>"
  30. Response.Redirect("lib/Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  31. Response.end
  32. Elseif   cint(p_picsizew)>200 then
  33. strShowErr = "<li>头像宽度不能超过200px</li>"
  34. Response.Redirect("lib/Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  35. Response.end
  36. Elseif  cint(p_picsizeh)>200 then
  37. strShowErr = "<li>头像高度不能超过200px</li"
  38. Response.Redirect("lib/Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  39. Response.end
  40. Elseif len(Request.Form("SelfIntro"))>50 then
  41. strShowErr = "<li>自我介绍不能超过50个字符</li"
  42. Response.Redirect("lib/Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  43. Response.end
  44. else
  45. Dim RsSaveIObj
  46. Set RsSaveIObj = server.CreateObject(G_FS_RS)
  47. RsSaveIObj.open "select  UserID,isLock,UserName,RealName,GroupID,Integral,UserNumber,BothYear,SelfIntro,isOpen,Certificate,CertificateCode,Vocation,HeadPic,NickName,Mobile,CloseTime,IsCorporation,isMessage,Email,sex,safeCode,UserLoginCode,HeadPicsize,OnlyLogin,UserFavor,IsMarray From FS_ME_Users where UserNumber = '"& Fs_User.UserNumber &"'",User_Conn,1,3
  48. RsSaveIObj("NickName") = p_NickName
  49. RsSaveIObj("RealName") = NoSqlHack(Replace(Request.Form("RealName"),"''",""))
  50. RsSaveIObj("sex") = NoSqlHack(Replace(Request.Form("sex"),"''",""))
  51. RsSaveIObj("Vocation")  = NoSqlHack(Replace(Request.Form("Vocation"),"''",""))
  52. RsSaveIObj("HeadPic")  = Replace(Request.Form("HeadPic"),"''","")
  53. RsSaveIObj("HeadPicSize")  = p_picsizew&","&p_picsizeh
  54. RsSaveIObj("BothYear")  = p_BothYear
  55. RsSaveIObj("IsMarray")  = NoSqlHack(Request.Form("IsMarray"))
  56. RsSaveIObj("isopen")  = NoSqlHack(Request.Form("isopen"))
  57. RsSaveIObj("SelfIntro")  =Request.Form("SelfIntro")
  58. RsSaveIObj("UserFavor")  =Request.Form("UserFavor")
  59. RsSaveIObj.update
  60. RsSaveIObj.close
  61. set RsSaveIObj = nothing
  62. strShowErr = "<li>个人资料修改成功!</li>"
  63. Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=../myinfo.asp")
  64. Response.end
  65. End if
  66. Else
  67. %>
  68. <html xmlns="http://www.w3.org/1999/xhtml">
  69. <title>我的资料-网站内容管理系统</title>
  70. <meta name="keywords" content="风讯cms,cms,FoosunCMS,FoosunOA,FoosunVif,vif,风讯网站内容管理系统">
  71. <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
  72. <meta content="MSHTML 6.00.3790.2491" name="GENERATOR" />
  73. <meta name="Keywords" content="Foosun,FoosunCMS,Foosun Inc.,风讯,风讯网站内容管理系统,风讯系统,风讯新闻系统,风讯商城,风讯b2c,新闻系统,CMS,域名空间,asp,jsp,asp.net,SQL,SQL SERVER" />
  74. <link href="images/skin/Css_<%=Request.Cookies("FoosunUserCookies")("UserLogin_Style_Num")%>/<%=Request.Cookies("FoosunUserCookies")("UserLogin_Style_Num")%>.css" rel="stylesheet" type="text/css">
  75. <head>
  76. <body>
  77. <table width="98%" border="0" align="center" cellpadding="1" cellspacing="1" class="table">
  78.   <tr>
  79.     <td>
  80.       <!--#include file="top.asp" -->
  81.     </td>
  82.   </tr>
  83. </table>
  84. <table width="98%" height="135" border="0" align="center" cellpadding="1" cellspacing="1" class="table">
  85.   
  86.     <tr class="back"> 
  87.       <td   colspan="2" class="xingmu" height="26"> <!--#include file="Top_navi.asp" --> </td>
  88.     </tr>
  89.     <tr class="back"> 
  90.       <td width="18%" valign="top" class="hback"> <div align="left"> 
  91.           <!--#include file="menu.asp" -->
  92.         </div></td>
  93.       <td width="82%" valign="top" class="hback"><table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" class="table">
  94.         <tr class="hback"> 
  95.           <td class="hback"><strong>位置:</strong><a href="../">网站首页</a> &gt;&gt; 
  96.             <a href="main.asp">会员首页</a> &gt;&gt; 我的资料</td>
  97.         </tr>
  98.       </table> 
  99.       <table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" class="table">
  100.         <form name="form1" method="post" action="">
  101.           <tr class="hback"> 
  102.             <td width="16%" class="hback_1"><div align="center"><strong>用 户 名</strong></div></td>
  103.             <td width="35%" class="hback"><input name="UserName" type="text" id="UserName" value="<% = Fs_User.UserName%>" size="26" readonly></td>
  104.             <td width="9%" class="hback_1"><div align="center"><strong>用户编号</strong></div></td>
  105.             <td width="40%" class="hback"><input name="UserNumber" type="text" id="UserNumber" value="<% = Fs_User.UserNumber%>" size="26" readonly></td>
  106.           </tr>
  107.           <tr class="hback"> 
  108.             <td class="hback_1"><div align="center"><strong>用户昵称</strong></div></td>
  109.             <td class="hback"><input name="NickName" type="text" id="NickName" value="<% = Fs_User.NickName%>" size="26" maxlength="20"></td>
  110.             <td class="hback_1"><div align="center"><strong>真实姓名</strong></div></td>
  111.             <td class="hback"><input name="RealName" type="text" id="RealName" value="<% = Fs_User.RealName%>" size="26" maxlength="20"></td>
  112.           </tr>
  113.           <tr class="hback"> 
  114.             <td class="hback_1"><div align="center"><strong>用户性别</strong></div></td>
  115.             <td class="hback"><select name="sex" id="sex">
  116.                 <option value="0" <%if Fs_User.Sex = 0 then response.Write("selected")%>>男</option>
  117.                 <option value="1" <%if Fs_User.Sex = 1 then response.Write("selected")%>>女</option>
  118.               </select></td>
  119.             <td class="hback_1"><div align="center"><strong>用户职业</strong></div></td>
  120.             <td class="hback"><input name="Vocation" type="text" id="Vocation" value="<% = Fs_User.Vocation%>" size="26" maxlength="30"> 
  121.             </td>
  122.           </tr>
  123.           <tr class="hback"> 
  124.             <td class="hback_1"><div align="center"><strong>用户头像</strong></div></td>
  125.             <td class="hback"><input name="HeadPic" type="text" id="HeadPic" value="<% = Fs_User.HeadPic%>" size="26" maxlength="250">
  126.             <img  src="Images/upfile.gif" width="44" height="22" onClick="OpenWindowAndSetValue('CommPages/SelectPic.asp?CurrPath=<% = str_CurrPath %>&f_UserNumber=<% = session("FS_UserNumber")%>',500,320,window,document.form1.HeadPic);" style="cursor:hand;"></td>
  127.             <td class="hback_1"><div align="center"><strong>头像尺寸</strong></div></td>
  128.             <td class="hback"> <%
  129. Dim arr_HeadPicsize
  130. If Not IsNull(Fs_User.HeadPicsize) then
  131. arr_HeadPicsize = split(Fs_User.HeadPicsize,",")
  132. End if
  133. %>
  134.               宽 
  135.               <input name="HeadPicsizew" type="text" value="<%If Not IsNull(Fs_User.HeadPicsize) then Response.write(arr_HeadPicsize(0))%>" size="5" maxlength="3">
  136.               px,高 
  137.               <input name="HeadPicsizeh" type="text" value="<%If Not IsNull(Fs_User.HeadPicsize) then Response.write(arr_HeadPicsize(1))%>" size="5" maxlength="3">
  138.               px</td>
  139.           </tr>
  140.           <tr class="hback"> 
  141.             <td class="hback_1"><div align="center"><strong>出身日期</strong></div></td>
  142.             <td class="hback"><input name="BothYear" type="text" id="BothYear" value="<% = Fs_User.BothYear%>" size="26" maxlength="10">
  143.               格式:1980-7-7</td>
  144.             <td class="hback_1"><div align="center"><strong>会 员 组</strong></div></td>
  145.             <td class="hback"><% if   Fs_User.NumGroupID = 0 then Response.Write("默认会员组")%> </td>
  146.           </tr>
  147.           <tr class="hback"> 
  148.             <td class="hback_1"><div align="center"><strong>证件类型</strong></div></td>
  149.             <td class="hback"> <%
  150. if  Fs_User.PaperType = 0 then
  151. Response.Write("身份证")
  152. Elseif   Fs_User.PaperType = 1 then
  153. Response.Write("驾驶证")
  154. Elseif   Fs_User.PaperType = 2 then
  155. Response.Write("学生证")
  156. Elseif   Fs_User.PaperType = 3 then
  157. Response.Write("军人证")
  158. Elseif   Fs_User.PaperType = 4 then
  159. Response.Write("护照")
  160. Else
  161. Response.Write("未知证件")
  162. End if
  163. %></td>
  164.             <td class="hback_1"><div align="center"><strong>证件号码</strong></div></td>
  165.             <td class="hback"><% = Fs_User.PaperTypeCode%></td>
  166.           </tr>
  167.           <tr class="hback"> 
  168.             <td class="hback_1"><div align="center"><strong>是否结婚</strong></div></td>
  169.             <td class="hback"><select name="IsMarray" id="IsMarray">
  170.                 <option value="0" <%if Fs_User.IsMarray = 0 then response.Write("selected")%>>保密</option>
  171.                 <option value="1" <%if Fs_User.IsMarray = 1 then response.Write("selected")%>>已婚</option>
  172.                 <option value="2" <%if Fs_User.IsMarray = 2 then response.Write("selected")%>>未婚</option>
  173.               </select></td>
  174.             <td class="hback_1"><div align="center"><strong>个人资料</strong></div></td>
  175.             <td class="hback"><input type="radio" name="isopen" value="1" <%if Fs_User.isopen = 1 then response.Write("checked")%>>
  176.               开放 
  177.               <input type="radio" name="isopen" value="0" <%if Fs_User.isopen = 0 then response.Write("checked")%>>
  178.               关闭</td>
  179.           </tr>
  180.           <tr class="hback"> 
  181.             <td class="hback_1"><div align="center"><strong>自我介绍<br>
  182.                 (签名)</strong></div></td>
  183.             <td class="hback"><textarea name="SelfIntro" cols="30" rows="5" id="SelfIntro"><% = Fs_User.SelfIntro%></textarea></td>
  184.             <td class="hback_1"><div align="center"><strong>个人爱好</strong></div></td>
  185.             <td class="hback"> <textarea name="UserFavor" cols="30" rows="5" id="UserFavor"><% = Fs_User.UserFavor%></textarea></td>
  186.           </tr>
  187.           <tr class="hback"> 
  188.             <td class="hback_1"><div align="center"><strong>登陆 IP</strong></div></td>
  189.             <td class="hback"> <% = Fs_User.LastLoginIP%> </td>
  190.             <td class="hback_1"><div align="center"><strong>最后登陆</strong></div></td>
  191.             <td class="hback"> <% = Fs_User.LastLoginTime%> </td>
  192.           </tr>
  193.           <tr class="hback"> 
  194.             <td class="hback_1"><div align="center"><strong>到期日期</strong></div></td>
  195.             <td class="hback"> <%
  196.   if Fs_User.CloseTime ="3000-1-1" then
  197. Response.Write("没限制")
  198.   Else
  199. Response.Write Fs_User.CloseTime
  200.   End if
  201.   %> </td>
  202.             <td class="hback_1"><div align="center"><strong>注册日期</strong></div></td>
  203.             <td class="hback"> <% = Fs_User.RegTime%> </td>
  204.           </tr>
  205.           <tr class="hback"> 
  206.             <td class="hback_1"><div align="center"><strong>点  数</strong></div></td>
  207.             <td class="hback"> <% = Fs_User.NumIntegral%> </td>
  208.             <td class="hback_1"><div align="center"><strong>金  币</strong></div></td>
  209.             <td class="hback"> <% = Fs_User.NumFS_Money%> </td>
  210.           </tr>
  211.           <tr class="hback"> 
  212.             <td colspan="4" class="hback"><div align="center"> 
  213.                 <input name="Action" type="hidden" id="Action" value="Save">
  214.                 <input type="submit" name="Submit" value="保存资料"   onClick="{if(confirm('确认您填写的信息吗?')){this.document.form1.submit();return true;}return false;}">
  215.                   
  216.                 <input type="reset" name="Submit3" value="重新填写">
  217.               </div></td>
  218.           </tr>
  219.           <tr class="hback"> 
  220.             <td colspan="4" class="hback"> <div align="center"> </div></td>
  221.           </tr>
  222.         </form>
  223.       </table>
  224.        </td>
  225.     </tr>
  226.     <tr class="back"> 
  227.       <td height="20"  colspan="2" class="xingmu"> <div align="left"> 
  228.           <!--#include file="Copyright.asp" -->
  229.         </div></td>
  230.     </tr>
  231. </table>
  232. </body>
  233. </html>
  234. <%
  235. End if
  236. Set Fs_User = Nothing
  237. %>
  238. <!--Powsered by Foosun Inc.,Product:FoosunCMS V4.0系列-->