function send_sms($email, $message, $subject = NULL, $from = NULL) { $from = AMPSystem_Email::sanitize($from); if (mail($email, $subject, $message, "From: {$from}\r\nReply-To: {$from}\r\nX-Sender: {$from}\r\nReturn-Path: {$from}", "-f{$from}")) { return true; } }
function send_email($email, $message, $subject = NULL, $from = NULL, $replyto = NULL) { $mail = new html_mime_mail(array("Reply-To: {$replyto}", "X-Mailer: AMP v3.4", "X-MessageId: {$message_ID}")); # $mail->add_html($message, $text = NULL, $images_dir = NULL) $mail->add_text($textmessage); $mail->send("", $to_addr, $from_name, $from_addr, $subject); $from = AMPSystem_Email::sanitize($from); $replyto = AMPSystem_Email::sanitize($replyto); if (mail($email, $subject, $message, "From: {$from}\r\nReply-To: {$replyto}\r\nX-Sender: {$from}\r\nReturn-Path: {$replyto}", "-f{$replyto}")) { return true; } }
include "AMP/BaseDB.php"; include "AMP/BaseTemplate.php"; include "AMP/BaseModuleIntro.php"; include_once "AMP/System/Email.inc.php"; include "dropdown.php"; // *** Edit Operations: declare Tables $MM_editAction = $PHP_SELF; if ($QUERY_STRING) { $MM_editAction = $MM_editAction . "?" . $QUERY_STRING; } $MM_abortEdit = 0; $MM_editQuery = ""; // *** Insert Record: set Variables if (isset($MM_insert)) { $messagetext = "To remove your listing simply visit this page " . $Web_url . "ride_remove2.php?email={$email} and press the remove button"; mail("{$email}", "remove your ride posting", "{$messagetext}", "From: " . AMPSystem_Email::sanitize($MM_email_from) . "\nX-Mailer: My PHP Script\n"); header("Location: ride_remove.php?show=yes"); } $emails = $dbcon->Execute("SELECT * FROM ride where publish='1' and board='2' ORDER BY email ASC"); if ($emails) { $emails_numRows = 0; $emails__totalRows = $emails->RecordCount(); ?> <p>Select your e-mail</p> <form ACTION="<?php echo $MM_editAction; ?> " METHOD="POST" name="form1"> <select name="email">
$MM_fieldsStr = "firstname|value|lastname|value|email|value|phone|value|avalible|value|beds|value|floor|value|tents|value|access|value|location|value|transport|value|parking|value|cooking|value|children|value|smoking|value|info|value|publish|value|board|value"; $MM_columnsStr = "firstname|',none,''|lastname|',none,''|email|',none,''|phone|',none,''|avalible|',none,''|beds|',none,''|floor|',none,''|tents|',none,''|access|',none,''|location|',none,''|transport|',none,''|parking|',none,''|cooking|',none,''|children|',none,''|smoking|',none,''|info|',none,''|publish|',none,''|board|none,none,none"; //Mail to admin for confirmation if ($confirm == "admin") { $MM_editRedirectUrl = "housing_confirm.php?step=admin"; $messagetext = $_POST["firstname"] . ' ' . $_POST["lastname"] . " has added a posting to the ride board\n Information:{$firstname}, {$Lastname}, {$email}, {$phone}, {$avalible}, {$beds}, {$floor}, {$tents}, {$access}, {$location}, {$transport}, {$parking}, {$cooking}, {$children}, {$smoking}, {$info} \n\nPlease visit " . $Web_url . "housing_confirm.php?email=" . $_POST["email"] . " to publish"; if ($MM_email_housing) { mail($MM_email_housing, "new housing board posting", "{$messagetext}", "From: " . AMPSystem_Email::sanitize($MM_email_from) . "\nX-Mailer: My PHP Script\n"); } } //Mail to poster for confirmation if ($confirm == "poster") { $MM_editRedirectUrl = "housing_confirm.php?step=email"; $messagetext2 = "\nPlease visit " . $Web_url . "housing_confirm.php?email=" . $_POST["email"] . " to confirm your housing board posting./n/n Information:{$firstname}, {$Lastname}/n {$email}/n {$phone}/n {$avalible}/n {$beds}/n {$floor}/n {$tents}/n {$access}/n {$location}/n {$transport}/n {$parking}/n {$cooking}/n {$children}/n {$smoking}/n {$info} "; if ($_POST["email"]) { mail($_POST["email"], "confirm your housing board posting", "{$messagetext2}", "From: " . AMPSystem_Email::sanitize($MM_email_from) . "\nX-Mailer: My PHP Script\n"); } } require "DBConnections/insetstuff.php"; require "DBConnections/dataactions.php"; } ?> <table width="100%" border="0" cellspacing="0" cellpadding="15"> <tr> <td> <form method="POST" action="<?php echo $MM_editAction; ?> " name="form1">
if ($checkfirst->RecordCount() > 0) { $MM_abortEdit = 1; $problem = "<strong><p class=docbox>The email address you entered is already registered on the ride board. Please use <a href=\"rides.php?uid=" . $checkfirst->Fields("uniqueid") . "\">this link</a> to login or enter new information below.</strong><P>"; } if (!$MM_abortEdit) { //Mail to admin for confirmation if ($confirm == "admin") { $MM_editRedirectUrl = $board . "_signin.php?step=admin"; $messagetext = "{$firstname} {$lastname} has added a posting on the {$board} board\n\n Information:\n Phone: {$phone}\n Email: {$email}\n State: {$state}\n Departing From: {$depatingfrom}\n Departure Date: {$depaturedate}\n Returning to: {$returningto}\n Return Date:{$returndate}\n Number of People: {$numpeople}\n Comments: {$commets} \n\nPlease visit " . $Web_url . $board . "_signin.php?uid={$uniqiueid} to publish"; mail("{$MM_email_ride}", "new {$board} board posting", "{$messagetext}", "From: " . AMPSystem_Email::sanitize($MM_email_from) . "\n"); } //Mail to poster for confirmation if ($confirm == "poster") { $MM_editRedirectUrl = $board . "_signin.php?step=email"; $messagetext2 = "\nPlease visit <a href=\"" . $Web_url . $board . "_signin.php?uid={$uniqueid}&action=confirm\">" . $Web_url . $board . "_signin.php?uid={$uniqueid}&action=confirm</A> to confirm your {$board} board posting.\n\n Information:\n Phone: {$phone}\n Email: {$email}\n State: {$state}\n Departing From: {$depatingfrom}\n Departure Date: {$depaturedate}\n Returning to: {$returningto}\n Return Date:{$returndate}\n Number of People: {$numpeople}\n Comments: {$commets} \n "; mail("{$pemail}", "Confirm your {$board} board posting", "{$messagetext2}", "From: " . AMPSystem_Email::sanitize($MM_email_from) . "\n"); } } } #} else { # echo $dbcon->ErrorMsg(); #} require "DBConnections/insetstuff.php"; require "DBConnections/dataactions.php"; ob_end_flush(); } if ($MM_update) { echo "MMUPDATE<BR>"; } if ($MM_insert) { echo "MMINSERT<BR>";
require_once 'AMP/Form/Element/Captcha.inc.php'; $captcha_demo = new PhpCaptcha(array()); $captcha_valid = $captcha_demo->Validate($_POST['captcha']); if (!$captcha_valid) { $_REQUEST['kill_insert'] = 'captcha'; $_GET['showask'] = '1'; $captcha_message = AMP_TEXT_ERROR_FORM_CAPTCHA_FAILED; } } if (isset($_REQUEST["MM_insert"]) && $_REQUEST["MM_insert"] && $captcha_valid) { $MM_editTable = "faq"; $MM_editRedirectUrl = "faq.php"; $MM_fieldsStr = "question|value|first|value|last|value|email|value"; $MM_columnsStr = "question|',none,''|firstname|',none,''|lastname|',none,''|email|',none,''"; if ($MM_email_faq) { mail($MM_email_faq, "faq needs response", "There is a new FAQ that needs answering: " . $_POST["question"] . " From:" . $_POST["email"] . " \nPlease visit {$Web_url}/system/faq.php?action=list to answer", "From: " . AMPSystem_Email::sanitize($MM_email_from) . "\nX-Mailer: My PHP Script\n"); } require "Connections/insetstuff.php"; require "Connections/dataactions.php"; header("Location: faq.php"); } $type__MMColParam = "0"; if (isset($_GET["typeid"])) { $type__MMColParam = mysql_real_escape_string($_GET["typeid"]); } $called__MMColParam = "1"; if (isset($_GET["id"])) { $called__MMColParam = mysql_real_escape_string($_GET["id"]); } $type = $dbcon->CacheExecute("SELECT * FROM faqtype WHERE id = " . $type__MMColParam . "") or AMP_redirect('search.php'); $called = $dbcon->CacheExecute("SELECT * FROM faq WHERE id = " . $called__MMColParam . "") or AMP_redirect('search.php');
// *** Edit Operations: declare Tables $MM_editAction = $PHP_SELF; if ($QUERY_STRING) { $MM_editAction = $MM_editAction . "?" . $QUERY_STRING; } $MM_abortEdit = 0; $MM_editQuery = ""; // *** Insert Record: set variables if (isset($MM_insert)) { // $MM_editConnection = $MM__STRING; $MM_editTable = "articles"; $MM_editRedirectUrl = "index.php"; $date = DateConvertIn($date); $MM_fieldsStr = "type|value|class|value|select3|value|uselink2|value|uselink|value|publish|value|titlex|value|subtitle|value|html|value|article|value|textfield|value|author|value|linktext|value|date|value|usedate|value|doc|value|radiobutton|value|link|value|linkuse|value|new|value|actionitem|value|actionlink|value|piccap|value|picture|value|usepict|value|morelink|value|usemore|value|ID|value|pageorder|value"; $MM_columnsStr = "type|none,none,NULL|class|none,none,NULL|catagory|none,none,NULL|fplink|none,1,0|uselink|none,1,0|publish|none,1,0|title|',none,''|subtitile|',none,''|html|none,1,0|test|',none,''|shortdesc|',none,''|author|',none,''|linktext|',none,''|date|',none,NULL|usedate|none,1,0|doc|',none,''|doctype|',none,''|link|',none,''|linkover|none,1,0|new|none,1,0|actionitem|none,1,0|actionlink|none,none,NULL|piccap|',none,''|picture|',none,''|picuse|none,none,NULL|morelink|',none,''|usemore|none,1,0|enteredby|none,none,NULL|pageorder|none,none,NULL"; mail("{$MM_email_usersubmit}", "user submited article", "{$article}", "From: " . AMPSystem_Email::sanitize($author) . "\nX-Mailer: My PHP Script\n"); require "Connections/insetstuff.php"; } require "Connections/dataactions.php"; $typelab = $dbcon->Execute("SELECT id, type FROM articletype ORDER BY type ASC") or die($dbcon->ErrorMsg()); $typelab_numRows = 0; $typelab__totalRows = $typelab->RecordCount(); $sublab = $dbcon->Execute("SELECT id, subname FROM articlesubtype") or die($dbcon->ErrorMsg()); $sublab_numRows = 0; $sublab__totalRows = $sublab->RecordCount(); $catagory = $dbcon->Execute("SELECT * FROM catagory ORDER BY catname ASC") or die($dbcon->ErrorMsg()); $catagory_numRows = 0; $catagory__totalRows = $catagory->RecordCount(); $action = $dbcon->Execute("SELECT * FROM sendfax ORDER BY subject ASC") or die($dbcon->ErrorMsg()); $action_numRows = 0; $action__totalRows = $action->RecordCount();
function senddelemail($pemail) { global $board, $dbcon, $Web_url, $modinid; $getuid = $dbcon->Execute("Select id, uniqueid from {$board} where pemail = " . $dbcon->qstr($pemail)); $uid = $getuid->Fields("uniqueid"); $messagetext = "To remove your listing simply visit this page " . $Web_url . $board . "_signin.php?deluid={$uid}"; if (email_is_valid($pemail)) { mail($pemail, "remove your {$board} posting", "{$messagetext}", "From:" . AMPSystem_Email::sanitize($MM_email_from)); echo "An e-mail has been sent to you with instructions on how to remove yourself from the board."; } else { echo "Your email is invalid or not in our system<br><br>"; deleteform(); } }
Description: housing remove page GET VARS show SYS VARS $MM_email_from To Do: *********************/ $modid = 3; $intro_id = 19; include "AMP/BaseDB.php"; include "AMP/BaseTemplate.php"; include "AMP/BaseModuleIntro.php"; include_once "AMP/System/Email.inc.php"; if (isset($_POST["MM_insert"])) { $messagetext = "To remove your listing simply visit this page " . $Web_url . "housing_remove2.php?email=" . $_POST["email"] . " and press the remove button"; if ($_POST["email"]) { mail($_POST["email"], "remove your housing posting", "{$messagetext}", "From: " . AMPSystem_Email::sanitize($MM_email_from) . "\nX-Mailer: My PHP Script\n"); header("Location: housing_remove.php?show=yes"); } } $emails = $dbcon->Execute("SELECT * FROM housing where publish='1' and board='2' ORDER BY email ASC") or die($dbcon->ErrorMsg()); $emails_numRows = 0; $emails__totalRows = $emails->RecordCount(); ?> <p>Select your e-mail</p> <form ACTION="<?php echo $MM_editAction; ?> " METHOD="POST" name="form1"> <select name="email"> <?php if ($emails__totalRows > 0) {
// *** Insert Record: set Variables if (isset($MM_insert)) { $MM_editTable = "ride"; $MM_fieldsStr = "firstname|value|lastname|value|phone|value|email|value|depatingfrom|value|depaturedate|value|returningto|value|returndate|value|numpeople|value|ride|value|commets|value|publish|value|board|value"; $MM_columnsStr = "firstname|',none,''|lastname|',none,''|phone|',none,''|email|',none,''|depatingfrom|',none,''|depaturedate|',none,''|returningto|',none,''|returndate|',none,''|numpeople|',none,''|need|',none,''|commets|',none,''|publish|',none,''|board|none,none,none"; //Mail to admin for confirmation if ($confirm == "admin") { $MM_editRedirectUrl = "ride_confirm.php?step=admin"; $messagetext = "{$firstname} {$lastname} has added a posting to the ride board\n Information:{$phone}, {$email}, {$departingform}, {$depaturedate}, {$returningto}, {$retundate}, {$numpeople}, {$ride}, {$comments} \n\nPlease visit " . $Web_url . "ride_confirm.php?email={$email} to publish"; mail("{$MM_email_ride}", "new ride board posting", "{$messagetext}", "From: " . AMPSystem_Email::sanitize($MM_email_from) . "\nX-Mailer: My PHP Script\n"); } //Mail to poster for confirmation if ($confirm == "poster") { $MM_editRedirectUrl = "ride_confirm.php?step=email"; $messagetext2 = "\nPlease visit " . $Web_url . "ride_confirm.php?email={$email} to confirm your ride board posting./n/n Information: {$phone}, {$email}, {$departingform}, {$depaturedate}, {$returningto}, {$retundate}, {$numpeople}, {$ride}, {$comments} "; mail("{$email}", "confirm your ride board posting", "{$messagetext2}", "From: " . AMPSystem_Email::sanitize($MM_email_from) . "\nX-Mailer: My PHP Script\n"); } require "DBConnections/insetstuff.php"; require "DBConnections/dataactions.php"; } ?> <form name="rieinput" action="<?php echo $MM_editAction; ?> " method="POST"> <table width="100%" border="0" cellspacing="0"> <tr> <td align="right" class="form"><div align="left">First Name</div></td> <td> <input name="firstname" type="text" size="35" > </td> </tr> <tr>