📄 menprint.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("系统超时,您需要<font color=red><b>重新登陆</font></b>。 ")
response.end
Else %>
您现在处于管理状态。
<%end if%>
<strong><a href="javascript:self.location.reload();"><font color="#FF0000">刷新</font></a></strong>
</div></td>
</tr>
<tr>
<td> <strong>工人管理:</strong><br>
<br>
<%if request("delcp")<>""then
set rs=server.createobject("adodb.recordset")
id=request("id")
sql="select * from produc where id like '"&id&"' "
rs.open sql,conn,1,3
if rs.eof or rs.bof then
else%>
<script language="JavaScript" >
alert("删除了!");
</script>
<%
rs.delete
end if
rs.close
end if%>
<%set rs=server.createobject("adodb.recordset")
sql="select * from men where mid like '"&request("mid")&"'"
rs.open sql,conn,3,2
if rs.eof or rs.bof then
if request("mid")<>"" and request("name")<>"" and request("gongling")<>"" and request("act")<>"" then
rs.addnew
rs("mid")=request("mid")
rs("gongling")=request("gongling")
if request("te")<>"" then
rs("tel")=request("te")
end if
if request("ad")<>"" then
rs("add")=request("ad")
end if
rs("name")=request("name")
if request("MONEY")="" then
rs("money")=0
else
rs("money")=request("money")
end if
rs.movenext
ms=" <b>添加成功</b>"
end if
else
ms=" <b>添加失败,已经有了这个序号,请更换序号。</b>"
end if
rs.close%>
<%
'修改
if request("act2")<>"" and request("mmid")<>"" and request("ling")<>"" and request("name2")<>"" then
set rs=server.createobject("adodb.recordset")
sql="select * from men where mid like '"&request("mmid")&"'"
rs.open sql,conn,3,2
if rs.eof or rs.bof then
ms2="错误"
else
rs("gongling")=request("ling")
rs("name")=request("name2")
if request("tel2")<>"" then
rs("tel")=request("tel2")
end if
if request("ad2")<>"" then
rs("add")=request("ad2")
end if
if request("MONEY2")="" then
rs("money")=0
else
rs("money")=request("money2")
end if
rs.update
ms2=" <b>修改成功</b>"
end if
rs.close
end if
%>
<%if request("del")="yes" then
set rs=server.createobject("adodb.recordset")
id=request("id")
sql="select * from men where id like '"&id&"' "
rs.open sql,conn,1,3
if rs.eof or rs.bof then
else%>
<script language="">
//question = confirm("你确认删除吗?")
//if (question !="0"){
//de="yes";
alert("删除了!");
</script>
<%
rs.delete
end if
rs.close
end if%>
<%set rs=server.createobject("adodb.recordset")
sql="select * from men order by mid asc"
rs.open sql,conn,3,2
if rs.eof or rs.bof then
gid=1
%>
<table width="100%" border="0" cellpadding="2" cellspacing="2" class="front">
<tr>
<td><div align="center">目前还没有。</div></td>
</tr>
</table>
<%else
gid=rs("mid")+1
pgsize=8
page=request.querystring("page")
rs.pagesize=pgsize
pgnm=rs.pagecount
if page=""or clng(page)<1 then page=1
if clng(page)>pgnm then page=pgnm
if pgnm>0 then rs.absolutepage=page
count=0%>
<table width="100%" border="0" cellpadding="1" cellspacing="1" class="front">
<tr>
<td bgcolor="#F2EADF" ><div align="left" class="gb4">现有记录:<font color="#FF0000"><%=rs.recordcount %></font>共<font color="#FF0000">
<%= pgnm %></font> 页,当前页:<font color="#0033FF"><%= page %> </font><a href=?page=1>第一页</a> <a href=?page=<%=pgnm%>>最后一页</a>
<a href=?page=<%=page+1%>>下一页</a>
<a href=?page=<%=page-1%>>上一页</a>
</div></td>
</tr>
</table><br>
<% do while not rs.eof and count<rs.pagesize %>
<table width="100%" border="0" cellpadding="2" cellspacing="2" class="front">
<tr>
<td width="12%"><strong>工号:</strong></td>
<td width="17%"><%= rs("mid") %></td>
<td width="12%"><strong>姓名:</strong></td>
<td width="22%"><%= rs("name") %></td>
<td width="15%"><strong>基本工资:</strong></td>
<td width="22%"><%=rs("money") %></td>
</tr>
<tr>
<td>工龄:</td>
<td><font color="#000000"><%= rs("gongling") %></font></td>
<td><font color="#000000">工龄工资:</font></td>
<td><font color="#000000"> <%= rs("gongling") %> X
<%set rs3=server.createobject("adodb.recordset")
sql="select money from config"
rs3.open sql,conn,1,3
%><%=rs3("money")%>
<%gz=rs3("money")*rs("gongling")%>
=<%=gz%><%rs3.close%></font></td>
<td><font color="#000000">联系电话:</font></td>
<td><font color="#000000"> <%=rs("tel") %></font></td>
</tr>
<tr>
<td colspan="6"><div align="left"></div>
<font color="#000000">家庭住址:<%=rs("add") %></font></td>
</tr>
<tr>
<td colspan="6">
<hr size="1" noshade></td>
</tr>
</table>
<%
if not rs.eof or not rs.bof then rs.movenext
count=count+1
loop
rs.movelast
gid=rs("mid")+1
end if
%>
</td>
</tr>
</table>
</div>
</BODY>
</HTML> <% rs.close
conn.close%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -