?? manage.asp
字號:
<!--#include file="inc/conn.asp"-->
<!--#include file="inc/Skin_css.asp"-->
<!--#include file="inc/config.asp"-->
<!--#include file="inc/md5.asp"-->
<!--#include file="inc/function.asp"-->
<meta charset=gb2312">
<%
dim Action,UserName,FoundErr,ErrMsg
dim rsUser,sqlUser
Action=trim(request("Action"))
UserName=trim(request("UserName"))
if UserName="" then
UserName=session("UserName")
end if
if UserName="" then
if Action="" then
response.redirect "Server.asp"
else
FoundErr=True
ErrMsg=ErrMsg & "<br><li>參數不足!</li>"
end if
end if
if FoundErr=true then
call WriteErrMsg()
else
Set rsUser=Server.CreateObject("Adodb.RecordSet")
sqlUser="select * from [User] where UserName='" & UserName & "'"
rsUser.Open sqlUser,conn,1,3
if rsUser.bof and rsUser.eof then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>找不到指定的用戶!</li>"
call writeErrMsg()
else
if Action="Modify" then
dim Sex,Email,Homepage,QQ,MSN
Sex=trim(Request("Sex"))
Email=trim(request("Email"))
Homepage=trim(request("Homepage"))
Comane=trim(request("Comane"))
Add=trim(request("Add"))
Somane=trim(request("Somane"))
Zip=trim(request("Zip"))
Phone=trim(request("Phone"))
Fox=trim(request("Fox"))
if Sex="" then
founderr=true
errmsg=errmsg & "<br><li>性別不能為空</li>"
else
sex=cint(sex)
if Sex<>0 and Sex<>1 then
Sex=1
end if
end if
if Email="" then
founderr=true
errmsg=errmsg & "<br><li>Email不能為空</li>"
else
if IsValidEmail(Email)=false then
errmsg=errmsg & "<br><li>您的Email有錯誤</li>"
founderr=true
end if
end if
if Comane="" then
founderr=true
errmsg=errmsg & "<br><li>公司名稱不能為空</li>"
end if
if Add="" then
founderr=true
errmsg=errmsg & "<br><li>收貨地址不能為空</li>"
end if
if Somane="" then
founderr=true
errmsg=errmsg & "<br><li>收貨人不能為空</li>"
end if
if Phone="" then
founderr=true
errmsg=errmsg & "<br><li>聯系電話不能為空</li>"
end if
if FoundErr<>true then
rsUser("Sex")=Sex
rsUser("Email")=Email
rsUser("HomePage")=HomePage
rsUser("Comane")=Comane
rsUser("Add")=Add
rsUser("Somane")=Somane
rsUser("Zip")=Zip
rsUser("Phone")=Phone
rsUser("Fox")=Fox
rsUser.update
response.write"<SCRIPT language=JavaScript>alert('會員資料修改成功!');"
response.write"javascript:history.go(-1)</SCRIPT>"
else
call WriteErrMsg()
end if
else
%>
<!-- #include file="Head.asp" -->
<table width="100%" height="8" border="0" cellpadding="0" cellspacing="0" background="Img/contopbg.gif">
<tr>
<td><table width="226" height="8" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="209"></td>
<td width="17" background="Img/contopbg2.gif"></td>
</tr>
</table></td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td width="209" align="center" valign="top"><!-- #include file="server_left.asp" -->
<p> </p></td><td width="17" background="Img/combg.gif"> </td>
<td valign="top"><table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="2" bgcolor="#E6EFF9"></td>
</tr>
<tr>
<td height="26" bgcolor="#AACFF0"> <span > <img src="Img/HaoSc23.png" width="14" height="16" align="absmiddle"> <strong>會員中心</strong></span></td>
</tr>
<tr>
<td height="2" bgcolor="#0086C6"></td>
</tr>
</table></td>
</tr>
<TR>
<TD
height=1>
</TD>
</TR>
</table>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="3">
<tr>
<td align="center" valign="top"><FORM name="Form1" action="Manage.asp" method="post">
<table width=500 border=0 align="center" cellpadding=2 cellspacing=2 class='border'>
<TR align=center class='title'>
<TD height=20 colSpan=2><font color="#FF6600" class=font14><b>修改注冊用戶信息</b></font></TD>
</TR>
<TR>
<TD width="120" align="right"><b>用 戶 名:</b></TD>
<TD>
<INPUT name=UserName value="<%=rsUser("UserName")%>" size=30 maxLength=14></TD>
</TR>
<TR>
<TD width="120" align="right"><strong>性別:</strong></TD>
<TD>
<INPUT type=radio value="1" name=sex <%if rsUser("Sex")=1 then response.write "CHECKED"%>>
男
<INPUT type=radio value="0" name=sex <%if rsUser("Sex")=0 then response.write "CHECKED"%>>
女</TD>
</TR>
<TR>
<TD width="120" align="right"><strong>Email地址:</strong></TD>
<TD>
<INPUT name=Email value="<%=rsUser("Email")%>" size=30 maxLength=50>
</TD>
</TR>
<TR>
<TD width="120" align="right"><strong>主頁:</strong></TD>
<TD>
<INPUT maxLength=100 size=30 name=homepage value="<%=rsUser("HomePage")%>"></TD>
</TR>
<TR>
<TD width="120" align="right"><strong>公司名稱:</strong></TD>
<TD>
<INPUT name=Comane value="<%=rsUser("Comane")%>" size=30 maxLength=20></TD>
</TR>
<TR>
<TD width="120" align="right"><strong>收貨地址:</strong></TD>
<TD>
<INPUT name=Add value="<%=rsUser("Add")%>" size=30 maxLength=50></TD>
</TR>
<TR>
<TD align="right"><strong>收貨人:</strong></TD>
<TD><INPUT name=Somane value="<%=rsUser("Somane")%>" size=30 maxLength=50></TD>
</TR>
<TR>
<TD align="right"><strong>郵政編碼:</strong></TD>
<TD><INPUT name=Zip value="<%=rsUser("Zip")%>" size=30 maxLength=50></TD>
</TR>
<TR>
<TD align="right"><strong>聯系電話:</strong><br></TD>
<TD><INPUT name=Phone value="<%=rsUser("Phone")%>" size=30 maxLength=50></TD>
</TR>
<TR>
<TD align="right"><strong>傳 真:</strong></TD>
<TD><INPUT name=Fox value="<%=rsUser("Fox")%>" size=30 maxLength=50></TD>
</TR>
<TR align="center" >
<TD height="40" colspan="2"><input name="Action" type="hidden" id="Action" value="Modify">
<input name=Submit type=submit id="Submit" value="保存修改結果">
</TR>
</TABLE>
</form></td>
</tr>
</table></td>
</tr>
</table>
<!-- #include file="Inc/Foot.asp" -->
</BODY></HTML>
<%
end if
end if
rsUser.close
set rsUser=nothing
end if
call CloseConn()
%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -