?? punish.asp
字號:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="css/css.css">
<meta http-equiv="expires" content="no-cache">
<title>企業辦公自動化IE37-OA系統</title>
</head>
<body bgcolor="#ffffff" topmargin="5" leftmargin="5">
<%response.expires=0%>
<!--#include file="asp/sqlstr.asp"-->
<!--#include file="asp/bgsub.asp"-->
<!--#include file="asp/opendb.asp"-->
<!--#include file="asp/checked.asp"-->
<!--#include file="asp/keepformat.asp"-->
<%
'-----------------------------------------
oabusyname=request.cookies("oabusyname")
oabusyusername=request.cookies("oabusyusername")
oabusyuserdept=request.cookies("oabusyuserdept")
oabusyuserlevel=request.cookies("oabusyuserlevel")
if oabusyusername="" then
response.write("<script language=""javascript"">")
response.write("window.top.location.href='default.asp';")
response.write("</script>")
response.end
end if
'--------------------------------------
'打開數據庫,讀出權限
set conn=opendb("oabusy","conn","accessdsn")
set rs=server.createobject("adodb.recordset")
sql="select * from userinf where username=" & sqlstr(oabusyusername)
rs.open sql,conn,1
cook_allow_edit_all_rewpuninf=rs("allow_edit_all_rewpuninf")
cook_allow_see_all_personinf=rs("allow_see_all_personinf")
cook_allow_edit_dept_rewpuninf=rs("allow_edit_dept_rewpuninf")
cook_allow_see_dept_personinf=rs("allow_see_dept_personinf")
%>
<center>
<table align="center">
<tr>
<td>
<%
if cook_allow_see_all_personinf="no" and cook_allow_see_dept_personinf="no" then
response.write "<td><font size=3 color=red>對不起,你不能查看員工獎懲檔案!</font></td>"
rs.close
set rs=nothing
conn.close
response.end
end if
%>
<b>員工獎懲檔案</b>
</td>
<%
if cook_allow_edit_all_rewpuninf="yes" then
%>
<form action="punish.asp" method=get name="form1">
<td>
<select name="userdept" size=1 onChange="document.form1.submit();">
<%
'打開數據庫讀出部門
set rs=server.createobject("adodb.recordset")
sql="select DISTINCT userdept from userinf"
rs.open sql,conn,1
if not rs.eof and not rs.bof then firstdept=rs("userdept")
if request("userdept")<>"" then firstdept=request("userdept")
while not rs.eof and not rs.bof
%>
<option value="<%=rs("userdept")%>"<%=selected(firstdept,rs("userdept"))%>><%=rs("userdept")%></option>
<%
rs.movenext
wend
%>
</select>
</td>
</form>
<%
else
firstdept=oabusyuserdept
end if
%>
<form action="punish.asp" method=get name="form2">
<td>
<input type="hidden" name="userdept" value="<%=firstdept%>">
<select name="username" size=1 onchange="document.addform.username.value=document.form2.username.value;">
<%
set rs=server.createobject("adodb.recordset")
sql="select name,username from userinf where userdept=" & sqlstr(firstdept) & " and forbid='no'"
rs.open sql,conn,1
if not rs.eof and not rs.bof then username=rs("username")
if request("username")<>"" then username=request("username")
while not rs.eof and not rs.bof
%>
<option value="<%=rs("username")%>"<%=selected(username,rs("username"))%>><%=rs("name")%></option>
<%
rs.movenext
wend
%>
</select>
<td>
<input type="submit" name="submit" value="查詢">
</td>
</form>
<form method="post" action="addrewpuninf.asp" name="addform">
<td>
<input type="hidden" name="userdept" value="<%=firstdept%>">
<input type="hidden" name="username" value="<%=username%>">
<%
if cook_allow_edit_all_rewpuninf="yes" or cook_allow_edit_all_rewpuninf="yes" then
%>
<input type="submit" value="增加檔案">
<%end if%>
</td>
</form>
</tr>
</table>
</center>
<%
'打開數據庫讀出員工姓名
set rs=server.createobject("adodb.recordset")
sql="select name from userinf where username=" & sqlstr(username)
rs.open sql,conn,1
name=rs("name")
%>
<br>
<center><b><%=name%>的獎懲檔案</b></center>
<br>
<%
'打開數據庫,讀出員工職位變動數據庫
set rs=server.createobject("adodb.recordset")
sql="select * from rewpuninf where username=" & sqlstr(username)
rs.open sql,conn,1
while not rs.eof and not rs.bof
rewpunname=rs("rewpunname")
rewpundate=rs("rewpundate")
rewpunfile=rs("rewpunfile")
rewpunsort=rs("rewpunsort")
rewpuntype=rs("rewpuntype")
remark=rs("remark")
recname=rs("recname")
recdate=rs("recdate")
updatename=rs("updatename")
updatedate=rs("updatedate")
id=rs("id")
%>
<center>
<table border="1" cellpadding="5" cellspacing="0" width="95%" bordercolorlight="#808080" bordercolordark="#d4d0c8">
<tr>
<td width="15%" align="center" height="25"><b>員工姓名</b></td>
<td colspan="3" width="85%" height="25" bgcolor="#FFFFFF"><%=name%>
</td>
</tr>
<tr>
<td width="15%" align="center" height="25"><b>獎懲名稱</b></td>
<td colspan="3" width="35%" height="25" bgcolor="#FFFFFF"><%=keepformat(rewpunname)%>
</td>
</tr>
<tr>
<td width="15%" align="center" height="25"><b>獎懲時間</b></td>
<td height="25" bgcolor="#FFFFFF"><%=rewpundate%>
</td>
<td width="15%" align="center" height="25"><b>獎懲文號</b></td>
<td height="25" bgcolor="#FFFFFF"><%=keepformat(checked3(rewpunfile))%>
</td>
</tr>
<tr>
<td width="15%" align="center" height="25"><b>獎懲類型</b></td>
<td height="25" bgcolor="#FFFFFF"><%=keepformat(checked3(rewpunsort))%>
</td>
<td width="15%" align="center" height="25"><b>獎懲方式</b></td>
<td height="25" bgcolor="#FFFFFF"><%=keepformat(checked3(rewpuntype))%>
</td>
</tr>
<tr>
<td width="15%" align="center" height="25"><b>獎懲原因<br>
備注說明</b></td>
<td colspan="3" width="85%" height="25" bgcolor="#FFFFFF"><%=keepformat(checked3(remark))%>
</td>
</tr>
<tr>
<td width="15%" align="center" height="25"><b>記
錄 人</b></td>
<td width="35%" height="25" bgcolor="#FFFFFF"><%=checked3(recname)%>
</td>
<td width="15%" align="center" height="25"><b>記錄時間</b></td>
<td width="35%" height="25" bgcolor="#FFFFFF"><%=recdate%>
</td>
</tr>
<tr>
<td width="15%" align="center" height="25"><b>更
改 人</b></td>
<td height="25" bgcolor="#FFFFFF"><%=updatename%>
</td>
<td width="15%" align="center" height="25"><b>更改時間</b></td>
<td height="25" bgcolor="#FFFFFF"><%=updatedate%>
</td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="95%">
<tr><form method="post" action="editrewpuninf.asp">
<td align=right><input type="submit" value="編 輯">
<input type="hidden" name="userdept" value="<%=firstdept%>">
<input type="hidden" name="username" value="<%=username%>">
<input type="hidden" name="id" value=<%=id%>>
</td>
</form>
</tr>
</table>
<br>
</center>
<%
rs.movenext
wend
%>
<div align="center">
<center>
<table>
<tr>
<td height=19>
<table border="0" cellpadding="0" cellspacing="0" width="610" height="19">
<tr>
<td width="100%" height=20><p align="center"><font color="#808080">IE37 © <a href="http://www.ie37.com" target="_blank">IE37.com</a></font></td>
</tr>
</table>
</td>
</tr>
<%
conn.close
set conn=nothing
%>
</table>
</center>
</div>
</body>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -