?? wnp_uj_list.asp
字號:
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<!--#include file="WNP_INCLUDE.ASP" -->
<%
pagename="WNP_UJ_LIST.ASP"
%>
<script language="javascript">
<!--
function checkUjItem(formName){
if(formName.hField01.value == 'yes'){
if(formName.para1.value==""){
alert("請?zhí)顚懶蛱枺?quot;);
formName.para1.focus();
return false;
}
if(formName.para2.value==""){
alert("請?zhí)顚憴?quán)限等級!");
formName.para2.focus();
return false;
}
if(formName.para3.value==""){
alert("請?zhí)顚憴?quán)限名稱!");
formName.para3.focus();
return false;
}
if(formName.para5.value==""){
alert("請選擇用戶類型!");
formName.para5.focus();
return false;
}
if(formName.para6.value==""){
alert("請選擇上限單位級別!");
formName.para6.focus();
return false;
}
if(formName.para7.value==""){
alert("請選擇上限單位級別!");
formName.para7.focus();
return false;
}
if(formName.para8.value==""){
alert("請?zhí)顚懶袠I(yè)單位編碼!");
formName.para8.focus();
return false;
}
}
else{
if(formName.para1.value==""){
alert("請?zhí)顚懶蛱枺?quot;);
formName.para1.focus();
return false;
}
if(formName.para2.value==""){
alert("請?zhí)顚憴?quán)限等級!");
formName.para2.focus();
return false;
}
if(formName.para3.value==""){
alert("請?zhí)顚憴?quán)限名稱!");
formName.para3.focus();
return false;
}
}
return true;
}
//-->
function changeOthers(){
if(document.theForm01.para2.value != 1){
document.theForm01.para5.disabled = true;
document.theForm01.para6.disabled = true;
document.theForm01.para7.disabled = true;
document.theForm01.para8.disabled = true;
}
else{
document.theForm01.para5.disabled = false;
document.theForm01.para6.disabled = false;
document.theForm01.para7.disabled = false;
document.theForm01.para8.disabled = false;
document.theForm01.hField01.value = 'yes';
}
}
</script>
<script language = "JavaScript"><!--------------------單位用戶二級聯(lián)動腳本------------------->
<%
dim count
sql="select * from WNT_UNIT"
rs.open sql,conn,1,1
%>
var onecount;
onecount=0;
subcat = new Array();
<%
count = 0
do while not rs.eof
%>
subcat[<%=count%>] = new Array("<%= trim(rs("UNIT_BM"))%>","<%= trim(rs("UNIT_Jibie"))%>","<%= Left(rs("UNIT_BM"),10)%>");
<%
count = count + 1
rs.movenext
loop
rs.close
%>
onecount=<%=count%>;
function changeclass(locationid)
{
document.theForm01.para8.length = 0;
var locationid=locationid;
var i;
document.theForm01.para8.options[0] = new Option('請選擇','');
for (i=0;i < onecount; i++)
{
if (subcat[i][1] == locationid)
{
//alert(subcat[i][1]);
document.theForm01.para8.options[document.theForm01.para8.length] = new Option(subcat[i][0], subcat[i][2]);
}
}
}
</script>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
<form name="sForm01" method="post" action="?action=search01" onSubmit="" >
<tr>
<td height="30" align="left" class="title1"><input name="sKey01" type="text" class="input1" id="sKey01" onFocus="this.select()" value="請輸入權(quán)限ID號">
<input name="Submit" type="submit" class="newSubmit" value="修改查詢">
<input name="Submit" type="button" class="newSubmit" onClick="location.href='?action=addif';" value="新增權(quán)限">
<input name="Submit" type="button" class="newSubmit" onClick="location.href='?';" value="返 回"></td>
</tr>
</form>
</table>
<%
action=request("action")
if action="addif" then
%>
<table bgColor=#fdfaf4 borderColorDark=#ffffff border=1 cellspacing=0 cellpadding=0 align=center width=730 bordercolorlight=#999999 class=textmost>
<form name="theForm01" method="post" action="WNP_UJ_SAVE_Other1.ASP" onSubmit="return checkUjItem(theForm01);">
<tr align="center" class="texttitle">
<td>權(quán)限序號</td>
<td>菜單級別</td>
<td height="30">權(quán)限名稱</td>
<td>調(diào)用程序</td>
<td>用戶類型</td>
<td>上限單位級別</td>
<td>下限單位級別</td>
<td>行業(yè)單位編碼</td>
<td colspan="2">操作</td>
</tr>
<tr align="center">
<td><input name="hField01" type="hidden" id="hField01" value="no">
<%
sql="select max(WND_UJ_Order) as maxOrder from WNT_UJ"
rs.open sql,conn,1,1
tempOrder01 = rs("maxOrder")+1
rs.close
%>
<input name="para1" type="text" id="para1" value="<%=tempOrder01%>" size="5"></td><td><select name="para2" id="para2" onChange="changeOthers(document.theForm01.para2.options[document.theForm01.para2.selectedIndex].value);">
<%
for i=1 to 3
%>
<option value="<%=i%>"><%=i%></option>
<%
next
%>
</select></td>
<td><input name="para3" type="text" id="para3" size="10"></td>
<td>
<input name="para4" type="text" id="para4" size="10"></td>
<td> <select name="para5" id="para5">
<option value="">::請選擇::</option>
<%
sql="select * from WNT_GW order by WND_GW_Order desc"
rssub.open sql,conn,1,1
do while not rssub.eof
%>
<option value="<%=rssub("WND_GW_ID")%>"><%=rssub("WND_GW_NAME1")%></option>
<%
rssub.movenext
loop
rssub.close
%>
</select></td>
<td>
<select name="para6" id="para6" onChange="changeclass(document.theForm01.para6.options[document.theForm01.para6.selectedIndex].value);">
<option value="">請選擇</option>
<%
for i=session("UNIT_Jibie") to session("AllStepNumber")
%>
<option value="<%=i%>"><%=i%></option>
<%
next
%>
</select></td>
<td>
<select name="para7" id="para7">
<option value="">請選擇</option>
<%
for i=session("UNIT_Jibie") to session("AllStepNumber")
%>
<option value="<%=i%>"><%=i%></option>
<%
next
%>
</select></td>
<td>
<select name="para8" id="para8">
<option value="">請選擇</option>
</select> </td>
<td colspan="2"><input name="Submit" type="submit" class="newSubmit" value="新 增"></td>
</tr>
</form>
</table>
<%
elseif action="search01" then
%>
<%
'本頁調(diào)用過程
sub msgWindow()'顯示錯誤信息過程
response.Write("<script language=javascript>alert('請輸入權(quán)限編號!');location.href='WNP_UJ_LIST.ASP';</script>")
end sub
sub searchSub(sKey01)'搜索過程
sql="select * from WNT_UJ where WND_ID="&sKey01
rs.open sql,conn,1,1
if not rs.eof then
%>
<table bgColor=#fdfaf4 borderColorDark=#ffffff border=1 cellspacing=0 cellpadding=0 align=center width=730 bordercolorlight=#999999 class=textmost>
<form name="theForm01" method="post" action="WNP_UJ_SAVE_Other.ASP?ujId=<%=sKey01%>" onSubmit="">
<tr align="center" class="texttitle">
<td>權(quán)限ID</td>
<td>權(quán)限序號</td>
<td>菜單級別</td>
<td height="30">權(quán)限名稱</td>
<td>調(diào)用程序</td>
<td>用戶類型</td>
<td>上限單位級別</td>
<td>下限單位級別</td>
<td>行業(yè)單位編碼</td>
<td colspan="2">操作</td>
</tr>
<tr align="center">
<td><input name="hField01" type="hidden" id="hField01" value="no">
<%=rs("WND_ID")%></td>
<td><input name="para1" type="text" id="para1" value="<%=rs("WND_UJ_Order")%>" size="5"></td>
<td><select name="para2" id="para2" onChange="changeOthers(document.theForm01.para2.options[document.theForm01.para2.selectedIndex].value);">
<%
for i=1 to 3
if i=rs("WND_UJ_Step") then
%>
<option value="<%=rs("WND_UJ_Step")%>" selected><%=rs("WND_UJ_Step")%></option>
<%
else
%>
<option value="<%=i%>"><%=i%></option>
<%
end if
next
%>
</select></td>
<td><input name="para3" type="text" id="para3" value="<%=rs("WND_UJ_UJ")%>" size="10"></td>
<td>
<input name="para4" type="text" id="para4" value="<%=rs("WND_UJ_FUNCTION")%>" size="10"></td>
<td> <select name="para5" id="para5" <%if rs("WND_UJ_Step")<>1 then response.Write(" disabled")%>>
<option value="">::請選擇::</option>
<%
sql="select * from WNT_GW order by WND_GW_Order desc"
rssub.open sql,conn,1,1
do while not rssub.eof
%>
<option value="<%=rssub("WND_GW_ID")%>" <%if rssub("WND_GW_ID")=rs("WND_UJ_UserType") then response.Write "selected"%>><%=rssub("WND_GW_NAME1")%></option>
<%
rssub.movenext
loop
rssub.close
%>
</select></td>
<td>
<select name="para6" id="para6" onChange="changeclass(document.theForm01.para6.options[document.theForm01.para6.selectedIndex].value);" <%if rs("WND_UJ_Step")<>1 then response.Write(" disabled")%>>
<option value="">請選擇</option>
<%
for i=session("UNIT_Jibie") to session("AllStepNumber")
%>
<option value="<%=i%>" <%if i=rs("WND_UJ_TYPE") then response.Write(" selected")%>><%=i%></option>
<%
next
%>
</select></td>
<td>
<select name="para7" id="para7" <%if rs("WND_UJ_Step")<>1 then response.Write(" disabled")%>>
<option value="">請選擇</option>
<%
for i=session("UNIT_Jibie") to session("AllStepNumber")
%>
<option value="<%=i%>" <%if i=rs("WND_UJ_XXJB") then response.Write(" selected")%>><%=i%></option>
<%
next
%>
</select></td>
<td>
<select name="para8" id="para8" <%if rs("WND_UJ_Step")<>1 then response.Write(" disabled")%>>
<%
sql="select * from WNT_UNIT where UNIT_Jibie="&rs("WND_UJ_TYPE")
rssub.open sql,conn,1,1
do while not rssub.eof
%>
<option value="<%=rssub("UNIT_BM")%>" <%if rs("WND_UJ_HYBM")=rssub("UNIT_BM") then response.Write("selected")%>><%=rssub("UNIT_BM")%></option>
<%
rssub.movenext
loop
rssub.close
%>
</select></td>
<td colspan="2"><input name="Submit" type="submit" class="newSubmit" value="修 改"> </td>
</tr>
</form>
</table>
<%
rs.close
else
rs.close
response.Write("<script language=javascript>alert('沒有找到相關(guān)權(quán)限!');location.href='WNP_UJ_LIST.ASP';</script>")
end if
end sub
sub saveEdit()'保存過程
response.Write("<script language=javascript>alert('修改權(quán)限成功!');location.href='WNP_UJ_LIST.ASP';</script>")
end sub
sKey01=trim(request("sKey01"))
if sKey01="" or not IsNumeric(sKey01) then
call msgWindow()
else
call searchSub(sKey01)
end if
%>
<%
end if
%>
<table width="770" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><iframe width="770" height="500" frameborder="0" src="WNP_UJ_Frame.asp"></iframe>
</td>
</tr>
</table>
</body>
</html>
<%
call closedb
%>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -