📄 selectfgdept.asp
字号:
<%dim ThisKey
ThisKey = "a"
%>
<!--#include file="../inc/permission.asp"-->
<!--#include file="../inc/conn.asp"-->
<!--#include file="../inc/const.asp"-->
<%
FGDept=trim(request("FGDept"))
set rs=server.createobject("ADODB.RecordSet")
%>
<HTML>
<HEAD>
<TITLE>用户分管部门</TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="../CSS/main.css">
<Script Language="JavaScript">
function ChkedAll(){
for(var i=0;i<window.form1.FGDept.length;i++){
window.form1.FGDept[i].checked=true;
}
}
function UnChkedAll(){
for(var i=0;i<window.form1.FGDept.length;i++){
window.form1.FGDept[i].checked=false;
}
}
function SelectedData(){
num=0
FGDept=""
for(var i=0;i<form1.FGDept.length;i++){
if(form1.FGDept[i].checked){
num=num+1
if(num==1){
FGDept=window.form1.FGDept[i].value;
}
else{
FGDept=FGDept+","+window.form1.FGDept[i].value
}
}
}
window.opener.Rightfrm.FGDept.value=FGDept
}
</Script>
</HEAD>
<BODY bgcolor="#ffffff" topmargin=5 leftmargin=0>
<table border=0 cellpadding=0 cellspacing=0 width=330 align=center>
<tr>
<td align=left style="line-height:12pt;">选择分管权限</td>
</tr>
</table>
<table border=0 cellpadding=0 cellspacing=1 width="330" align=center valign=middle bgcolor="#336699">
<form name="form1" method=post action="">
<%
rs.open "select Department,DaiHao from tblDepartment where UnitDaiHao="&Session("Unit")&"and DaiHao<>0 order by DaiHao",conn,1,1
do while not rs.eof
%>
<tr>
<%
for i=1 to 3
if not rs.eof then%>
<td align=left bgcolor="#ffffff"><input type=checkbox name=FGDept value="(<%=rs("DaiHao")%>)"<% if FGDept<>"" then
if instr(1,FGDept,"("&rs("DaiHao")&")",1)>0 then%> checked<%end if
end if%>><%=trim(rs("Department"))%></td>
<%
rs.movenext
else
%>
<td bgcolor="#ffffff"> </td>
<%
end if
next
%></tr><%
loop
rs.close
set rs=nothing
%>
<tr>
<td colspan=3 bgcolor="#ffffff">
<input type=button name="CheckedAll" value="全选" onclick="javascript:ChkedAll();">
<input type=button name="UnCheckedAll" value="清除" onclick="javascript:UnChkedAll();">
<input type=button name="Submit" value="确定" onclick="javascript:SelectedData();self.close();">
</td>
</tr>
</form>
</table>
</BODY>
</HTML>
<!--#include file="../inc/close.asp"-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -