📄 modulecode_regist.asp
字号:
<!--#include file="../Include/TimeOut.asp"-->
<!--#include file="../Include/AdoConn.asp"-->
<!--#include file="../Include/online.asp"-->
<%
'接收传来的变量
srtsql=Request.QueryString ("strsql")
edit=Request.QueryString ("edit")
page=Cstr(Request.QueryString ("page"))
CheckboxEnd="0"
IP="0"
'接收表单数据
ModuleName=request("ModuleName")
ModuleCode=request("ModuleCode")
ModulePath=request("ModulePath")
CheckBoxEnd=request("CheckBoxEnd")
IP=request("IP")
'处理修改页面部分
if edit="edit" then
ModuleCode=request("ModuleCode")
strsql="update XT_TC_Module set 模块名称="+"'"+ModuleName+"'"+",模块路径="+"'"+ModulePath+"'"+",末级菜单="+"'"+CheckBoxEnd+"',IP校验标志="+"'"+IP+"'"+" where 模块编码="+"'"+ModuleCode+"'"
conn.Execute strsql,1
Response.Write ModuleName&"已修改成功!<br>模块编码为:"&ModuleCode&"<br>模块路径为:"&ModulePath
Response.Write "<a href=ModuleCode_EditList.asp?strsql="+server.URLEncode ( Request.QueryString("strsql"))+"&page="+Cstr(page)+">按此返回列表</a>"
else
set rst2=server.CreateObject ("ADODB.recordset")
StrSQL="select 模块编码 from XT_TC_Module where 模块编码='"&ModuleCode&"'"
rst2.CursorType =3
rst2.CursorLocation =3
rst2.LockType =2
rst2.Open strsql,strconn
if not rst2.EOF then
Response.Write "这个模块编码已经存在,<a href=ModuleCode_Edit.asp?strsql="+server.URLEncode ( Request.QueryString("strsql"))+"&page="+Cstr(page)+">请重新注册!</a> "
Response.End
end if
%>
<%
'模块信息写入数据库
StrSQL="insert into XT_TC_Module(模块编码,模块名称,模块路径,末级菜单,IP校验标志) values ('"&ModuleCode&"','"&ModuleName&"','"&ModulePath&"','"&CheckBoxEnd&"','"&IP&"')"
conn.Execute StrSQL
conn.close
set conn=nothing
Response.Write ModuleName&"已注册成功!<br>模块编码为:"&ModuleCode&"<br>模块路径为:"&ModulePath
Response.Write "<a href=ModuleCode_EditList.asp?strsql="+server.URLEncode ( Request.QueryString("strsql"))+"&page="+Cstr(page)+">按此返回列表</a>"
end if
%>
<script language="vbscript">
function back(i)
history.go(i)
end function
</script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -