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

📄 admin_link.asp

📁 新闻发布系统
💻 ASP
字号:
<!--#include file = "include.asp"-->
<!--#include file = "admin_Checkmana.asp"-->
<%
'=========================================================
'产品目录:风讯产品N系列
'软件名称:风讯站点管理系统
'当前版本:2004.I.0225
'最新更新:2004.2.10
'=========================================================
'Copyright (C) 2002-2004 cooin.com. All rights reserved.
'网站: http://www.cooin.com  Foosun.net
'程序制作:轻风云(QQ:655071)
'Email:skeen@cooin.com,skeen@Foosun.net
'论坛支持:风讯在线论坛(http://bbs.cooin.com   http://bbs.foosun.net)
'=========================================================
if EnoughPopedom("changgui")=1 then
Response.write"<script>alert(""[操作失败]\n\n你的权限不足!\n\n请与系统管理员联系获得足够的权限!"");location.href=""javascript:history.back()"";</script>"
Response.end
end if

  action=request("action")
  if action="添加" then
  'Call CheckUrl
  UrlName=trim(request("UrlName"))
  UrlPath=trim(request("UrlPath"))
  set rs=conn.execute("select website from link where website='"&UrlName&"'")
  if not rs.eof then response.Write("已经存在此联结,请重新添加!"):response.end
  if UrlName="" or UrlPath="" then response.Write("联接名和路径不能为空!"):response.end
  set rs=server.createobject("adodb.recordset")
  sql="select * from link"
  rs.open sql,conn,3,3
  rs.addnew  
  rs("website")=UrlName
  rs("Url")=UrlPath
  rs.update
  rs.close
  set rs=nothing
elseif action="删除" then
  'Call CheckUrl
  Num=request("delID").count
  for i=1 to num
    conn.execute("Delete from link where ID="&request("delID")(i))
  next
elseif action="修改" then
  'Call CheckUrl
  UrlName=trim(request("UrlName"))
  UrlPath=trim(request("UrlPath"))
  if UrlName="" or UrlPath="" then response.Write("联接名和路径不能为空!"):response.end
  set rs=server.createobject("adodb.recordset")
  sql="select * from link where ID="&request("delID")
  rs.open sql,conn,3,3
  rs("website")=UrlName
  rs("Url")=UrlPath
  rs.update
  rs.close
  set rs=nothing
  response.redirect"admin_link.asp"
end if


page=request("page")
if page<=1 or page="" then page=1
set rs1=server.createobject("adodb.recordset")
sql="select website,Url,ID from link order by ID desc"
rs1.open sql,conn,1,1

rs1.pagesize=20
for i=1 to rs1.pagesize*(page-1)
  if not rs1.eof then
    rs.movenext
  end if
next
if ccur(page)=ccur(rs1.pagecount) then
  NextPage=Page
else
  NextPage=page+1
end if

if Page=1 then
  AscendPage=page
else
  AscendPage=Page-1
end if


'		strpage=request.querystring("page")
'		if len(strpage)=0 then
'		strpage="1"
'		end if
		   
 '       set rs1=server.createobject("adodb.recordset")
  '      sql="select * from link order by id desc"
   '     rs1.open sql,conn,1,3      
 '       if rs1.eof then
'		       rs1.close
'			   set rs1=nothing
'			   conn.close
'			   set conn=nothing
'			   response.Write"没有联接记录。"
'			   response.end
'	    end if
'		rs1.pagesize=15
'		rs1.absolutepage=cint(strpage)
'		select_count=rs1.recordcount
'		select_pagecount=rs1.pagecount
 '       for i=1 to rs1.pagesize
'		if rs1.eof then
'		exit for
'		end if
		%>
<head>
<title>www.sowin.net</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href=css/css.css rel=stylesheet>
</head>


<body>
<%
if request("oper")="modify" then
set rs=conn.execute("select id, website,Url from link where ID="&request("delID"))
if rs.eof then Call Succeed("true","系统不存在此联接","","0"):response.end 

%>
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#84BE7E">
  <form name=form method="post" action="">
    <tr bgcolor="#D7FFC8"> 
      <td height="26" colspan="4">
