?? yck2.asp
字號:
<!--#include file="conn.asp"-->
<!--#include file="adminset.asp"-->
<%if session("admin")="" then
response.Write "<script language='javascript'>alert('網絡超時或您還沒有登陸!');window.location.href='login.asp';</script>"
response.End
end if
'if session("flag")>1 then
'response.Write "<div align=center><font size=80 color=red><b>您沒有此項目管理權限!</b></font></div>"
'response.End
'end if
'if qx6<>1 then
'response.Write "<div align=center><font size=80 color=red><b>您沒有此項目管理權限!</b></font></div>"
'response.End
'end if
%>
<html>
<head>
<title>動感商城系統</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../css.css" rel="stylesheet" type="text/css">
<script>
function IsDigit()
{
return ((event.keyCode >= 48) && (event.keyCode <= 57));
}
</script>
</head>
</head>
<body topmargin="0" leftmargin="0" marginheight="0" marginwidth="0">
<center>
<table width="100%" border="0" cellpadding="0" cellspacing="0" background="images/right_top2.gif">
<tr>
<td width="1%"> </td>
<td width="99%"><table width="100%" border="0" cellspacing="0" cellpadding="5">
<tr>
<td width="30%" height="32" style="font-size:14px;color:#000000"> <strong>在線扣款</strong></td>
<td width="70%" align="right"> </td>
</tr>
</table></td>
</tr>
</table>
<br>
<table border="0" width="90%" cellspacing="1" cellpadding="3" style="border-collapse: collapse" align=center bgcolor="#9DB2D4">
<form method="post" action="yckset.asp?action=add1">
<tr height=25 bgcolor="#F0F3F8">
<td width="13%" align=center>在線扣款</td>
<td width="37%" align=center>
扣款用戶
<input name="username" type="text" class="wenbenkuang" id="username" size="20"> </td>
<td width="37%" align=center>
扣款金額
<input name="je" type="text" class="wenbenkuang" id="je" ONKEYPRESS="event.returnValue=IsDigit();" size="18"> </td>
<td width="13%" align=center><input type="submit" name="Submit2" value="添加" class="go-wenbenkuang"></td>
</tr>
<tr height=25 bgcolor="#F0F3F8">
<td colspan="4" align=center>備注
<textarea name="bz" cols="80" rows="6" class="wenbenkuang" id="bz" ></textarea> </td>
</tr>
</form>
</table>
<br><%
Const MaxPerPage=20
dim totalPut
dim CurrentPage
dim TotalPages
dim j
dim sql
if Not isempty(request("page")) then
currentPage=Cint(request("page"))
else
currentPage=1
end if
Set rs = Server.CreateObject("ADODB.Recordset")
rs.open "SELECT * From shop_yck where lx=1 order by id",conn,1,1
if rs.eof And rs.bof then
Response.Write "<p align='center' class='contents'> 對不起,目前沒有記錄!</p>"
else
totalPut=rs.recordcount
if currentpage<1 then
currentpage=1
end if
if (currentpage-1)*MaxPerPage>totalput then
if (totalPut mod MaxPerPage)=0 then
currentpage= totalPut \ MaxPerPage
else
currentpage= totalPut \ MaxPerPage + 1
end if
end if
if currentPage=1 then
showContent
showpage totalput,MaxPerPage,"yck2.asp"
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
showContent
showpage totalput,MaxPerPage,"yck2.asp"
else
currentPage=1
showContent
showpage totalput,MaxPerPage,"yck2.asp"
end if
end if
end if
sub showContent
dim i
i=0
%>
<table border="0" width="90%" cellspacing="1" cellpadding="3" style="border-collapse: collapse" align=center bgcolor="#9DB2D4">
<tr align=center bgcolor="#C7D3E6" height=25>
<td>ID</td>
<td>扣款用戶</td>
<td>扣款金額</td>
<td>操作</td>
<td>IP</td>
<td>時間</td>
<td>備注</td>
<td>刪除</td>
</tr>
<%
do while not rs.eof
%>
<tr height=25 bgcolor="#F0F3F8">
<td align=center><%=rs("ID")%></td>
<td align=center> <input type="hidden" name="id" value="<%=rs("id")%>">
<a href="listuser.asp?username=<%=trim(rs("username"))%>"><%=trim(rs("username"))%></a> </td>
<td align=center> <%=trim(rs("je"))%> </td>
<td align=center><%=trim(rs("admin"))%></td>
<td align=center><%=trim(rs("ip"))%></td>
<td align=center><%=trim(rs("czdate"))%></td>
<td align=center> <%=trim(rs("bz"))%> </td>
<td align=center> <a href="yckset.asp?action=del1&id=<%=rs("id")%>">刪除</a>
</td>
</tr>
<%i=i+1
if i>=MaxPerPage then Exit Do
rs.movenext
loop
rs.close
set rs=nothing%>
</table><%
End Sub
Function showpage(totalnumber,maxperpage,filename)
Dim n
If totalnumber Mod maxperpage=0 Then
n= totalnumber \ maxperpage
Else
n= totalnumber \ maxperpage+1
End If
'//////////////////
Response.Write "<form method=Post action="&filename&">"
'//////////////////
Response.Write "<p align='center' class='contents'> "
If CurrentPage<2 Then
Response.Write "<font class='contents'>首頁 上一頁</font> "
Else
'///////////////////
Response.Write "<a href="&filename&"?page=1 class='contents'>首頁</a> "
Response.Write "<a href="&filename&"?page="&CurrentPage-1&" class='contents'>上一頁</a> "
'//////////////////
End If
If n-currentpage<1 Then
Response.Write "<font class='contents'>下一頁 尾頁</font>"
Else
'////////////////////////
Response.Write "<a href="&filename&"?page="&(CurrentPage+1)&" class='contents'>"
Response.Write "下一頁</a> <a href="&filename&"?page="&n&" class='contents'>尾頁</a>"
'/////////////////////
End If
Response.Write "<font class='contents'> 頁次:</font><font class='contents'>"&CurrentPage&"</font><font class='contents'>/"&n&"頁</font> "
Response.Write "<font class='contents'> 共有"&totalnumber&"條 "&maxperpage&"條/頁</font> "
Response.Write "<font class='contents'>轉到:</font><input type='text' name='page' size=2 maxlength=10 class=smallInput value="¤tpage&">"
Response.Write " <input type='submit' class='contents' value='GO' name='cndok'></form>"
End Function
%>
</center>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -