function main() { $this->PageSubtitle = "Send a Test Email"; include_once "ddtable_adm_emails.php"; Hidden("gp_page", "x_email"); $table =& $GLOBALS["AG"]["tables"]["adm_emails"]; $em = array("email_to" => CleanBox("email_to", "", false), "email_subject" => CleanBox("email_subject", "", false), "email_message" => CleanBox("email_message", "", false)); // If this is postback, process the email before putting // the boxes back up. // if ($em["email_to"]) { X_EMAIL_SEND($em); echo "<p>The email to " . $em["email_to"] . " has been accepted " . "by the email server, please check your email system " . "to see if the server has successfully sent the email.</p>" . "You may also " . HTMLE_A_STD("View Sent Emails", 'adm_emails') . " or " . HTMLE_A_STD("Send another email", 'x_email') . "</p>"; return; } // In this little trick we set "uino" to all of the columns // except the ones we are setting. foreach ($table["flat"] as $colname => $colinfo) { if ($colname == "email_to" || $colname == "email_subject" || $colname == "email_message") { continue; } $table["flat"][$colname]["uino"] = "Y"; } ?> <?php echo HTMLX_Errors(); ?> <?php echo ElementOut("msg", true); ?> <p>This is a very minimal page that can be used to verify that this system can send emails. Enter a valid address, subject, and short message below and then click on the [SEND] button.</p> <table> <?php echo $this->HTML_INPUTS($GLOBALS["AG"]["tables"]["adm_emails"], $em, "ins", true); ?> </table> <br> <br> <?php echo HTMLE_A_JS("formSubmit()", "Send Email Now"); ?> <?php }
function HTMLE_A_JSSubmit() { return HTMLE_A_JS("formSubmit()", "Save Changes"); }