X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-refbanner.php;h=1f48c21fca25807d71365a8981a5d4f798fc42c6;hp=e8754f6ba2eb3b28ab48ec4d24dd0344f1914e55;hb=2df9f7a53f8b1dd5164f87824a324ccb3b6634cb;hpb=e3934352dffa6eb9da59a137ae1a9414e5b4d80b diff --git a/inc/modules/admin/what-refbanner.php b/inc/modules/admin/what-refbanner.php index e8754f6ba2..1f48c21fca 100644 --- a/inc/modules/admin/what-refbanner.php +++ b/inc/modules/admin/what-refbanner.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * 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 * @@ -49,10 +49,8 @@ if ((!isPostRequestElementSet('url')) || (!isPostRequestElementSet('alternate')) } // END - if if (isFormSent()) { - // Fix older calls from add-new-banner-form - if (!isGetRequestElementSet('mode')) setGetRequestElement('mode', 'add'); $sql = ''; - switch (getRequestElement('mode')) { + switch (getRequestElement('do')) { case 'add': // Check if banner is already added $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_refbanner` WHERE `url`='%s' LIMIT 1", @@ -61,7 +59,7 @@ if (isFormSent()) { // Was the banner found? if (SQL_HASZERONUMS($result)) { // Add banner - SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_refbanner` (`url`,`alternate`,`visible`) + SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_refbanner` (`url`, `alternate`, `visible`) VALUES ('%s','%s','%s')", array( postRequestElement('url'), @@ -107,7 +105,7 @@ VALUES ('%s','%s','%s')", $OUT = ''; foreach (postRequestElement('sel') as $id => $sel) { // Load data - $result = SQL_QUERY_ESC("SELECT `id`,`url`,`alternate`,`visible` FROM `{?_MYSQL_PREFIX?}_refbanner` WHERE `id`=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT `id`, `url`, `alternate`, `visible` FROM `{?_MYSQL_PREFIX?}_refbanner` WHERE `id`=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); $content = SQL_FETCHARRAY($result); SQL_FREERESULT($result); @@ -131,7 +129,7 @@ VALUES ('%s','%s','%s')", } // END - if // Referral levels - $result = SQL_QUERY('SELECT `id`,`url`,`alternate`,`visible`,`counter`,`clicks` FROM `{?_MYSQL_PREFIX?}_refbanner` ORDER BY `url` ASC', __FILE__, __LINE__); + $result = SQL_QUERY('SELECT `id`, `url`, `alternate`, `visible`, `counter`, `clicks` FROM `{?_MYSQL_PREFIX?}_refbanner` ORDER BY `url` ASC', __FILE__, __LINE__); // Entries found? if (!SQL_HASZERONUMS($result)) {