📄 select_txl.asp
字号:
<!--#include file="islogin.asp"-->
<%
Response.Expires =0
dim ismut,dept,sql,ors,name,username,shumu,count,page,asktype
ismut=Request("ismut")
dept=trim(Request("dept"))
asktype=Request("asktype")
%>
<html>
<head>
<title>WEBOA</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script language="javascript" src="style.js"></script>
<script language="javascript" src="myfunction.js"></script>
<script language="javascript">
function set_value()
{
var a,count,name,oldwindow,strValue,arrTemp,show_name,arrValue;
a=document.myform;
count=select_count(a);
if(count==0)
{
alert("请你选择用户!");
return;
}
if(a.ismut.value=="false" && count>1)
{
alert("只能选择一个!");
return ;
}
name=window.name ;
oldwindow=window.opener;
strValue=get_select_value(a);
show_name="show_"+name;
if(count==1)
{
arrValue=strValue.split(",");
oldwindow.myform.item(name).value= arrValue[0];
oldwindow.myform.item(show_name).value= arrValue[1];
if(a.asktype.value=="zbap")
oldwindow.myform.item("department").value=arrValue[2];
}else if(count>1)
{
arrTemp=strValue.split(String.fromCharCode (27));
for(var i=0;i<arrTemp.length;i++)
{
arrValue=arrTemp[i].split(",");
if(i==0)
{
oldwindow.myform.item(name).value= arrValue[0];
oldwindow.myform.item(show_name).value= arrValue[1];
}else
{
oldwindow.myform.item(name).value=oldwindow.myform.item(name).value+String.fromCharCode (27)+ arrValue[0];
oldwindow.myform.item(show_name).value=oldwindow.myform.item(show_name).value+String.fromCharCode (27)+ arrValue[1];
}
}
}
//window.returnValue=get_select_value(a);
window.close();
}
function select_count(a)
{
var choice_count;
choice_count=0;
if(!a.choice_id.length)
{
if(a.choice_id.checked==true)
choice_count++;
}
else
{
for(var i=0;i<parseInt(a.choice_id.length);i++)
{
if(a.choice_id(i).checked==true)
{
choice_count++;
}
}
}
return choice_count;
}
function get_select_value(a)
{
var choice_count,strValue;
choice_count=0;
if(!a.choice_id.length)
{
if(a.choice_id.checked==true)
strValue=a.choice_id.value;
}
else
{
for(var i=0;i<parseInt(a.choice_id.length);i++)
{
if(a.choice_id(i).checked==true)
{
choice_count++;
if(choice_count>1)
strValue=strValue+String.fromCharCode(27)+a.choice_id(i).value;
else
strValue=a.choice_id(i).value;
}
}
}
return strValue;
}
function page_check(a)
{
a.page.value = TrimJS(a.page .value);
if(!a.page.value)
{
alert("请输入要转到的页数!");
a.page.focus();
return false;
}
else
{
if(!fucCheckNum(a.page.value))
{
alert("页数必须是数字!");
a.page.value = "";
a.page.focus();
return false;
}
}
return true;
}
function change_txl()
{
window.myform.submit();
}
function go_page()
{
if(page_check(document.myform))
{
window.myform.submit();
}
}
</script>
</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="3" topmargin="0">
<table width="15%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="9"><img src="../images/left_1.gif" width="9" height="24"></td>
<td bgcolor="#F7941d" align="center"><font color="#FFFFFF">用户列表</font></td>
<td align="right" width="9"><img src="../images/right_1.gif" width="9" height="24"></td>
</tr>
</table>
<br>
<form action="select_txl.asp" method="post" name="myform" target="_self">
<table width="90%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td height="30" nowrap><font color="#333333">你当前所选的部门:
<select name="dept" onchange="change_txl();">
<option value="all">全部员工</option>
<%
sql="select distinct dept from dept where rec_flag=1"
connect_db()
set ors=conn.Execute(sql)
while not ors.EOF
name=ors("dept")
%>
<option value="<%=name%>" <%=selected(name,dept)%>><%=name%></option>
<%
ors.MoveNext
wend
ors.close()
set ors=nothing
%>
</select>
</font></td>
</tr>
</table>
<table border="0" cellspacing="0" cellpadding="0" width="90%" align="center">
<input type="hidden" name="ismut" value="<%=ismut%>">
<input type="hidden" name="asktype" value="<%=asktype%>">
<tr>
<td valign="bottom">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="1">
<tr>
<td bgcolor="7EB961" height="1" width="100%"><img src="../images/spacer.gif" height="1"></td>
</tr>
</table>
</td>
<td width="9" background="../images/bg_2.gif"><img src="../images/left_2.gif" width="9" height="24"></td>
<td align="center" background="../images/bg_2.gif">用户名<img src="../images/spacer.gif" width="8" height="8" align="absmiddle"></td>
<td width="8" align="center" nowrap background="../images/bg_2.gif"><img src="../images/jian.gif" width="8" height="24"></td>
<td align="center" background="../images/bg_2.gif">姓 名<img src="../images/spacer.gif" width="8" height="8" align="absmiddle"></td>
<td align="center" width="7" nowrap><img src="../images/right_2.gif" width="7" height="24"></td>
</tr>
<%
page = trim(Request("page"))
if page="" then
page = 1
end if
page=cint(page)
if page<=0 then
page=1
end if
shuMu = 10
if dept="" or dept="all" then
sql="select name,username,userdept from userinf where forbid='no'"
else
sql="select name,username,userdept from userinf where forbid='no' and userdept='"&dept&"'"
end if
call get_recordset(ors)
ors.open sql,conn,1,1
if not ors.EOF then
ors.PageSize = shuMu
count=ors.PageCount
if page>count then
page = count
end if
ors.Move ((page-1)*shuMu)
while not ors.EOF and shuMu>=1
name=ors("name")
username=ors("username")
%>
<tr>
<td height="24" align="center">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="7EB961" height="24" width="1"><img src="../images/spacer.gif" width="1" height="1"></td>
<td align="center">
<input type="checkbox" name="choice_id" value="<%=username%>,<%=name%>,<%=ors("userdept")%>">
</td>
</tr>
</table>
</td>
<td width="9"> </td>
<td><font color="#006600"><%=username%></font></td>
<td width="8" nowrap> </td>
<td><font color="#006600"><%=name%></font></td>
<td align="right" width="7" nowrap>
<table width="1" border="0" cellspacing="0" cellpadding="0" height="24">
<tr>
<td bgcolor="7EB961" height="100%"><img src="../images/spacer.gif" width="1" height="1"></td>
</tr>
</table>
</td>
</tr>
<%
shuMu=shuMu-1
ors.MoveNext()
wend
end if
ors.close()
set ors=nothing
close_db()
%>
<tr>
<td height="24" align="left">
<table width="1" border="0" cellspacing="0" cellpadding="0" height="24">
<tr>
<td bgcolor="7EB961" height="100%"><img src="../images/spacer.gif" width="1" height="1"></td>
</tr>
</table>
</td>
<td colspan="4" align="right" class="F1">
<%if page>1 and count >1 then%>
<a href="txl.asp?page=<%=page-1%>&dept=<%=dept%>">上一页</a>
<%else%>
上一页
<%end if%>
|
<%if page<count then%>
<a href="txl.asp?page=<%=page+1%>&dept=<%=dept%>">下一页</a>
<%else%>
下一页
<%end if%> | 第
<input class="flat1b" name="page" size="2" value="1">
页<a href="#" target="_self" onclick="go_page();return false;"><img src="../images/go.gif" width="21" height="21" align="absmiddle" border="0"></a></td>
<td align="right" width="7" nowrap>
<table width="1" border="0" cellspacing="0" cellpadding="0" height="24">
<tr>
<td bgcolor="7EB961" height="100%"><img src="../images/spacer.gif" width="1" height="1"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="6" valign="bottom" height="1" align="center" bgcolor="7EB961"><img src="../images/spacer.gif" width="1" height="1"></td>
</tr>
<tr align="right">
<td colspan="6" valign="bottom" height="1">
<table border="0" cellspacing="0" cellpadding="0" height="23">
<tr>
<td width="9" height="23"><img src="../images/left_3.gif" width="9" height="23"></td>
<td align="center" background="../images/bg_1.gif" height="23" nowrap><a href="#" onclick="set_value(); return false;">确 定</a></td>
<td width="20" height="23"><img src="../images/jian_1.gif" width="20" height="23"></td>
<td align="center" background="../images/bg_1.gif" height="23" nowrap><a href="#" onclick="window.close();">关 闭</a></td>
<td width="9" height="23"><img src="../images/right_3.gif" width="9" height="23"></td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -