DEFINE("BASEDIR", $_SERVER['DOCUMENT_ROOT'] . "/planer/"); // base dir of cms including document root DEFINE("ROOT", "/planer/"); // base dir of cms without document root DEFINE("TEMPLATEDIR", BASEDIR . "template/"); // directory of template files DEFINE("PLUGINDIR", BASEDIR . "plugins/"); // directory of plugins DEFINE("LANGUAGE", "de-DE"); // used language file DEFINE("FRONTENDURL", "http://localhost/planer/"); DEFINE("ORGANISATION", "Organisation Ltd."); DEFINE("COMPRESS_ENABLED", false); DEFINE("ENFORCE_SSL", false); // redirect to https DEFINE("WEBMASTER", "*****@*****.**"); require "dbConn.php"; require "template.php"; dbConn::setHost("localhost"); dbConn::setDatabase("schichtplaner"); dbConn::setUsername("root"); dbConn::setPassword("root"); dbConn::setTablePrefix("mvoe_"); template::setDoIndent(true); require_once "emailSettings.php"; emailSettings::setHost("localhost"); emailSettings::setUsername("*****@*****.**"); emailSettings::setPassword("53cur3"); emailSettings::setSender(WEBMASTER); emailSettings::setMethod(emailSendMethod::PHPMAILER);
/** * Getter of the host field. * * @return emailSendMethod * @static */ public static function setMethod($val) { emailSettings::$method = $val; }
$change->insert("user", $r['nameAfter']); } else { $change->insert("user", "<small><span style=\"text-decoration:line-through;\">{$r['nameBefore']}</span></small>\n <br /><strong>{$r['nameAfter']}</strong>"); } if ($r['emailBefore'] == $r['emailAfter']) { $change->insert("email", $r['emailAfter']); } else { $change->insert("email", "<small><span style=\"text-decoration:line-through;\">{$r['emailBefore']}</span></small>\n <br /><strong>{$r['emailAfter']}</strong>"); } $change->insert("hidden", "hidden"); $email->insert("content", $change->getOutput()); dbConn::execute("DELETE FROM :prefix:email_pending WHERE historyId = :0", $r['historyId']); } } if ($emailRequired) { $emailError = ""; $arr = array(); foreach (dbConn::query("SELECT email FROM :prefix:email_subscriber \n WHERE plan = :0", $_POST['plan']) as $r) { $arr[] = $r['email']; } if (count($arr) > 0 && trim($arr[0]) != "") { emailSettings::send($arr, "Änderungen am Schichtplan " . $_POST['plan'], $email->getOutput(), $emailError); if ($emailError != "") { throw new Exception($emailError); } } } echo "SUCCESS"; } catch (Exception $ex) { echo $ex->getMessage(); }