?? manage.asp
字號:
<!--#include file="inc/conn.asp"-->
<!--#include file="inc/Skin_css.asp"-->
<!--#include file="inc/config.asp"-->
<!--#include file="inc/function.asp"-->
<%
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>parameter lack!</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>Can't find appointed user!</li>"
call writeErrMsg()
else
if Action="Modify" then
dim Sex,Email,Homepage
Sex=trim(Request("Sex"))
Email=trim(request("Email"))
Homepage=trim(request("Homepage"))
CompanyName=trim(request("CompanyName"))
Add=trim(request("Add"))
Receiver=trim(request("Receiver"))
Postcode=trim(request("Postcode"))
Phone=trim(request("Phone"))
Fax=trim(request("Fax"))
if Sex="" then
founderr=true
errmsg=errmsg & "<br><li>The sex can be empty</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 It can be empty</li>"
else
if IsValidEmail(Email)=false then
errmsg=errmsg & "<br><li>Your Email has a mistake</li>"
founderr=true
end if
end if
if CompanyName="" then
founderr=true
errmsg=errmsg & "<br><li>Company name can be empty</li>"
end if
if Add="" then
founderr=true
errmsg=errmsg & "<br><li>The address can be empty to receive</li>"
end if
if Receiver="" then
founderr=true
errmsg=errmsg & "<br><li>The consignee can be empty</li>"
end if
if Phone="" then
founderr=true
errmsg=errmsg & "<br><li>The telephone number can be empty</li>"
end if
if FoundErr<>true then
rsUser("Sex")=Sex
rsUser("Email")=Email
rsUser("HomePage")=HomePage
rsUser("CompanyName")=CompanyName
rsUser("Add")=Add
rsUser("Receiver")=Receiver
rsUser("Postcode")=Postcode
rsUser("Phone")=Phone
rsUser("Fax")=Fax
rsUser("LastLoginTime")=Now()
rsUser.update
response.write"<SCRIPT language=JavaScript>alert('member information rework win!');"
response.write"javascript:history.go(-1)</SCRIPT>"
else
call WriteErrMsg()
end if
else
%>
<!-- #include file="Head.asp" -->
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="5" valign="top" bgcolor="#FFFFFF"></td>
</tr>
<tr>
<td height="72" valign="top" bgcolor="#FFFFFF"><table width="746" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td class="tdbg_left" width="190" height="179" valign="top" > <table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="34" class="title_left"> <img src="Images/smallbook.jpg" width="10" height="10"> Member centre</td>
</tr>
<tr>
<td height="20"> <div align="center"><a href="Manage.asp">Revise member meterials</a></div></td>
</tr>
<TR>
<TD
height=1 colspan="2"
background=img/naSzarym.gif><IMG height=1 src="img/1x1_pix.gif"
width=10></TD>
</TR>
<tr>
<td height="20"> <div align="center"><a href="ManagePwd.asp">Revise member password</a></div></td>
</tr>
<TR>
<TD
height=1 colspan="2"
background=img/naSzarym.gif><IMG height=1 src="img/1x1_pix.gif"
width=10></TD>
</TR>
<tr>
<td height="20"> <div align="center"><a href="E_shop.asp">Shopping order inquiry</a></div></td>
</tr>
<TR>
<TD
height=1 colspan="2"
background=img/naSzarym.gif><IMG height=1 src="img/1x1_pix.gif"
width=10></TD>
</TR>
<tr>
<td height="20"> <div align="center"><a href="NetBook.asp">Website leave word</a></div></td>
</tr>
<TR>
<TD
height=1 colspan="2"
background=img/naSzarym.gif><IMG height=1 src="img/1x1_pix.gif"
width=10></TD>
</TR>
<tr> Close member centre
<td height="20"> <div align="center"><a href="UserLogout.asp">Close member centre</a></div></td>
</tr>
<TR>
<TD
height=1 colspan="2"
background=img/naSzarym.gif><IMG height=1 src="img/1x1_pix.gif"
width=10></TD>
</TR>
</table></td>
<td width="6"></td>
<td valign="top"><table Class=border width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="206" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="title_right" height="32"> <img src="Images/smallbook.jpg" width="10" height="10"> Member centre</td>
</tr>
</table>
<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><strong>Revise member meterials</strong></font></TD>
</TR>
<TR>
<TD width="120" align="right"><b>User Name:</b></TD>
<TD> <INPUT name=UserName value="<%=rsUser("UserName")%>" size=30 maxLength=14></TD>
</TR>
<TR>
<TD width="120" align="right"><strong>Sex:</strong></TD>
<TD> <INPUT type=radio value="1" name=sex <%if rsUser("Sex")=1 then response.write "CHECKED"%>>
Mr <INPUT type=radio value="0" name=sex <%if rsUser("Sex")=0 then response.write "CHECKED"%>>
Ms</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>Http:</strong></TD>
<TD> <INPUT maxLength=100 size=30 name=homepage value="<%=rsUser("HomePage")%>"></TD>
</TR>
<TR>
<TD width="120" align="right"><strong>Company name:</strong></TD>
<TD> <INPUT name=CompanyName value="<%=rsUser("CompanyName")%>" size=30 maxLength=20></TD>
</TR>
<TR>
<TD width="120" align="right"><strong>Receipt Address:</strong></TD>
<TD> <INPUT name=Add value="<%=rsUser("Add")%>" size=30 maxLength=50></TD>
</TR>
<TR>
<TD align="right"><strong>Consignee:</strong></TD>
<TD><INPUT name=Receiver value="<%=rsUser("Receiver")%>" size=30 maxLength=50></TD>
</TR>
<TR>
<TD align="right"><strong>Post code:</strong></TD>
<TD><INPUT name=Postcode value="<%=rsUser("Postcode")%>" size=30 maxLength=50></TD>
</TR>
<TR>
<TD align="right"><strong>Tel:</strong><br></TD>
<TD><INPUT name=Phone value="<%=rsUser("Phone")%>" size=30 maxLength=50></TD>
</TR>
<TR>
<TD align="right"><strong>fax:</strong></TD>
<TD><INPUT name=Fax value="<%=rsUser("Fax")%>" 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="Revise">
</TR>
</TABLE>
</form>
</td>
</tr>
</table></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 + -