📄 editcompany.asp
字号:
<%
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.CompanyName.value)=="")
{
alert("请输入企业名称!")
document.Form1.CompanyName.focus()
return false
}
if (document.Form1.Principal.value=="")
{
alert("请输入企业的法人代表!")
document.Form1.Principal.focus()
return false
}
if (document.Form1.ProductService.value=="")
{
alert("请输入企业主营产品!")
document.Form1.ProductService.focus()
return false
}
if (SJTrim(document.Form1.FoundedPlace.value)=="")
{
alert("请输入企业注册地址!")
document.Form1.FoundedPlace.focus()
return false
}
if (document.Form1.SortID.value=="")
{
alert("请选择行业大类!")
document.Form1.SortID.focus()
return false
}
if (document.Form1.TypeID.value=="")
{
alert("请选择行业分类!")
document.Form1.TypeID.focus()
return false
}
if (document.Form1.Explain.value == "")
{
alert("请输入企业说明!");
document.Form1.Explain.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
if not Rs1.EOF then
Rs1("CompanyName")=trim(request.form("CompanyName"))
Rs1("Principal")=trim(request.form("Principal"))
Rs1("BrandName")=trim(request.form("BrandName"))
Rs1("CompanyType")=trim(request.form("CompanyType"))
Rs1("Capital")=Cint(trim(request.form("Capital")))
Rs1("ProductService")=trim(request.form("ProductService"))
Rs1("MostlyClient")=trim(request.form("MostlyClient"))
Rs1("MainMarkets")=trim(request.form("MainMarkets"))
Rs1("FoundedPlace")=trim(request.form("FoundedPlace"))
Rs1("EstablishYear")=trim(request.form("EstablishYear"))
Rs1("WebUrl")=trim(request.form("WebUrl"))
Rs1("EmployeeCount")=Cint(request.form("EmployeeCount"))
Rs1("AnnualRevenue")=Cint(request.form("AnnualRevenue"))
Rs1("DealInMode")=request.form("DealInMode")
Rs1("SortID")=request.form("SortID")
Rs1("TypeID")=request.form("TypeID")
Rs1("Explain")=trim(request.form("Explain"))
Rs1.update
Rs1.Close
Set Rs1=nothing
end if
%>
<TABLE border="0" cellspacing="0" width="100%" cellpadding="4" ID="Table2">
<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" ID="Table1">
<form name="Form1" method="post" action="EditCompany.asp?action=edit" ID="Form1">
<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="30%" height="25" align=right><b><font color="#F78200">*</font> 企业名称:</b></TD>
<TD width="70%" height="25">
<INPUT name=CompanyName value="<%=Rs("CompanyName")%>" size=30 maxLength=255 ID="Text2">
</TD>
</TR>
<TR>
<TD width="30%" height="25" align=right><b><font color="#F78200">*</font> 法人代表:</b></TD>
<TD width="70%" height="25">
<INPUT name=Principal value="<%=Rs("Principal")%>" size=15 maxLength=25 ID="Text1">
</TD>
</TR>
<TR>
<TD width="30%" height="25" align=right><b>经营品牌:</b></TD>
<TD width="70%" height="25">
<INPUT name=BrandName value="<%=Rs("BrandName")%>" size=30 maxLength=255 ID="Text6">
</TD>
</TR>
<TR>
<TD width="30%" height="25" align=right><b>企业性质:</b></TD>
<TD width="70%" height="25">
<INPUT name=CompanyType value="<%=Rs("CompanyType")%>" size=20 maxLength=40 ID="Text3">
</TD>
</TR>
<TR>
<TD width="30%" height="25" align=right><b><font color="#F78200">*</font> Capital:</b></TD>
<TD width="70%" height="25">
<select name="Capital" ID="Select1">
<option value="1" <%if Rs("Capital")="1" then%> selected <%end if%>>Below US$1 Million</option>
<option value="2" <%if Rs("Capital")="2" then%> selected <%end if%>>US$1 Million - US$2.5 Million</option>
<option value="3" <%if Rs("Capital")="3" then%> selected <%end if%>>US$2.5 Million - US$5 Million</option>
<option value="4" <%if Rs("Capital")="4" then%> selected <%end if%>>US$5 Million - US$10 Million</option>
<option value="5" <%if Rs("Capital")="5" then%> selected <%end if%>>US$10 Million - US$50 Million</option>
<option value="6" <%if Rs("Capital")="6" then%> selected <%end if%>>US$50 Million - US$100 Million</option>
<option value="7" <%if Rs("Capital")="7" then%> selected <%end if%>>Above US$100 Million</option>
</select>
</TD>
</TR>
<TR>
<TD width="30%" height="25" align=right><b><font color="#F78200">*</font> 主营产品/服务:</b></TD>
<TD width="70%" height="25">
<INPUT name=ProductService value="<%=Rs("ProductService")%>" size=40 maxLength=250 ID="Text4">
</TD>
</TR>
<TR>
<TD width="30%" height="25" align=right><b>主要客户:</b></TD>
<TD width="70%" height="25">
<INPUT name=MostlyClient value="<%=Rs("MostlyClient")%>" size=40 maxLength=250 ID="Text7">
</TD>
</TR>
<TR>
<TD width="30%" height="25" align=right><b>主要市场:</b></TD>
<TD width="70%" height="25">
<INPUT name=MainMarkets value="<%=Rs("MainMarkets")%>" size=40 maxLength=250 ID="Text9">
</TD>
</TR>
<TR>
<TD width="30%" height="25" align=right><b><font color="#F78200">*</font> 企业注册地址:</b></TD>
<TD width="70%" height="25">
<INPUT name=FoundedPlace value="<%=Rs("FoundedPlace")%>" size=40 maxLength=250 ID="Text5">
</TD>
</TR>
<TR>
<TD width="30%" height="25" align=right><b>企业注册年份:</b></TD>
<TD width="70%" height="25">
<INPUT name=EstablishYear value="<%=Rs("EstablishYear")%>" size=10 maxLength=20 ID="Text8">
</TD>
</TR>
<TR>
<TD width="30%" height="25" align=right><b>企业网址:</b></TD>
<TD width="70%" height="25">
<INPUT name=WebUrl value="<%=Rs("WebUrl")%>" size=35 maxLength=100 ID="Text10">
</TD>
</TR>
<TR>
<TD width="30%" height="25" align=right><b><font color="#F78200">*</font> Number of Company Employees:</b></TD>
<TD width="70%" height="25">
<SELECT name=EmployeeCount ID="Select4">
<OPTION value="1" <%if Rs("EmployeeCount")=1 then%> selected <%end if%>>Less than 5 People</option>
<OPTION value="2" <%if Rs("EmployeeCount")=2 then%> selected <%end if%>>5 - 10 People</option>
<OPTION value="3" <%if Rs("EmployeeCount")=3 then%> selected <%end if%>>11 - 50 People</option>
<OPTION value="4" <%if Rs("EmployeeCount")=4 then%> selected <%end if%>>51 - 100 People</option>
<OPTION value="5" <%if Rs("EmployeeCount")=5 then%> selected <%end if%>>101 - 500 People</option>
<OPTION value="6" <%if Rs("EmployeeCount")=6 then%> selected <%end if%>>501 - 1000 People</option>
<OPTION value="7" <%if Rs("EmployeeCount")=7 then%> selected <%end if%>>Above 1000 People</OPTION>
</SELECT>
</TD>
</TR>
<TR>
<TD width="30%" height="25" align=right><b><font color="#F78200">*</font> Annual Sales Volume:</b></TD>
<TD width="70%" height="25">
<SELECT name=AnnualRevenue ID="Select5">
<option value="1" <%if Rs("AnnualRevenue")="1" then%> selected <%end if%>>Below US$1 Million</option>
<option value="2" <%if Rs("AnnualRevenue")="2" then%> selected <%end if%>>US$1 Million - US$2.5 Million</option>
<option value="3" <%if Rs("AnnualRevenue")="3" then%> selected <%end if%>>US$2.5 Million - US$5 Million</option>
<option value="4" <%if Rs("AnnualRevenue")="4" then%> selected <%end if%>>US$5 Million - US$10 Million</option>
<option value="5" <%if Rs("AnnualRevenue")="5" then%> selected <%end if%>>US$10 Million - US$50 Million</option>
<option value="6" <%if Rs("AnnualRevenue")="6" then%> selected <%end if%>>US$50 Million - US$100 Million</option>
<option value="7" <%if Rs("AnnualRevenue")="7" then%> selected <%end if%>>Above US$100 Million</option>
</SELECT>
</TD>
</TR>
<TR>
<TD width="30%" height="25" align=right><b><font color="#F78200">*</font> 经营模式:</b></TD>
<TD width="70%" height="25">
<SELECT name=DealInMode ID="Select2">
<option value="1" <%if Rs("DealInMode")="1" then%> selected <%end if%>>Manufacturer</option>
<option value="2" <%if Rs("DealInMode")="2" then%> selected <%end if%>>Trading Company</option>
<option value="3" <%if Rs("DealInMode")="3" then%> selected <%end if%>>Buying Office</option>
<option value="4" <%if Rs("DealInMode")="4" then%> selected <%end if%>>Distributor/Wholesaler</option>
<option value="5" <%if Rs("DealInMode")="5" then%> selected <%end if%>>Agent</option>
<option value="6" <%if Rs("DealInMode")="6" then%> selected <%end if%>>Others</option>
</SELECT>
</TD>
</TR>
<TR>
<TD width="30%" height="25" align=right><b><font color="#F78200">*</font> 行业类别:</b></TD>
<TD width="70%" height="25">
<%
Set TypeRs2=server.CreateObject("ADODB.Recordset")
TypeStr2="select * from Sort2 order by TypeID ASC"
TypeRs2.open TypeStr2,conn,1,1
%>
<script language = "JavaScript">
var onecount1;
onecount1=0;
subcat1 = new Array();
<%
count1 = 0
do while not TypeRs2.eof
%>
subcat1[<%=count1%>] = new Array("<%= trim(TypeRs2("Typename"))%>","<%= trim(TypeRs2("SortID"))%>","<%= trim(TypeRs2("TypeID"))%>");
<%
count1 = count1 + 1
TypeRs2.movenext
loop
TypeRs2.close
%>
onecount1=<%=count1%>;
function changelocation1(locationid)
{
document.Form1.TypeID.length = 0;
var locationid=locationid;
var i;
for (i=0;i < onecount1; i++)
{
if (subcat1[i][1] == locationid)
{
document.Form1.TypeID.options[document.Form1.TypeID.length] = new Option(subcat1[i][0], subcat1[i][2]);
}
}
}
</script>
<%
Set SortRs1=server.CreateObject("ADODB.Recordset")
SortStr1="select * from Sort1 order by SortID ASC"
SortRs1.open SortStr1,conn,1,1
%>
<SELECT name=SortID onChange="javascript:changelocation1(document.Form1.SortID.options[document.Form1.SortID.selectedIndex].value)" size="1" ID="Select6">
<option value="">--请选择行业大类--</option>
<%
dim SortID
SortID=SortRs1("SortID")
while not SortRs1.eof
%>
<option value="<%=SortRs1("SortID")%>" <%if SortRs1("SortID")=Rs("SortID") then%> selected <%end if%>><%=SortRs1("SortName")%></option>
<%
SortRs1.movenext
wend
%>
</select>
<%
SortRs1.close
Set SortRs1=nothing
%>
<select name="TypeID" ID="Select7">
<option value="">--请选择行业分类--</option>
<%
Set TypeRs3=server.CreateObject("ADODB.recordset")
TypeStr3="select * from Sort2 where SortID="& Rs("SortID") &" order by TypeID ASC"
TypeRs3.open TypeStr3,conn,1,1
if not(TypeRs3.eof and TypeRs3.bof) then
while not TypeRs3.eof
%>
<option value="<%=TypeRs3("TypeID")%>" <%if TypeRs3("TypeID")=Rs("TypeID") then%> selected <%end if%>><%=TypeRs3("TypeName")%></option>
<%
TypeRs3.movenext
wend
end if
TypeRs3.close
set TypeRs3 = nothing
%>
</select>
</TD>
</TR>
<TR>
<TD width="30%" height="25" align=right><b><font color="#F78200">*</font> 企业说明:</b></TD>
<TD width="70%" height="25">
<textarea rows="8" name="Explain" cols="50" ID="Textarea1"><%=Rs("Explain")%></textarea>
</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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -