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

📄 news_link.asp

📁 很好的企业网站管理系统!可以适应各种不同的小型企业!
💻 ASP
字号:
<!--#include file="mdb_path_info.asp"-->
<!--#include file = Check.asp-->
<script language="JavaScript">
function CheckAll(form)
{
for (var i=0;i<form.elements.length;i++)
{
var e = form.elements[i];
if (e.name != 'chkall')
e.checked = form.chkall.checked;
}
}
</script>
<%
'#################################################################
'#  晓宇听幽网站内容管理系统(xoYu CMS)
'# 
'#  版权所有: 晓宇听幽工作室
'#
'#  制作人  :  xoyu(晓宇)            
'#           
'#  主页地址: http://www.xoYu.com	    晓宇听幽工作室
'#  论坛地址: http://www.xoYu.com/bbs/	晓宇听幽讨论区
'#
'#【版权声明】
'#################################################################
'# 本软体为共享软体(shareware)提供个人网站免费使用,请勿非法修改,
'# 转载,散播,或用于其他图利行为,并请勿删除版权声明。
'# 如果您的网站正式起用了这个脚本,请您通知我们,以便我们能够知晓!
'# 如果可能,请在您的网站做上我们的链接,希望能给予合作。谢谢!
'#################################################################
'# 程序名称:晓宇听幽网站内容管理系统·网站内容管理系统
'# 英文名称:xoYu News 2004 Professional For xoYu CMS
'# 程序创建时间:2003-7-10
'# 程序完成时间:2003-9-11
'# 最后修改时间:2003-11-15
'#################################################################
'# 请您尊重我们的劳动和版权,不要删除以上的版权声明部分,谢谢合作
'# 如有任何问题请到我们的论坛(http://www.xoyu.com/bbs/)告诉我们。 
'#################################################################
  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"news_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
%>
<head>
<title>管理中心 -晓宇听幽 网站内容管理系统</title>
<meta copy="程序制作:xoyu(QQ:5964887)www.xoyu.com">
<link rel="stylesheet" href="admin.css" type="text/css">
</head>
<body>
<table class="tableBorder" width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
<th class="tableHeaderText" height="20">
<p align="left">当前位置:管理首页 >> <a href="news_link.asp">内部连接管理</a></th>
  </tr>
</table>
<%
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 class="tableBorder" width="98%" border="0" align="center" cellpadding="0" cellspacing="1">
  <form name=form method="post" action="">
    <tr> 
      <td class="forumrow" height="23"> 
<u>联接名</u> <input name="UrlName" value=<%=rs1("website")%> size="20">
      <u>联接路径</u>
          <input type="text" name="UrlPath" value="<%=rs("url")%>" size="39">
</td>
    </tr>
    <tr align="center"> 
      <td class="forumrow" height="23" colspan="2"> <input type="hidden" name=UrlID value="<%=request("UrlID")%>"> 
        <input type="submit" class=button value="修改" name="action" onclick="return modify()"> 
        <input type="button" class=button value="返回" onclick="javascript:history.back()"></td>
    </tr>
  </form>
</table>
<%else%>
<form name="form1" method="post" action="">
  <table class="tableBorder" width="98%" height="27" border="0" align="center" cellpadding="3" cellspacing="1">
  <tr> 
      <td class="forumrow" width="3%"></td>
      <td class="forumrow" width="25%">联接名称</td>
      <td class="forumrow" width="48%">联接地址</td>
      <td class="forumrow" width="15%"><div align="center">修改联接</div></td>
    </tr>
	  <%  
for i=1 to rs1.pagesize
if rs1.eof then exit for
%>

    <tr> 
      <td class="forumrow" width="3%"><input name="DelId" type="checkbox" id="DelId" value="<%=rs1("Id")%>"></td>
      <td class="forumrow" width="25%"><table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr> 
              <td class="forumrow"><a href="<%=rs1("website")%>" target=_blank><%=rs1("website")%></a></td>
            </tr>
          </table>
      </td>
      <td class="forumrow" width="48%"><div align="left"><font color="#FF0000"><%=rs1("url")%></font>
          
        </div></td>
      <td class="forumrow" width="15%"><div align="center"><a href="news_link.asp?oper=modify&delID=<%=rs1("id")%>">修改</a> 
        </div></td>
	          <%
        rs1.MoveNext
        next
        %>

    </tr>
  </table>
    <br>  
  <table class="tableBorder" width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td class="forumrow"> <a href="news_link.asp?Page=1">首页</a>
	<a href="news_link.asp?Page=<%=AscendPage%>">上一页</a>
	<a href="news_link.asp?Page=<%=NextPage%>">下一页</a>
	<a href="news_link?Page=<%=rs1.pagecount%>">尾页</a>
	<b><font color=red><%=Page%></font>/<%=rs1.pagecount%></b>
	          </td>
      <td class="forumrow" width="140"> <input type="checkbox" name="chkall" onclick="CheckAll(this.form)" value="ON">
          选中所有 
		  <input type=submit value="删除" name=action class=button onclick="return Del()">
         </td>
    </tr>
    <tr> 
      <td class="forumrow" colspan="2"> 
      </td>
    </tr>
  </table>
</form>
<br>
<table class="tableBorder" width="98%" cellspacing="1" cellpadding="5" align="center">
<form name=form method="post" action="">
<tr>
<td class="forumrow"><b>添加联接</td><td class="forumrow"><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=button value="添加" name="action" onclick="return CheckUrl()">
<input type="Reset" name="Reset" value="重填">
</td>
      </tr></form></table>
<%
rs1.close
set rs1=nothing
 end if
%>
</body>
</htm>

⌨️ 快捷键说明

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