📄 admin_link.asp
字号:
<!--#include file="inc/conn.asp"-->
<!--#include file="inc/set.asp" -->
<!--#include file="inc/adminfunction.asp"-->
<%
call hacker()
call checkadmin("link")
sql="select * from [YC_link] where pass=0 order by id DESC"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
link=rs.recordcount
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="img/admin.css" rel="stylesheet" type="text/css">
<script type='text/javascript' language='javascript' src='inc/adminjs.js'></script>
</head>
<body> <%if request("type")=""then%>
<table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="<%=border%>" rules=none class=3d>
<tr height=25 class=title><td colspan=5><b> <img src=img/ie.gif border=0 width=15 height=15 align=absMiddle> 连接管理 [未通过的有<%=link%>个]</b></td></tr>
<tr height=25 class=bg>
<td width="14%"><div align="center">网站logo</div></td>
<td width="34%"><div align="center">网站介绍</div></td>
<td width="7%"><div align="center">站长</div></td>
<td width="9%"><div align="center">状态</div></td>
<td width="17%"><div align="center">选项</div></td>
</tr><tr><td class="hr" colspan="5"></td></tr>
<%
sql="select * from [YC_link] order by id DESC"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
if not rs.bof and not rs.eof then
rs.pagesize=10
i=1
mypage=request("page")
if mypage="" then
mypage=1
else
mypage=cint(mypage)
end if
pages=rs.pagecount
rs.absolutepage=mypage
do while not rs.eof%>
<tr onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#efefef'" class=3d>
<td height="50"><div align="center"><a href="<%=rs("url")%>" target="_blank">
<%if rs("type")="logo" then%>
<img onerror="this.src='img/noimg.gif'" src='<%=rs("logo")%>' width='88' height='31' border='0' alt="网站名称:<%=rs("webname")%><br>加入时间:<%=rs("date")%>" />
<%else%>
<font title='网站名称:<%=rs("webname")%><br>加入时间:<%=rs("date")%>'><%=rs("webname")%></font>
<%end if%></a></div></td>
<td height="50"><div align="left"><%=rs("content")%></div></td>
<td height="50"><div align="center"><%=rs("adminname")%></div></td>
<td height="50"><div align="center"><%if rs("pass")=1 then response.Write"已审核" end if
if rs("best")=1 then response.Write"<br>已推荐" end if%></div></td>
<td height="50"><div align="center"><a href="?action=del&id=<%=rs("id")%>" onclick="mybox('你确定要删除,删除后不能恢复!!');return document.del">删除</a>
<%if rs("pass")=0 then %>
<a href="?action=pass&id=<%=rs("id")%>">通过审核</a><%else%>
<a href="?action=nopass&id=<%=rs("id")%>">取消审核</a>
<%end if%><br>
<a href="?type=edit&id=<%=rs("id")%>">修改</a>
<%if rs("best")=0 then%>
<a href="?action=best&id=<%=rs("id")%>">设为推荐</a>
<%else%>
<a href="?action=nobest&id=<%=rs("id")%>">取消推荐</a>
<%end if%></div></td>
</tr><tr><td class="hr" colspan="5"></td></tr>
<%
if i=rs.pagesize then exit do end if
i=i+1
rs.movenext
loop
end if
%>
<tr class=bg><td height=25 colspan=6>
<table width=100% border=0><tr><td>
  共有连接<font color=red><%=rs.recordcount%></font>条,每页<font color=red><%=rs.pagesize%></font>条,分<font color=red><%=mypage%></font>/<%=rs.pagecount%>页   
<script language="javascript">
showPageLink("?page=",<%=mypage%>,<%=pages%>);
</script>
</td></tr></table>
</td></tr>
</form></table>
<%elseif request("type")="edit"then
set rs1=server.CreateObject("adodb.recordset")
sql1="select * from YC_link where id="&request("id")
rs1.open sql1,conn,1,3
if request.Form("submitedit")<>""then
rs1("class")=cint(request.Form("class"))
rs1("webname")=server.htmlencode(request.Form("webname"))
rs1("adminname")=server.htmlencode(request.Form("adminname"))
rs1("url")=server.htmlencode(request.Form("url"))
rs1("logo")=server.htmlencode(request.Form("logo"))
rs1("content")=server.htmlencode(request.Form("content"))
rs1("best")=cint(request.Form("best"))
rs1("pass")=cint(request.Form("pass"))
rs1.update
response.Write"<script>location.href='admin_link.asp';</script>"
end if
%><br>
<form method="post" name="form" id="form" onsubmit="return chk();">
<table width="450" border="1" cellpadding="0" cellspacing="0" bordercolor="<%=border%>" rules=none class=3d align=center>
<tr class=title>
<td width="25%" height="25" colspan=2> ※ 修改连接</td>
</tr>
<tr>
<td width="25%" height="25"> 显示形式:</td>
<td width="75%" height="25"><input name="class" type="radio" value="logo" <%if rs1("class")="logo" then%>checked<%end if%>>
logo链接
<input type="radio" name="class" value="text" <%if rs1("class")="text" then%>checked<%end if%>>
文字链接</td>
</tr>
<tr>
<td height="30"> 网站名称:</td>
<td height="30"><input name="webname" type="text" id="webname" value="<%=rs1("webname")%>" class=yecao></td>
</tr>
<tr>
<td height="30"> 站长姓名:</td>
<td height="30"><input name="adminname" type="text" id="adminname" value="<%=rs1("adminname")%>" class=yecao></td>
</tr>
<tr>
<td height="30"> 网站地址:</td>
<td height="30"><input name="url" type="text" id="url" value="<%=rs1("url")%>" class=yecao></td>
</tr>
<tr>
<td height="30"> logo地址:</td>
<td height="30"><input name="logo" type="text" id="logo" value="<%=rs1("logo")%>" class=yecao></td>
</tr>
<tr>
<td> 网站介绍:</td>
<td><textarea name="content" cols="50" rows="5" id="content" class=yecao><%=rs1("content")%></textarea></td>
</tr>
<tr>
<td height="30"> 是否通过:</td>
<td height="30"><input name="pass" type="radio" value="1" <%if rs1("pass")=1 then%>checked<%end if%>>
是
<input type="radio" name="pass" value="0" <%if rs1("pass")=0 then%>checked<%end if%>>
否</td>
</tr>
<tr>
<td height="30"> 是否推荐:</td>
<td height="30"><input name="best" type="radio" value="1" <%if rs1("best")=1 then%>checked<%end if%>>
是
<input type="radio" name="best" value="0" <%if rs1("best")=0 then%>checked<%end if%>>
否</td>
</tr><tr><td class="hr" colspan="2"></td></tr>
<tr class=bg>
<td height="30" colspan="2"><div align="center">
<input name="Submitedit" type="submit" id="Submitedit" value="提交" class="adminbutton"> <input type="reset" name="Submit" value="重置" class="adminbutton" >
</div></td>
</tr>
</table>
</form>
<%
rs1.close
set rs1=nothing
%>
<br>
</body>
</html>
<%
end if
action=request("action")
select case action
case "del":
call del()
case "best":
call best()
case "nobest":
call nobest()
case "pass":
call pass()
case "nopass":
call nopass()
end select
sub del()
set rs1=server.CreateObject("adodb.recordset")
sql1="select * from [YC_link] where id="&request("id")
rs1.open sql1,conn,1,3
rs1.delete
response.Write"<script>location.href='admin_link.asp';</script>"
rs1.close
set rs1=nothing
end sub
sub best()
set rs1=server.CreateObject("adodb.recordset")
sql1="select * from [YC_link] where id="&request("id")
rs1.open sql1,conn,1,3
rs1("best")=1
rs1.update
response.Write"<script>location.href='admin_link.asp';</script>"
rs1.close
set rs1=nothing
end sub
sub nobest()
set rs1=server.CreateObject("adodb.recordset")
sql1="select * from [YC_link] where id="&request("id")
rs1.open sql1,conn,1,3
rs1("best")=0
rs1.update
response.Write"<script>location.href='admin_link.asp';</script>"
rs1.close
set rs1=nothing
end sub
sub pass()
set rs1=server.CreateObject("adodb.recordset")
sql1="select * from [YC_link] where id="&request("id")
rs1.open sql1,conn,1,3
rs1("pass")=1
rs1.update
response.Write"<script>location.href='admin_link.asp';</script>"
rs1.close
set rs1=nothing
end sub
sub nopass()
set rs1=server.CreateObject("adodb.recordset")
sql1="select * from [YC_link] where id="&request("id")
rs1.open sql1,conn,1,3
rs1("pass")=0
rs1.update
response.Write"<script>location.href='admin_link.asp';</script>"
rs1.close
set rs1=nothing
end sub%>
<%
rs.close
set rs=nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -