📄 car.asp
字号:
<!--#include file="articleconn.asp"-->
<!--#include file="../checkpost.asp"-->
<!--#include file="home1.asp"-->
<!--#include file="security.asp"-->
<%if session("flag")>3 then
response.write "<br><p align=center>您的操作权限不够!</p>"
response.end
end if
%>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<LINK href="inc/Admin_STYLE.CSS" rel="stylesheet" type="text/css">
<title>影视卡管理</title>
<script language="JavaScript">
function CheckAll(v)
{
var i;
for (i=0;i<document.forms.elements.length;i++)
{
var e = document.forms.elements[i];
e.checked = v;
}
}
function OnDelete()
{
var del, a, i;
del = new String("");
for(i = 0; i < document.forms.elements.length ; i ++)
{
var e = document.forms.elements[i];
if(e.name == 'selAnnounce')
{
if ( e.checked == true)
{
a = e.value;
del = del + a + ";";
}
};
}
if(del == "")
{
alert("请选择要删除的充值卡")
}
else
{
if(confirm("确定要删除吗?")==true)
{
document.forms.submit();
}
}
}
//-->
</script>
</head>
<script language="JavaScript">
<!--
function checkinput()
{
if (document.form2.not.value=="")
{
alert("请输入生成的数量!");
document.form2.not.focus();
return false;
}
if (document.form2.not.value < 1)
{
alert("最少输入1张!");
document.form2.not.focus();
return false;
}
return true;
}
-->
</script>
<style type="text/css">
<!--
.样式1 {
color: #FFFFFF;
font-weight: bold;
}
.样式3 {font-size: 9pt}
-->
</style>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<div align="center">
<center>
<!--#include file="top1.asp"-->
<form method="POST" action="carsave.asp?type=jd" onsubmit="if (!checkinput()) return false;" name="form2">
<table cellpadding="2" cellspacing="1" border="0" width="100%" class="border" align=center>
<tr align="center">
<td height=25 colspan=4 bgcolor="#429AEF" > <div align="left"><b><font color="#FFFFFF">自动增加包月充值卡:</font></b></div>
<tr>
<td width="50%" class="tdbg" height=23><span class="样式3">
<input type="text" name="dayer" size="4">
天
<select size="1" name="grad">
<option value="1" selected>普通会员卡</option>
<option value="2">白银会员卡</option>
<option value="3">黄金会员卡</option>
</select>
</span></td>
<td width="25%" class="tdbg 样式3"><input type="text" name="not" size="6">
张</td>
<td width="12%" class="tdbg 样式3"> <input type="text" name="paymoneyj" size="4"> 元</td>
<td width="13%" class="tdbg"><input name="B1" type="submit" value="增加"></td>
</tr>
</table>
</form>
<%
sql="select * from car where ok=0 order by id desc"
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "<p align='center'> 还 没 有 任 何 充 值 卡</p>"
else
totalPut=rs.recordcount
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
showpage totalput,MaxPerPage,"car.asp"
showContent
showpage totalput,MaxPerPage,"car.asp"
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
showpage totalput,MaxPerPage,"car.asp"
showContent
showpage totalput,MaxPerPage,"car.asp"
else
currentPage=1
showpage totalput,MaxPerPage,"car.asp"
showContent
showpage totalput,MaxPerPage,"car.asp"
end if
end if
end if
sub showContent
dim i
i=0
%>
<div align="center">
<center>
<table border="0" cellspacing="1" width="100%" class="border" bordercolorlight="#000000" bordercolordark="#FFFFFF" cellpadding="2" height="33" style="border-collapse: collapse" bordercolor="#111111">
<form action="car.asp" name="forms" method="post">
<tr bgcolor="#429AEF">
<td width="157" height="20" align="center"><b><font color="#FFFFFF">电影卡号</font></b></td>
<td width="177" height="20" align="center"><b><font color="#FFFFFF">电影卡密码</font></b></td>
<td width="113" height="20" align="center"><b><font color="#FFFFFF">可充天数</font></b></td>
<td width="101" height="20" align="center"><b><font color="#FFFFFF">面
值</font></b></td>
<td width="112" height="20" align="center"><span class="样式1">电影卡类型</span></td>
<td width="58" height="20" align="center"><b><font color="#FFFFFF">删除</font></b></td>
<td width="237" height="20" align="center"> <font color="#FFFFFF">
<input name="chkall" onClick="CheckAll(document.forms.chkall.checked)" type="checkbox" value="on">
<strong>全 选/</strong> <a href="javascript:OnDelete()"><font color="#ffffff"><strong>删
除</strong></font></a></font></td>
</tr>
<%do while not rs.eof%>
<tr bgcolor="#F3F5F5">
<td height="4" width="157" class="tdbg"> <p align="center"><%=rs("carid")%></td>
<td width="177" height="4" align="center" class="tdbg"><%=rs("carpws")%></td>
<td width="113" height="4" align="center" class="tdbg"><%=rs("day")%>
天</td>
<td width="101" height="4" align="center" class="tdbg"><%=rs("paymoney")%>
元</td>
<td width="112" height="4" align="center" class="tdbg"> <%if rs("oklook")=1 then%> 普通会员卡 <%elseif rs("oklook")=2 then%> 白银会员卡 <%elseif rs("oklook")=3 then%> 黄金会员卡 <%end if%> </td>
<td width="58" height="4" align="center" class="tdbg"> <a href="delcar.asp?id=<%=rs("id")%>"><font color="#000000">删除</font></a></td>
<td width="237" height="4" align="center" class="tdbg">
<input type="checkbox" name="selAnnounce" value="<%=cstr(rs("ID"))%>"></td>
</tr>
<% i=i+1
if i>=MaxPerPage then exit do
rs.movenext
loop
%>
</form>
</table>
</center>
</div>
<%
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 "<p align=""center""><form method=Post action="&filename&"?typeid="&typeid&">"
if CurrentPage<2 then
response.write "<font color='#000080'>首页 上一页</font> "
else
response.write "<a href="&filename&"?page=1&typeid="&typeid&">首页</a> "
response.write "<a href="&filename&"?page="&CurrentPage-1&"&typeid="&typeid&">上一页</a> "
end if
if n-currentpage<1 then
response.write "<font color='#000080'>下一页 尾页</font>"
else
response.write "<a href="&filename&"?page="&(CurrentPage+1)&"&typeid="&typeid&">"
response.write "下一页</a> <a href="&filename&"?page="&n&"&typeid="&typeid&">尾页</a>"
end if
response.write "<font color='#000080'> 页次:</font><strong><font color=red>"&CurrentPage&"</font><font color='#000080'>/"&n&"</strong>页</font> "
response.write "<font color='#000080'> 共<b>"&totalnumber&"</b>张 <b>"&maxperpage&"</b>张/页</font> "
response.write " <font color='#000080'>转到:</font><input type='text' name='page' size=4 maxlength=10 class=smallInput value="¤tpage&">"
response.write " <input class=buttonface type='submit' value='Goto' name='cndok'></span></p></form></p>"
end function
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
<p><br>
</p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -