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

📄 admin_link.asp

📁 后台登陆admin.asp
💻 ASP
📖 第 1 页 / 共 2 页
字号:
title=""
if request.querystring("flcat_id")<>"" then
   flcat_id=cint(request.querystring("flcat_id"))
   sql="select * from friendlink where flcat_id="&flcat_id&" and passed=0 and lk=0 order by fl_id deSC"
   Url_Add=Url_Add&"cat_id="&cat_id&"&"
elseif request.querystring("t")="lk" then
   sql="select * from friendlink where lk=1 order by fl_id deSC"
   Url_Add=Url_Add&"t=lk&"
   title="黑名单"
elseif request.querystring("t")="pass" then
   sql="select * from friendlink where passed=1 order by fl_id deSC"
   Url_Add=Url_Add&"t=pass&"
   title="待审核"
elseif request.querystring("t")="top" then
   sql="select * from friendlink where istop=1 order by fl_id deSC"
   Url_Add=Url_Add&"t=top&"
   title="首页推荐"
elseif request("keyword")<>""  then
  keyword=trim(replace(request("keyword"),"'",""))
  sea_type=trim(replace(request("sea_type"),"'",""))
  sql_tmp=1
  sql="select * from friendlink where "&sea_type&" like '%"&keyword&"%' order by fl_id DESC"
  Url_Add=Url_Add&"sea_type="&sea_type&"&keyword="&keyword&"&"
  title="搜索关键字:"&keyword
else
   sql="select * from friendlink where passed=0 and lk=0 order by fl_id deSC"
   title="有效"
end if
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
%>
<table align="center" width="98%" align="center" border="1" cellspacing="0" cellpadding="4" class=Hxcmsbk style="border-collapse: collapse">
    <form name="form3" method="post" action="">
       <tr class=Hxcmsss>
          <td colspan="7">链接管理</td>
          <td align="right" style="padding-top:2px;">
            <select name="go" style="margin:-3px" onChange='window.location=form.go.options[form.go.selectedIndex].value'>
	    <option value="">选择显示方式</option>
	    <option value="admin_link.asp?action=link">显示所有链接</option>
	    <option value="admin_link.asp?action=link&t=lk">显示黑名单链接</option>
	    <option value="admin_link.asp?action=link&t=pass">显示待审核链接</option>
	    <option value="admin_link.asp?action=link&t=top">显示推荐链接</option>
