📄 listhead.asp
字号:
<!-- #include file = "../../../include/function.asp" -->
<%CheckUser()%>
<script src="../../../include/function.js" type="text/javascript"></script>
<link href="../../../include/main.css" rel="stylesheet" type="text/css">
<script ID="clientEventHandlersJS" LANGUAGE="javascript">
<!--
function window_onload(){
btnAdd.disabled =false;
btnImport.disabled =false;
btnExport.disabled =false;
SetRows();
window.parent.RightData.navigate("list.asp");
}
function window_onresize() {
SetRows();
}
function SetRows()
{
parent.RightPanel.rows=RightHeadTable.clientHeight + ",*";
}
function AddRecord() {
if(window.showModalDialog("frame.asp?target=new.asp", "","dialogwidth:560px;dialogheight:300px;Status:0;center:1;resizable=1;")==true)
{
window.parent.RightData.navigate("list.asp");
}
}
function DelRecord()
{
var SelectedRow;
SelectedRow=window.parent.RightData.RowSelect();
if(SelectedRow=="")
{
alert("您要删除哪些用户?请选择。")
}
else
{
var temp,UserID;
temp=","+SelectedRow+",";
UserID=","+frmData.UserID.value+",";
if(temp.indexOf(UserID)>=0)
{
alert("您要删除的用户中包含您自己,这是不允许的。")
}
else
{
if(confirm("警告!\n删除用户时,记录中填有此用户的字段也将被清空,请参考该用户的相关数据。如果仅仅想阻止该用户登录使用,修改他的状态为停用即可,不必作删除操作。删除操作要慎重,以免数据丢失。\n您确定要删除此用户吗?")==true)
{
document.frmData.RowSelect.value =SelectedRow;
document.frmData.target ="SaveArea";
document.frmData.action="del.asp";
document.frmData.submit();
}
}
}
}
function DepartmentSelect()
{
var Index,DepartmentID;
Index=Department.selectedIndex;
if (Index==0)
DepartmentID=0;
else
DepartmentID=Department[Index].value;
frmData.DepartmentID.value=DepartmentID;
frmData.CurPage.value=1
frmData.target ="RightData";
frmData.action="list.asp";
frmData.submit();
}
function Import()
{
if(window.showModalDialog("frame.asp?target=../../../imexport/importuserstep1.asp", "","dialogwidth:560px;dialogheight:370px;Status:0;center:1;resizable=1;")==true)
{
window.parent.RightData.navigate("list.asp");
}
}
function Export()
{
if(HasData())
{
window.showModalDialog("frame.asp?target=exportstep1.asp","","dialogwidth:420px;dialogheight:270px;Status:0;center:1;resizable=1;");
}
else
alert("没有用户帐号可导出。");
}
function HasData()
{
if(PageNavigate.innerText!="" && document.frmData.CurPage.value>0) //用PageNavigate.innerText有无内容和CurPage.value判断list是否已经有数据
return(true);
else
return(false);
}
//-->
</script>
<%
if instr(1,Request.ServerVariables("HTTP_REFERER"),"funmenu.asp")>0 then
'来自于左侧的点击
CurPage=1
Response.Cookies("System")("UserCurPage")=CurPage
Response.Cookies("System").Expires = CookieLife
end if
dim WExcel
set WExcel=server.CreateObject("WExcel.System")
dim DepartmentOption,DepartmentID
DepartmentID=Request.Cookies("System")("UserDepartmentID")
if DepartmentID="" then
DepartmentID=0
end if
DepartmentOption=WExcel.GetDepartmentOption(cint(UserID),cint(DepartmentID))
CheckErr
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onload="window_onload()" onresize="window_onresize()">
<table id=RightHeadTable name=RightHeadTable width="100%" border="0" cellPadding=0 cellSpacing=0>
<tr height=20>
<td width="51%">
<p align="left" id="PageNavigate">
</p>
</td>
<td width="49%">
<p align="right">
<select name=Department style="WIDTH: 100px" LANGUAGE=javascript onchange="return DepartmentSelect()">
<%=DepartmentOption%>
</select>
<input type="button" name="btnAdd" disabled value="新增" style="cursor:hand; WIDTH: 45px; HEIGHT: 24px" LANGUAGE="javascript" onclick="return AddRecord()">
<input type="button" name="btnDel" disabled value="删除" style="cursor:hand; WIDTH: 45px; HEIGHT: 24px" LANGUAGE="javascript" onclick="return DelRecord()">
<input type="button" name="btnImport" disabled value="导入" style="cursor:hand; WIDTH: 45px; HEIGHT: 24px" LANGUAGE="javascript" onclick="return Import()">
<input type="button" name="btnExport" disabled value="导出" style="cursor:hand; WIDTH: 45px; HEIGHT: 24px" LANGUAGE="javascript" onclick="return Export()">
</p>
</td>
</tr>
<tr>
<td colspan=2>
<table width=100% cellspacing=1 bgcolor=999999>
<tr>
<td bgcolor='white' width=1% title='全选/全清'><INPUT name=chkAll onClick=SelectAll() type=checkbox></td>
<td bgcolor=white style='cursor:hand' width=8% onClick=ChgOrder('UserID') title=按用户号排序>用户号</td>
<td bgcolor=white style='cursor:hand' width=11% onClick=ChgOrder('LoginID') title=按登录名排序>登录名</td>
<td bgcolor=white style='cursor:hand' width=13% onClick=ChgOrder('Name') title=按姓名排序>姓名</td>
<td bgcolor=white style='cursor:hand' width=13% onClick=ChgOrder('Department') title=按部门排序>部门</td>
<td bgcolor=white style='cursor:hand' width=29% onClick=ChgOrder('Email') title=按Email排序>Email</td>
<td bgcolor=white style='cursor:hand' width=11% onClick=ChgOrder('AccountType') title=按账号性质排序>账号性质</td>
<td bgcolor=white style='cursor:hand' width=6% onClick=ChgOrder('Status') title=按状态排序>状态</td>
<td bgcolor=white style='cursor:hand' width=8% onClick=ChgOrder('Admin') title=按管理员排序>管理员</td>
</tr>
</table>
</td>
<iframe id="SaveArea" name="SaveArea" style="visibility:hidden" width="0" height="0" frameborder="0" src="">
</iframe>
</tr>
<form METHOD="post" name="frmData">
<input TYPE="hidden" NAME="OrderBy" value="<%=Request.Cookies("System")("UserOrderBy")%>">
<input TYPE="hidden" NAME="CurPage">
<input TYPE="hidden" NAME="RowSelect">
<input TYPE="hidden" NAME="DepartmentID" value="<%=DepartmentID%>">
<input TYPE="hidden" NAME="UserID" value="<%=UserID%>">
</form>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -