?? systemmanager.asp
字號(hào):
<%@ Language=VBScript %>
<%
'判斷用戶是否登錄以及是否是系統(tǒng)管理員
if isempty(Session("ID")) or Session("IsSystemManager")=false then
Response.Redirect "../Login.asp"
end if
'連接系統(tǒng)數(shù)據(jù)庫
set conn = server.createobject ("adodb.connection")
conn.open "ASPData", "sa", "yourpassword"
set EmployeeInformation = conn.Execute(" select * from PSLogins order by " & Session("SystemOrder"))
'添加新用戶信息
if not IsEmpty(Request.Form("Add")) then
Response.Redirect "AddNewUser.asp"
end if
'刪除某個(gè)用戶信息
if not IsEmpty(Request.Form("Delete")) then
if not IsEmpty(Request.Form("SelectWho")) then
conn.Execute "delete from PSLogins where LoginID = '" & Request.Form("SelectWho") & "' "
TheMessage="記錄已被刪除"
set EmployeeInformation = conn.Execute(" select * from PSLogins order by Name ")
'修改某個(gè)用戶信息
else
TheMessage = "請(qǐng)?jiān)谙旅嫘薷膯T工信息"
end if
'修改某個(gè)用戶信息
elseif not IsEmpty(Request.Form("Modify")) then
if not IsEmpty(Request.Form("SelectWho")) then
Session("temp")= Request.Form("SelectWho")
Response.Redirect "ModifyUserInformation.asp"
else
TheMessage = "請(qǐng)?jiān)谙旅嫘薷膯T工信息"
end if
else
TheMessage = "請(qǐng)?jiān)谙旅嫘薷膯T工信息"
end if
%>
<HTML>
<HEAD>
<TITLE>系統(tǒng)管理員頁面</TITLE>
<META NAME="Generator" CONTENT="NetObjects Fusion 2.0.2 for Windows">
</HEAD>
<BODY BGCOLOR="">
<table width=800 border=0 bgcolor=#164DA8 cellspacing=1 cellpadding=2 align=center>
<tr bgcolor=white><td valign=center ><img src="../ASPLogo3.jpg" width=796 height=100></td></tr>
</table>
<table width="800" border="0" bordercolor="#164DA8" align="center" cellpadding="0" cellspacing="0">
<tr><td height="13"><img src=".././image/banner2.jpg" width="800" height="12"></td></tr>
</table>
<br>
<table WIDTH=100% border=0 bgcolor=#164DA8 cellspacing=1 cellpadding=2 align=center>
<tr><td colspan=3><font color=white><P ALIGN="CENTER">公司內(nèi)部辦公信息管理系統(tǒng)->員工信息查詢->系統(tǒng)管理員選項(xiàng) [當(dāng)前用戶-<% response.write Session("Name") %>]</FONT></font></td></tr>
<tr bgcolor=white >
<td><a href="../.././html/home.asp"><font color="#164DA8">返回內(nèi)網(wǎng)主頁</font></a></td>
<td align=center> <font color="#164DA8" ><% response.write TheMessage %></FONT></td>
<td align=right><a href="EmployeeInformation.asp"><font color="#164DA8">返回上一級(jí)網(wǎng)頁</font></a></td>
</tr>
</table>
<table width="100%" border="0" bordercolor="#164DA8" align="center" cellpadding="0" cellspacing="0">
<tr><td height="13"><img src=".././image/banner2.jpg" width="100%" height="12"></td></tr>
</table>
<br>
<FORM ACTION="SystemManager.asp" METHOD=POST>
<TABLE WIDTH=100% border=0 bgcolor=#164DA8 cellspacing=1 cellpadding=2 align=center>
<TR ><TD COLSPAN=14 align=center><font color=white>全部員工信息如下</font></TD></TR>
<TR VALIGN="center" ALIGN="center" bgcolor=white>
<td width=2%>選中</td><td width=5%>登錄名</td><td width=5%>姓名</td><td>電子郵件地址</td><td width=5%>部門</td><td>位置</td><td>內(nèi)部分機(jī)</td><td>家庭電話</td><td>手機(jī)</td><td>QQ號(hào)</td><td>家庭住址</td><td width=8%>生日</td><td width=5%>是否系統(tǒng)管理員</td><td width=5%>是否財(cái)務(wù)主管</td>
</TR>
<%
Do until EmployeeInformation.Eof
Response.write "<tr bgcolor=white>" _
& "<td align=center><input type=radio name=SelectWho value=" & EmployeeInformation("LoginID") & "> </td>" _
& "<td align=center><font face=arial>"& EmployeeInformation("LoginID") & "</font></td>" _
& "<td align=center><font face=arial>"& EmployeeInformation("Name") & "</font></td>" _
& "<td align=center><font face=arial>"& EmployeeInformation("EmailAddress") & "</font></td>" _
& "<td align=center><font face=arial>"& EmployeeInformation("Department") & "</font></td>" _
& "<td align=center><font face=arial>"& EmployeeInformation("Position") & "</font></td>" _
& "<td align=center><font face=arial>"& EmployeeInformation("InternalPhone") & "</font></td>" _
& "<td align=center><font face=arial>"& EmployeeInformation("HomePhone") & "</font></td>" _
& "<td align=center><font face=arial>"& EmployeeInformation("MobilePhone") & "</font></td>" _
& "<td align=center><font face=arial>"& EmployeeInformation("QQ") & "</font></td>" _
& "<td align=center><font face=arial>"& EmployeeInformation("HomeAddress") & "</font></td>" _
& "<td align=left><font face=arial>"& EmployeeInformation("Birthday") & "</font></td>" _
& "<td align=center><font face=arial>"& EmployeeInformation("IsSystemManager") & "</font></td>" _
& "<td align=center><font face=arial>"& EmployeeInformation("IsFinancialManager") & "</font></td></tr>"
EmployeeInformation.MoveNext
loop
%>
</TABLE>
<TABLE CELLPADDING=0 CELLSPACING=0 BORDER=1 WIDTH=100% align=center>
<TR VALIGN="top" ALIGN="center">
<TD WIDTH=100% align=center >
<INPUT TYPE="submit" NAME="Modify" VALUE="修改此用戶信息" style="border: 1px solid #3466BB; background-color: #B6CAEB; color: #3466BB">
<INPUT TYPE="submit" NAME="Delete" VALUE="刪除此用戶信息" style="border: 1px solid #3466BB; background-color: #B6CAEB; color: #3466BB">
<INPUT TYPE="submit" NAME="Add" VALUE="添加新用戶信息" style="border: 1px solid #3466BB; background-color: #B6CAEB; color: #3466BB"></TD>
</TD>
</TR>
</table>
<br>
</FORM>
</body>
</html>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -