📄 admin_html_index.asp
字号:
<!--#include file="config.asp"-->
<%
dim founderr,errmsg
founderr=false
errmsg=""
if session("adminlogin")<>sessionvar then
founderr=true
errmsg=errmsg+"<br>"+"<li>你尚未登录,或者超时了!请<a href='index.asp'>重新登录</a>!"
call diserror()
response.end
end if
if session("flag")>2 then
errmsg=errmsg+"<br>"+"<li>你的管理权限不够!!</a>!"
call diserror()
response.end
end if
dim sort
sort=trim(Request("sort"))
'开始审核操作
if Request("action")="shen" then
id=Request("id")
sql="Select * from happywz_WEB where wwwid=" & id
Set rs=Server.CreateObject("Adodb.RecordSet")
rs.Open sql,conn,1,2
rs("isok")=true
rs.update
rs.Close
set rs=Nothing
response.redirect "admin_html_index.asp?sort="&Request("sort")
response.end
end if
'取消审核操作
if Request("action")="fou" then
id=Request("id")
sql="Select * from happywz_WEB where wwwid=" & id
Set rs=Server.CreateObject("Adodb.RecordSet")
rs.Open sql,conn,1,2
rs("isok")=false
rs.update
rs.Close
set rs=Nothing
response.redirect "admin_html_index.asp?sort="&Request("sort")
response.end
end if
'开始删除操作
if Request("actiond")="del" then
if Request("id")="" then
response.write"<SCRIPT language=JavaScript>alert('没有该信息,或者该信息已经删除。!');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end
end if
conn.execute "delete * from happywz_WEB where wwwid=" & Request("id")
response.write"<SCRIPT language=JavaScript>alert('信息删除成功,返回!');"
response.write"location.href='admin_html_index.asp?sort="&Request("sort")&"&action="&Request("action")&"'</SCRIPT>"
response.end
end if%>
<html>
<head>
<title>精彩网址 - 管理中心</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="css.css" type="text/css">
<SCRIPT LANGUAGE="JavaScript" SRC="inc/overlib2.js"></SCRIPT>
</head>
<body LEFTMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0" TOPMARGIN="0"><script>if(top==self)top.location="index.asp" </script>
<TABLE WIDTH="100%" BORDER="0" CELLPADDING="2" CELLSPACING="0" CLASS="HeaderTdStyle" >
<TR> <TD HEIGHT="26"
COLSPAN="2" ALIGN="center"><B>新登陆数据列表/管理</B></TD></TR> <TR BGCOLOR="#ffffff">
<TD WIDTH="85" HEIGHT="30"><B>管理导航:</B></TD><TD
HEIGHT="30">☆<A HREF="admin_html_index.asp?sort=<%=Request("sort")%>">数据列表</A></TD><FORM NAME="form1" METHOD="post" ACTION=""></FORM></TR>
</TABLE><TABLE WIDTH="99%" BORDER="0" CELLSPACING="0" CELLPADDING="5" ALIGN="CENTER"><TR><FORM NAME="form1" METHOD="post" ACTION=""><TD
HEIGHT="30" WIDTH="314"><FONT COLOR="#FF0000">网址搜索</FONT>: <INPUT TYPE="text" NAME="txtitle" SIZE="13"><SELECT NAME="weborurl"><OPTION VALUE="1">站名</OPTION><OPTION VALUE="2">网址</OPTION></SELECT><INPUT CLASS=buttonface TYPE="submit" VALUE="查 询" NAME="title2">
</TD></FORM><TD ALIGN="RIGHT"><SELECT ONCHANGE="if(this.options[this.selectedIndex].value!=''){location=this.options[this.selectedIndex].value;}" NAME="select2" >
<OPTION VALUE="admin_html_index.asp">全部分类</OPTION> <%
sql="select sortid,sort,sortstep from happywz_SORT order by bigid,sortid"
set rs=server.createobject("ADODB.Recordset")
rs.open sql,conn,1,1
while not rs.eof
%> <OPTION VALUE="?sort=<%=rs("sort")%>"<%if Request("sort")<>"" and (Request("sort"))=rs("sort") then%>selected<%end if%>><%if rs("sortstep")>0 then
for i=1 to rs("sortstep")%> -- <%next
end if%> <%=rs("sort")%></OPTION> <%
rs.movenext
wend
rs.Close()
set rs=nothing
%> </SELECT></TD></TR></TABLE><table border="0" width="99%" cellspacing="1" cellpadding="5" BGCOLOR="#0099CF" ALIGN="CENTER">
<tr BGCOLOR="#0099CF"> <td width="160" HEIGHT="26" VALIGN="top"><B>站点名称</B></td><td width="60" ALIGN="CENTER" VALIGN="top"><B>站点类别</B></td><td VALIGN="top"><B>加入日期</B></td><td width="36" ALIGN="CENTER"><B>推荐</B></td><td width="36" VALIGN="MIDDLE" ALIGN="CENTER"><B>修改</B></td><td width="36" ALIGN="CENTER"><B>删除</B></td></tr
><%
'action=trim(Request("action"))
txtitle=trim(Request("txtitle"))
if right(txtitle,1)="/" then txtitle=left(txtitle,len(txtitle)-1)
weborurl=Request("weborurl")
if txtitle="" then
if sort="" then
sql="select * from happywz_WEB order by addtime desc"
elseif sort<>"" then
sql="select * from happywz_WEB where wwwsort='"&sort&"' order by addtime desc"
end if
else
if weborurl="1" then
sql="select * from happywz_WEB where wwwweb like '%"&trim(txtitle)&"%' order by wwwid desc"
elseif weborurl="2" then
sql="select * from happywz_WEB where wwwurl like '%"&trim(txtitle)&"%' order by wwwid desc"
end if
end if
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
if rs.eof or rs.bof then%> <tr><td COLSPAN="11" height="20" ALIGN="CENTER" VALIGN="top"><B>暂时还没有加入数据</B></td></tr>
<%
else
n=0
if not isempty(Request("page")) then
pagecount=cint(Request("page"))
else
pagecount=1
end if
rs.pagesize=20
rs.AbsolutePage=pagecount
do while not rs.eof
%> <tr BGCOLOR="#EBEBEB"> <td height="20" BGCOLOR="#ffffff" VALIGN="top">
<IMG SRC="images/a.gif" ><A HREF="<%=rs("wwwurl")%>" TARGET="_blank" onMouseOver="MM_showHideLayers('Layer<%=n%>','','show')" onMouseOut="MM_showHideLayers('Layer<%=n%>','','hide')"><FONT COLOR="#0000FF"><%=rs("wwwweb")%></FONT></A>
<DIV ID="Layer<%=n%>" STYLE="position:absolute; width:260px; height:60px; z-index:2; visibility: hidden" ONMOUSEOVER="MM_showHideLayers('Layer<%=n%>','','show')" ONMOUSEOUT="MM_showHideLayers('Layer<%=n%>','','hide')">
<TABLE WIDTH=100% BORDER="0" CELLSPACING="0" CELLPADDING="2" CLASS="infotable">
<TR> <TD BGCOLOR="#FFF7EE">HITS:<%=rs("hits")%></TD></TR> <TR> <TD BGCOLOR="#FFF7EE" VALIGN="TOP">URL
:<%=rs("wwwurl")%></TD></TR> </TABLE></DIV></td><td height="20" ALIGN="CENTER" VALIGN="top" BGCOLOR="#ffffff"><%=rs("wwwsort")%></td><td height="20" BGCOLOR="#ffffff" VALIGN="top"><%=rs("addtime")%></td><td height="20" BGCOLOR=""#0099CF"" VALIGN="MIDDLE" ALIGN="CENTER">
<%
if rs("isok")=false then
response.write "<a href='admin_html_index.asp?id="&rs("wwwid")&"&sort="&Request("wwwsort")&"&action=shen'>×</a>"
else
response.write "<a href='admin_html_index.asp?id="&rs("wwwid")&"&sort="&Request("wwwsort")&"&action=fou'><font color=#FF0000>√</font></a>"
end if%></td><td height="20" BGCOLOR="#ffffff" VALIGN="MIDDLE" ALIGN="CENTER"><A HREF="admin_index_edit.asp?shuju=1&id=<%=rs("wwwid")%>">修改</A></td><td height="20" BGCOLOR=""#0099CF"" VALIGN="MIDDLE" ALIGN="CENTER"><A HREF="admin_html_index.asp?id=<%=rs("wwwid")%>&sort=<%=wwwsort%>&action=<%=action%>&actiond=del" onClick="{if(confirm('确定删除吗?')){return true;}return false;}">删除</A></td></tr>
<%
rs.movenext
n=n+1
if n>=rs.pagesize then exit do
loop
%> </table><TABLE WIDTH="97%" BORDER="0" CELLSPACING="0" CELLPADDING="0" ALIGN="center">
<FORM ACTION="admin_html_index.asp" METHOD="post"> <TR> <TD HEIGHT="22" WIDTH="30%">共计<%=rs.recordcount%>条记录</TD><TD HEIGHT="22" ALIGN="right" >
页次: <B><FONT COLOR=red><%=pagecount%></FONT>/<%=rs.pagecount%></B> <% if pagecount=1 and rs.pagecount<>pagecount and rs.pagecount<>0 then%>
<A HREF="admin_html_index.asp?page=<%=cstr(pagecount+1)%>&sort=<%=sort%>"> 下一页</A>
<% end if %> <% if rs.pagecount>1 and rs.pagecount=pagecount then %> <A HREF="admin_html_index.asp?page=<%=cstr(pagecount-1)%>&sort=<%=sort%>">
上一页</A> <%end if%> <% if pagecount<>1 and rs.pagecount<>pagecount then%> <A HREF="admin_html_index.asp?page=<%=cstr(pagecount-1)%>&sort=<%=sort%>">
上一页</A> <A HREF="admin_html_index.asp?page=<%=cstr(pagecount+1)%>&sort=<%=sort%>">
下一页</A> <% end if%> 直接到第 <SELECT NAME="page" CLASS="un_submit"> <%for i=1 to rs.pagecount%>
<OPTION VALUE="<%=i%>"><%=i%></OPTION> <%next%> </SELECT> 页 <INPUT TYPE="submit" NAME="go" VALUE="Go" CLASS="un_submit">
<INPUT TYPE="hidden" NAME="sort" VALUE="<%=sort%>"> </TD></TR> </FORM><%
end if
rs.close
set rs=nothing
conn.close
set conn=nothing
%> </TABLE><BR>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -