⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wnp_uj_list.asp

📁 U盘身份识别软件
💻 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("请填写序号!");
    formName.para1.focus();
	return false;
  }
  if(formName.para2.value==""){
    alert("请填写权限等级!");
    formName.para2.focus();
	return false;
  }
  if(formName.para3.value==""){
    alert("请填写权限名称!");
    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("请填写行业单位编码!");
    formName.para8.focus();
	return false;
  }
}
else{
  if(formName.para1.value==""){
    alert("请填写序号!");
    formName.para1.focus();
	return false;
  }
  if(formName.para2.value==""){
    alert("请填写权限等级!");
    formName.para2.focus();
	return false;
  }
  if(formName.para3.value==""){
    alert("请填写权限名称!");
    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"><!--------------------单位用户二级联动脚本------------------->
<%
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="请输入权限ID号">
      <input name="Submit" type="submit" class="newSubmit" value="修改查询">
      <input name="Submit" type="button" class="newSubmit" onClick="location.href='?action=addif';" value="新增权限">
      <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>权限序号</td>
    <td>菜单级别</td>
    <td height="30">权限名称</td>
    <td>调用程序</td>
    <td>用户类型</td>
    <td>上限单位级别</td>
    <td>下限单位级别</td>
    <td>行业单位编码</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
%>
<%
'本页调用过程
sub msgWindow()'显示错误信息过程
  response.Write("<script language=javascript>alert('请输入权限编号!');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>权限ID</td>
    <td>权限序号</td>
    <td>菜单级别</td>
    <td height="30">权限名称</td>
    <td>调用程序</td>
    <td>用户类型</td>
    <td>上限单位级别</td>
    <td>下限单位级别</td>
    <td>行业单位编码</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('没有找到相关权限!');location.href='WNP_UJ_LIST.ASP';</script>")
  end if
end sub

sub saveEdit()'保存过程
  response.Write("<script language=javascript>alert('修改权限成功!');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
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -