X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-unlock_emails.php;h=0cf0c8583fe4111124e33cf9895093f05c6c4849;hp=8a135b2d30e6bca10b563bc1c339955c83e5aeeb;hb=2df9f7a53f8b1dd5164f87824a324ccb3b6634cb;hpb=56931cd9321119dd37372bd16d6c552857e40066 diff --git a/inc/modules/admin/what-unlock_emails.php b/inc/modules/admin/what-unlock_emails.php index 8a135b2d30..0cf0c8583f 100644 --- a/inc/modules/admin/what-unlock_emails.php +++ b/inc/modules/admin/what-unlock_emails.php @@ -16,8 +16,8 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * - * For more information visit: http://www.mxchange.org * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * + * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * @@ -45,7 +45,14 @@ addYouAreHereLink('admin', __FILE__); // Check for mails $result_main = SQL_QUERY("SELECT - `id`, `sender`, `subject`, `payment_id`, `timestamp`, `url`, `target_send`, `cat_id` + `id`, + `sender`, + `subject`, + `payment_id`, + `timestamp`, + `url`, + `target_send`, + `cat_id` FROM `{?_MYSQL_PREFIX?}_pool` WHERE @@ -57,13 +64,17 @@ if ((!SQL_HASZERONUMS($result_main)) || (isFormSent('lock'))) { if (isFormSent('accept')) { if (ifPostContainsSelections()) { // Accept mail orders - foreach (postRequestParameter('sel') as $id => $value) { + foreach (postRequestElement('sel') as $id => $value) { // Secure id number $id = bigintval($id); // Order placed in queue... - $result = SQL_QUERY_ESC("SELECT - po.`url`, po.`subject`, po.`sender`, pay.`payment`, po.`payment_id` + $result = SQL_QUERY_ESC('SELECT + po.`url`, + po.`subject`, + po.`sender`, + pay.`payment`, + po.`payment_id` FROM `{?_MYSQL_PREFIX?}_pool` AS `po` INNER JOIN @@ -72,7 +83,7 @@ ON po.`payment_id`=pay.`id` WHERE po.`id`=%s -LIMIT 1", +LIMIT 1', array($id), __FILE__, __LINE__); // Update wents fine? @@ -84,7 +95,7 @@ LIMIT 1", // @TODO Rewrite these if-blocks to a filter if ((isExtensionActive('surfbar')) && (getConfig('surfbar_migrate_order') == 'Y')) { // Then "migrate" the URL to the surfbar - SURFBAR_ADMIN_MIGRATE_URL($content['url'], $content['sender']); + doSurfbarAdminMigrateUrl($content['url'], $content['sender']); } // END - if // Check for bonus extension version >= 0.4.4 for the order bonus @@ -94,7 +105,7 @@ LIMIT 1", array(bigintval($content['sender'])), __FILE__, __LINE__); // Subtract bonus points from system - handleBonusPoints(getConfig('bonus_order')); + handleBonusPoints(getConfig('bonus_order'), $content['sender']); } // END - if // Load email template @@ -121,11 +132,11 @@ LIMIT 1", // Mails unlocked for mail delivery displayMessage($message); - } elseif (isPostRequestParameterSet('reject')) { + } elseif (isPostRequestElementSet('reject')) { if (ifPostContainsSelections()) { // Reject mail orders $OUT = ''; - foreach (postRequestParameter('sel') as $id => $value) { + foreach (postRequestElement('sel') as $id => $value) { // Secure id number $id = bigintval($id); @@ -144,18 +155,18 @@ LIMIT 1", sendEmail($content['sender'], '{--MEMBER_ORDER_REJECTED--}', $message_user); // If you do not enter an URL to redirect to, your URL will be set! - if ((!isPostRequestParameterSet('redirect')) || (postRequestParameter('redirect') == 'http://')) { - setPostRequestParameter('redirect', getUrl()); + if ((!isPostRequestElementSet('redirect')) || (postRequestElement('redirect') == 'http://')) { + setPostRequestElement('redirect', getUrl()); } // END - if // Redirect URL - SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_pool` SET `url`='%s', `data_type`='NEW' WHERE `id`=%s LIMIT 1", - array(postRequestParameter('redirect'), $id),__FILE__, __LINE__); + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_pool` SET `url`='%s',`data_type`='NEW' WHERE `id`=%s LIMIT 1", + array(postRequestElement('redirect'), $id),__FILE__, __LINE__); // Prepare data for the row template $content = array( 'id' => $id, - 'url' => postRequestParameter('url', $id), + 'url' => postRequestElement('url', $id), ); // Load row template and switch colors @@ -170,7 +181,7 @@ LIMIT 1", } } elseif ((isFormSent('lock')) && (ifPostContainsSelections()) && (isUrlBlacklistEnabled())) { // Lock URLs - foreach (postRequestParameter('sel') as $id => $url) { + foreach (postRequestElement('sel') as $id => $url) { // Secure id number $id = bigintval($id);