X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-refbanner.php;h=0982ed3ef8a160b298fe8a91c0fb95994910612f;hb=4f7df133f736da124e6f7bd02008b9093f736451;hp=937996ee91f0df749b39639fb9578e9ffb6d15d8;hpb=2379934be6a196a54f4155bb8e24c49b20736969;p=mailer.git
diff --git a/inc/modules/admin/what-refbanner.php b/inc/modules/admin/what-refbanner.php
index 937996ee91..0982ed3ef8 100644
--- a/inc/modules/admin/what-refbanner.php
+++ b/inc/modules/admin/what-refbanner.php
@@ -6,7 +6,7 @@
* -------------------------------------------------------------------- *
* File : what-refbanner.php *
* -------------------------------------------------------------------- *
- * Short description : Manage all referal banner *
+ * Short description : Manage all referral banner *
* -------------------------------------------------------------------- *
* Kurzbeschreibung : Alle Banner fuer die Ref-Links verwalten *
* -------------------------------------------------------------------- *
@@ -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 *
@@ -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'),
@@ -80,7 +78,7 @@ VALUES ('%s','%s','%s')",
$id = bigintval($id);
// Update entry
- SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_refbanner` SET `url`='%s', `alternate`='%s', `visible`='%s' WHERE `id`=%s LIMIT 1",
+ SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_refbanner` SET `url`='%s',`alternate`='%s',`visible`='%s' WHERE `id`=%s LIMIT 1",
array(
postRequestElement('url', $id),
postRequestElement('alternate', $id),
@@ -97,7 +95,7 @@ VALUES ('%s','%s','%s')",
$content = '{--SETTINGS_SAVED--}';
} else {
// Nothing has been updated
- $content = '{--SETTINGS_NOT_SAVED--}';
+ $content = '{--SETTINGS_NOT_SAVED--}';
}
// Display message
@@ -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);
@@ -116,11 +114,11 @@ VALUES ('%s','%s','%s')",
$content['visible'] = addSelectionBox('yn', $content['visible'], 'visible');
// Load row template and switch color
- $OUT .= loadTemplate('admin_edit_refbanner_row', true, $content);
+ $OUT .= loadTemplate('admin_edit_refbanner_row', TRUE, $content);
} // END - foreach
// Load main template
- loadTemplate('admin_edit_refbanner', false, $OUT);
+ loadTemplate('admin_edit_refbanner', FALSE, $OUT);
} else {
if ((ifPostContainsSelections()) && (isFormSent('delete'))) {
// Delete banner
@@ -130,26 +128,26 @@ VALUES ('%s','%s','%s')",
} // END - foreach
} // END - if
- // Referal levels
- $result = SQL_QUERY('SELECT `id`,`url`,`alternate`,`visible`,`counter`,`clicks` FROM `{?_MYSQL_PREFIX?}_refbanner` ORDER BY `url` ASC', __FILE__, __LINE__);
+ // Referral levels
+ $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)) {
- // Make referal banner editable and deletable
+ // Make referral banner editable and deletable
$OUT = '';
while ($content = SQL_FETCHARRAY($result)) {
// Load row template and switch color
- $OUT .= loadTemplate('admin_list_refbanner_row', true, $content);
+ $OUT .= loadTemplate('admin_list_refbanner_row', TRUE, $content);
} // END - while
// Free memory
SQL_FREERESULT($result);
// Load main template
- loadTemplate('admin_list_refbanner', false, $OUT);
+ loadTemplate('admin_list_refbanner', FALSE, $OUT);
} // END - if
- // Form for adding new referal levels
+ // Form for adding new referral levels
loadTemplate('admin_add_refbanner');
}