?? 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 + -