📄 add_dalei_new.asp
字号:
<%if session("LHB_MiMa")<>"" then%>
<!-- #include file="LHB_GuangLiQX_Top.asp"-->
<!-- #include file="config.asp"-->
<%
MC_ID=Request("id")
L_DaLeiBM = Request("LouHB_DaLeiBM")
L_DaLeiMC = Request("LouHB_DaLeiMC")
L_Insert_Update = Request("Insert_Update")
SQLKS="select top 1 L_DaLeiBM from LHB_GongYong_DaLei order by L_DaLeiBM desc"
Lours.open SQLKS,Louconn,1,1
if Lours.EOF and Lours.BOF then
L_DaLeiBM = 0+1
else
L_DaLeiBM = Lours("L_DaLeiBM")+1
end if
set Lours=nothing
%>
<%
if L_DaLeiMC="" then
response.write "<script language=JavaScript>" & chr(13) & "alert('请输入项目名称');" & "history.back()" & "</script>"
Response.End
end if
Lousql="select L_DaLeiMC from LHB_GongYong_DaLei where L_DaLeiMC='"&L_DaLeiMC&"'"
set Lours1=Louconn.execute(Lousql)
if not Lours1.eof then
Lours1.close
response.write "<script language=JavaScript>" & chr(13) & "alert('对不起,您输入的项目名称已经存在!');" & "history.back()" & "</script>"
response.End
end if
Select Case L_Insert_Update
Case 1 '如果Insert_Update值为1就执行新增Into
set saveadmin=Louconn.execute("insert into LHB_GongYong_DaLei(L_DaLeiBM,L_DaLeiMC) values('"&L_DaLeiBM&"','"&L_DaLeiMC&"')")
response.write "<script language=JavaScript>" & chr(13) & "alert('恭喜,项目名称添加成功!');"&"window.location.href = 'Manage_XiTong.asp'"&" </script>"
set saveadmin=nothing
Case 2 '如果L_New_Modiy值为2就执行修改update
%>
<!-- #include file="config.asp"-->
<%
sql="update LHB_GongYong_DaLei set L_DaLeiMC='"&L_DaLeiMC&"' where id="&MC_ID
Lours.Open sql,Louconn,1,3
response.write "<script language=JavaScript>" & chr(13) & "alert('恭喜!项目名称更新成功');"&"window.location.href = 'Manage_XiTong.asp'"&" </script>"
set Lours=nothing
set Louconn=nothing
End Select
%>
<!-- #include file="LHB_GuangLiQX_Down.asp"-->
<%
else
Response.Redirect "index.asp"
end if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -