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

📄 linksh_act.asp

📁 PDA,若你死昂师傅你说的附件是打开附件上课的附件四度空间就大方快速减肥
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#include file="../../ACT.Function.asp"-->
<!--#include file="../../../ACT_inc/cls_pageview.asp"-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>友情链接系统管理-By ACTCMS</title>
<link href="../../Images/css1/css.css" rel="stylesheet" type="text/css">
</head>
<body>
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table">
  <tr>
    <td colspan="2"  class="bg_tr"><strong>您现在的位置:子系统管理 &gt;&gt; <a href="Index.asp">链接系统管理</a> &gt;&gt; 新增友情链接</strong></td>
  </tr>
  <tr>
    <td width="9%" align="right" class="td_bg"><strong>链接选项:</strong></td>
    <td class="td_bg"><strong><a href="?">管理首页</a> ┆ <a href="?Action=Add">新增友情链接</a></strong></td>
  </tr>
</table><% 
	Dim ShowErr,Action
	Action = Request("Action")
	If Not ACTCMS.ACTCMS_QXYZ(0,"xqlj_ACT","") Then   Call Actcms.Alert("对不起,你没有操作权限!","") 
	Select Case Action
			Case "Edit","Add"
				Call Edit()
			Case "SaveAdd"
				Call SaveAdd
			Case "SaveEdit"
				Call SaveEdit
			case "sh"
				call sh()
			Case "del"
				Call Del()
			Case Else
				Call Main()
	End Select
	
	
	Sub sh()
		Dim ID:ID =Request("ID")
		IF ID = "" Then
			ShowErr = "<li>请先选定链接!</li>"
			Response.Redirect("../../Error.asp?Errs="&Server.URLEncode(ShowErr)&"&ErrorUrl="&"&Title=1")
			Response.End
		End IF		
			Conn.execute("Update Link_Act set sh=1 where ID in ("&ID&")")
			set conn=nothing
			ShowErr = "<li>链接审核成功!</li>"
			Response.Redirect("../../Error.asp?Errs="&Server.URLEncode(ShowErr)&"&ErrorUrl=Sys_Act/link/Linksh_Act.asp")
	
	End Sub
	Sub SaveAdd()
		Dim SiteName,Description,SQL,rs,id
		SiteName = Trim(Request.Form("SiteName"))
		Description = ACTCMS.Rsql(Request.Form("Description"))
		IF 	SiteName = "" Then 
			ShowErr = "<li>网站名称名称不能为空!</li>"
			Response.Redirect("../../Error.asp?Errs="&Server.URLEncode(ShowErr)&"&ErrorUrl="&"&Title=1")
			Response.End
		End IF
		SQL = "Select * From Link_Act "
		Set Rs=Server.CreateObject("Adodb.RecordSet")
		Rs.Open SQL,Conn,1,3
		Rs.addnew
		 Rs("SiteName") = SiteName
		  Rs("Description")=request("Description")
		  Rs("Webadmin")=request("Webadmin")
		  Rs("Email")=request("Email")
		  Rs("url")=request("url")
		  Rs("AddDate")=now
		  Rs("classlinkID")=ACTCMS.ChkNumeric(request("ClassLinkID"))
		  Rs("locked")=ACTCMS.ChkNumeric(request("locked"))
		  Rs("rec")=ACTCMS.ChkNumeric(request("rec"))
		  Rs("LinkType")=ACTCMS.ChkNumeric(request("LinkType"))
		  Rs("sh")=1	
		  Rs("Logo")=request("Logo")
		Rs.update
		Rs.Close:Set Rs=Nothing
		ShowErr = "<li>添加新链接成功!&nbsp;&nbsp;<a href='sys_act/link/Link_Act.asp'><b>返回友情链接管理</b></a></li>"
		Response.Redirect("../../Error.asp?Errs="&Server.URLEncode(ShowErr)&"&ErrorUrl=")
		Response.End
	End Sub	
		
	Sub SaveEdit()
		Dim SiteName,Description,SQL,rs,id
		SiteName = Trim(Request.Form("SiteName"))
		Description = ReplaceBadChar(Request.Form("Description"))
		ID = ACTCMS.ChkNumeric(Request("ID"))
		IF 	SiteName = "" Then 
			ShowErr = "<li>网站名称不能为空!</li>"
			Response.Redirect("../../Error.asp?Errs="&Server.URLEncode(ShowErr)&"&ErrorUrl="&"&Title=1")
			Response.End
		End IF
		SQL = "Select * From Link_Act Where ID="&ID
		Set Rs=Server.CreateObject("Adodb.RecordSet")
		Rs.Open SQL,Conn,1,3
		IF Not (Rs.Eof And Rs.Bof) Then
		 Rs("SiteName") = SiteName
		Rs("Description")=request("Description")
		  Rs("Webadmin")=request("Webadmin")
		  Rs("Email")=request("Email")
		  Rs("url")=request("url")
		  Rs("Hits")=ACTCMS.ChkNumeric(request("Hits"))
		  Rs("classlinkID")=ACTCMS.ChkNumeric(request("classlinkID"))
		  Rs("locked")=ACTCMS.ChkNumeric(request("locked"))
		  Rs("rec")=ACTCMS.ChkNumeric(request("rec"))
		  Rs("LinkType")=ACTCMS.ChkNumeric(request("LinkType"))
		  Rs("Logo")=request("Logo")
			Rs.update
		Else
			ShowErr = "<li>无此链接,参数传递出错</li>"
			Response.Redirect("../../Error.asp?Errs="&Server.URLEncode(ShowErr)&"&ErrorUrl="&"&Title=1")
			Response.End
		End IF
		Rs.Close:Set Rs=Nothing
		ShowErr = "<li>链接修改成功!&nbsp;&nbsp;<a href='sys_act/link/Link_Act.asp'><b>返回友情链接管理</b></a></li>"
		Response.Redirect("../../Error.asp?Errs="&Server.URLEncode(ShowErr)&"&ErrorUrl=")
		Response.End
	End Sub	
	Sub Del()
		Conn.Execute ("Delete from Link_Act Where ID=" & ACTCMS.ChkNumeric(Request.QueryString("ID")))		
		Set conn=nothing
		ShowErr = "<li>链接删除成功!</li>"
		Response.Redirect("../../Error.asp?Errs="&Server.URLEncode(ShowErr)&"&ErrorUrl=sys_act/link/Link_Act.asp")
  		Response.End
    End Sub
		
 Sub Main
	Dim strLocalUrl
	strLocalUrl = request.ServerVariables("SCRIPT_NAME")
	Dim intPageNow
	intPageNow = request.QueryString("page")
	Dim intPageSize, strPageInfo
	intPageSize = 30
	Dim arrRecordInfo, i
	Dim sql, sqlCount,pages,Sqls
	pages = "action="&Request("action")&"&page"
	Select Case Request.QueryString("Action")
		Case "List"
			Sqls = " where sh=0 classlinkid="&Request.QueryString("classlinkid")&"  "
			pages = "Action=List&classlinkid="&Request("classlinkid")&"&page"
		Case Else
			Sqls = "  where sh=0   "
			pages = "page"
	End Select

	sql = "SELECT [ID], [ClassLinkID], [SiteName], [LinkType],  [AddDate], [Rec], [Locked]" & _
		" FROM [Link_Act]" &Sqls& _
		"ORDER BY [ID] deSC"
	sqlCount = "SELECT Count([ID]) " & _
			" FROM [Link_Act]"&Sqls
		Dim clsRecordInfo
		Set clsRecordInfo = New Cls_PageView
			clsRecordInfo.intRecordCount = 2816
			clsRecordInfo.strSqlCount = sqlCount
			clsRecordInfo.strSql = sql
			clsRecordInfo.intPageSize = intPageSize
			clsRecordInfo.intPageNow = intPageNow
			clsRecordInfo.strPageUrl = strLocalUrl
			clsRecordInfo.strPageVar = "page"
		clsRecordInfo.objConn = Conn		
		arrRecordInfo = clsRecordInfo.arrRecordInfo
		strPageInfo = clsRecordInfo.strPageInfo
		Set clsRecordInfo = nothing
 %>
<form name="form1" method="post" action="?Action=sh"><table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table">
    <tr>
      <td width="20" align="center" class="td_bg">ID</td>
      <td width="200" align="center" class="td_bg"><STRONG>网站名称</STRONG></td>
      <td width="100" align="center" class="td_bg"><strong>所属类别</strong></td>
      <td width="100" align="center" class="td_bg"><strong>类型</strong></td>
      <td width="120" align="center" class="td_bg"><strong>添加日期</strong></td>
      <td width="150" align="center" class="td_bg"><strong>管理</strong></td>
    </tr>
	 <%
		Dim bgColor
		If IsArray(arrRecordInfo) Then
			For i = 0 to UBound(arrRecordInfo, 2)
	%>
    <tr onMouseOver=overColor(this) onMouseOut=outColor(this)>
      <td align="center" class="td_bg" ><input name="ID" type="checkbox" id="ID" value="<%= arrRecordInfo(0,i) %>"></td>
      <td align="center" class="td_bg" >
	    <a href="?Action=Edit&ID=<%=arrRecordInfo(2,i)  %>">
	  <%=arrRecordInfo(2,i)%></a></td>
      <td align="center" class="td_bg" ><%
	  			Dim Rs ,ClassLinkName
			  Set Rs = server.CreateObject("adodb.recordset")
					Rs.Open "select id,ClassLinkName from ClassLink_Act where ID="& arrRecordInfo(1,i) &"",Conn,1,1
					if  Not Rs.bof then
							ClassLinkName =Rs("ClassLinkName")
					Else
							ClassLinkName ="<font color=red>意外错误</font>"
					End if 
				  response.Write ClassLinkName
	   %></td>
      <td align="center" class="td_bg" >
	  <%if arrRecordInfo(3,i) =0 then response.Write "文字链接" else response.Write "图片链接" %></td>
      <td align="center" class="td_bg" ><%=arrRecordInfo(5,i)  %></td>
      <td  align="center" class="td_bg"><a href="?Action=sh&ID=<%=arrRecordInfo(0,i)  %>">通过</a>┆<a href="?Action=Edit&ID=<%=arrRecordInfo(0,i)  %>">修改</a>┆ <a href="?Action=del&ID=<%= arrRecordInfo(0,i) %>" onClick="return confirm('确认删除此链接吗?')">删除</a></td>
    </tr>
	<% 
	Next
	End If
	%>
    

⌨️ 快捷键说明

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