?? kamore.asp
字號:
<!--#include file="conn.asp" -->
<%if request("delall")<>"" and request("delkid")<>"" then
set rs=server.createobject("adodb.recordset")
sql="select * from daylu where 卡號 like '"&request("delkid")&"' "
rs.open sql,conn,1,3
if rs.eof or rs.bof then
else
do while not rs.eof or rs.bof
rs.delete
if not rs.eof or not rs.bof then rs.movenext
loop
%> <script language=VBScript>
msgbox "刪除了!"
</script><%
end if
rs.close
end if%>
<%if request("act")="del" then
set rs=server.createobject("adodb.recordset")
sql="select * from daylu where id like '"&request("idd")&"' "
rs.open sql,conn,1,3
if rs.eof or rs.bof then
else%>
<script language=VBScript>
msgbox "刪除了!"
</script>
<%
rs.delete
end if
rs.close
end if%>
<%if request("idm")<>"" and request("卡號")<>"" and request("工序號")<>"" and request("工資")<>"" then
set rs=server.createobject("adodb.recordset")
sql="select * from daylu where id like'"&request("idm")&"'"
rs.open sql,conn,3,2
if rs.eof or rs.bof then
response.Write("error")
else
rs("卡號")=request("卡號")
rs("貨號")=request("型號")
if request("型號")<>"" then
rs("型號")=request("貨號")
else
rs("型號")=" "
end if
rs("工資")=request("工資")
rs("工序")=request("工序")
rs("工序號")=request("工序號")
rs("工號")=request("工號")
rs("數量")=request("數量")
rs("日期")=request("日期")
rs("時間")=time()
he=request("數量")*request("工資")
rs("合計工資")=he
rs.update
%>
<script language=VBScript>
msgbox "更新成功!"
</script>
<%
end if
rs.close
end if%>
<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><%if request("kid")<>"" then%>
卡號<font color="#FF0000"><%=request("kid")%></font> <a href="?delkid=<%=request("kid")%>&delall=yes"><strong><font color="#FF0000">刪除這個卡的所有記錄</font></strong></a>
<%end if%><br>
<table width="100%" border="0" cellspacing="2" cellpadding="2">
<tr>
<td>
<form name="form2" method="post" action="">
<div align="right">工序卡號:
<input name="kid" type="text" id="kid">
<input name="s" type="submit" id="s" value="查詢詳細">
<a href="?"><font color="#FF0000">列出所有</font></a>
</div>
</form></td>
</tr>
</table>
<%set rs=server.createobject("adodb.recordset")
if request("kid")="" then
sql="select * from daylu order by 日期 desc"
else
sql="select * from daylu where 卡號 like "&request("kid")&" order by 日期 desc"
end if
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
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&kid=<%=request("kid")%>>第一頁</a> <a href=?page=<%=pgnm%>&kid=<%=request("kid")%>>最后一頁</a>
<a href=?page=<%=page+1%>&kid=<%=request("kid")%>>下一頁</a>
<a href=?page=<%=page-1%>&kid=<%=request("kid")%>>上一頁</a>
</div></td>
</tr>
</table><br>
<table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#CCCCCC" class="front">
<tr bgcolor="#E7E7E7">
<td><strong>記錄號</strong></td>
<td><strong>工序</strong></td>
<td><strong>工號</strong></td>
<td><strong>單價</strong></td>
<td><strong>完成數量</strong></td>
<td><strong>卡號</strong></td>
<td><strong>貨號</strong></td>
<td><strong>型號</strong></td>
<td><strong>錄入時間</strong></td>
<td colspan="3"><strong>操作</strong></td>
</tr>
<% do while not rs.eof and count<rs.pagesize %>
<tr bgcolor="#FFFFFF">
<td> <div align="left"><%= rs("id") %></div></td>
<td><%= rs("工序") %></td>
<td><div align="left"><%= rs("工號") %></div></td>
<td><div align="left"><%=rs("工資") %></div></td>
<td><div align="left">
<% =rs("數量")%>
</div></td>
<td><%= rs("卡號") %></td>
<td><%= rs("型號") %></td>
<td><%= rs("貨號") %></td>
<td><div align="left">
<% =rs("日期")%>
<% =rs("時間")%>
</div></td>
<td> <a href="?act=modi&idm=<%=rs("id")%>"><font color="#0000FF">修改</font></a> </td>
<td colspan="2"><a href="?act=del&idd=<%=rs("id")%>"><font color="#FF0000">刪除</font></a></td>
</tr>
<%
if not rs.eof or not rs.bof then rs.movenext
count=count+1
loop
rs.movelast
end if
%>
<tr bgcolor="#FFFFFF">
<td colspan="12"> </td>
</tr>
</table>
<%if request("idm")<>"" then
set rs3=server.createobject("adodb.recordset")
sql="select * from daylu where id like "&request("idm")&""
rs3.open sql,conn,3,1
if rs3.eof or rs3.bof then
response.Write("沒有此記錄")
else%>
<table width="100%" border="0" cellspacing="2" cellpadding="2">
<tr>
<td> <form name="form1" method="post" action="">
<strong>修改記錄:</strong><%= rs3("id") %><br>
<br>
工序:
<input name="工序號" disabled type="text" id="工序號" value="<%=rs3("工序號")%>" size="8" maxlength="8">
工號:
<input name="工號" type="text" id="工號" value="<%=rs3("工號")%>" size="8" maxlength="8">
單價:
<input name="工資" type="text" id="工資2" value="<%=rs3("工資")%>" size="8" maxlength="8">
完成量:
<input name="數量" type="text" id="數量2" value="<%=rs3("數量")%>" size="8" maxlength="8">
<br>
卡號:
<input name="卡號" type="text" id="卡號" value="<%=rs3("卡號")%>" size="8" maxlength="8">
貨號:
<input name="貨號" type="text" id="貨號" value="<%=rs3("型號")%>" size="8" maxlength="8">
型號:
<input name="型號" type="text" id="型號" value="<%=rs3("貨號")%>" size="8" maxlength="8">
日期:
<input name="日期" type="text" id="日期" value="<%=rs3("日期")%>" size="10" maxlength="10">
<input name="act" type="submit" id="act" value="更新">
<input name="idm" type="hidden" id="idm" value="<%=request("idm")%>">
<input name="工序" type="hidden" id="工序" value="<%=rs3("工序")%>">
<input name="工序號" type="hidden" id="工序號" value="<%=rs3("工序號")%>">
</form></td>
</tr>
</table>
<%
end if
rs3.close
end if%>
</td>
</tr>
</table>
</div>
</BODY>
</HTML> <% rs.close
conn.close%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -