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

📄 link_admin.asp

📁 九酷网络个人主页系统破解版
💻 ASP
字号:
<!--#include file="admin.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../css/admin.css" rel="stylesheet" type="text/css">
<script language=javascript src="inc/select.js"></script>
</head>
<body>
<%
id=request("id")
select case request("option")
case ""
main
case "del" 
chk_admin_login(3)
del
case "lock"
chk_admin_login(2)
lock
case "unlock"
chk_admin_login(2)
unlock
case "add"
chk_admin_login(1)
add
case "edit"
chk_admin_login(2)
edit
case "editok"
chk_admin_login(2)
editok
end select
sub main
%>
<table width="70%" border="0" align="center" cellpadding="4" cellspacing="1" class="a2">
  <form method="post" action="?option=add">
    <tr align="center">
      <td height="25" colspan="2" class="a1">增加链接</td>
    </tr>
    <tr class="a3">
      <td> 网站名称:</td>
      <td>
        <input type="text" name="name" size="35">
      </td>
    </tr>
    <tr class="a4">
      <td>logo地址:</td>
      <td>
        <input name="logo" type="text" id="logo" size="40">
        如使用文字链接,可留空</td>
    </tr>
    <tr class="a3">
      <td>连接地址:</td>
      <td><input name="link" type="text" id="link" value="http://" size="40"></td>
    </tr>
    <tr class="a4">
      <td>链接类型: </td>
      <td><select name="linktype" id="linktype">
        <option value="">请选择</option>
        <option value="0">次页链接</option>
        <option value="1">合作伙伴</option>
        <option value="2">首页显示</option>
      </select>
      </td>
    </tr>
    <tr align="center" class="a4">
      <td colspan="2">
      <input type="submit" name="submit" value=" 确 定 "></td>
    </tr>
  </form>
</table>
<br>
<%
sql="select * from links order by id desc"
rs.open sql,conn,1,1 
pagesetup=20 '设定每页的显示数量
rs.pagesize=pagesetup
TotalPage=rs.pagecount  '总页数
PageCount = cint(Request.QueryString("ToPage"))
if PageCount <1 then PageCount = 1
if PageCount > TotalPage then PageCount = TotalPage
if TotalPage>0 then rs.absolutepage=PageCount '跳转到指定页数
%>
<table width="70%" border="0" align="center" cellpadding="4" cellspacing="1" class="a2">
  <tr class="a1">
    <td width="5%" height="25" align="center">&nbsp;</td>
    <td width="25%" height="25" align="center">网站名称</td>
    <td width="19%" align="center">网站logo</td>
    <td width="30%" align="center">加入时间</td>
    <td width="9%" align="center">状态</td>
    <td width="12%" align="center">操 作</td>
  </tr>
  <form action="" method="post" onSubmit="return Confirm()">
  <%
i=0
j=0
Do While Not RS.EOF and i<pagesetup
i=i+1
if j mod 2 = 0 then
a="a3"
else
a="a4"
end if
%>
  <tr class="<%=a%>">
    <td align="center"><INPUT name=id type=checkbox id="id" value=<%=rs("id")%>></td>
    <td align="center"><a href="<%=rs("link")%>" target="_blank"><%=rs("name")%></a></td>
    <td align="center"><%if rs("logo")<>"" then
			  Response.Write "<a href="&rs("link")&" target=_blank title="&rs("name")&"><img src="&rs("logo")&" width=88 height=31 border=0 alt="&rs("name")&" ></a>"
              else
              Response.Write "无"
              end if
			  %></td>
    <td align="center"><%=rs("time")%></td>
    <td align="center"><%
			  select case rs("pass")
			  case "True"
              Response.Write("正常")
              case "False"
              Response.Write("<b>待审核</b>")
              end select
			  %></td>
    <td align="center"><a href="?option=edit&id=<%=rs("id")%>">修改</a> </td>
  </tr>  <%
  j=j+1
  rs.movenext
loop
rs.close
set rs=nothing 
%>
  <tr class="a4">
    <td colspan="6" align="center">
      <input name=chkall type=checkbox id="chkall" onclick=CheckAll(this.form) value="ON">
全选
<input name="option" type="radio" value="del"> 
删除
<input name="option" type="radio" value="lock">
锁定
<input name="option" type="radio" value="unlock">
审核
<input type="submit" name="Submit22" value=" 确 定 ">      </td>
  </tr></form>

</table>
[<b>共有
<font color="990000"><%=TotalPage%></font> 页
<script>
ShowPage(<%=TotalPage%>,<%=PageCount%>,"")
</script>
</b>]
<%
end sub
sub edit
id=request("id")
rs.open "select * from links where id="&id, conn,1,1
%>
<table width="70%" border="0" align="center" cellpadding="4" cellspacing="1" class="a2">
  <form method="post" action="?option=editok">
    <input type=hidden name=id value=<%=id%>>
    <tr align="center">
      <td height="25" colspan="2" class="a1">修改链接</td>
    </tr>
    <tr class="a3">
      <td width="43%">网站名称: </td>
      <td width="57%">
        <input type="text" name="name" size="40" value="<%=rs("name")%>">      </td>
    </tr>
    <tr class="a3">
      <td class="a4">网站LOGO:</td>
      <td class="a4"><input type="text" name="logo" size="40" value="<%=rs("logo")%>"></td>
    </tr>
    <tr class="a3">
      <td>网站网址:</td>
      <td><input type="text" name="link" size="40" value="<%=rs("link")%>"></td>
    </tr>
    <tr class="a3">
      <td class="a4">链接类型:</td>
      <td class="a4"><select name="linktype">
	  <option value="" <%if rs("linktype")="" then Response.Write(" selected")%>>请选择</option>
        <option value=0 <%if rs("linktype")=0 then Response.Write(" selected")%>>次页链接</option>
        <option value=1 <%if rs("linktype")=1 then Response.Write(" selected")%>>合作伙伴</option>
		<option value=2 <%if rs("linktype")=2 then Response.Write(" selected")%>>首页显示</option>
      </select></td>
    </tr>
    <tr align="center" class="a3">
      <td colspan="2">
        <input name="submit" type="submit" value=" 确 定 ">
&nbsp;
        <input name="reset" type="reset" value=" 取 消 " onClick="javascript:history.back()">
      </td>
    </tr>
    <tr>
      <td colspan="2"></td>
    </tr>
  </form>
</table>
<%
end sub
%>
</body>
</html>
<%
sub Del
	if ID="" then
		Response.Write "<br><li>请指定要删除的站点</li>"
	end if
	if instr(ID,",")>0 then
		ID=replace(ID," ","")
		sql="delete from [links] where id in (" & ID & ")"
	else
		sql="delete from [links] where id=" & Clng(ID)
	end if
	Conn.Execute sql      
	response.redirect "link_admin.asp"
end sub
sub lock
	if ID="" then
		Response.Write "<br><li>请指定要锁定的站点</li>"
	end if
	if instr(ID,",")>0 then
		ID=replace(ID," ","")
		sql="Update [links] set pass=False where id in (" & ID & ")"
	else
		sql="Update [links] set pass=False where id=" & Clng(ID)
	end if
	Conn.Execute sql      
	response.redirect "link_admin.asp"
end sub
sub unlock
	if ID="" then
		Response.Write "<br><li>请指定要审核的站点</li>"
	end if
	if instr(ID,",")>0 then
		ID=replace(ID," ","")
		sql="Update [links] set pass=True where id in (" & ID & ")"
	else
		sql="Update [links] set pass=True where id=" & Clng(ID)
	end if
	Conn.Execute sql      
	response.redirect "link_admin.asp"
end sub
sub add
if request.form("name")="" or request.form("link")="http://" or request.form("linktype")="" then
response.write("<script language=""javascript"">alert(""错误:您的输入不正确!"");history.go(-1);</script>")
response.end
end if
sql="select * from links"
rs.open sql,conn,1,3
rs.addnew
rs("name")=request.form("name")
rs("logo")=request.form("logo")
rs("link")=request.form("link")
rs("linktype")=request.form("linktype")
rs("pass")=True
rs.update
rs.close
response.redirect "link_admin.asp"
end sub
sub editok
if request.form("name")="" or request.form("logo")="http://" or request.form("link")="http://" or request.form("link")="" then
response.write("<script language=""javascript"">alert(""错误:您的输入不正确!"");history.go(-1);</script>")
response.end
end if
sql="select * from links where id="&cint(request("id"))
rs.open sql,conn,1,3
rs("name")=request.form("name")
rs("logo")=request.form("logo")
rs("link")=request.form("link")
rs("linktype")=request.form("linktype")
rs.update
rs.close
response.write"<script>alert('修改成功!');location.href='link_admin.asp'</script>"
end sub
%> 

⌨️ 快捷键说明

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