X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-edit_emails.php;h=c36da875352539a30b4bf41537f42e0cad4adeae;hb=9e604ce404fe7d2d8dafc259a5fb8cd826aec5e6;hp=350831451201e757e32367c7e1e641115941a654;hpb=4001187f22197f55e5a1f211fc8defcc180f7c32;p=mailer.git diff --git a/inc/modules/admin/what-edit_emails.php b/inc/modules/admin/what-edit_emails.php index 3508314512..c36da87535 100644 --- a/inc/modules/admin/what-edit_emails.php +++ b/inc/modules/admin/what-edit_emails.php @@ -10,7 +10,12 @@ * -------------------------------------------------------------------- * * Kurzbeschreibung : Werbebuchungen aendern (z.B. umleiten der URL) * * -------------------------------------------------------------------- * - * * + * $Revision:: $ * + * $Date:: $ * + * $Tag:: 0.2.1-FINAL $ * + * $Author:: $ * + * Needs to be in all Files and every File needs "svn propset * + * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2008 by Roland Haeder * * For more information visit: http://www.mxchange.org * @@ -33,23 +38,23 @@ // Some security stuff... if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; + $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; require($INC); } // Add description as navigation point -ADD_DESCR("admin", __FILE__); +ADD_DESCR('admin', __FILE__); -if ((IS_FORM_SENT()) && (!REQUEST_ISSET_POST(('id')))) { +if ((isFormSent()) && (!REQUEST_ISSET_POST('id'))) { REQUEST_UNSET_POST('ok'); } $result = SQL_QUERY("SELECT id, sender, subject, payment_id, cat_id FROM `{!_MYSQL_PREFIX!}_pool` ORDER BY timestamp", __FILE__, __LINE__); if (SQL_NUMROWS($result) > 0) { - if (IS_FORM_SENT()) { + if (isFormSent()) { // Make mail editable... - $result = SQL_QUERY_ESC("SELECT subject, text, url FROM `{!_MYSQL_PREFIX!}_pool` WHERE id=%s LIMIT 1", - array(bigintval(REQUEST_POST('id'))), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT subject, text, url FROM `{!_MYSQL_PREFIX!}_pool` WHERE `id`=%s LIMIT 1", + array(bigintval(REQUEST_POST('id'))), __FILE__, __LINE__); list($subj, $text, $url) = SQL_FETCHROW($result); SQL_FREERESULT($result); // @TODO More constants to rewrite @@ -60,19 +65,19 @@ if (SQL_NUMROWS($result) > 0) { // Load template LOAD_TEMPLATE("admin_edit_email"); - } elseif (REQUEST_ISSET_POST(('save'))) { + } elseif (REQUEST_ISSET_POST('save')) { // Save changes SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_pool` SET subject='%s', text='%s', url='%s' -WHERE id=%s LIMIT 1", - array( - REQUEST_POST('subj'), - REQUEST_POST('text'), - REQUEST_POST('url'), - bigintval(REQUEST_POST('id')), -), __FILE__, __LINE__); +WHERE `id`=%s LIMIT 1", + array( + REQUEST_POST('subj'), + REQUEST_POST('text'), + REQUEST_POST('url'), + bigintval(REQUEST_POST('id')), + ), __FILE__, __LINE__); if (SQL_AFFECTEDROWS() == 1) { $content = getMessage('SETTINGS_SAVED'); @@ -81,10 +86,10 @@ WHERE id=%s LIMIT 1", } // Display message - LOAD_TEMPLATE("admin_settings_saved", false, $content); + LOAD_TEMPLATE('admin_settings_saved', false, $content); } else { // There are mail orders available - $OUT = ""; $SW = 2; + $OUT = ''; $SW = 2; while ($content = SQL_FETCHARRAY($result)) { // Prepare data for the row template // @TODO Rewritings: subj->subject in template @@ -92,9 +97,9 @@ WHERE id=%s LIMIT 1", 'sw' => $SW, 'id' => $content['id'], 'subj' => $content['subject'], - 'uid' => ADMIN_USER_PROFILE_LINK($content['sender']), - 'pay' => GET_PAYMENT($content['payment_id']), - 'cat' => GET_CATEGORY($content['cat_id']), + 'uid' => generateUserProfileLink($content['sender']), + 'pay' => getPaymentTitlePrice($content['payment_id']), + 'cat' => getCategory($content['cat_id']), ); // Load row template and switch colors @@ -113,7 +118,7 @@ WHERE id=%s LIMIT 1", } } else { // No mail orders left in pool - LOAD_TEMPLATE("admin_settings_saved", false, "{--ADMIN_NO_MAILS_IN_POOL--}"); + LOAD_TEMPLATE('admin_settings_saved', false, "{--ADMIN_NO_MAILS_IN_POOL--}"); } //