<% Option Explicit %> <% Dim rsLinks Dim strInputName Dim strInputURL Dim strInputDescription Dim strInputCatID Dim objCDOMail strInputName = Request.Form("name") strInputDescription = Request.Form("description") strInputURL = Request.Form("url") strInputCatID = Request.Form("category") Set rsLinks = Server.CreateObject("ADODB.Recordset") strSQL = "SELECT tblLinks.* FROM tblLinks;" rsLinks.CursorType = 2 rsLinks.LockType = 3 rsLinks.Open strSQL, strLinksCon rsLinks.AddNew rsLinks.Fields("Cat_ID") = strInputCatID rsLinks.Fields("Link") = strInputName rsLinks.Fields("URL") = strInputURL rsLinks.Fields("Description") = strInputDescription If strUserGood = "True" Then rsLinks.Fields("Active") = "True" Else rsLinks.Fields("Active") = "False" End If rsLinks.Update rsLinks.Requery If strEmailNotice = "True" and NOT strUserGood = "True" Then 'Create the e-mail server object Set objCDOMail = Server.CreateObject("CDONTS.NewMail") 'Who the e-mail is from objCDOMail.From = strWebsiteName & " <" & strAdminEmail & ">" 'Who the e-mail is sent to objCDOMail.To = strAdminEmail & " <" & strAdminEmail & ">" 'The subject of the e-mail objCDOMail.Subject = "A new link has been submitted!" 'The main body of the e-amil objCDOMail.Body = "Hello,

Someone has submitted a link in your link manager. You must authorize it before its added to the database.

" & strSiteURL 'Set the e-mail body format (0=HTML 1=Text) objCDOMail.BodyFormat = 0 'Set the mail format (0=MIME 1=Text) objCDOMail.MailFormat = 0 'Importance of the e-mail (0=Low, 1=Normal, 2=High) objCDOMail.Importance = 1 'Send the e-mail objCDOMail.Send 'Close the server mail object Set objCDOMail = Nothing End If %> <% = strWebSiteName %> - Submit Links

Submit Links

Link <% = strInputName %> will be added when the admin has aproved it!

Close Window

<% '***** START WARNING - REMOVAL OR MODIFICATION OF THIS CODE WILL VIOLATE THE LICENSE AGREEMENT ****** Response.Write("
") '***** END WARNING - REMOVAL OR MODIFICATION OF THIS CODE WILL VIOLATE THE LICENSE AGREEMENT ****** %>