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

📄 admin_index.asp

📁 完整的网址站
💻 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
'---将数据添加到数据表happywz_WEB中
if Request("action")="add" then
id=Request("id")
sql="Select * from happywz_WEBURL where id=" & id
Set rs=Server.CreateObject("Adodb.RecordSet")
rs.Open sql,conn,1,2
	rs("sh")=2
	rs.update
	web=rs("web")
	url=rs("url")
	sort=rs("sort")
rs.Close
set rs=Nothing
addtime=now()
conn.execute "insert into happywz_WEB (wwwweb,wwwurl,wwwsort,addtime) values ('"&web&"','"&url&"','"&sort&"','"&addtime&"') "
response.redirect "admin_index.asp?sort="&Request("sort")
response.end
end if


'开始审核操作
if Request("action")="shen" then
id=Request("id")
sql="Select * from happywz_WEBURL where id=" & id
Set rs=Server.CreateObject("Adodb.RecordSet")
rs.Open sql,conn,1,2
	rs("sh")=1
	rs("adate")=now()
	rs.update
rs.Close
set rs=Nothing

response.redirect "admin_index.asp?sort="&Request("sort")
response.end
end if

'取消审核操作
if Request("action")="fou" then
id=Request("id")
sql="Select * from happywz_WEBURL where id=" & id
Set rs=Server.CreateObject("Adodb.RecordSet")
rs.Open sql,conn,1,2
	rs("sh")=0
	rs.update
rs.Close
set rs=Nothing

response.redirect "admin_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_WEBURL where id=" & Request("id")

response.write"<SCRIPT language=JavaScript>alert('信息删除成功,返回!');"
response.write"location.href='admin_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">

</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> <TD WIDTH="85" HEIGHT="30" BGCOLOR="#ffffff"><B>管理导航:</B></TD><TD 
HEIGHT="30" BGCOLOR="#ffffff">☆<A HREF="admin_index.asp?action=nopass&sort=<%=Request("sort")%>">此类未审核数据</A>  ☆<A HREF="admin_index.asp?action=pass&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="title"> 
</TD></FORM><TD ALIGN="RIGHT"><SELECT ONCHANGE="if(this.options[this.selectedIndex].value!=''){location=this.options[this.selectedIndex].value;}" NAME="select2" > 
<OPTION VALUE="admin_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 valign="top" BGCOLOR="#0099CF"> <td width="195"><B>站点名称</B></td><td width="74" ALIGN="CENTER"><B>站点类别</B></td><td width="47"><B>点击</B></td><td width="164"><B>加入日期</B></td><td width="50" ALIGN="CENTER"><B>收录</B></td><td width="50" ALIGN="CENTER"><B>修改</B></td><td width="50" ALIGN="CENTER"><B>审核</B></td><td width="52" ALIGN="CENTER"><B>删除</B></td></tr
  ><%
		sort=trim(Request("sort"))
		action=trim(Request("action"))
		txtitle=trim(Request("txtitle"))
		if right(txtitle,1)="/" then txtitle=left(txtitle,len(txtitle)-1)
		weborurl=Request("weborurl")
		set rs=server.createobject("adodb.recordset")               
                sql="select * from happywz_WEBURL order by id desc"
		if txtitle="" then
			if sort="" and action="pass" then
				sql="select * from happywz_WEBURL where sh<>0 order by id desc"
			elseif sort="" and action="nopass" then
				sql="select * from happywz_WEBURL where sh=0 order by id desc"
			elseif sort<>"" and action="" then
				sql="select * from happywz_WEBURL where sort='"&sort&"' order by id desc"
			elseif sort<>"" and action="pass" then
				sql="select * from happywz_WEBURL where sort='"&sort&"' and sh<>0 order by id desc" 
			elseif sort<>"" and action="nopass" then
				sql="select * from happywz_WEBURL where sort='"&sort&"' and sh=0 order by id desc"  
			end if    
		else
			if weborurl="1" then
				sql="select * from happywz_WEBURL where web like '%"&trim(txtitle)&"%' order by id desc" 
			elseif weborurl="2" then
				sql="select * from happywz_WEBURL where url like '%"&trim(txtitle)&"%' order by id desc" 
			end if
		end if     
                rs.open sql,conn,1,1
		if rs.eof or rs.bof then%> <tr valign="top"><td COLSPAN="11" height="20" ALIGN="CENTER"><B>暂时还没有加入数据</B></td></tr> 
<% 
else
n=0 
i=1
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 valign="MIDDLE" BGCOLOR="#EBEBEB"> <td BGCOLOR="#ffffff" WIDTH="195"> 
<IMG SRC="images/a.gif" ><a href="<%=rs("url")%>" onMouseOver="MM_showHideLayers('Layer<%=n%>','','show')" onMouseOut="MM_showHideLayers('Layer<%=n%>','','hide')" TARGET="_blank" ><FONT COLOR="#0000FF"><%=rs("web")%></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" WIDTH="35">邮件:</TD><TD BGCOLOR="#FFF7EE"><%=rs("lang")%></TD></TR> 
<TR> <TD BGCOLOR="#FFF7EE" VALIGN="TOP" >简介:</TD><TD BGCOLOR="#FFF7EE"><%=rs("info")%></TD></TR> 
</TABLE></DIV></td><td BGCOLOR="#ffffff" ALIGN="CENTER" WIDTH="74"><%=rs("sort")%></td><td BGCOLOR="#ffffff" WIDTH="47"><%=rs("hits")%></td><td BGCOLOR="#ffffff" ALIGN="CENTER" WIDTH="164"><%=rs("adate")%></td><td BGCOLOR=""#0099CF"" ALIGN="CENTER" WIDTH="50"> 
<%
if  rs("sh")>1  then
	response.write "<font color=#FF0000>√</font>"
else
	response.write "<a href='admin_index.asp?id="&rs("id")&"&sort="&Request("sort")&"&action=add'>×</a>"
end if%></td><td BGCOLOR="#ffffff" ALIGN="CENTER" WIDTH="50"><A HREF="Admin_Index_Edit.asp?shuju=2&id=<%=rs("id")%>">修改</A></td><td BGCOLOR=""#0099CF"" ALIGN="CENTER" WIDTH="50"> 
<%
if  rs("sh")=0  then
	response.write "<a href='admin_index.asp?id="&rs("id")&"&sort="&Request("sort")&"&action=shen'>×</a>"
else
	response.write "<a href='admin_index.asp?id="&rs("id")&"&sort="&Request("sort")&"&action=fou'><font color=#FF0000>√</font></a>"
end if%></td><td BGCOLOR="#ffffff" ALIGN="CENTER" WIDTH="52"><A HREF="admin_index.asp?id=<%=rs("id")%>&sort=<%=sort%>&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="99%" BORDER="0" CELLSPACING="0" CELLPADDING="0" ALIGN="CENTER"> 
<FORM ACTION="admin_index.asp?action=<%=Request("action")%>" METHOD="post"> <TR> 
<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_index.asp?page=<%=cstr(pagecount+1)%>&sort=<%=sort%>&action=<%=Request("action")%>"> 
下一页</A> <% end if %> <% if rs.pagecount>1 and rs.pagecount=pagecount then %> <A HREF="admin_index.asp?page=<%=cstr(pagecount-1)%>&sort=<%=sort%>&action=<%=Request("action")%>"> 
上一页</A> <%end if%> <% if pagecount<>1 and rs.pagecount<>pagecount then%> <A HREF="admin_index.asp?page=<%=cstr(pagecount-1)%>&sort=<%=sort%>&action=<%=Request("action")%>"> 
上一页</A> <A HREF="admin_index.asp?page=<%=cstr(pagecount+1)%>&sort=<%=sort%>&action=<%=Request("action")%>"> 
下一页</A> <% end if%> &nbsp; 直接到第 <SELECT NAME="select"> <%for i=1 to rs.pagecount%> 
<OPTION VALUE="<%=i%>"><%=i%></OPTION> <%next%> </SELECT> 页 <INPUT TYPE="submit" NAME="go2" 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><TABLE WIDTH="99%" BORDER="0" CELLPADDING="2" CELLSPACING="1" BGCOLOR="#0099CF" ALIGN="CENTER" > 
<TR BGCOLOR="#0099CF"> <TD HEIGHT="22" 
COLSPAN="2" ALIGN="center"><B>操作说明</B></TD></TR> <TR BGCOLOR="#ffffff"> <TD WIDTH="87" HEIGHT="30"><B>操作说明:</B></TD><TD 
HEIGHT="30"><LI><FONT COLOR="#FF0000">红色</FONT>字体代表已完成要操作项<li><FONT COLOR="#FF0000">收录</FONT>指收录到网址库,只有收录后才能出现更新的HTML页中!</TD></TR> 
</TABLE><SCRIPT LANGUAGE="JavaScript" SRC="inc/overlib2.js"></SCRIPT> 
</body>
</html>

⌨️ 快捷键说明

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