<%
sql="select * from flcat"
set rs2=server.createobject("adodb.recordset")
rs2.open sql,conn,1,1
do while not rs2.eof
Response.Write("<option value=""admin_link.asp?action=link&flcat_id="&rs2("flcat_id")&""">→["&rs2("flcat_name")&"]</option>")
rs2.movenext
loop
if rs2.bof and rs2.eof then
   Response.Write("<option value=''>当前没有分类</option>")
end if
rs2.close
set rs2=nothing%>
</select></td>
</tr></form>
<form name="form4" method="post" action="?action=link">
<tr align="center" class=Hxcmsqs>
<td colspan="8">搜索(连接列表)关键字:
<input type=text name=keyword size=15 maxlength=20>
<select name=sea_type size=1>
<option value='fl_name'>按链接名称</option>
</select>
<input type=submit value='搜 索'></td>          
</tr></form>
        <tr class=Hxcmsqs align="center"> 
          <td width="50">编号</td>
          <td width="30">选中</td>
          <td width="50">首页推荐</td>
          <td width="50">审核状态</td>
          <td width="100">LOGO</td>
          <td width="*">链接名称<%if sql_tmp="1" then response.write "(搜索结果:"&keyword&")"%></td>
          <td width="100">分类</td>
          <td width="100">编辑操作</td>
        </tr>
<%
if rs.eof and rs.bof then
  Response.Write("<tr align=""center""><td class=Hxcmsds colspan=8>当前没有链接!</td></tr>")
Else
   Dim art_Nums,MultiPages,i
   rs.PageSize=adflperpage
   rs.AbsolutePage=CurPage
   art_Nums=rs.RecordCount
   MultiPages="<tr><td class=Hxcmsqs colspan=""8"" align=""center"">共有【"&title&"】链接:"&art_Nums&"个&nbsp;&nbsp;"&MultiPage(art_Nums,adflperpage,CurPage,Url_Add)&"</td></tr>"
Do Until Rs.EOF OR i=adflperpage
sql="select flcat_name from flcat where flcat_id="&rs("flcat_id")
set rs2=conn.execute(sql)%>
         <form name="selform" method="post" action="?action=link">
         <tr class=Hxcmsds> 
          <td align="center"><%=rs("fl_id")%></td>
          <td width="30" align="center"><input type="checkbox" name="selID" id="selID" value="<%=rs("fl_id")%>"></td>
          <td width="50" align="center">
          <%if rs("istop")=0 then%>×<%end if%>
          <%if rs("istop")=1 then%><font color=red>√</font><%end if%></td>
          <td width="50" align="center">
          <%if rs("passed")=1 then%>×<%end if%>
          <%if rs("passed")=0 then%><font color=red>√</font><%end if%></td>
          <td align="center"><%if rs("fl_logo")<>"" then response.write "<img src='"&rs("fl_logo")&"' width='88' height='31' border='0'>" else response.write "<font color='#cccccc'>无</font>" end if%></td>
          <td><a href="<%=rs("fl_url")%>" target="_blank"><%=rs("fl_name")%></a></td><td align="center"><%=rs2("flcat_name")%></td>
          <td align="center"><a href="admin_link.asp?id=<%=rs("fl_id")%>&action=editfl">编辑</a></td>
        </tr>
<%
i=i+1
rs.movenext
loop
end if
rs.close
set rs=nothing
%>
    <tr class=Hxcmsds> 
      <td colspan="8" height="30">管理操作:全选 
        <input type="checkbox" name="checkbox" value="checkbox" onClick="javascript:SelectAll()" style="border:0PX">  
        <input onClick="{if(confirm('确定删除选定的连接吗?')){this.document.selform.submit();return true;}return false;}" type=submit value="删除" name="hx66" class="button"> 
<%if request.querystring("t")="" or request.querystring("t")="top" then%>
        <input onClick="{if(confirm('确定取消推荐选定的连接吗?')){this.document.selform.submit();return true;}return false;}" type=submit value="取消推荐" name="hx66" class="button"> 
        <input onClick="{if(confirm('确定设为推荐选定的连接吗?')){this.document.selform.submit();return true;}return false;}" type=submit value="设为推荐" name="hx66" class="button">
        <input onClick="{if(confirm('确定拉入黑名单选定的连接吗?')){this.document.selform.submit();return true;}return false;}" type=submit value="拉入黑名单" name="hx66" class="button">
<%end if%>
<%if request.querystring("t")="lk" then%>
        <input onClick="{if(confirm('确定取消黑名单选定的连接吗?')){this.document.selform.submit();return true;}return false;}" type=submit value="取消黑名单" name="hx66" class="button">
<%end if%>
<%if request.querystring("t")="pass" then%>
        <input onClick="{if(confirm('确定审核通过选定的连接吗?')){this.document.selform.submit();return true;}return false;}" type=submit value="通过审核" name="hx66" class="button">
<%end if%>
<%if request.querystring("t")="" then%>
        <input onClick="{if(confirm('确定取消通过选定的连接吗?')){this.document.selform.submit();return true;}return false;}" type=submit value="取消通过" name="hx66" class="button">
<%end if%>
        </td>
    </tr>
  </form>
<%
Response.Write(MultiPages)
Response.Write("</table>")
end if

'================www.ynsky.com.cn===============
if request.form("MM_insert") then
if request.form("action")="newflcat" then
dim flcatname
flcatname=trim(replace(request.form("flcat_name"),"'",""))
if flcatname="" then
  Response.Write("<script language=javascript>alert('你必须填写分类名称!');history.back(1);</script>")
  response.end
end if
  conn.Execute ("Insert Into flcat(flcat_name,isimage) Values('"&flcatname&"',"&clng(request.form("isimage"))&")")
  response.redirect "admin_link.asp"
end if
'================www.ynsky.com.cn===============
if request.form("action")="editflcat" then
if request.Form("id")="" then
  Response.Write("<script language=javascript>alert('你必须指定操作的对象!');history.back(1);</script>")
  response.End
else
  if not isInteger(request.form("id")) then
    Response.Write("<script language=javascript>alert('非法的文章分类id参数。');history.back(1);</script>")
    response.End
  end if
end if
flcatname=trim(replace(request.form("flcat_name"),"'",""))
if flcatname="" then
  Response.Write("<script language=javascript>alert('你必须填写分类名称!');history.back(1);</script>")
  response.End
end if
  conn.Execute ("Update flcat Set flcat_name='"&flcatname&"',isimage="&clng(request.form("isimage"))&" where flcat_id="&cint(request.form("id"))&"")
  response.redirect "admin_link.asp"
end if
'================www.ynsky.com.cn===============
if request.form("action")="delflcat" then
if request.Form("id")="" then
  Response.Write("<script language=javascript>alert('你必须指定操作的对象!');history.back(1);</script>")
  response.End
else
  if not isInteger(request.form("id")) then
    Response.Write("<script language=javascript>alert('非法的分类id参数。');history.back(1);</script>")
    response.End
  end if
end if
  Conn.Execute "DELETE * FROM flcat WHERE flcat_id="&clng(request.form("id"))
  Conn.Execute "DELETE * FROM friendlink WHERE flcat_id="&clng(request.form("id"))
  response.redirect "admin_link.asp"
end if

'================www.ynsky.com.cn===============
if request.form("action")="newfl" then
dim flcatid,flname,flurl,fllogo
flcatid=request.form("flcat_id")
flname=trim(replace(request.form("fl_name"),"'",""))
flurl=trim(replace(request.form("fl_url"),"'",""))
fllogo=trim(replace(request.form("fl_logo"),"'",""))
if not isInteger(flcatid) then
  Response.Write("<script language=javascript>alert('非法的分类参数!');history.back(1);</script>")
  response.end
end if
if flname="" then
   Response.Write("<script language=javascript>alert('站点名称未填写!');history.back(1);</script>")
   response.end
else
  if strLength(flname)>50 then
      Response.Write("<script language=javascript>alert('站点名称太长,不可以超过50个字符!');history.back(1);</script>")
      response.end
  end if
end if
if flurl="" then
   Response.Write("<script language=javascript>alert('站点地址未填写!');history.back(1);</script>")
   response.end
else
  if strLength(flurl)>100 then
      Response.Write("<script language=javascript>alert('站点地址太长,不可以超过100个字符!');history.back(1);</script>")
      response.end
   end if
end if
sql="select * from friendlink"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
rs.addnew
  rs("flcat_id")=flcatid
  rs("fl_name")=flname
  rs("fl_url")=flurl
  rs("fl_logo")=fllogo
  rs.update
  rs.close
  set rs=nothing
  response.redirect "admin_link.asp?action=link"
end if
'================www.ynsky.com.cn===============
if request.form("action")="editfl" then
if request.Form("id")="" then
  Response.Write("<script language=javascript>alert('你必须指定操作的对象!');history.back(1);</script>")
  response.End
else
  if not isInteger(request.form("id")) then
    Response.Write("<script language=javascript>alert('非法的文章分类id参数。');history.back(1);</script>")
    response.End
  end if
end if
flcatid=request.form("flcat_id")
flname=trim(replace(request.form("fl_name"),"'",""))
flurl=trim(replace(request.form("fl_url"),"'",""))
fllogo=trim(replace(request.form("fl_logo"),"'",""))
if not isInteger(flcatid) then
  Response.Write("<script language=javascript>alert('非法的分类参数!');history.back(1);</script>")
  response.End
end if
if flname="" then
   Response.Write("<script language=javascript>alert('站点名称未填写!');history.back(1);</script>")
   response.end
else
  if strLength(flname)>50 then
     Response.Write("<script language=javascript>alert('站点名称太长,不可以超过50个字符!');history.back(1);</script>")
     response.end
  end if
end if
if flurl="" then
   Response.Write("<script language=javascript>alert('站点地址未填写!');history.back(1);</script>")
   response.end
else
  if strLength(flurl)>100 then
     Response.Write("<script language=javascript>alert('站点地址太长,不可以超过100个字符!');history.back(1);</script>")
     response.end
  end if
end if
sql="select * from friendlink where fl_id="&cint(request.form("id"))
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
  rs("fl_name")=flname
  rs("fl_url")=flurl
  rs("fl_logo")=fllogo
  rs("flcat_id")=flcatid
  rs.update
  rs.close
  set rs=nothing
  response.redirect "admin_link.asp?action=link"
end if
end if

'****************************************************
%>

⌨️ 快捷键说明

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