admin_add_main.asp
资源名称:wap.rar [点击查看]
上传用户:sking1122
上传日期:2020-09-24
资源大小:1005k
文件大小:3k
源码类别:
手机WAP编程
开发平台:
ASP/ASPX
- <!--#include file=admin_sb.asp-->
- <%
- const PageSize=15 '一页15条记录
- %><%
- '====================================================================
- ' 请你保留这段说明,这并不会影响你的速度. 电脑交流:http://www.cnscu.cn
- ' 程序制作:横云 掌上校园收倾心整理收集于互联网,感谢你的支持!
- ' 升级时间: 2008-2-5 主页地址:HTTP://wap.cnscu.cn
- ' E-Mail: cnscu@126.com 客服QQ:554904632 QQ群:30493504 QQ群2:46659883
- '====================================================================
- %> <tr bgcolor="#799ae1">
- <td class="blu">ID</td>
- <td class="blu">主题栏目名称</td>
- <td class="blu">操作</td>
- <td class="blu">排序</td>
- </tr>
- <%
- dim sql,h,i
- Set Rs = Server.CreateObject("Adodb.Recordset")
- Sql = "SELECT * from wap_lm order by pid asc"
- Rs.Open Sql,conn,1,1
- Page = Request("Page")
- Rs.PageSize = PageSize
- if not (rs.bof and rs.eof) then
- IF Not IsEmpty(Page) Then
- IF Not IsNumeric(Page) Then '判断Page是否为数字
- Page=1
- Else
- Page=Cint(Page) '转换成短整形Integer
- End IF
- IF Page > Rs.PageCount Then
- Rs.AbsolutePage = Rs.PageCount '设置当前显示页等于最后一页
- ElseIF Page <= 0 Then
- Rs.AbsolutePage = 1 '设置当前页等于第一页
- Else
- Rs.AbsolutePage = Page '如果大于零,显示当前页等于接收的页数
- End IF
- Else
- Rs.AbsolutePage = 1
- End IF
- Page = Rs.AbsolutePage
- For i=1 to Rs.PageSize
- If Rs.Eof Then
- exit For
- End If
- %>
- <tr bgcolor="#eeeeee" class=TBBG9>
- <td width="10%"><%=rs("id")%></td>
- <td width="35%">
- <%=ubb(rs("nxn"))%></a></td>
- <%=ubb(rs("txt"))%></td>
- <td width="15%"><a href="admin_add_main.asp?Action=edit&id=<%=rs("id")%>">修改</a>
- <% if session("flag")="1" or session("flag")="2" then%>
- <a href="admin_add_main.asp?Action=del&id=<%=rs("id")%>">删除栏目</a>
- <%end if%>
- </td>
- <td width="10%"><input type="text" class=fminpt name="classID<%=i%>" size="4" value="<%=rs("pid")%>" maxlength="12" onkeyup='this.value=this.value.replace(/D/gi,"")'>
- </td>
- </tr>
- <%
- Rs.MoveNext
- Next
- %>
- <tr bgcolor="#eeeeee">
- <td colspan="4" > <div align="center">
- <%
- if page<=1 then
- Response.Write ("[首页][上一页]")
- else
- Response.Write("[<a href=admin_add_main.asp?Page=1>首页</a>]")
- Response.Write("[<a href=admin_add_main.asp?Page=" & (Page-1) & ">上一页</a>]")
- end if
- if page>=Rs.PageCount then
- Response.Write ("[下一页][尾页]")
- else
- Response.Write("[<a href=admin_add_main.asp?Page=" & (Page+1) & ">下一页</a>]")
- Response.Write("[<a href=admin_add_main.asp?Page=" & Rs.PageCount & ">尾页</a>]")
- end if
- Response.Write("[页次:<font color=red>" & page & "</font>/" & Rs.PageCount)
- Response.Write("][共" & Rs.RecordCount & "条 <font color=red>"& Rs.PageSize & "</font>条/页]")
- %>
- </div></td>
- </tr>
- <tr bgcolor="#eeeeee">
- <td colspan="4" > <div align="center">栏目排序,序号越小越排前!<br/>
- <input type="hidden" name="page" value="<%=page%>">
- <input type=submit name=提交 value=修改排序 class=fmbtn>
- <input type=reset name=取消 value=清 除 class=fmbtn>
- </div></td>
- </tr>
- <%
- else
- %>
- <tr bgcolor="#eeeeee" class=TBBG9>
- <td colspan="4" > <div align="center">
- 暂无主题栏目,请添加!<br/><a href='admin_add_main.asp?Action=add'>添加主题栏目</a>
- </div></td>
- </tr>
- <%
- end if
- Rs.close
- set rs=nothing
- %>