<% Option Explicit %> <% '**************************************************************************************** '** Copyright Notice '** '** Copyright 2002 Drew Gauderman All Rights Reserved. '** '** This program is free software; you can redistribute it and/or modify '** it under the terms of the GNU General Public License as published by '** the Free Software Foundation; either version 2 of the License, or '** any later version. '** '** All copyright notices must remain intacked in the scripts and the '** outputted HTML. '** '** You may not pass the whole or any part of this application off as your own work. '** '** All links to www.maddogs-asp.com must remain in place and the powered by '** link or image must remain visiable when the pages are viewed. '** '** This program is distributed in the hope that it will be useful, '** but WITHOUT ANY WARRANTY; without even the implied warranty of '** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the '** GNU General Public License for more details. '** '** You should have received a copy of the GNU General Public License '** along with this program; if not, write to the Free Software '** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA '** '** No official support is available for this program but you may post support questions at: - '** http://www.maddogs-asp.com/ '** '** Support questions are NOT answered by e-mail ever! '** '** For correspondence or non support questions contact: - '** webmaster@maddogs-asp.com '** '**************************************************************************************** Dim rsLinks Dim strLinkID Dim strStars Dim strInputName Dim strInputURL Dim strInputCategory Dim strInputDescription Dim strInputActive Dim strInputStatus Dim strMode If NOT strUserGood = "True" Then Response.Write "Your Not Authorized To View This Page, Please Login" Response.End End If strInputName = Request.Form("name") strInputURL = Request.Form("url") strInputCategory = Request.Form("category") strInputDescription = Request.Form("description") strLinkID = Request.QueryString("ID") If strLinkID = "" Then Response.Write "Not a vaild ID" Response.End End If strInputActive = Request.Form("Active") strInputStatus = Request.Form("Status") If strInputActive = "on" Then strInputActive = "True" Else strInputActive = "False" End If strMode= Request.Form("mode") Set rsLinks = Server.CreateObject("ADODB.Recordset") strSQL = "SELECT tblLinks.* FROM tblLinks Where tblLinks.ID = " & strLinkID & ";" rsLinks.CursorType = 2 rsLinks.LockType = 3 rsLinks.Open strSQL, strLinksCon If strMode = "update" Then rsLinks.Fields("Link") = strInputName rsLinks.Fields("URL") = strInputURL rsLinks.Fields("Cat_ID") = strInputCategory rsLinks.Fields("Description") = strInputDescription rsLinks.Fields("Active") = strInputActive rsLinks.Fields("Status") = strInputStatus rsLinks.Update rsLinks.Requery Response.Redirect "admin_links.asp?ID=" & Request.QueryString("ID") End If If Request.QueryString("Delete") = "True" Then rsLinks.Delete rsLinks.Update rsLinks.Requery Response.Write "Deleted!


Close Window" Response.End End If %> <% = strWebSiteName %> - Admin Links " onSubmit="validate();return returnVal;" onReset="return confirm('Are you sure you want to clear the changed you have entered?');">
Admin Links
<% If strMode = "add" Then %>

Thanks for adding a link!

Once it has been aproved by the admin it will be added a.s.a.p.!


<% Else %>
Link Name: ">
Link URL: ">
Active: >
Times Reported: ">
Category:
Link Description:
<% End If %> Close Window
&Delete=True">
<% rsLinks.Close Set rsLinks = Nothing %>