📄 auditing_putouttable.asp
字号:
<%response.expires=0%>
<!--#include file="../asp/sqlstr.asp"-->
<%
'session.abandon
'Server.ScriptTimeOut=500
function opendb(DBPath,sessionname,dbsort)
dim conn
'if not isobject(session(sessionname)) then
Set conn=Server.CreateObject("ADODB.Connection")
'if dbsort="accessdsn" then conn.Open "DSN=" & DBPath
'if dbsort="access" then conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DBPath
'if dbsort="sqlserver" then conn.Open "DSN=" & DBPath & ";uid=wsw;pwd=wsw"
DBPath1=server.mappath("../db/jzud-oa.asa")
conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DBPath1
set session(sessionname)=conn
'end if
set opendb=session(sessionname)
end function
%>
<!--#include file="../asp/bgsub.asp"-->
<!--#include file="../asp/keepformat.asp"-->
<!--#include file="setpopedom.asp"-->
<%
oabusyname=request.cookies("oabusyname")
oabusyusername=request.cookies("oabusyusername")
oabusyuserid=request.cookies("oabusyuserid")
oabusyuserdept=request.cookies("oabusyuserdept")
oabusyuserlevel=request.cookies("oabusyuserlevel")
if oabusyusername="" or oabusyuserid="" then
response.write("<script language=""javascript"">")
response.write("window.top.location.href='default.asp';")
response.write("</script>")
response.end
end if
errstr=getpopedom("allow_auditing_workthings",oabusyusername)
if errstr<>"" then
response.redirect "../asp/disperrorinfo.asp?errorinfo="&errstr
response.end
end if
'on error resume next
set conn=opendb("oabusy","conn","accessdsn")
conn.begintrans
if request.form("ok")=" 提交 " then
recordnumber=request.form("recordnumber")
set rs2=server.createobject("adodb.recordset")
sql="select workthings_userthings.ID,workthings_type.auditingflag from workthings_userthings,workthings_type where workthings_userthings.recordid="&recordnumber&" and workthings_type.autoid=workthings_userthings.workthingsid"
rs2.open sql,conn,1
nowtime=cstr(date())&" "&cstr(time())
do while not rs2.eof
if rs2("auditingflag") then
explainx=replace(trim(request.form("T"&cstr(rs2("ID")))),"'","''")
sql1="update workthings_userthings set auditingidea="&request.form("R"&cstr(rs2("ID")))&",auditingusername='"&oabusyname&"',auditingexplain='"&explainx&"',auditingtime=#"&nowtime&"# where ID="&rs2("ID")
conn.execute(sql1)
end if
rs2.movenext
loop
sql2="update workthings_use set alreadyauditing=true where autoid="&recordnumber
conn.execute(sql2)
set rs2=nothing
if err.number<>0 then
conn.rollbacktrans
conn.close
response.redirect "../asp/disperrorinfo.asp?errorinfo=对不起,审核办公用品领用表出错!"
response.end
else
conn.committrans
end if
end if
set rs=server.createobject("adodb.recordset")
sql="select * from workthings_use,userinf where workthings_use.auditingflag=true and workthings_use.alreadyauditing=false and workthings_use.writeuserid=userinf.ID"
rs.open sql,conn,1
%>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta http-equiv="expires" content="no-cache">
<title>审核办公用品领用表</title>
<link rel="stylesheet" type="text/css" href="../css/css.css">
<script language="vbscript">
sub checkkey()
if window.event.keyCode >57 or window.event.keyCode <48 then
window.event.keyCode=0
end if
end sub
</script>
</head>
<body bgcolor="#ffffff" topmargin="5" leftmargin="5">
<%
%>
<center>
<table align="center">
<tr>
<td><b>审核办公用品领用表</b></td>
</tr>
</table>
</center>
<%
if rs.eof and rs.bof then
set rs=nothing
%>
<p><p>
<center><font color="#ee0000" size="+1">现在没有需要审核的办公用品领用表!</font></center>
<%
else
do while not rs.eof
set rs1=server.createobject("adodb.recordset")
sql1="select * from workthings_userthings,workthings_type where workthings_userthings.recordid="&rs("autoid")&" and workthings_userthings.workthingsid=workthings_type.autoid"
rs1.open sql1,conn,1
if not rs1.eof and not rs1.bof then
%>
<br>
<p align="center" style="margin-bottom: 0"><b><font color="#FF0000" size="3">办公用品领用表</font></b></p>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" width="500">
<tr>
<td>
<hr color="#FF0000" width="50%">
</td>
</tr>
</table>
</center>
</div>
<form method="POST" action="auditing_putouttable.asp">
<input type="hidden" name="recordnumber" value="<%=rs("autoid")%>">
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="500">
<tr>
<td>
<p align="center">领取人:<%=keepformat(rs("name"))%>
部门:<%=keepformat(rs("userdept"))%>
填表时间:<%=rs("writetabletime")%></td>
</tr>
</table>
</div>
<div align="center">
<center>
<table border="1" cellpadding="5" cellspacing="0" width="80%" bordercolorlight="#808080" bordercolordark="#CCCCCC" bgcolor="#ffffff">
<tr>
<td height="25" width="50" align="center" bgcolor="#D4D0C8">编号</td>
<td height="25" width="108" align="center" bgcolor="#D4D0C8">办公用品名称</td>
<td height="25" width="64" align="center" bgcolor="#D4D0C8">领取数量</td>
<td height="25" width="152" align="center" bgcolor="#D4D0C8">审核意见</td>
<td height="25" width="114" align="center" bgcolor="#D4D0C8">审核意见说明</td>
</tr>
<%
recordsums=1
do while not rs1.eof
%>
<tr>
<td height="25" width="50" align="center"><%=recordsums%></td>
<td height="25" width="108" align="center"><%=keepformat(rs1("workthingsname"))%></td>
<td height="25" width="64" align="center"><%=rs1("putoutnumber")%></td>
<td height="25" width="152" align="center">
<%
if rs1("auditingflag") then
%>
<input type="radio" value="true" checked name="R<%=rs1("ID")%>">同意领取<input type="radio" name="R<%=rs1("ID")%>" value="false">不同意领取
<%
else
response.write(" ")
end if
%>
</td>
<td height="25" width="114" align="center">
<%
if rs1("auditingflag") then
%>
<input type="text" name="T<%=keepformat(rs1("ID"))%>" size="14" value="">
</td>
<%
else
response.write(" ")
end if
%>
</tr>
<%
rs1.movenext
recordsums=recordsums+1
loop
%>
</table>
</center>
</div>
<p align="center"><input type="submit" value=" 提交 " name="ok">
<input type="reset" value=" 重填 " name="reset"></p>
</form>
<%
end if
set rs1=nothing
rs.movenext
loop
end if
'conn.close
set conn=nothing
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -