data.asp
来自「基于C#语言的一个物流信息网数据库系统开发案例的源代码 ,很实用」· ASP 代码 · 共 76 行
ASP
76 行
<!-- #include file="../check/check.asp" -->
<!-- #include file="../Conn/conn.asp" -->
<%
style=request.Form("style")
if request.Form("name")="" then
names="个体经营者"
else
names=request.Form("name")
end if
work=request.Form("work")
area=request.Form("area")
if request.Form("address")="" then
address="无固定经营地址"
else
address=request.Form("address")
end if
phone=request.Form("phone")
linkman=request.Form("linkman")
andset=request.Form("handset")
email=request.Form("email")
if request.Form("fax")="" then
fax="该企业不具备传真机"
else
fax=request.Form("fax")
end if
if request.Form("meg")="" then
meg="暂时没有企业的任何介绍信息"
else
meg=request.Form("meg")
end if
if request.form("http")="" then
http="http://"
else
http=request.Form("http")
end if
yonghu=session("name")
sql="select * from tb_EnterpriseMeg where EnterpriseSort='"&style&"' and EnterpriseName='"&names&"' and Operation='"&work&"' and WorkArea='"&area&"' and Address='"&address&"' and Phone='"&phone&"' and LinkMan='"&linkman&"' and HandSet='"&andset&"' and Fax='"&fax&"' and Intro='"&meg&"' and Http='"&http&"'and UserName='"&yonghu&"'"
rs.open sql,conn
if not rs.eof or not rs.bof then
%>
<script language="javascript">
alert("因为您重复发布相同的信息,本站将限制您在48小时内不能发布信息");
history.back();
</script>
<%
set rs=nothing
conn.close
set conn=nothing
else
set rs=nothing
conn.close
set conn=nothing
%>
<!-- #include file="../Conn/conn.asp" -->
<%
sql="insert into tb_EnterpriseMeg values('"&style&"','"&names&"','"&work&"','"&area&"','"&address&"','"&phone&"','"&linkman&"','"&andset&"','"&fax&"','"&email&"','"&http&"','"&meg&"','"&now()&"','"&yonghu&"')"
rs.open sql,conn
set rs=nothing
conn.close
set conn=nothing
%>
<!-- #include file="../Conn/conn.asp" -->
<%
sql="select * from tb_EnterpriseMeg where EnterpriseSort='"&style&"' and EnterpriseName='"&names&"' and Operation='"&work&"' and WorkArea='"&area&"' and Address='"&address&"' and Phone='"&phone&"' and LinkMan='"&linkman&"' and HandSet='"&andset&"' and Fax='"&fax&"' and Intro='"&meg&"' and Http='"&http&"'and UserName='"&yonghu&"'"
rs.open sql,conn
if not rs.eof or not rs.bof then
%>
<script language="javascript">
alert("信息添加成功!");
window.close();
opener.location.reload();
</script>
<%
end if
end if
%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?