<table width="100%" border="0" cellpadding="0" cellspacing="0" background="images/bg1.gif">
          <tr> 
            <td height="26"> <div align="center">联接修改</div></td>
          </tr>
        </table></td>
    </tr>
    <tr bgcolor="#F7FFF4"> 
      <td width="21%" height="38" bgcolor="#F7FFF4"> <div align="center"><u>联接名</u><br>
        </div></td>
      <td width="31%" bgcolor="#F7FFF4"> <div align="center">
          <input name="UrlName" type="text" class=form80 value=<%=rs1("website")%> size="30">
        </div></td>
      <td width="15%" bgcolor="#F7FFF4"> <div align="center"><u>联接路径</u></div></td>
      <td width="33%" height="38"> <div align="center"> 
          <input name="UrlPath" type="text" class=form80 value="<%=rs("url")%>" size="30">
        </div></td>
    </tr>
    <tr align="center" bgcolor="#F7FFF4"> 
      <td height="32" colspan="4"> 
        <input type="hidden" name=UrlID value="<%=request("UrlID")%>"> 
        <input type="submit" class=Anbutc value="修改" name="action" onclick="return modify()"> 
        <input type="button" class=Anbutc value="返回" onclick="javascript:history.back()">
        <!--#include file = name.asp-->
      </td>
    </tr>
  </form>
</table>
<%else%>
<form name="form1" method="post" action="">
  <table width="95%" height="27" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#84BE7E">
    <tr bgcolor="#D7FFC8"> 
      <td width="3%"></td>
      <td width="42%">联接名称</td>
      <td width="31%">联接地址</td>
      <td width="15%"> <div align="center">修改联接</div></td>
    </tr>
    <%  
for i=1 to rs1.pagesize
if rs1.eof then exit for
%>
    <tr bgcolor="#F1F5FA"> 
      <td width="3%" bgcolor="#F7FFF4"> <input name="DelId" type="checkbox" id="DelId" value="<%=rs1("Id")%>"></td>
      <td width="42%" bgcolor="#F7FFF4"> <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr> 
            <td><a href="<%=rs1("website")%>" target=_blank><%=rs1("website")%></a></td>
          </tr>
        </table></td>
      <td width="31%" bgcolor="#F7FFF4"> <div align="left"><font color="#FF0000"><%=rs1("url")%></font> 
        </div></td>
      <td width="15%" bgcolor="#F7FFF4"> <div align="center"><a href="admin_link.asp?oper=modify&delID=<%=rs1("id")%>">修改</a> 
        </div></td>
      <%
        rs1.MoveNext
        next
        %>
    </tr>
    <tr bgcolor="#F7FFF4"> 
      <td colspan="4">&nbsp; </td>
    </tr>
  </table>
  
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="2"></td>
  </tr>
</table>
	    
     
  <div align="center"><a href="admin_link.asp?Page=1">首页</a> <a href="admin_link.asp?Page=<%=AscendPage%>">上一页</a> 
    <a href="admin_link.asp?Page=<%=NextPage%>">下一页</a> <a href="admin_link?Page=<%=rs1.pagecount%>">尾页</a> 
    <b><font color=red><%=Page%></font>/<%=rs1.pagecount%></b> </div>
  <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td><div align="right">
          <input type="checkbox" name="chkall" onclick="CheckAll(this.form)">
          选中所有 
		  <input type=submit value="删除" name=action class=Anbutc onclick="return Del()">
        </div></td>
    </tr>
    <tr> 
      <td> 
      </td>
    </tr>
  </table>
</form>
<table width="95%" cellspacing="1" cellpadding="0" bgcolor="#84BE7E" align="center">
  <form name=form method="post" action="">

<tr bgcolor=#cccccc><td bgcolor="#BBCEE8"><center>
        <table width="100%" border="0" cellpadding="0" cellspacing="0" background="images/bg1.gif">
          <tr> 
            <td height="26"> <div align="center">添加联接</div></td>
          </tr>
        </table>
        
      </td>
    </tr>
<tr bgcolor=#eeeeee>
      <td height="38" bgcolor="#F7FFF4"><center> 名称: 
        <input name=urlname type=text id="urlname" value="风讯" size=15>
        网址: 
        <input name=urlpath type=text id="urlpath" value="http://" size=40>
&nbsp;<input type="submit" class=Anbutc value="添加" name="action" onclick="return CheckUrl()">
        &nbsp;
<input type="Reset" name="Reset" value="重填" class=Anbutc>
      </td>
    </tr></form></table>
<br>
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#84BE7E">
  <tr>
    <td bgcolor="#F7FFF4">
      <!--#include file = name.asp-->
    </td>
  </tr>
</table>
<%
rs1.close
set rs1=nothing
 end if
%>
</body>
</htm>

⌨️ 快捷键说明

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