$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(); }