?? add.asp
字號:
<!--#include file="conn.asp" -->
<HTML>
<HEAD>
<TITLE></TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background-color: #FFffff;
}
-->
</style>
<link href="style.css" rel="stylesheet" type="text/css">
</HEAD>
<BODY bgcolor="#FF0000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" >
<div align="center">
<table width="100%" border="0" cellspacing="5" cellpadding="5">
<tr>
<td> <div align="right">
<% If session("admin")<>"yes" Then
response.write("系統(tǒng)超時,您需要<font color=red><b>重新登陸</font></b>。 ")
response.end
Else %>
您現(xiàn)在處于管理狀態(tài)。
<%end if%>
</div></td>
</tr>
<tr>
<td> <%if request("act")="更新" and request("id")<>"" and session("nian")<>"" then
set rs2=server.createobject("adodb.recordset")
sql="select * from monthlu where id like '"&request("id")&"'"
rs2.open sql,conn,3,2
if rs2.eof or rs2.bof then
msg="沒有這個記錄。"
else
rs2("工號")=request("mid")
rs2("姓名")=request("name")
rs2("記件工資")=request("jjgz")
rs2("基本工資")=request("money")
rs2("工齡工資")=request("gz")
'all=request("jjgz")+request("money")+request("gz")+request("jiangjin")
'rs2("本月工資")=all
rs2("獎金")=request("jiangjin")
if request("xishu")>1 then
response.Write("錯誤,系數(shù)最大為1。")
response.end
else
if request("xishu")="" then
rs2("合格系數(shù)")=1
else
rs2("合格系數(shù)")=request("xishu")
end if
end if
rs2("年份")=session("nian")
rs2("月份")=session("yue")
rs2.update
msg="修改成功!"
end if
rs2.close
end if
'增加
if request("act")="增加" and request("mid")<>"" and session("nian")<>"" then
set rs2=server.createobject("adodb.recordset")
sql="select * from monthlu where 工號 like '"&request("mid")&"' and 月份 like '"&session("yue")&"' and 年份 like '"&session("nian")&"'"
rs2.open sql,conn,3,2
if rs2.eof or rs2.bof then
rs2.addnew
rs2("工號")=request("mid")
rs2("姓名")=request("name")
rs2("記件工資")=request("jjgz")
rs2("基本工資")=request("money")
rs2("工齡工資")=request("gz")
'all=request("jjgz")+request("money")+request("gz")+request("jiangjin")
'rs2("本月工資")=all
rs2("獎金")=request("jiangjin")
rs2("年份")=session("nian")
rs2("月份")=session("yue")
if request("xishu")>1 then
response.Write("錯誤,系數(shù)最大為1。")
response.end
else
if request("xishu")="" then
rs2("合格系數(shù)")=1
else
rs2("合格系數(shù)")=request("xishu")
end if
end if
rs2.update
msg="添加成功!"
else
msg="已經(jīng)有了這條記錄,不能重復(fù)添加"
end if
rs2.close
end if
conn.close
%></td>
</tr>
<tr>
<td><div align="center"><%= msg %>!<font color="#FF0000">兩秒鐘</font>后<a href="month.asp?page=<%=request("page")%>"><font color="#0000FF"><strong>返回</strong></font></a>。。</div></td>
</tr>
</table>
<meta http-equiv="refresh" content="2;URL=month.asp?page=<%=request("page")%>">
</div>
</BODY>
</HTML>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -