📄 adminindex.asp
字号:
<!--#include file = "public.asp"-->
<%on error resume next%>
<%if session("admintype")<>"common" and session("admintype")<>"admin" then response.Redirect "index.asp"%>
<%
text=request("text")
option1=request("option")
linktype=request("linktype")
agree=request("agree")
if linktype="全部" or linktype="" then
linktype=""
linktype1=""
else
linktype1=" and linktype='"&linktype&"'"
end if
select case agree
case 2
agree=""
case 1
agree1=" and mark=true"
case 0
agree1=" and mark=false"
end select
%>
<%
Set rso=conn.Execute("select * from foption")
select case option1
case 1
SQL="Select * From friend where SiteName like '%"&text&"%'"&linktype1&""&agree1&" order by MyDate desc"
case 2
SQL="Select * From friend where url like '%"&text&"%'"&linktype1&""&agree1&" order by MyDate desc"
case 3
SQL="Select * From friend where Description like '%"&text&"%'"&linktype1&""&agree1&" order by MyDate desc"
case else
SQL="Select * From friend order by MyDate desc"
end select
Set rs=conn.Execute(SQL)
%>
<%
Set rs=Server.CreateObject("ADODB.RecordSet")
rs.open SQL,Conn,1,1
if not rs.eof then
if rso("showmodal")=2 then rs.PageSize=rso("backrecord")*rso("col") else rs.PageSize=rso("backrecord")
PageNo=REQUEST("Page")
if PageNo="" or PageNo=0 then PageNo=1
RS.AbsolutePage=PageNo
TSum=rs.pagecount
RowCount=rs.PageSize
PageNo=PageNo+1
PageNo=PageNo-1
if CINT(PageNo)>1 then
if CINT(PageNo)>CINT(TSum) then
response.Write("对不起没有您想要的页数")
Response.End
end if
end if
if PageNo<0 then
response.Write("没有这一页!")
Response.End
End if
end if
%>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>自助友情链接</title>
<style type="text/css">
<!--
.style1 {color: #222222}
-->
</style>
<link rel="stylesheet" href="css.css" type="text/css">
</head>
<body bgcolor="#FFFFFF"> <!--#include file = "admintop.asp"-->
<script language="javascript">
var rImg = "images/nobanner.gif";
function errorImg(X, Y) {
if (Y == null) {
X.src = rImg;
}
else {
X.src = Y;
}
}
</script>
<table width="681" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="100%" height="147" colspan="4">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="9point" align="center">
<tr>
<td width="100%" height="153">
<form action="progress.asp" method="post" name="form" id="form">
<TABLE width=681 height="35" border=0 align=center cellPadding=3 cellSpacing=0>
<TBODY>
<TR>
<TD style="LETTER-SPACING: 1px" width=81% class="9point" height="25">共有记录
<%=rs.recordcount%> 个 第 <%=PageNo%> 页/共 <%=rs.pagecount%>
页</TD>
</TR>
</TBODY>
</TABLE>
<table border="0" align="center" cellpadding="2" cellspacing="0" class="9point" width="681" height="66" >
<tr>
<td colspan="8">
<table width="100%" border="0" align="center" cellspacing="0" cellpadding="0" height="1">
<tr>
<td background="images/line.gif"></td>
</tr>
</table>
</td>
</tr>
<tr bgcolor="#F4F9FD">
<td height="23">
<div align="center">网站图标</div>
</td>
<td height="23">
<div align="center">加入时间</div>
</td>
<td height="23">
<p align="center">类别
</td>
<td align="center" height="23">
<div align="center">点击</div>
</td>
<td align="center" height="23" bgcolor="#F4F9FD">网站简介</td>
<td align="center" height="23">状态</td>
<td align=center height="23">
修改</td>
<td align=center height="23">操作</td>
</tr>
<tr>
<td colspan="8">
<table width="100%" border="0" align="center" cellspacing="0" cellpadding="0" height="1">
<tr>
<td background="images/line.gif"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="9" colspan="8"> </td>
</tr>
<%
DO WHILE NOT rs.EOF AND RowCount>0
%>
<tr>
<td align="center">
<%if (rs("sitelogo")<>"") and (rs("sitelogo")<>" ") then%>
<a href="index.asp?goto=<%=rs("id")%>" target="_blank"> <img src="<%=rs("sitelogo")%>" onerror="errorImg(this)" width="88" height="31" border="0">
</a>
<%end if%>
</td>
<td>
<div align="center">
<% =year(rs("MyDate"))&"-"&month(rs("MyDate"))&"-"&day(rs("MyDate")) %>
</div>
</td>
<td align="center">
<div align="center"><font color=#222222>
<% =rs("linktype") %>
</font> </div>
</td>
<td align="center">
<% =rs("siteclick") %>
</td>
<td align="center" width="37%">
<div align="left">
<% =rs("Description") %>
</div>
</td>
<td align="center">
<% if rs("mark") then %>
已认证
<% else%>
未认证
<% end if%>
<%if rs("show")=1 then%>
<br>
<span class="style1">首页</span>
<%end if%>
</td>
<td align="center" ><a href="admin_edit.asp?id=<%=rs("id")%>">修改</a>
</td>
<td align="center">
<input name="<%=rs("id")%>" type="checkbox" id="<%=rs("id")%>" value="on">
</td>
</tr>
<tr >
<td align="center"><a href="<% =rs("URL") %>" target="_blank" class="pinkbg">
<% =rs("SiteName") %></a></td>
<td></td>
<td align="center" class="jnfont5"></td>
<td align="center"></td>
<td align="center"></td>
<td align="center"></td>
<td align="center" ></td>
<td align="center"></td>
</tr>
<tr >
<td align="center" colspan="8">
<table width="100%" border="0" align="center" cellspacing="0" cellpadding="0" height="4">
<tr>
<td background="images/line.gif"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="center" height="3"></td>
<td height="3"></td>
<td align="center" class="jnfont5" height="3"></td>
<td align="center" height="3"></td>
<td align="center" height="3"></td>
<td align="center" height="3"></td>
<td align="center" height="3" ></td>
<td align="center" height="3"></td>
</tr>
<%
RowCount = RowCount - 1
rs.movenext
loop
%>
</table>
<TABLE width=681 height="5" border=0 align=center cellPadding=3 cellSpacing=0 class="9point">
<tr>
<td width="81%" style="LETTER-SPACING: 1px">
<%if TSum>10 then
if PageNo mod 10=0 then
currid=PageNo
currid1=PageNo-9
else
if TSum mod 10=0 then
currid=int(PageNo/10)*10+10
else
if int(PageNo/10)=int(TSum/10) then currid=(TSum/10)*10 else currid=int(PageNo/10)*10+10
end if
currid1=int(PageNo/10)*10+1
end if
else
currid=TSum mod 10
currid1=int(TSum/10)*10+1
end if%>
分页:<font face=webdings>
<%if PageNo=1 then%>
<span style="color: #FF0000">9</span>
<%else%>
<a href="adminindex.asp?Page=1<%="&linktype="&linktype&"&text="&text&"&option="&option1&"&agree="&agree%><%if session("webid")<>"" then response.Write("&username="&session("webid"))%>">9</a>
<%end if%>
<%if PageNo>10 then%>
<a href="adminindex.asp?Page=<%=currid1-1&"&linktype="&linktype&"&text="&text&"&option="&option1&"&agree="&agree%><%if session("webid")<>"" then response.Write("&username="&session("webid"))%>">7</a>
<%end if%>
</font><strong>
<%
for i=currid1 to currid
if PageNo=i then
response.Write("<font color=red>"&i&"</font> ")
else%>
<a href="adminindex.asp?Page=<%=i&"&linktype="&linktype&"&text="&text&"&option="&option1&"&agree="&agree%><%if session("webid")<>"" then response.Write("&username="&session("webid"))%>">
<%response.write i%>
</a>
<%end if%>
<%response.write " "%>
<%next%>
</strong><font face=webdings>
<%if currid<TSum then%>
<a href="adminindex.asp?Page=<%=currid+1&"&linktype="&linktype&"&text="&text&"&option="&option1&"&agree="&agree%><%if session("webid")<>"" then response.Write("&username="&session("webid"))%>">8</a>
<%end if%>
</font> <font face=webdings>
<%if PageNo=TSum then%>
<span style="color: #FF0000">:</span>
<%else%>
<a href="index.asp?Page=<%=TSum&"&linktype="&linktype&"&text="&text&"&option="&option1&"&agree="&agree%><%if session("webid")<>"" then response.Write("&username="&session("webid"))%>">:</a>
<%end if%>
</font></td>
</tr>
<TBODY>
<TR>
<TD style="LETTER-SPACING: 1px">
<div align="right"><a href=### onclick=checkAll()>全选</a> <a href=### onclick=checkNone() >全不选</a>
<a href=### onclick=checkRev() >反选</a>
<select name=act class=input2>
<option value="1" selected>认证链接</option>
<option value="2">取消认证</option>
<option value="3">删除链接</option>
<option value="4">提到最前</option>
<option value="5">固定顶端</option>
<option value="6">取消固顶</option>
<option value="7">首页显示</option>
<option value="8">取消显示</option>
</select>
<input name="goto" type=submit class=input2 id="goto2" value="确定">
</div>
</TD>
</TR>
</TBODY>
</TABLE>
</form>
</td>
</tr>
</table>
<table width="681" border="0" cellspacing="0" cellpadding="0" class="9point" align="center">
<tr>
<td>
<form action="adminindex.asp" method="post" name="form" id="form">
<div align="center"><IMG src="images/sousuo.gif" width="10" height="10" align=absMiddle>
搜索:
<INPUT
class=input1 size=15 name=text>
<INPUT type=radio CHECKED value=1 name=option>
名称
<INPUT type=radio value=2 name=option>
地址
<INPUT type=radio value=3
name=option>
简介
<%
SQL1="Select * From sort"
Set rs1=conn.Execute(SQL1)
Set rs1=Server.CreateObject("ADODB.RecordSet")
rs1.Open sql1,conn,1,1
%>
<select name="linktype" id="linktype">
<option value="全部" selected>全部</option>
<% do while not rs1.eof %>
<option value="<%=rs1("sort")%>" ><%=rs1("sort")%></option>
<% rs1.movenext
loop
rs1.close
set rs1=nothing
%>
</select>
<select name="agree" id="agree">
<option value="2" selected>全部</option>
<option value="1">已认证</option>
<option value="0">未认证</option>
</select>
<INPUT name="submit" type=submit class=input2 value=" 搜 索 ">
<INPUT name="reset" type=reset class=input2 value=" 重 填 ">
</div>
</form></td>
</tr>
</table></td>
</tr>
</table>
<!--#include file = "bottom.asp"-->
</body>
</html>
<script language="JavaScript">
function checkAll()
{
var objID;
objID=document.forms[0].elements;
for (var i=0 ;i<objID.length-2;i++)
{
objID[i].checked=true;
}
}
function checkNone()
{
var objID;
objID=document.forms[0].elements;
for (var i=0 ;i<objID.length-2;i++)
{
objID[i].checked=false;
}
}
function checkRev()
{
var objID;
objID=document.forms[0].elements;
for (var i=0 ;i<objID.length-2;i++)
{
if (objID[i].checked==true)
objID[i].checked=false;
else
objID[i].checked=true;
}
}
</script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -