X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-unlock_emails.php;h=6d26db812cfefc04a2b7a5d512797b2b2793e51b;hp=b47c51cf42c863998fbcaf26e84d4edb4481fd1b;hb=116747e4dba29e9e2e4daa82c45d8bbb302e9378;hpb=5bdeaf8b452206598b6c6cd4f941145b11a0eccc diff --git a/inc/modules/admin/what-unlock_emails.php b/inc/modules/admin/what-unlock_emails.php index b47c51cf42..6d26db812c 100644 --- a/inc/modules/admin/what-unlock_emails.php +++ b/inc/modules/admin/what-unlock_emails.php @@ -10,7 +10,12 @@ * -------------------------------------------------------------------- * * Kurzbeschreibung : Werbebuchungen freigeben * * -------------------------------------------------------------------- * - * * + * $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,37 +38,37 @@ // 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__); // Define some variables global $DATA; // Check for mails -$result_main = SQL_QUERY("SELECT `id`, `sender`, `subject`, `payment_id` AS `payment`, `timestamp`, `url`, `target_send`, `cat_id` AS `category` +$result_main = SQL_QUERY("SELECT `id`,`sender`,`subject`,`payment_id` AS `payment`,`timestamp`,`url`,`target_send`,`cat_id` AS `category` FROM `{!_MYSQL_PREFIX!}_pool` WHERE `data_type`='ADMIN' ORDER BY `timestamp` ASC", __FILE__, __LINE__); -if ((SQL_NUMROWS($result_main) > 0) || (isset($_POST['lock']))) { +if ((SQL_NUMROWS($result_main) > 0) || (REQUEST_ISSET_POST(('lock')))) { // Count checked checkboxes $SEL = 0; - if (isset($_POST['sel'])) { + if (REQUEST_ISSET_POST('sel')) { // Are there checked boxes? - if (count($_POST['sel']) > 0) { + if (count(REQUEST_POST('sel')) > 0) { // Count now... We use an own function for now - $SEL = SELECTION_COUNT($_POST['sel']); + $SEL = SELECTION_COUNT(REQUEST_POST('sel')); } // END - if } // END - if - if (isset($_POST['accept'])) { + if (REQUEST_ISSET_POST(('accept'))) { if ($SEL > 0) { // Accept mail orders - foreach ($_POST['sel'] as $id => $value) { + foreach (REQUEST_POST('sel') as $id => $value) { // Secure ID number $id = bigintval($id); @@ -85,13 +90,13 @@ LIMIT 1", SQL_FREERESULT($result); // Is the surfbar installed? - if ((EXT_IS_ACTIVE("surfbar")) && (getConfig('surfbar_migrate_order') == "Y")) { + if ((EXT_IS_ACTIVE('surfbar')) && (getConfig('surfbar_migrate_order') == 'Y')) { // Then "migrate" the URL to the surfbar SURFBAR_ADMIN_MIGRATE_URL($DATA['url'], $DATA['sender']); } // END - if // Check for bonus extension version >= 0.4.4 for the order bonus - if ((GET_EXT_VERSION("bonus") >= "0.4.4") && (getConfig('bonus_active') == "Y")) { + if ((GET_EXT_VERSION('bonus') >= '0.4.4') && (getConfig('bonus_active') == 'Y')) { // Add points directly SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET bonus_order=bonus_order+".getConfig('bonus_order')." WHERE userid=%s LIMIT 1", array(bigintval($DATA['sender'])), __FILE__, __LINE__); @@ -113,19 +118,19 @@ LIMIT 1", } // END - foreach // Set message - $MSG = ADMIN_MAILS_ACTIVATED; + $message = ADMIN_MAILS_ACTIVATED; } else { // Nothing checked! - $MSG = ADMIN_MAILS_NOTHING_CHECKED; + $message = ADMIN_MAILS_NOTHING_CHECKED; } // Mails unlocked for mail delivery - LOAD_TEMPLATE("admin_settings_saved", false, $MSG); - } elseif (isset($_POST['reject'])) { + LOAD_TEMPLATE('admin_settings_saved', false, $message); + } elseif (REQUEST_ISSET_POST(('reject'))) { if ($SEL > 0) { // Reject mail orders - $SW = 2; $OUT = ""; - foreach ($_POST['sel'] as $id => $value) { + $OUT = ''; $SW = 2; + foreach (REQUEST_POST('sel') as $id => $value) { // Secure ID number $id = bigintval($id); @@ -144,17 +149,17 @@ LIMIT 1", SEND_EMAIL($DATA['sender'], MEMBER_ORDER_REJECTED, $msg_user); // If you do not enter an URL to redirect to, your URL will be set! - if ((empty($_POST['redirect'])) || ($_POST['redirect'] == "http://")) $_POST['redirect'] = constant('URL'); + if ((!REQUEST_ISSET_POST(('redirect'))) || (REQUEST_POST('redirect') == "http://")) REQUEST_SET_POST('redirect', constant('URL')); // Redirect URL SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_pool` SET url='%s', data_type='NEW' WHERE id=%s LIMIT 1", - array($_POST['redirect'], $id),__FILE__, __LINE__); + array(REQUEST_POST('redirect'), $id),__FILE__, __LINE__); // Prepare data for the row template $content = array( 'sw' => $SW, 'id' => $id, - 'url' => $_POST['url'][$id], + 'url' => REQUEST_POST('url', $id), ); // Load row template and switch colors @@ -167,11 +172,11 @@ LIMIT 1", LOAD_TEMPLATE("admin_unlock_emails_redir"); } else { // Nothing selected - LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_MAILS_NOTHING_CHECKED')); + LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_MAILS_NOTHING_CHECKED')); } - } elseif ((isset($_POST['lock'])) && ($SEL > 0) && (getConfig('url_blacklist') == "Y")) { + } elseif ((REQUEST_ISSET_POST(('lock'))) && ($SEL > 0) && (getConfig('url_blacklist') == 'Y')) { // Lock URLs - foreach ($_POST['sel'] as $id => $url) { + foreach (REQUEST_POST('sel') as $id => $url) { // Secure id number $id = bigintval($id); @@ -189,10 +194,10 @@ LIMIT 1", } // END - foreach // Output message - LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_URLS_BLOCKED')); - } elseif ((empty($_POST['lock'])) && (empty($_POST['accept'])) && (empty($_POST['reject'])) && (getConfig('url_blacklist') == "Y")) { + LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_URLS_BLOCKED')); + } elseif ((!REQUEST_ISSET_POST(('lock'))) && (!REQUEST_ISSET_POST(('accept'))) && (!REQUEST_ISSET_POST(('reject'))) && (getConfig('url_blacklist') == 'Y')) { // Mail orders are in pool so we can display them - $SW = 2; $OUT = ""; + $OUT = ''; $SW = 2; while ($content = SQL_FETCHARRAY($result_main)) { // Prepare data for the template $content = array( @@ -222,21 +227,21 @@ LIMIT 1", // Prepare rejection URL $REJECT = "http://"; - if (GET_EXT_VERSION("other") >= "0.1.6") $REJECT = getConfig('reject_url'); + if (GET_EXT_VERSION('other') >= '0.1.6') $REJECT = getConfig('reject_url'); define('__REJECT_URL', $REJECT); // Load main template LOAD_TEMPLATE("admin_unlock_emails"); - } elseif ((isset($_POST['lock'])) && (getConfig('url_blacklist') == "N")) { + } elseif ((REQUEST_ISSET_POST(('lock'))) && (getConfig('url_blacklist') != 'Y')) { // URL blacklist not activated - LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_URL_BLACKLIST_DISABLED')); + LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_URL_BLACKLIST_DISABLED')); } else { // Wrong call! - LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_WRONG_CALL')); + LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_WRONG_CALL')); } } else { // No mail orders fond - LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_NO_MAILS_IN_POOL')); + LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_NO_MAILS_IN_POOL')); } //