?? wageinf.asp
字號:
<!--#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.redirect "default.asp"
'--------------------------------------
'打開數據庫讀出編輯工資的權限
set conn=opendb("oabusy","conn","accessdsn")
set rs=server.createobject("adodb.recordset")
sql="select allow_edit_all_wageinf,allow_edit_dept_wageinf from userinf where username=" & sqlstr(oabusyusername)
rs.open sql,conn,1
cook_allow_edit_all_wageinf=rs("allow_edit_all_wageinf")
cook_allow_edit_dept_wageinf=rs("allow_edit_dept_wageinf")
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<link rel="stylesheet" href="css/css.css">
<script language="javascript1.2" src="js/openwin.js"></script>
<title>學校OA辦公自動化網站</title>
</head>
<body bgcolor="#eeeeee" topmargin="5" leftmargin="5">
<% call bghead() %>
<center>
<table>
<tr>
<td>
<b>教職工工資檔案</b>
</td>
<%
if cook_allow_edit_all_wageinf="yes" then
%>
<form action="wageinf.asp" method=get name="form1">
<td>
<select name="userdept" size=1 onChange="document.form1.submit();">
<%
'打開數據庫讀出部門
set conn=opendb("oabusy","conn","accessdsn")
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
%>
<%
if cook_allow_edit_all_wageinf="yes" or cook_allow_edit_dept_wageinf="yes" then
%>
<form action="wageinf.asp" method=get name="form2">
<td>
<input type="hidden" name="userdept" value="<%=firstdept%>">
<select name="username" size=1>
<%
set conn=opendb("oabusy","conn","accessdsn")
set rs=server.createobject("adodb.recordset")
sql="select name,username from userinf where userdept=" & sqlstr(firstdept) & " and userlevel<>'總管' 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="addwageinf.asp">
<td>
<input type="hidden" name="userdept" value="<%=firstdept%>">
<input type="hidden" name="username" value="<%=username%>">
<input type="submit" value="增加檔案">
</td>
</form>
<%
else
username=oabusyusername
end if
%>
</tr>
</table>
</center>
<%
call bgmid()
%>
<%
'打開數據庫讀出教職工姓名
set conn=opendb("oabusy","conn","accessdsn")
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 conn=opendb("oabusy","conn","accessdsn")
set rs=server.createobject("adodb.recordset")
sql="select * from wageinf where username=" & sqlstr(username)
rs.open sql,conn,1
while not rs.eof and not rs.bof
wagelevel=rs("wagelevel")
basewage=rs("basewage")
stafjob=rs("stafjob")
jobwage=rs("jobwage")
workyear=rs("workyear")
workyearwage=rs("workyearwage")
rentwage=rs("rentwage")
carwage=rs("carwage")
prize=rs("prize")
insurance=rs("insurance")
tax=rs("tax")
affairday=rs("affairday")
affairfund=rs("affairfund")
sickday=rs("sickday")
sickfund=rs("sickfund")
mustwage=rs("mustwage")
actwage=rs("actwage")
changreason=rs("changreason")
actdate=rs("actdate")
remark=rs("remark")
recname=rs("recname")
recdate=rs("recdate")
updatename=rs("updatename")
updatedate=rs("updatedate")
id=rs("id")
%>
<center>
<b>教師姓名:</b><%=name%>
<table border="0" cellpadding="0" cellspacing="0" width="95%">
<tr>
<td height="25" align="center" width="15%" style="border-left: 2 solid #000000; border-top: 2 solid #000000; border-bottom: 1 solid #000000">
<b>教師級別</b></td>
<td height="25" width="18%" style="border-left: 1 solid #000000; border-top: 2 solid #000000; border-bottom: 1 solid #000000"><%=checked3(wagelevel)%></td>
<td height="25" align="center" width="15%" style="border-left: 1 solid #000000; border-top: 2 solid #000000; border-bottom: 1 solid #000000"><b>基本工資</b></td>
<td height="25" width="18%" style="border-left: 1 solid #000000; border-top: 2 solid #000000; border-bottom: 1 solid #000000"><%=checked3(basewage)%></td>
<td height="25" align="center" width="15%" style="border-left: 1 solid #000000; border-top: 2 solid #000000; border-bottom: 1 solid #000000">
<b>教師職務</b></td>
<td height="25" style="border-left: 1 solid #000000; border-right: 2 solid #000000; border-top: 2 solid #000000; border-bottom: 1 solid #000000"><%=checked3(stafjob)%></td>
</tr>
<tr>
<td height="25" align="center" width="15%" style="border-left: 2 solid #000000; border-bottom: 1 solid #000000"><b>職務工資</b></td>
<td height="25" width="18%" style="border-left: 1 solid #000000; border-bottom: 1 solid #000000"><%=checked3(jobwage)%></td>
<td height="25" align="center" width="15%" style="border-left: 1 solid #000000; border-bottom: 1 solid #000000"><b>教職工工齡</b></td>
<td height="25" width="18%" style="border-left: 1 solid #000000; border-bottom: 1 solid #000000"><%=checked3(workyear)%></td>
<td height="25" align="center" width="15%" style="border-left: 1 solid #000000; border-bottom: 1 solid #000000"><b>工齡工資</b></td>
<td height="25" style="border-left: 1 solid #000000; border-right: 2 solid #000000; border-bottom: 1 solid #000000"><%=checked3(workyearwage)%></td>
</tr>
<tr>
<td height="25" align="center" width="15%" style="border-left: 2 solid #000000; border-bottom: 1 solid #000000"><b>獎金金額</b></td>
<td height="25" width="18%" style="border-left: 1 solid #000000; border-bottom: 1 solid #000000"><%=checked3(prize)%></td>
<td height="25" align="center" width="15%" style="border-left: 1 solid #000000; border-bottom: 1 solid #000000"><b>房租補貼</b></td>
<td height="25" width="18%" style="border-left: 1 solid #000000; border-bottom: 1 solid #000000"><%=checked3(rentwage)%></td>
<td height="25" align="center" width="15%" style="border-left: 1 solid #000000; border-bottom: 1 solid #000000"><b>車費補貼</b></td>
<td height="25" style="border-left: 1 solid #000000; border-right: 2 solid #000000; border-bottom: 1 solid #000000"><%=checked3(carwage)%>
</td>
</tr>
<tr>
<td height="25" align="center" width="15%" style="border-left: 2 solid #000000; border-bottom: 1 solid #000000"><b>事假天數</b></td>
<td height="25" width="18%" style="border-left: 1 solid #000000; border-bottom: 1 solid #000000"><%=checked3(affairday)%></td>
<td height="25" align="center" width="15%" style="border-left: 1 solid #000000; border-bottom: 1 solid #000000"><b>扣事假款</b></td>
<td height="25" width="18%" style="border-left: 1 solid #000000; border-bottom: 1 solid #000000"><%=checked3(affairfund)%></td>
<td height="25" align="center" width="15%" style="border-left: 1 solid #000000; border-bottom: 1 solid #000000"><b>病假天數</b></td>
<td height="25" style="border-left: 1 solid #000000; border-right: 2 solid #000000; border-bottom: 1 solid #000000"><%=checked3(sickday)%></td>
</tr>
<tr>
<td height="25" align="center" width="15%" style="border-left: 2 solid #000000; border-bottom: 1 solid #000000"><b>扣病假款</b></td>
<td height="25" width="18%" style="border-left: 1 solid #000000; border-bottom: 1 solid #000000"><%=checked3(sickfund)%></td>
<td height="25" align="center" width="15%" style="border-left: 1 solid #000000; border-bottom: 1 solid #000000"><b>交個人稅</b></td>
<td height="25" width="18%" style="border-left: 1 solid #000000; border-bottom: 1 solid #000000"><%=checked3(tax)%></td>
<td height="25" align="center" width="15%" style="border-left: 1 solid #000000; border-bottom: 1 solid #000000"><b>交保險費</b></td>
<td height="25" style="border-left: 1 solid #000000; border-right: 2 solid #000000; border-bottom: 1 solid #000000"><%=checked3(insurance)%></td>
</tr>
<tr>
<td height="25" align="center" width="15%" style="border-left: 2 solid #000000; border-bottom: 1 solid #000000"><b>應發金額</b></td>
<td height="25" width="18%" style="border-left: 1 solid #000000; border-bottom: 1 solid #000000"><%=checked3(mustwage)%></td>
<td height="25" align="center" width="15%" style="border-left: 1 solid #000000; border-bottom: 1 solid #000000"><b>實發金額</b></td>
<td height="25" width="18%" style="border-left: 1 solid #000000; border-bottom: 1 solid #000000"><%=checked3(actwage)%></td>
<td height="25" align="center" width="15%" style="border-left: 1 solid #000000; border-bottom: 1 solid #000000"><b>執行時間</b></td>
<td height="25" style="border-left: 1 solid #000000; border-right: 2 solid #000000; border-bottom: 1 solid #000000"><%=checked3(actdate)%></td>
</tr>
<tr>
<td height="25" align="center" width="15%" style="border-left: 2 solid #000000; border-bottom: 1 solid #000000"><b>變動原因</b></td>
<td colspan="5" height="25" width="85%" style="border-left: 1 solid #000000; border-right: 2 solid #000000; border-bottom: 1 solid #000000"><%=checked3(changreason)%></td>
</tr>
<tr>
<td height="25" align="center" width="15%" style="border-left: 2 solid #000000; border-bottom: 1 solid #000000"><b>備注說明</b></td>
<td colspan="5" height="25" width="85%" style="border-left: 1 solid #000000; border-right: 2 solid #000000; border-bottom: 1 solid #000000"><%=checked3(remark)%></td>
</tr>
</table>
<table width="95%" cellspacing="0" cellpadding="0">
<tr>
<td height="25" width="15%" align="center" style="border-left: 2 solid #000000; border-bottom: 1 solid #000000"><b>記 錄 人</b></td>
<td height="25" width="35%" style="border-left: 1 solid #000000; border-bottom: 1 solid #000000"><%=checked3(recname)%></td>
<td height="25" width="15%" align="center" style="border-left: 1 solid #000000; border-bottom: 1 solid #000000"><b>記錄時間</b></td>
<td height="25" width="35%" style="border-left: 1 solid #000000; border-right: 2 solid #000000; border-bottom: 1 solid #000000"><%=checked3(recdate)%></td>
</tr>
<tr>
<td height="25" width="15%" align="center" style="border-left: 2 solid #000000; border-bottom: 2 solid #000000"><b>更 改 人</b></td>
<td height="25" width="35%" style="border-left: 1 solid #000000; border-bottom: 2 solid #000000"><%=checked3(updatename)%></td>
<td height="25" width="15%" align="center" style="border-left: 1 solid #000000; border-bottom: 2 solid #000000"><b>更改時間</b></td>
<td height="25" width="35%" style="border-left: 1 solid #000000; border-right: 2 solid #000000; border-bottom: 2 solid #000000"><%=checked3(updatedate)%></td>
</tr>
</table>
<%
if cook_allow_edit_all_wageinf="yes" or cook_allow_edit_dept_wageinf="yes" then
%>
<table border="0" cellpadding="0" cellspacing="0" width="95%">
<tr><form method="post" action="editwageinf.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>
<%
end if
%>
<hr size=1 color=red width="95%">
<br>
</center>
<%
rs.movenext
wend
%>
<%
call bgback()
%>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -