|
Server : Apache/2.4.62 System : FreeBSD fbsdweb2.web.rcn.net 14.1-RELEASE FreeBSD 14.1-RELEASE releng/14.1-n267679-10e31f0946d8 GENERIC amd64 User : www ( 80) PHP Version : 8.3.8 Disable Function : NONE Directory : /domains/marilynaj/admin/ |
Upload File : |
<!--#include file="scripts/admin_funct.inc"-->
<%
Session("name")
Session("office")
Session("email")
Session("callalert")
Session("phone")
em = Session("email")
u = Session("user")
p = Session("pass")
gt = int(Session("gotoit"))
action = Request.Querystring("action")
source = "D:\\Inetpub\WWWroot\jacobsandassocs.com\data\email_list.xml"
If gt = 0 then
Response.ReDirect "login.htm"
Else
Select Case action
Case "manage"
set xml = Server.CreateObject("Microsoft.XMLDOM")
xml.ValidateOnParse=True
xml.load(source)
set root = xml.documentElement
m = 0
For i = 0 To root.childNodes.length - 1
agentName = root.childNodes.item(i).getAttribute("un")
agentID = root.childNodes.item(i).getAttribute("pz")
emailName = root.childNodes.item(i).getAttribute("name")
emailAddress = root.childNodes.item(i).text
If u = agentName AND p = agentID Then
m = m + 1
if m = 1 Then
Else
Line = Line & "<tr><td colspan='5'><hr size='1' class='list'></td></tr>"
End If
Line = Line & "<tr><td width=1>" & (m) & ".</td>"
Line = Line & "<td width=500>" & emailName & "</td><td>" & "<a href='message_admin.asp?email=" & emailAddress & "&action=delete'><img src='images/delete-btn.gif' border='0'></a></td>"
Line = Line & "<td><a href='message_admin.asp?email=" & emailAddress & "&action=email'><img src='images/email-btn.gif' border='0'></a></td>" & b
Line = Line & "<td><a href='message_admin.asp?email=" & emailAddress & "&action=edit'><img src='images/edit-btn.gif' border='0'></a></td></tr>" & b
End If
Next
set root = nothing
set xml = nothing
If Session("pageTitle") = "" Then
Area = Area & "<div class='menutitlea'><strong>Welcome To The Message Center</strong></div>" & b
Else
Area = Area & "<div class='menutitlea'><strong>" & Session("pageTitle") & "</strong></div>" & b
End If
Area = Area & "<table width='99%' height='225px' border='0' cellspacing='0' cellpadding='5'><tr><td valign='top'>"
Area = Area & "<p>This is YOUR Mailing List. You may add, delete and edit as many email listings you wish. You can also send a mass email to everyone on your Mailing List.</p>"
Area = Area & "<div class='title'>Your Mailing List</div><div class='list'>"
Area = Area & "<table>" & Line & "</table>"
Area = Area & "</div>"
Area = Area & "<div class='title'>Add An Email to Your Mailing List</div><div class='add'>"
Area = Area & " <form method='post' action='message_admin.asp?action=add' style='margin:0px;padding:0px;'>" & b
Area = Area & " <table border='0' cellpadding='5'>" & b
Area = Area & " <tr><td><strong>Name:</strong></td><td width='100%'><input type='text' name='name' style='width:100%;'></td></tr>" & b
Area = Area & " <tr><td valign='top'><br><strong>Email:</strong></td><td><input type='text' name='email' style='width:100%'></td></tr>" & b
Area = Area & " <tr><td> </td><td><input type='submit' value='add new email listing' class='submit'></td></tr>" & b
Area = Area & " </table>" & b
Area = Area & " </form>" & b
Area = Area & "</div>"
Area = Area & "</td></tr></table>"
Response.Write(ServiceitSml("message"))
Session("pageTitle") = ""
Case "delete"
Function delEmail()
set xmlDEL = Server.CreateObject("Microsoft.XMLDOM")
xmlDEL.ValidateOnParse=True
DELsource = source
xmlDEL.load(DELsource)
set rootDEL = xmlDEL.documentElement
For a = 0 To rootDEL.childNodes.length - 1
DELagentName = rootDEL.childNodes.item(a).getAttribute("un")
DELagentID = rootDEL.childNodes.item(a).getAttribute("pz")
DELemailName = rootDEL.childNodes.item(a).getAttribute("name")
DELemailAddress = rootDEL.childNodes.item(a).text
If u = DELagentName AND p = DELagentID Then
If Request.QueryString("email") = DELemailAddress Then
rootDEL.RemoveChild(rootDEL.childNodes.item(a))
xmlDEL.Save(DELsource)
Exit Function
End If
End If
Next
set rootDEL = nothing
set xmlDEL = Nothing
End Function
If Request.QueryString("doit") = "yes" Then
Response.Write(delEmail())
Session("pageTitle") = "Your Email Has Been Deleted From The Mailing List"
Response.Redirect "message_admin.asp"
Else
If Session("pageTitle") = "" Then
Area = Area & "<div class='menutitlea'><strong>Welcome To The Message Center</strong></div>" & b
Else
Area = Area & "<div class='menutitlea'><strong>" & Session("pageTitle") & "</strong></div>" & b
End If
Area = Area & "<table width='99%' height='225px' border='0' cellspacing='0' cellpadding='5'><tr><td valign='top'>"
Area = Area & "<p></p>"
Area = Area & "<div class='title'>Delete Email Listing From Mailing List</div>"
Area = Area & "<div class='list'><table border='0' cellspacing='0' cellpadding='50' width='99%'>" & b
Area = Area & "<tr><td><p>Are you sure you want to delete this Email Listings? If so please select the button below to remove the email from the Mailing List. You can also choose not to remove the listing and select to go back to the list.</p>" & b
Area = Area & "<br><a href='message_admin.asp?action=delete&email=" & Request.QueryString("email") & "&doit=yes' class='button'>YES! Remove Email Listing!</a>"
Area = Area & "<br><a href='message_admin.asp' class='button'>NO! Go Back To List!</a>"
Area = Area & "</td></tr>"
Area = Area & "</table></div>" & b
Area = Area & "</td></tr></table>"
Response.Write(ServiceitSml("webtools"))
End If
Case "add"
Function AddEL()
set xml = Server.CreateObject("Microsoft.XMLDOM")
xml.ValidateOnParse=True
xml.load(source)
set root = xml.documentElement
For i = 0 To (root.childNodes.length - 1)
emailLink = root.childNodes.item(i).text
emailName = root.childNodes.item(i).getAttribute("name")
If Request.Form("email") = emailLink Then
EMstop = "yes"
Session("pageTitle") = "This Email Address Already Exists"
Response.Redirect "message_admin.asp"
End If
Next
If not(EMstop = "yes") then
Set eADD = xml.documentElement.AppendChild(xml.createElement("email"))
eADD.setAttribute "un", u
eADD.setAttribute "pz", p
eADD.setAttribute "name", Request.Form("name")
eADD.Text = Request.Form("email")
xml.Save(source)
set root = Nothing
set xml = Nothing
End If
End Function
If not(Request.Form("name") = "") And not(Request.Form("email") = "") Then
Response.Write(AddEL())
If EMstop = "yes" then
Session("pageTitle") = "This Email Address Already Exists"
Response.Redirect "message_admin.asp"
Else
Session("pageTitle") = "Your New Email Has Been Added To The Mailing List"
Response.Redirect "message_admin.asp"
End If
Else
Session("pageTitle") = "Please Be Sure To Complete All Fields In The Provided Form Below"
Response.Redirect "message_admin.asp"
End If
Case "edit"
set xml = Server.CreateObject("Microsoft.XMLDOM")
xml.ValidateOnParse=True
xml.load(source)
set root = xml.documentElement
For i = 0 To root.childNodes.length - 1
agentName = root.childNodes.item(i).getAttribute("un")
agentID = root.childNodes.item(i).getAttribute("pz")
emailName = root.childNodes.item(i).getAttribute("name")
emailAddress = root.childNodes.item(i).text
If u = agentName AND p = agentID Then
If emailAddress = Request.QueryString("email") Then
Line = Line & "<div class='title'>Edit Email Listing</div>"
Line = Line & "<div class='list'>"
Line = Line & " <table border='0' cellpadding='5'>" & b
Line = Line & " <tr><td><strong>Name:</strong></td><td width='100%'><input type='text' name='name' style='width:100%;' value='" & emailName & "'></td></tr>" & b
Line = Line & " <tr><td><strong>Email:</strong></td><td width='100%'><input type='text' name='email' style='width:100%;' value='" & emailAddress & "'></td></tr>" & b
Line = Line & " <tr><td> </td><td><input type='hidden' name='emailorig' value='" & emailAddress & "'><input type='submit' value='update email listing' class='submit'></td></tr>" & b
Line = Line & " </table>" & b
Line = Line & "</div>" & b
End If
End If
Next
set root = nothing
set xml = nothing
If Session("pageTitle") = "" Then
Area = Area & "<div class='menutitlea'><strong>Welcome To The Message Center</strong></div>" & b
Else
Area = Area & "<div class='menutitlea'><strong>" & Session("pageTitle") & "</strong></div>" & b
End If
Area = Area & "<table width='99%' height='225px' border='0' cellspacing='0' cellpadding='5'><tr><td valign='top'>"
Area = Area & "<p>This is YOUR Mailing List. You may add, delete and edit as many email listings you wish. You can also send a mass email to everyone on your Mailing List.</p>"
Area = Area & "<form method='post' action='message_admin.asp?action=editFin' style='margin:0px;padding:0px;'>" & Line & "</form>"
Area = Area & "</td></tr></table>"
Response.Write(ServiceitSml("message"))
Session("pageTitle") = ""
Case "editFin"
set xml = Server.CreateObject("Microsoft.XMLDOM")
xml.ValidateOnParse=True
xml.load(source)
set root = xml.documentElement
For i = 0 To root.childNodes.length - 1
agentName = root.childNodes.item(i).getAttribute("un")
agentID = root.childNodes.item(i).getAttribute("pz")
emailName = root.childNodes.item(i).getAttribute("name")
emailAddress = root.childNodes.item(i).text
If u = agentName AND p = agentID Then
If Request.Form("emailorig") = emailAddress Then
root.childNodes.item(i).setAttribute "un", agentName
root.childNodes.item(i).setAttribute "pz", agentID
root.childNodes.item(i).setAttribute "name", Request.Form("name")
root.childNodes.item(i).Text = Request.Form("email")
transaction = 1
End If
End If
Next
If transaction = 1 Then
xml.Save(source)
Session("pageTitle") = "Your Email Listing Has Been Updated"
Else
Session("pageTitle") = "There appears to be an error, please try again"
End If
set root = Nothing
set xml = Nothing
Response.Redirect "message_admin.asp"
Case "email"
If Session("pageTitle") = "" Then
Area = Area & "<div class='menutitlea'><strong>Manage Jacobs & Associates, Inc Public Mailing List</strong></div>" & b
Else
Area = Area & "<div class='menutitlea'><strong>" & Session("pageTitle") & "</strong></div>" & b
End If
Area = Area & "<table width='99%' height='225px' border='0' cellspacing='0' cellpadding='5'><tr><td valign='top'>"
Area = Area & "<p>This is YOUR Mailing List. You may add, delete and edit as many email listings you wish. You can also send a mass email to everyone on your Mailing List.</p>"
Area = Area & "<div class='title'>Send Email To " & Request.QueryString("email") & "</div>"
Area = Area & "<div class='list'>" & b
Area = Area & " <form method='post' action='message_admin.asp?action=send' style='margin:0px;padding:0px;'>" & b
Area = Area & " <table width='99%' border='0' cellpadding='5'>" & b
Area = Area & " <tr><td>To: </td><td width='550'><input type='text' name='to' value='" & Request.QueryString("email") & "' style='width:100%'></td></tr>" & b
Area = Area & " <tr><td>From: </td><td><input type='text' name='from' value='" & em & "' style='width:100%'></td></tr>" & b
Area = Area & " <tr><td>Subject: </td><td><input type='text' name='subject' style='width:100%'></td></tr>" & b
Area = Area & " <tr><td valign='top'>Message: </td><td><textarea name='message' rows='8' style='width:100%'></textarea></td></tr>" & b
Area = Area & " <tr><td> </td><td><input type='submit' value='send email' class='submit'></td></tr>" & b
Area = Area & " </table>" & b
Area = Area & " </form>" & b
Area = Area & "</div></td></tr></table>"
Response.Write(ServiceitSml("message"))
Session("pageTitle") = ""
Case "send"
If (not(Request.Form("to") = "") AND not(Request.Form("from") = "") AND not(Request.Form("subject") = "") AND not(Request.Form("message") = "")) Then
Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
Mailer.FromName = "Jacobs & Associates, Inc."
Mailer.FromAddress = "[email protected]"
Mailer.RemoteHost = "smtp.rcn.com"
Mailer.AddRecipient Request.Form("to"), "[email protected]"
Mailer.Subject = Request.Form("from") & ": " & Request.Form("subject")
Mailer.BodyText = Request.Form("message")
Session("pageTitle") = "Your Email Has Been Sent!"
Response.Redirect "message_admin.asp"
Else
Session("email") = Request.Form("from")
em = Session("email")
Area = Area & "<div class='menutitlea'><strong>Please Be Sure To Complete All Fields In The Provided Form Below</strong></div>" & b
Area = Area & "<table width='99%' height='225px' border='0' cellspacing='0' cellpadding='5'><tr><td valign='top'>"
Area = Area & "<p>This is YOUR Mailing List. You may add, delete and edit as many email listings you wish. You can also send a mass email to everyone on your Mailing List.</p>"
Area = Area & "<div class='title'>Send Email To " & Request.Form("to") & "</div>"
Area = Area & "<div class='list'>" & b
Area = Area & " <form method='post' action='message_admin.asp?action=send' style='margin:0px;padding:0px;'>" & b
Area = Area & " <table width='99%' border='0' cellpadding='5'>" & b
Area = Area & " <tr><td>To: </td><td width='550'><input type='text' name='to' value='" & Request.Form("to") & "' style='width:100%'></td></tr>" & b
Area = Area & " <tr><td>From: </td><td><input type='text' name='from' value='" & em & "' style='width:100%'></td></tr>" & b
Area = Area & " <tr><td>Subject: </td><td><input type='text' name='subject' style='width:100%' value='" & Request.Form("subject") & "'></td></tr>" & b
Area = Area & " <tr><td valign='top'>Message: </td><td><textarea name='message' rows='8' style='width:100%'>" & Request.Form("message") & "</textarea></td></tr>" & b
Area = Area & " <tr><td> </td><td><input type='submit' value='send email' class='submit'></td></tr>" & b
Area = Area & " </table>" & b
Area = Area & " </form>" & b
Area = Area & "</div></td></tr></table>"
Response.Write(ServiceitSml("message"))
Session("pageTitle") = ""
End If
Case "emailALL"
If Session("pageTitle") = "" Then
Area = Area & "<div class='menutitlea'><strong>Manage Jacobs & Associates, Inc Public Mailing List</strong></div>" & b
Else
Area = Area & "<div class='menutitlea'><strong>" & Session("pageTitle") & "</strong></div>" & b
End If
Area = Area & "<table width='99%' height='225px' border='0' cellspacing='0' cellpadding='5'><tr><td valign='top'>"
Area = Area & "<p>This is YOUR Mailing List. You may add, delete and edit as many email listings you wish. You can also send a mass email to everyone on your Mailing List.</p>"
Area = Area & "<div class='title'>Send Email To Everyone On Mailing List</div>"
Area = Area & "<div class='list'>" & b
Area = Area & " <form method='post' action='message_admin.asp?action=sendALL' style='margin:0px;padding:0px;'>" & b
Area = Area & " <table width='99%' border='0' cellpadding='5'>" & b
Area = Area & " <tr><td>To: </td><td width='550'><strong>Everyone</strong></td></tr>" & b
Area = Area & " <tr><td>From: </td><td><input type='text' name='from' value='" & em & "' style='width:100%'></td></tr>" & b
Area = Area & " <tr><td>Subject: </td><td><input type='text' name='subject' style='width:100%'></td></tr>" & b
Area = Area & " <tr><td valign='top'>Message: </td><td><textarea name='message' rows='8' style='width:100%'></textarea></td></tr>" & b
Area = Area & " <tr><td> </td><td><input type='submit' value='send email' class='submit'></td></tr>" & b
Area = Area & " </table>" & b
Area = Area & " </form>" & b
Area = Area & "</div></td></tr></table>"
Response.Write(ServiceitSml("message"))
Session("pageTitle") = ""
Case "sendALL"
If (not(Request.Form("from") = "") AND not(Request.Form("subject") = "") AND not(Request.Form("message") = "")) Then
set xml = Server.CreateObject("Microsoft.XMLDOM")
xml.ValidateOnParse=True
xml.load(source)
set root = xml.documentElement
For i = 0 To root.childNodes.length - 1
agentName = root.childNodes.item(i).getAttribute("un")
agentID = root.childNodes.item(i).getAttribute("pz")
emailAddress = root.childNodes.item(i).text
If u = agentName AND p = agentID Then
Set eMailer = Server.CreateObject("SMTPsvg.Mailer")
eMailer.FromName = "Jacobs & Associates, Inc."
eMailer.FromAddress = "[email protected]"
eMailer.RemoteHost = "smtp.rcn.com"
eMailer.AddRecipient emailAddress, "[email protected]"
eMailer.Subject = Request.Form("from") & ": " & Request.Form("subject")
eMailer.BodyText = Request.Form("message")
End If
Next
set root = nothing
set xml = Nothing
Session("pageTitle") = "Your Email Has Been Sent To Everyone!"
Response.Redirect "message_admin.asp"
Else
Area = Area & "<div class='menutitlea'><strong>Please Be Sure To Complete All Fields In The Provided Form Below</strong></div>" & b
Area = Area & "<table width='99%' height='225px' border='0' cellspacing='0' cellpadding='5'><tr><td valign='top'>"
Area = Area & "<p>This is YOUR Mailing List. You may add, delete and edit as many email listings you wish. You can also send a mass email to everyone on your Mailing List.</p>"
Area = Area & "<div class='title'>Send Email To Everyone On Mailing List</div>"
Area = Area & "<div class='list'>" & b
Area = Area & " <form method='post' action='message_admin.asp?action=sendALL' style='margin:0px;padding:0px;'>" & b
Area = Area & " <table width='99%' border='0' cellpadding='5'>" & b
Area = Area & " <tr><td>To: </td><td width='550'><strong>Everyone</strong></td></tr>" & b
Area = Area & " <tr><td>From: </td><td><input type='text' name='from' value='" & em & "' style='width:100%'></td></tr>" & b
Area = Area & " <tr><td>Subject: </td><td><input type='text' name='subject' style='width:100%' value='" & Request.Form("subject") & "'></td></tr>" & b
Area = Area & " <tr><td valign='top'>Message: </td><td><textarea name='message' rows='8' style='width:100%'>" & Request.Form("message") & "</textarea></td></tr>" & b
Area = Area & " <tr><td> </td><td><input type='submit' value='send email' class='submit'></td></tr>" & b
Area = Area & " </table>" & b
Area = Area & " </form>" & b
Area = Area & "</div></td></tr></table>"
Response.Write(ServiceitSml("message"))
Session("pageTitle") = ""
End If
Case Else
set xml = Server.CreateObject("Microsoft.XMLDOM")
xml.ValidateOnParse=True
xml.load(source)
set root = xml.documentElement
m = 0
For i = 0 To root.childNodes.length - 1
agentName = root.childNodes.item(i).getAttribute("un")
agentID = root.childNodes.item(i).getAttribute("pz")
emailName = root.childNodes.item(i).getAttribute("name")
emailAddress = root.childNodes.item(i).text
If u = agentName AND p = agentID Then
m = m + 1
if m = 1 Then
Else
Line = Line & "<tr><td colspan='5'><hr size='1' class='list'></td></tr>"
End If
Line = Line & "<tr><td width=1>" & (m) & ".</td>"
Line = Line & "<td width=500>" & emailName & "</td><td>" & "<a href='message_admin.asp?email=" & emailAddress & "&action=delete'><img src='images/delete-btn.gif' border='0'></a></td>"
Line = Line & "<td><a href='message_admin.asp?email=" & emailAddress & "&action=email'><img src='images/email-btn.gif' border='0'></a></td>" & b
Line = Line & "<td><a href='message_admin.asp?email=" & emailAddress & "&action=edit'><img src='images/edit-btn.gif' border='0'></a></td></tr>" & b
End If
Next
set root = nothing
set xml = nothing
If Session("pageTitle") = "" Then
Area = Area & "<div class='menutitlea'><strong>Welcome To The Message Center</strong></div>" & b
Else
Area = Area & "<div class='menutitlea'><strong>" & Session("pageTitle") & "</strong></div>" & b
End If
Area = Area & "<table width='99%' height='225px' border='0' cellspacing='0' cellpadding='5'><tr><td valign='top'>"
Area = Area & "<p>This is YOUR Mailing List. You may add, delete and edit as many email listings you wish. You can also send a mass email to everyone on your Mailing List.</p>"
Area = Area & "<div class='title'>Your Mailing List</div><div class='list'>"
Area = Area & "<table>" & Line & "</table>"
Area = Area & "</div>"
Area = Area & "<div class='title'>Add An Email to Your Mailing List</div><div class='add'>"
Area = Area & " <form method='post' action='message_admin.asp?action=add' style='margin:0px;padding:0px;'>" & b
Area = Area & " <table border='0' cellpadding='5'>" & b
Area = Area & " <tr><td><strong>Name:</strong></td><td width='100%'><input type='text' name='name' style='width:100%;'></td></tr>" & b
Area = Area & " <tr><td valign='top'><br><strong>Email:</strong></td><td><input type='text' name='email' style='width:100%'></td></tr>" & b
Area = Area & " <tr><td> </td><td><input type='submit' value='add new email listing' class='submit'></td></tr>" & b
Area = Area & " </table>" & b
Area = Area & " </form>" & b
Area = Area & "</div>"
Area = Area & "</td></tr></table>"
Response.Write(ServiceitSml("message"))
Session("pageTitle") = ""
End Select
Session("user")
Session("pass")
End If
%>