edituser.asp
来自「英文版全站B2B仿阿里巴巴贸易平台网站,全英文」· ASP 代码 · 共 242 行
ASP
242 行
<%
if instr(session("EAPurview"),"06")=0 then
response.redirect "../login.asp"
response.end
end if
%>
<!--#include file="../../Inc/DBConn1.asp" -->
<LINK href="../../CSS/style.css" rel="stylesheet" type="text/css"></LINK>
<script language="VBScript">
function SJTrim(Str)
SJTrim=Trim(Str)
end function
</script>
<script Language="JavaScript">
function Check()
{
if (SJTrim(document.Form1.FirstName.value)=="")
{
alert("请输入您的First Name!");
document.Form1.FirstName.focus();
return (false);
}
if (SJTrim(document.Form1.LastName.value)=="")
{
alert("请输入您的Last Name!");
document.Form1.LastName.focus();
return (false);
}
if (document.Form1.CountryID.value=="")
{
alert("请选择所在的国家/地区!");
document.Form1.CountryID.focus();
return;
}
Email=SJTrim(document.Form1.Email.value)
if ( Email== "")
{
alert("请输入您的Email地址!");
document.Form1.Email.focus();
return (false);
}
if(Email.length>0)
{
i=Email.indexOf("@");
if(i==-1)
{
window.alert("Email格式错误!")
document.Form1.Email.focus();
return false
}
ii=Email.indexOf(".")
if(ii==-1)
{
window.alert("Email格式错误!")
document.Form1.Email.focus();
return false
}
}
document.Form1.submit();
}
</script>
<%
if request("action")="edit" then
set Rs1=server.CreateObject ("adodb.recordset")
Rs1.Open "select * from UserCompany where UID=" & Request("UID"),conn,3,3
Rs1("FirstName")=trim(request.Form("FirstName"))
Rs1("LastName")=trim(request.Form("LastName"))
Rs1("Sex")=request("Sex")
Rs1("Province")=trim(request.Form("Province"))
Rs1("City")=trim(request.Form("City"))
Rs1("Street")=trim(request.Form("Street"))
Rs1("CountryID")=request("CountryID")
Rs1("Post")=trim(request("Post"))
Rs1("PhoneCountry")=trim(request("PhoneCountry"))
Rs1("PhoneArea")=trim(request("PhoneArea"))
Rs1("PhoneNumber")=trim(request("PhoneNumber"))
Rs1("FaxCountry")=trim(request("FaxCountry"))
Rs1("FaxArea")=trim(request("FaxArea"))
Rs1("FaxNumber")=trim(request("FaxNumber"))
Rs1("Handset")=trim(request("Handset"))
Rs1("Email")=trim(request.form("Email"))
Rs1.update
Rs1.close
%>
<TABLE border="0" cellspacing="0" width="100%" cellpadding="4" ID="Table1">
<TR>
<TD bgcolor="#F78200" height=30 colspan=2><b><font color="#FFFFFF">会员基本资料修改</font></b></TD>
</TR>
<tr>
<td align=center height=200 style="font-size:16px;">
<b>会员基本资料修改成功!<br><br><a href="javascript:history.go(-2)">点击返回</a></b>
</td>
</tr>
</TABLE>
<%
response.End
end if
%>
<%
set Rs=server.CreateObject("ADODB.Recordset")
Rs.Open "select * from UserCompany where UID=" & request("UID"),conn,1,1
%>
<TABLE border="0" cellspacing="0" width="100%" cellpadding="4">
<form name="Form1" method="Post" action="EditUser.asp?action=edit">
<input name="UID" value="<%=Rs("UID")%>" type=hidden>
<TR>
<TD bgcolor="#F78200" height=30 colspan=2><b><font color="#FFFFFF">会员基本资料修改</font></b></TD>
</TR>
<tr>
<td height=20 colspan=2 align=right style="padding-right:20px;">带 <font color="#F78200">*</font> 为必填项</td>
</tr>
<TR>
<TD width="20%" height="25" align=right><b>用户名:</b></TD>
<TD width="80%" height="25">
<%=Rs("UserName")%>
</TD>
</TR>
<TR>
<TD width="20%" height="25" align=right><b><font color="#F78200">*</font> First Name:</b></TD>
<TD width="80%" height="25">
<INPUT maxLength=100 name=FirstName size="12" value="<%=Rs("FirstName")%>">
</TD>
</TR>
<TR>
<TD width="20%" height="25" align=right><b><font color="#F78200">*</font> Last Name:</b></TD>
<TD width="80%" height="25">
<INPUT maxLength=100 name=LastName size="12" value="<%=Rs("LastName")%>" ID="Text3">
</TD>
</TR>
<TR>
<TD width="20%" height="25" align=right><b><font color="#F78200">*</font> Sex:</b></TD>
<TD width="80%" height="25">
<INPUT name=Sex type=radio value="1" <%if Rs("Sex")=true then%> checked <%end if%>>Mr.
<INPUT name=Sex type=radio value="0" <%if Rs("Sex")=false then%> checked <%end if%>>Ms.
</TD>
</TR>
<TR>
<TD width="20%" height="25" align=right><b><font color="#F78200">*</font> 联系地址:</b></TD>
<TD width="80%" height="25">
<table border=0 cellpadding=0 cellspacing=0 ID="Table4">
<tr>
<td>Street</td>
<td>City</td>
<td>Province/State(if any)</td>
</tr>
<tr>
<td nowrap><input type="text" name="Street" value="<%=Rs("Street")%>" maxlength="250" value="" style="width: 120px" ID="Text12"> - </td>
<td nowrap><input type="text" name="City" value="<%=Rs("City")%>" maxlength="80" size="8" value="" style="width: 120px" ID="Text13"> - </td>
<td><input type="text" name="Province" value="<%=Rs("Province")%>" maxlength="80" size="8" value="" style="width: 120px" ID="Text14"></td>
</tr>
</table>
</TD>
</TR>
<TR>
<TD width="20%" height="25" align=right><b>邮政编码:</b></TD>
<TD width="80%" height="25">
<INPUT maxLength=16 name=Post size="12" value="<%=Rs("Post")%>">
</TD>
</TR>
<tr>
<td width=20% height=30 align=right style="padding-right:10pt;">
<b><font color="#F78200">*</font> Country:</b>
</td>
<td width=80%>
<select name="CountryID" ID="Select2">
<%
Set CouRs=server.CreateObject("ADODB.recordset")
CouStr="select * from Country order by CountryName ASC"
CouRs.open CouStr,conn,1,1
if not(CouRs.eof and CouRs.bof) then
while not CouRs.eof
%>
<option value="<%=CouRs("CountryID")%>" <%if CouRs("CountryID")=Rs("CountryID") then%> selected <%end if%>><%=CouRs("CountryName")%></option>
<%
CouRs.movenext
wend
end if
CouRs.close
set CouRs = nothing
%>
</select>
</td>
</tr>
<TR>
<TD width="20%" height="25" align=right><b><font color="#F78200">*</font> 联系电话:</b></TD>
<TD width="80%" height="25">
<table border=0 cellpadding=0 cellspacing=0 ID="Table3">
<tr>
<td>Country Code</td>
<td>Area Code (if any)</td>
<td> Tel Number</td>
</tr>
<tr>
<td><input type="text" name="PhoneCountry" value="<%=Rs("PhoneCountry")%>" maxlength="8" size="8" style="width: 98px" ID="Text2"> - </td>
<td><input type="text" name="PhoneArea" value="<%=Rs("PhoneArea")%>" maxlength="8" size="8" value="" style="width: 98px" ID="Text5"> -</td>
<td> <input type="text" name="PhoneNumber" value="<%=Rs("PhoneNumber")%>" maxlength="100" size="15" value="" ID="Text6"></td>
</tr>
</table>
</TD>
</TR>
<TR>
<TD width="20%" height="25" align=right><b>传真号码:</b></TD>
<TD width="80%" height="25">
<table border=0 cellpadding=0 cellspacing=0 ID="Table2">
<tr>
<td><input type="text" name="FaxCountry" value="<%=Rs("FaxCountry")%>" maxlength="8" size="8" style="width: 98px" ID="Text7"> - </td>
<td><input type="text" name="FaxArea" value="<%=Rs("FaxArea")%>" maxlength="8" size="8" value="" style="width: 98px" ID="Text8"> -</td>
<td> <input type="text" name="FaxNumber" value="<%=Rs("FaxNumber")%>" maxlength="100" size="15" value="" ID="Text9"></td>
</tr>
</table>
</TD>
</TR>
<TR>
<TD width="20%" height="25" align=right><b>移动电话:</b></TD>
<TD width="80%" height="25">
<INPUT maxLength=50 name=Handset size="20" value="<%=Rs("Handset")%>" ID="Text4">
</TD>
</TR>
<TR>
<TD width="20%" height="25" align=right><b><font color="#F78200">*</font> E-mail:</b></TD>
<TD width="80%" height="25">
<INPUT maxLength=100 name=Email size="30" value="<%=Rs("Email")%>" ID="Text1">
</TD>
</TR>
<tr>
<td colspan=2 align=center height=80>
<input type="button" value="确认无误,提交!" onclick="Check()" style="height:25pt;">
</td>
</tr>
</form>
</TABLE>
<%
Rs.Close
Set Rs=nothing
%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?