📄 yp_vip.asp
字号:
<%dbdns="../../"%>
<!--#include file="../../inc/conn.asp"-->
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<%if session("admin")="" then
response.redirect "../index.asp"
end if
if request("action")="vip" then
conn.execute("update yp Set vip=2 where id="&request("id"))
elseif request("action")="cvip" then
conn.execute("update yp Set vip=0 where id="&request("id"))
end if
%>
<%=citycss%>
<br>
<table width="97%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolorlight="#cccccc" bordercolordark="#FFFFFF">
<tr align=center bgcolor=#efefef>
<%
sql="select * from yp where key=true and vip=1 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 "暂无内容"
else
'分页的实现
listnum=20
Rs.pagesize=listnum
page=Request("page")
if (page-Rs.pagecount) > 0 then
page=Rs.pagecount
elseif page = "" or page < 1 then
page = 1
end if
Rs.absolutepage=page
'编号的实现
j=rs.recordcount
j=j-(page-1)*listnum
i=0
nn=request("page")
if nn="" then
n=0
else
nn=nn-1
n=listnum*nn
end if%>
<td width="4%" height=20>编号</td>
<td width=*>企业名称</td>
<td width="10%">通过申请</td>
<td width="10%">撤消申请</td>
</tr>
<%do while not rs.eof and i<listnum
n=n+1%>
<tr align=center height=20>
<td><%=n%></td>
<td align=left> <%=rs("coname")%></td>
<td><a href=yp_vip.asp?action=vip&id=<%=rs("id")%>>通过申请</a></td>
<td><a href=yp_vip.asp?action=cvip&id=<%=rs("id")%>>撤消申请</a></td>
</tr>
<%rs.movenext
i=i+1
j=j-1
loop%>
<tr>
<%filename="yp_vip.asp"%>
<%response.write "<form method=post action="&filename&">"%>
<td colspan=9 align=right bgcolor=#cccccc><%=Rs.recordcount%> 个企业 <%=listnum%> 个企业/页 共 <%=Rs.pagecount%> 页
<% if page=1 then %>
<%else%>
<a href=<%=filename%>><strong>|<<</strong></a>
<a href=<%=filename%>?page=<%=page-1%>><strong><<</strong></a>
<a href=<%=filename%>?page=<%=page-1%>><b>[<%=page-1%>]</b></a>
<%end if%>
<% if Rs.pagecount=1 then %>
<%else%>
<b>[<%=page%>]</b>
<%end if%>
<% if Rs.pagecount-page <> 0 then %>
<a href=<%=filename%>?page=<%=page+1%>><b>[<%=page+1%>]</b></a>
<a href=<%=filename%>?page=<%=page+1%>><strong>>></strong></a>
<a href=<%=filename%>?page=<%=Rs.pagecount%>><strong>>>|</strong></a>
<%end if%>
<%response.write "转到:<input type='text' name='page' class=input size=4 maxlength=10 value="&page&">"
response.write " <input type='submit' class=input value='>>' name='cndok'>"%> </td>
<%end if%></tr>
</form>
</table>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -