?? payer_list.asp
字號:
<!--#include file="Conn.asp"-->
<!--#include file="Check.asp"-->
<!--#include file="Inc/Function.asp"-->
<%
Dim rs,sqltext
Dim id,per,counts
Dim co
Set rs=Server.Createobject("Adodb.RecordSet")
sqltext = "Select ID,Payer From [Payer] Order By ID Desc"
rs.Open sqltext,Conn,1,3
MaxPerPage=30
text="0123456789"
rs.PageSize=MaxPerPage
for i=1 to Len(Request.QueryString("page"))
checkpage = Instr(1,text,mid(Request.QueryString("page"),i,1))
if checkpage=0 then
exit for
end if
next
If checkpage<>0 then
If NOT IsEmpty(Request.QueryString("page")) Then
CurrentPage=Cint(Request.QueryString("page"))
If CurrentPage < 1 Then CurrentPage = 1
If CurrentPage > rs.PageCount Then CurrentPage = rs.PageCount
Else
CurrentPage= 1
End If
If not rs.eof Then rs.AbsolutePage = CurrentPage end if
Else
CurrentPage=1
End if
%>
<html>
<head>
<title>管理中心</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="Image/style.css" type=text/css rel=stylesheet>
<script language="JavaScript" src="Image/js.js"></SCRIPT>
</head>
<body text="#000000">
<script language="JavaScript" type="text/JavaScript">
function delpay()
{
if(confirm("確定要刪除此嗎?"))
return true;
else
return false;
}
</script>
<table width="98%" border="0" cellpadding="2" cellspacing="0" align="center" class=TableBorder>
<tr height="22" valign="middle" align="center">
<th colspan="3">所有報銷人 <a href="Payer_Add.asp" style="color:#ff0000">( 添加報銷人
) </a></th>
</tr>
<tr>
<td width="39%" height="25" class=forumrow><div align="center">報銷人</div></td>
<td width="37%" class=forumrow> <div align="center"></div>
<div align="center">報銷數量</div></td>
<td width="24%" class=forumrow> <div align="center">操作</div></td>
</tr>
<%
i=0
If rs.Eof Then
Response.Write "<tr><td colspan='8'>沒有該記錄!</td></tr>"
Else
Do While Not rs.Eof
id=rs(0)
per=rs(1)
Set co=Conn.Execute("Select Count(*) as cou From [PayList] Where Payer='"&per&"'")
counts=co("cou")
co.Close
Set co=Nothing
%>
<tr>
<td height="25"><div align="center"><%=per%></div></td>
<td> <div align="center"><%=counts%></div>
</td>
<td><div align="center"><a href="Payer_Edit.asp?id=<%=id%>">修改</a> | <a href="?action=del&id=<%=id%>" onClick="return delpay();">刪除</a></div></td>
</tr>
<%
i=i+1
if i >= MaxPerpage then exit do
rs.MoveNext
Loop
End if
%>
</table>
<%
showpage()
Response.Write "</html>"
If Request.QueryString("action") = "del" Then
Dim dd,delid
delid = Request("id")
Set dd = Conn.Execute("Delete * From [Payer] Where ID ="&delid)
Response.Redirect "Payer_List.asp"
End if
rs.Close
Conn.Close
Set rs = Nothing
Set Conn = Nothing
%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -