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

📄 adminguanggao.asp

📁 admin/admin.asp是WAP的后台管理登陆页面
💻 ASP
字号:
<% @LANGUAGE="VBSCRIPT" CODEPAGE="65001" %>
<%
'=================================================
' Copyright 2007-05 jinqiu. All Rights Reserved.
' Last Update: 2007-05-15   HTTP://www.wapfs.net
'=================================================
%>
<%
  if session("admin")="" then
  response.redirect "admin.asp"
  else
	if session("flag")>1 then
		response.write "<br/><p align=center>您没有操作的权限</p>"
		response.end
	end if
  end if

%>
<%Response.ContentType = "text/vnd.wap.wml; charset=utf-8"%>
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<!-- #include file="conn.asp" -->
<wml> 
<head>
<meta http-equiv='Cache-Control' content='no-Cache'/>
<meta http-equiv='Cache-Control' content='max-age=0'/>
</head>
<card id='main' title='广告管理' >
<p><%
function encodestr(str)
	dim i
	str=trim(str)
	if IsNull(str) then exit function
	str=replace(str,"<","&lt;")
	str=replace(str,">","&gt;")
	str=replace(str,"'","""")
	encodestr=replace(str,"  "," ")
end function

Set rs = Server.CreateObject("ADODB.Recordset")
sql="Select * from guanggao order by id desc"
rs.open sql,conn,1,1
if rs.eof then
response.write("没有广告!")
else
Page=Int(Abs(Request("page")))
IF not IsNumeric(Request("page")) Or IsEmpty(Request("page")) Then page=1
rs.pagesize = 1 '每页显示记录数
total = rs.RecordCount
mp = rs.pagesize
rs.absolutepage = page
i=0:k=0
do while not rs.eof and mp>0:k=k+1
%>
标题:<%=encodestr(rs("title"))%>
<br/>说明:<%=encodestr(rs("text"))%>
<br/>[<a href='editguanggao.asp?id=<%=rs("id")%>&amp;classid=<%=rs("classid")%>'>编辑</a>]  [<a href='delguanggao.asp?id=<%=rs("id")%>'>删除</a>]
<br/>点击:<%=rs("hit")%>
<%
mp=mp-1
rs.movenext
loop
%>
<br/><%
if page>rs.pagecount then Response.redirect("adminguanggao.asp?page="&rs.pagecount)
if page>1 then
response.Write("<a href='adminguanggao.asp?page=1'>&#x9996;&#x9875;</a>")
response.Write(" <a href='adminguanggao.asp?page="&page-1&"'>&#x4E0A;&#x4E00;&#x9875;</a> ")
end if
if page<rs.pagecount then
response.Write("<a href='adminguanggao.asp?page="&page+1&"'>&#x4E0B;&#x4E00;&#x9875;</a>")
response.Write(" <a href='adminguanggao.asp?page="&rs.pagecount&"'>&#x5C3E;&#x9875;</a>")
end if
response.Write("<br/>&#x5171;"&total&"个广告 ")
end if
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
<br/>------------
<br/><a href='addguanggao.asp'>添加广告</a>
<br/><a href='main.asp'>管理首页</a></p>
</card>
</wml>    

⌨️ 快捷键说明

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