⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 show.asp

📁 wapgo网址导航整站源码,WAP源码,更多登陆http://xywap.cn
💻 ASP
字号:
<%
if session("admin")="" then
  response.redirect "admin.asp"
end if
%>
<!--#include file="conn.asp"-->
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>显 示 设 置</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>

<body>
<br><br>
<div align="center"><center>
<table cellspacing="0" width="80%" border="1" cellpadding="0" cellspacing="0" bordercolor="#999999">
<tr>
<td width="100%" bgcolor="#999999" height="20">
<font color="#FFFFFF"><center><p><b>显 示 设 置</b></font>
</td>
</tr>
<tr align="center">
<td width="100%">
<%
p=cint(request("p"))
if p="" or p<1 then p=1

set rs=server.createobject("ADODB.Recordset")
rsstr="select * from class order by ClassID asc"
rs.open rsstr,conn,1,2

maxpage=int((rs.recordcount-1)/10)+1
if p>maxpage then p=maxpage
%>
<table border="0" cellspacing="1" width="785">
<tr>
<td width="59" align="center" height="30">
栏目编号</td>
<td width="102" align="center" height="30">
栏目名称</td>
<td width="116" align="center" height="30">
栏目操作</td>
<td width="125" height="30">
显示状态
</td>
<td colspan="2" align="center">
显示操作
</td>
</tr>
<%
if rs.recordcount > 0 then
rs.Move((p-1)*10)
dim j
j=1
do while ((not rs.EOF) and j<=10)
%>
<tr>
<td width="59" align="center" height="30">
<%=((p-1)*10+j)%>
</td>
<td width="102" align="center" height="30">
<a href="urlx.asp?classid=<%=rs("classid")%>"><%=rs("ClassName")%></a>
</td>
<td width="116" align="center" height="30">
[-<a href="edit.asp?ids=<%=rs("ClassId")%>">编辑</a>&nbsp;<a href="del.asp?ids=<%=rs("ClassId")%>">删除</a>-]
</td>
<td width="125" height="30">
<% if rs("show")=1 then %>
显示
<% else %>
未显示
<% end if %>
</td>
<form name="show" method="POST" action="showok.asp">
<td width="232" height="30">
设置显示:
<select name="show" value="<%=rs("show")%>">
<option value="0">不显示</option>
<option value="1">显示</option>
</select>
</td>
<td width="132"><input type="submit" value="提  交" name="title"></td></tr>
<input type="hidden" name="id" value="<%=rs("classid")%>">
</form>
<%
j=j+1
rs.movenext
loop
%>
<tr>
<td colspan="4" align="right" height="30">
<%
if p*10<rs.recordcount then response.write("<a href='show.asp?p=" & p+1 & "'>[下一页]</a>&nbsp;")
if p>1 then response.write("<a href='show.asp?p=" & p-1 & "'>[上一页]</a>&nbsp;")
if p*10<rs.recordcount or p>1 then response.write("(" & p & "/" & (int((rs.recordcount-1)/10)+1) & ")&nbsp;&nbsp;")
%>
</td>
<td>
<%
if p*10<rs.recordcount or p>1 then%>
<form name="goto" method="POST" action="show.asp">
<input name="p" type="text" emptyok="true" size="3" maxlength="4" value="<%if p>=maxpage then response.write(p-1) else response.write(p+1)%>"/>
<input type="submit" value="提  交" name="title">
</form>
<%end if%>
</td>
</tr>
<%
rs.Close
set rs=nothing
end if
%>
</table>
</table>
</center>
</div>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -