📄 userinfoedt.asp
字号:
<% ModuleCode="M0110" %>
<!--#include file="../../Include/Reference.asp"-->
<%
Call PrintPageHead
%>
<!--#include file="../../Include/connect.asp"-->
<%
UserID = request("UserID")
if InStr(Opt_Root,CStr(Session("UserID")))<1 then
IsProtect=False
strSQL="Select a.IsAdmin from T_DNS_RoleInfo a,T_DNS_UserRole b where b.RoleCode=a.RoleCode and b.UserID='" & UserID & "'"
Set ADRs=Cn.Execute(strSQL)
Do While Not ADRs.Eof
if Mid(ADRs("IsAdmin"),5,1)="Y" then
IsProtect=True
Exit Do
end if
ADRs.Movenext
Loop
ADRs.Close
Set ADRs=Nothing
if IsProtect and UserID<>CStr(Session("UserID")) then
Response.Write "<br><br><br><p align='center' class='titletext'>对不起,您没有权限!</p>"
Call PrintPageBottom
Response.End
end if
end if
%>
<SCRIPT language=javascript>
function changeform()
{
if (document.add_cust.Status[0].checked)
{
document.add_cust.Vocation[0].selected = true;
document.add_cust.Vocation[0].text = "请选择";
document.add_cust.Vocation.disabled = false;
document.add_cust.Employee[0].selected = true;
document.add_cust.Employee[0].text = "请选择";
document.add_cust.Employee.disabled = false;
document.add_cust.Trade[0].selected = true;
document.add_cust.Trade[0].text = "请选择";
document.add_cust.Trade.disabled = false;
document.add_cust.Fund.value = "";
document.add_cust.Fund.disabled = false;
document.add_cust.Range.value = "";
document.add_cust.Range.disabled = false;
document.add_cust.Introduce.value = "";
document.add_cust.Introduce.disabled = false;
document.add_cust.Status.value = "企业";
}
else
{
document.add_cust.Vocation[0].selected = true;
document.add_cust.Vocation[0].text = "不用选";
document.add_cust.Vocation.disabled = true;
document.add_cust.Employee[0].selected = true;
document.add_cust.Employee[0].text = "不用选";
document.add_cust.Employee.disabled = true;
document.add_cust.Trade[0].selected = true;
document.add_cust.Trade[0].text = "不用选";
document.add_cust.Trade.disabled = true;
document.add_cust.Fund.value = "不用填";
document.add_cust.Fund.disabled = true;
document.add_cust.Range.value = "不用填";
document.add_cust.Range.disabled = true;
document.add_cust.Introduce.value = "不用填";
document.add_cust.Introduce.disabled = true;
document.add_cust.Status.value = "个人";
}
}
function changeProvince()
{
document.add_cust.Province.value=document.add_cust.AProvince.value.substring(0,document.add_cust.AProvince.value.indexOf("|"));
document.add_cust.EProvince.value=document.add_cust.AProvince.value.substring(document.add_cust.AProvince.value.indexOf("|")+1,document.add_cust.AProvince.value.length);
}
function Check()
{
if (document.add_cust.UserName.value == "")
{
alert("公司名称(中文)或者个人姓名不能为空,要填写!");
document.add_cust.UserName.focus();
return false;
}
if (document.add_cust.EUserName.value == "")
{
alert("公司名称(英文)或者个人姓名不能为空,要填写!");
document.add_cust.EUserName.focus();
return false;
}
if (document.add_cust.Email.value.indexOf("@") == -1 )
{
alert("请填写正确的电子邮件地址!");
document.add_cust.Email.focus();
return false;
}
if (document.add_cust.Country.value == "")
{
alert("国家中文名不能为空,请填写!");
document.add_cust.Country.focus();
return false;
}
if (document.add_cust.ECountry.value == "")
{
alert("国家英文名不能为空,请填写!");
document.add_cust.ECountry.focus();
return false;
}
if (document.add_cust.Province.value == "")
{
alert("省份中文名不能为空,请填写!");
document.add_cust.Province.focus();
return false;
}
if (document.add_cust.EProvince.value == "")
{
alert("省份英文名不能为空,请填写!");
document.add_cust.EProvince.focus();
return false;
}
if (document.add_cust.City.value == "")
{
alert("城市中文名不能为空,请填写!");
document.add_cust.City.focus();
return false;
}
if (document.add_cust.City.value == "")
{
alert("城市英文名不能为空,请填写!");
document.add_cust.ECity.focus();
return false;
}
if (document.add_cust.Addr.value == "")
{
alert("地址中文不能为空,请填写!");
document.add_cust.Addr.focus();
return false;
}
if (document.add_cust.EAddr.value == "")
{
alert("地址英文不能为空,请填写!");
document.add_cust.EAddr.focus();
return false;
}
if (document.add_cust.PostCode.value == "")
{
alert("邮政编码不能为空,请填写!");
document.add_cust.PostCode.focus();
return false;
}
if (document.add_cust.Tel.value == "")
{
alert("电话号码不能为空,请填写!");
document.add_cust.Tel.focus();
return false;
}
if (document.add_cust.Status.value =="企业") {
if (document.add_cust.Vocation.value == "0")
{
alert("请选择所属行业!");
document.add_cust.Vocation.focus();
return false;
}
if (document.add_cust.Employee.value == "0")
{
alert("请选择公司的规模!");
document.add_cust.Employee.focus();
return false;
}
if (document.add_cust.Trade.value == "0")
{
alert("请选择公司的类型!");
document.add_cust.Trade.focus();
return false;
}
if (document.add_cust.Fund.value == "")
{
alert("请填写公司的注册资金!");
document.add_cust.Fund.focus();
return false;
}
if (document.add_cust.Range.value == "")
{
alert("请填写公司的主营业务!");
document.add_cust.Range.focus();
return false;
}
if (document.add_cust.Introduce.value == "")
{
alert("请选择公司的介绍!");
document.add_cust.Introduce.focus();
return false;
}
}
return true;
}
</SCRIPT>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="<%=Opt_Table_BGColor%>">
<tr>
<td colspan="3">
<%
if len(request("IFOK"))>0 then
if (request("IFPSW")="是") then
Set ASPObj = Server.CreateObject("BlueEncrypt.Decode")
UserPSW1 = ASPObj.EncryptStr("dns1234")
Set ASPObj = Nothing
else
UserPSW1=request("UserPSW")
end if
UserPSW2=UserPSW1
UserName=request("UserName")
EUserName=request("EUserName")
Email=request("Email")
Country=request("Country")
ECountry=request("ECountry")
Province=request("Province")
EProvince=request("EProvince")
City=request("City")
ECity=request("ECity")
Addr=request("Addr")
EAddr=request("EAddr")
PostCode=request("PostCode")
Tel=request("Tel")
Fax=request("Fax")
Web=request("Web")
QQ=request("QQ")
MSN=request("MSN")
CorpUser=request("CorpUser")
Status=request("Status")
Vocation=request("Vocation")
Employee=request("Employee")
Trade=request("Trade")
Fund=request("Fund")
if Fund="" then
Fund="null"
end if
Range=request("Range")
Introduce=request("Introduce")
InIP=Request.ServerVariables("REMOTE_ADDR")
strSQL="SP_UserHandle '2',"&request("UserID")&",'"&UserPSW1&"','"&UserPSW2&"','"&UserName&"','"&EUserName&"','"&EMail&"','"&Country&"','"&ECountry&"','"&Province&"','"&EProvince&"','"&City&"','"&ECity&"','"&Addr&"','"&EAddr&"','"&PostCode&"','"&Tel&"','"&Fax&"','"&Web&"','"&Status&"','"&Vocation&"','"&Employee&"','"&Trade&"',"&Fund&",'"&Range&"','"&Introduce&"','"&InIP&"','"&QQ&"','"&MSN&"','"&CorpUser&"'"
'response.write strSQL
'response.end
set rs=cn.Execute(strSQL)
if rs("result")="fail" then
Response.write "用户修改:" & rs("msg")& " <a href=v#' OnClick='javascript:history.go(-1)' class='a2'>返 回</a>"
else
Response.Redirect "UserInfo.asp"
end if
rs.close
else
strSQL="SP_TableInfo 'T_DNS_UserInfo','UserID="&request("UserID") & "'"
set rs=cn.Execute(strSQL)
if not (rs.bof and rs.eof) then
%>
<table cellspacing=0 cellpadding=0 width="98%" align=left bordercolorlight=<%=Opt_Table_BGColor%> border=0>
<tbody>
<tr valign=top>
<td>
<div align=center>
<form name=add_cust onSubmit="return Check()" action="" method=post>
<table bordercolor="<%=Opt_Table_BGColor%>" cellspacing=0 cellpadding=1 width="100%" border=1>
<tbody>
<tr>
<td>
<font color="<%=Opt_Font_TitleColor%>" class="titletext"><strong>用户信息 - 修改</strong></font>
</td>
<td align="right">
<a href="#" OnClick="javascript:history.go(-1)" class="a2">返 回</a>
</td>
</tr>
<tr align=middle bgcolor="<%=Opt_TR_BGColor%>">
<td colspan=2>
<div align="center">下面各项都必须填写</div>
</td>
</tr>
<tr>
<td align=right width="31%" bgcolor=<%=Opt_TD_BGColor2%>>会员编号</td>
<td width="69%" bgcolor=<%=Opt_TD_BGColor1%>>
<input type=hidden class="input" name="UserID" value="<%=rs("UserID")%>">
<b><font color=red><%=rs("UserID")%></font></b>
</td>
</tr>
<tr>
<td align=right width="31%" bgcolor=<%=Opt_TD_BGColor2%>>身份</td>
<td width="69%" bgcolor=<%=Opt_TD_BGColor1%>>
<%
if rs("Status")="企业" then
select1="CHECKED"
select2=""
else
select1=""
select2="CHECKED"
end if
%>
<input name="Status" type=radio <%=select1%> value="企业" onClick=changeform()>
企业
<input name="Status" type=radio <%=select2%> value="个人" onClick=changeform()>
个人 </td>
</tr>
<tr>
<td align=right width="31%"
bgcolor=<%=Opt_TD_BGColor2%>>公司名称(中文)<br>
个人则填姓名</td>
<td width="69%" bgcolor=<%=Opt_TD_BGColor1%>>
<input class="input" size=40 name=UserName value="<%=rs("UserName")%>">
</td>
</tr>
<tr>
<td align=right width="31%"
bgcolor=<%=Opt_TD_BGColor2%>>公司名称(英文)<br>
个人则填姓名拼音 </td>
<td width="69%" bgcolor=<%=Opt_TD_BGColor1%>>
<input class="input" size=40 name=EUserName value="<%=rs("EUserName")%>">
</td>
</tr>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -