?? worker_show.asp
字號:
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="../login/check_power.asp"-->
<%
if check_power("員工管理")=0 then
response.redirect("/login/check_false.asp")
else%>
<%
set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = "dsn=hotel;"
Recordset1.Source = "SELECT * FROM view_worker_basic"
Recordset1.CursorType = 3
Recordset1.CursorLocation = 2
Recordset1.LockType = 3
Recordset1.Open
Recordset1_numRows = 0
%><%
if request.querystring("page")="" then
nowpage=1
else
nowpage=Cint(request.querystring("page"))
end if
pagenumb=Recordset1.recordcount \ Application("pagesize")
if Recordset1.recordcount Mod Application("pagesize")<>0 then
pagenumb=pagenumb+1
end if
if nowpage > pagenumb then
nowpage=1
end if
%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script language="JavaScript">
<!--
function goworker_seach(){
location.assign("worker_seach.asp");
}
function goworker_add(){
location.assign("worker_add.asp");
}
function goindex(){
location.assign("../index.asp");
}
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
//-->
</script>
</head>
<body bgcolor="#FFFFFF">
<table width="100%" border="1" cellspacing="0" cellpadding="0" bordercolorlight="#000000" bordercolordark="#FFFFFF">
<tr>
<td>員工ID</td>
<td>登錄用戶名</td>
<td>工作卡號</td>
<td>姓名</td>
<td>性別</td>
<td>出生年月日</td>
<td>工作職務</td>
<td>來店日期</td>
<td> </td>
<td> </td>
<td> </td>
</tr><%
recno=0
while not recordset1.eof
recno=recno+1
if (recno <= Application("pagesize") * nowpage) and (recno > Application("pagesize") * (nowpage-1))then
%><tr>
<td><%=(Recordset1("id").Value)%> </td>
<td><%=(Recordset1("login").Value)%> </td>
<td><%=(Recordset1("card").Value)%> </td>
<td><%=(Recordset1("name").Value)%> </td>
<td><%=(Recordset1("sex").Value)%> </td>
<td><%=(Recordset1("birthday").Value)%> </td>
<td><%=(Recordset1("worksite").Value)%> </td>
<td><%=(Recordset1("godate").Value)%> </td>
<td><a href=worker_edit.asp?id=<%=Recordset1("id").value%>>修改</a></td>
<td><a href=worker_del.asp?id=<%=Recordset1("id").value%>>刪除</a></td>
<td><a href=worker_power.asp?id=<%=Recordset1("id").value%>>分配權限</a></td>
</tr><%
end if
recordset1.movenext
Wend
%></table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<form name="form1" method="post" action="">
<input type="button" name="Button" value="新增員工" onclick="goworker_add()">
<input type="button" name="Button" value="查詢員工" onclick="goworker_seach()">
當前頁:
<select name="gopage" onChange="MM_jumpMenu('parent',this,0)"><%
for i=1 to pagenumb
%><option value="worker_show.asp?page=<%=(i)%>" <%if i=nowpage then%> selected <%end if%>><%=(i)%></option><%
next%></select>
共<%=(pagenumb)%>頁
<input type="button" name="Button2" value="返 回" onClick="goindex()">
</form>
</td>
</tr>
</table>
</body>
</html>
<%end if%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -