Manage.asp
Upload User: ahxunteng
Upload Date: 2022-05-16
Package Size: 1606k
Code Size: 8k
Development Platform:

VBScript

  1. <%@ LANGUAGE=VBScript CodePage=936%>
  2. <%option explicit%>
  3. <%Response.Buffer=True%>
  4. <!--#include file="Include/System.asp"-->
  5. <!--#include file="Include/StrLeft.asp"-->
  6. <!--#include file="../Inc/md5.asp"-->
  7. <%
  8. dim Action,UserName
  9. dim FoundErr,ErrMsg
  10. dim rsUser,sqlUser
  11. dim Sex,Email,Homepage,Comane,Add,Somane,Zip,Phone,Fox
  12. Action=trim(request("Action"))
  13. 'UserName=trim(request("UserName"))
  14. if UserName="" then
  15. UserName=session("UserName")
  16. end if
  17. if  UserName="" then
  18. if Action="" then
  19. response.redirect "Server.asp"
  20. else
  21. FoundErr=True
  22. ErrMsg=ErrMsg & "<br><li>参数不足!</li>"
  23. end if
  24. end if
  25. if FoundErr=true then
  26. call WriteErrMsg()
  27. else
  28. Set rsUser=Server.CreateObject("Adodb.RecordSet")
  29. sqlUser="select * from [User] where UserName='" & UserName & "'"
  30. rsUser.Open sqlUser,conn,1,3
  31. if rsUser.bof and rsUser.eof then
  32. FoundErr=True
  33. ErrMsg=ErrMsg & "<br><li>找不到指定的用户!</li>"
  34. call writeErrMsg()
  35. else
  36. if Action="Modify" then
  37. Sex=trim(Request("Sex"))
  38. Email=trim(request("Email"))
  39. Homepage=trim(request("Homepage"))
  40. Comane=trim(request("Comane"))
  41. Add=trim(request("Add"))
  42. Somane=trim(request("Somane"))
  43. Zip=trim(request("Zip"))
  44. Phone=trim(request("Phone"))
  45. Fox=trim(request("Fox"))
  46. if Sex="" then
  47. FoundErr=true
  48. ErrMsg=ErrMsg & "<br><li>性别不能为空</li>"
  49. else
  50. sex=cint(sex)
  51. if Sex<>0 and Sex<>1 then
  52. Sex=1
  53. end if
  54. end if
  55. if Email="" then
  56. FoundErr=true
  57. ErrMsg=ErrMsg & "<br><li>Email不能为空</li>"
  58. else
  59. if IsValidEmail(Email)=false then
  60. ErrMsg=ErrMsg & "<br><li>您的Email有错误</li>"
  61.   FoundErr=true
  62. end if
  63. end if
  64. if Comane="" then
  65. FoundErr=true
  66. ErrMsg=ErrMsg & "<br><li>公司名称不能为空</li>"
  67. end if
  68. if Add="" then
  69. FoundErr=true
  70. ErrMsg=ErrMsg & "<br><li>收货地址不能为空</li>"
  71. end if
  72. if Somane="" then
  73. FoundErr=true
  74. ErrMsg=ErrMsg & "<br><li>收货人不能为空</li>"
  75. end if
  76. if Phone="" then
  77. FoundErr=true
  78. ErrMsg=ErrMsg & "<br><li>联系电话不能为空</li>"
  79. end if
  80. if FoundErr<>true then
  81. rsUser("Sex")=Sex
  82. rsUser("Email")=Email
  83. rsUser("HomePage")=HomePage
  84. rsUser("Comane")=Comane
  85. rsUser("Add")=Add
  86. rsUser("Somane")=Somane
  87. rsUser("Zip")=Zip
  88. rsUser("Phone")=Phone
  89. rsUser("Fox")=Fox
  90. rsUser.update
  91. response.write"<SCRIPT language=JavaScript>alert('会员资料修改成功!');"
  92.                 response.write"javascript:history.go(-1)</SCRIPT>"
  93. 'call WriteSuccessMsg("会员资料修改成功!")
  94. else
  95. call WriteErrMsg()
  96. end if
  97. else
  98. %>
  99. <!--#include file="Include/Head.asp" -->
  100. <TABLE cellPadding=0 cellSpacing=0 class='Middle_Title'>
  101. <TR> 
  102. <TD vAlign=top class='M_Left_Td'> 
  103. <table cellpadding="0" cellspacing="0" align="center" class='M_Left_Title'>
  104. <tr>
  105. <td valign="top">
  106. <% Call Left_Member() %>
  107. </td>
  108. </tr>
  109. </table> 
  110. </TD>
  111. <%if strSkins <= 200 and strSkins >= 1 then%>
  112. <TD class='M_Jgx_TD'><IMG src='../img/1x1_pix.gif' width=1 height=2></TD>
  113. <%
  114. elseif strSkins <= 250 and strSkins >= 201 then '新风格==============================================================
  115. %>
  116. <%end if%>
  117. <TD vAlign=top> 
  118. <TABLE cellPadding=0 cellSpacing=0 align='center' class='M_Center_Title'>
  119. <% Call Style_Adcolumn() '广告栏 %>
  120. <!-- 修改会员资料 -->
  121. <TR>
  122. <TD>
  123. <TABLE cellSpacing=0 cellPadding=0  align="center" class='MC_Pt_Title'>
  124. <TR>
  125. <TD class='MC_Pt_TD1'><IMG src='../img/1x1_pix.gif' width=3 height=1></TD>
  126. <TD class='MC_Pt_TD2'><IMG src='../img/1x1_pix.gif' width=3 height=1></TD>
  127. <TD class='MC_Pt_TD3'><SPAN class=Glow>
  128. 修改注册用户信息
  129. &nbsp;</SPAN></TD>
  130. <TD class='MC_Pt_TD4'><div align="right">
  131. &nbsp;</div></TD>
  132. <TD class='MC_Pt_TD5'><IMG src='../img/1x1_pix.gif' width=3 height=1></TD>
  133. </TR>
  134. </TABLE>
  135. </TD>
  136. </TR>
  137. <TR> 
  138. <TD>
  139. <TABLE cellSpacing=0 cellPadding=0  align="center" class='MC_ServeNr_Title'>
  140. <TR> 
  141. <TD><FORM name="Form1" action="Manage.asp" method="post">
  142. <table width="90%" border="0" align="center" cellpadding="0" cellspacing="5">
  143. <TR><TD height=15><IMG height=1 src="img/1x1_pix.gif" width=10></TD></TR>
  144. <TR class="tdbg" > 
  145. <TD width="180" align="right"><b>用 户 名:</b></TD>
  146. <TD> <%=rsUser("UserName")%><INPUT name="UserName" type="hidden" value="<%=rsUser("UserName")%>" size=30 maxLength=30></TD>
  147. </TR>
  148. <TR class="tdbg" > 
  149. <TD width="180" align="right"><strong>性别:</strong></TD>
  150. <TD> <INPUT type=radio value="1" name=sex <%if rsUser("Sex")=1 then response.write "CHECKED"%>>
  151. 男 &nbsp;&nbsp; <INPUT type=radio value="0" name=sex <%if rsUser("Sex")=0 then response.write "CHECKED"%>>
  152. 女</TD>
  153. </TR>
  154. <TR class="tdbg" > 
  155. <TD width="180" align="right"><strong>Email地址:</strong></TD>
  156. <TD> <INPUT name=Email value="<%=rsUser("Email")%>" size=30   maxLength=50></TD>
  157. </TR>
  158. <TR class="tdbg" > 
  159. <TD width="180" align="right"><strong>主页:</strong></TD>
  160. <TD> <INPUT   maxLength=100 size=30 name=homepage value="<%=rsUser("HomePage")%>"></TD>
  161. </TR>
  162. <TR class="tdbg" > 
  163. <TD width="180" align="right"><strong>公司名称:</strong></TD>
  164. <TD> <INPUT name=Comane value="<%=rsUser("Comane")%>" size=30 maxLength=20></TD>
  165. </TR>
  166. <TR class="tdbg" > 
  167. <TD width="180" align="right"><strong>收货地址:</strong></TD>
  168. <TD> <INPUT name=Add value="<%=rsUser("Add")%>" size=30 maxLength=50></TD>
  169. </TR>
  170. <TR class="tdbg" > 
  171. <TD align="right"><strong>收货人:</strong></TD>
  172. <TD><INPUT name=Somane value="<%=rsUser("Somane")%>" size=30 maxLength=50></TD>
  173. </TR>
  174. <TR class="tdbg" > 
  175. <TD align="right"><strong>邮政编码:</strong></TD>
  176. <TD><INPUT name=Zip value="<%=rsUser("Zip")%>" size=30 maxLength=50></TD>
  177. </TR>
  178. <TR class="tdbg" > 
  179. <TD align="right"><strong>联系电话:</strong><br></TD>
  180. <TD><INPUT name=Phone value="<%=rsUser("Phone")%>" size=30 maxLength=50></TD>
  181. </TR>
  182. <TR class="tdbg" > 
  183. <TD align="right"><strong>传 真:</strong></TD>
  184. <TD><INPUT name=Fox value="<%=rsUser("Fox")%>" size=30 maxLength=50></TD>
  185. </TR>
  186. <TR align="center" class="tdbg" > 
  187. <TD height="50" colspan="2"><input name="Action" type="hidden" id="Action" value="Modify"
  188. ><input name=Submit type=submit id="Submit" value="保存修改结果"></TD>
  189. </TR>
  190. </TABLE>
  191. </form></TD>
  192. </TR>
  193. </TABLE>
  194. </TD>
  195. </TR>
  196. <%
  197. end if
  198. end if
  199. rsUser.close
  200. set rsUser=nothing
  201. end if
  202. %>
  203. <!-- 修改会员资料 End -->
  204. <TR> 
  205. <TD> 
  206. <TABLE cellSpacing=0 cellPadding=0  align="center" class='MC_bottom_title'>
  207. <tr> 
  208. <td>
  209. </td>
  210. </tr>
  211. <tr><td class='MC_bottom_Td2'></td></tr>
  212. </table>
  213. </TD>
  214. </TR>
  215. <TR><TD height=10><IMG src='../img/1x1_pix.gif' width=3 height=1></TD></TR>
  216. </TABLE>
  217. </TD>
  218. <%if strSkins <= 200 and strSkins >= 1 then%>
  219. </TR>
  220. </TABLE>
  221. <!--#include file="Include/Foot.asp" -->
  222. <%
  223. elseif strSkins <= 250 and strSkins >= 201 then '新风格==============================================================
  224. %>
  225. <TD class='M_Jgx_TD'><IMG src='../img/1x1_pix.gif' width=1 height=2></TD>
  226. <TD vAlign=top background="../Skin/201/line-mid-glay.gif" width="6"><img border="0" src="../Skin/201/line-shadow-glay-
  227. mid.gif" width="6" height="146"></TD>
  228. <TD vAlign=top class='Mr_TitlePt'><% Call Right_Download() %></TD>
  229. </TR>
  230. </TABLE>
  231. <!--#include file="Include/Foot4.asp" -->
  232. <%end if%>