From: Roland Häder Date: Wed, 29 Jul 2009 22:12:32 +0000 (+0000) Subject: Fix for wrong mask fill-in X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=1a00ba8958d8b6f0cb689690e955eb63fc75ffa8;p=mailer.git Fix for wrong mask fill-in --- diff --git a/inc/db/lib-mysql3.php b/inc/db/lib-mysql3.php index ccdfd8e9f7..2adf9c0d56 100644 --- a/inc/db/lib-mysql3.php +++ b/inc/db/lib-mysql3.php @@ -344,15 +344,16 @@ function SQL_RESULT_FROM_ARRAY ($table, $columns, $idRow, $id, $F, $L) { } // END - if // Prepare the SQL statement - $sql = "SELECT `".implode("`,`", $columns)."` FROM `{!_MYSQL_PREFIX!}_%s` WHERE ``='%s' LIMIT 1"; + $sql = "SELECT `".implode("`,`", $columns)."` FROM `{!_MYSQL_PREFIX!}_%s` WHERE `%s`='%s' LIMIT 1"; // Return the result return SQL_QUERY_ESC($sql, - array( - bigintval($id), - $table, - $idRow - ), $F, $L); + array( + $table, + $idRow, + bigintval($id), + ), $F, $L + ); } // ALTER TABLE wrapper function diff --git a/inc/modules/admin/what-list_bank_package.php b/inc/modules/admin/what-list_bank_package.php index 144b4142fd..383fa29bd7 100644 --- a/inc/modules/admin/what-list_bank_package.php +++ b/inc/modules/admin/what-list_bank_package.php @@ -55,14 +55,14 @@ if ((REQUEST_ISSET_POST('id')) && (is_array(REQUEST_POST('id'))) && (count(REQUE } elseif (REQUEST_ISSET_POST('edit')) { // Delete entries (with confirmation) ADMIN_EDIT_ENTRIES_CONFIRM( - REQUEST_POST('id'), + REQUEST_POST('id'), 'bank_packages', - array('id', 'title', 'description', 'account_fee', 'free_transfers', 'transfer_fee', 'output_system_mode', 'package_active', 'free_months_no_fee', 'interest_plus', 'interest_minus', 'first_payment', 'free_account_income', 'free_account_stuff', 'tan_lock'), - array('bigintval', '', '', 'translateComma', 'bigintval', 'translateComma', '', '', 'bigintval', 'translateComma', 'translateComma', 'translateComma', 'translateComma', '', 'bigintval'), - array('', '', '', '', '', '', '', '', '', '', '', '', '', '', '') + array('id', 'title', 'description', 'account_fee', 'free_transfers', 'transfer_fee', 'output_system_mode', 'package_active', 'free_months_no_fee', 'interest_plus', 'interest_minus', 'first_payment', 'free_account_income', 'free_account_stuff', 'tan_lock'), + array('bigintval', '', '', 'translateComma', 'bigintval', 'translateComma', '', '', 'bigintval', 'translateComma', 'translateComma', 'translateComma', 'translateComma', '', 'bigintval'), + array('', '', '', '', '', '', '', '', '', '', '', '', '', '', '') ); $show = false; - } elseif (REQUEST_ISSET_POST(('do_edit'))) { + } elseif (REQUEST_ISSET_POST('do_edit')) { // Delete entries (with confirmation) ADMIN_EDIT_ENTRIES_CONFIRM(REQUEST_POST('id'), 'bank_packages', array(), array(), array(), true); } elseif (REQUEST_ISSET_POST('delete')) { diff --git a/inc/modules/admin/what-list_surfbar_urls.php b/inc/modules/admin/what-list_surfbar_urls.php index cea4de3da6..3f18edd999 100644 --- a/inc/modules/admin/what-list_surfbar_urls.php +++ b/inc/modules/admin/what-list_surfbar_urls.php @@ -55,88 +55,88 @@ if ((REQUEST_POST_COUNT() > 0) && ((!REQUEST_ISSET_POST('id')) || (!is_array(REQ // Abort here return; -} +} // END - if // Edit or delete button hit? if (REQUEST_ISSET_POST('edit')) { // Show entries for editing ADMIN_EDIT_ENTRIES_CONFIRM( - REQUEST_POST('id'), + REQUEST_POST('id'), 'surfbar_urls', - array('id', 'userid', 'url'), - array('bigintval', 'ADD_MEMBER_SELECTION_BOX', ''), - array('', array(false, true, true), '') + array('id', 'userid', 'url'), + array('bigintval', 'ADD_MEMBER_SELECTION_BOX', ''), + array('', array(false, true, true), '') ); $show = false; -} elseif (REQUEST_ISSET_POST(('do_edit'))) { +} elseif (REQUEST_ISSET_POST('do_edit')) { // Change data of entries ADMIN_EDIT_ENTRIES_CONFIRM( - REQUEST_POST('id'), + REQUEST_POST('id'), 'surfbar_urls', - array(), - array(), - array(), - true + array(), + array(), + array(), + true ); } elseif (REQUEST_ISSET_POST('delete')) { // Show entries for deletion ADMIN_DELETE_ENTRIES_CONFIRM( REQUEST_POST('id'), 'surfbar_urls', - array('id', 'userid', 'url', 'registered'), - array('bigintval', 'generateUserProfileLink', 'FRAMETESTER', ''), - array('', '', '', '') + array('id', 'userid', 'url', 'registered'), + array('bigintval', 'generateUserProfileLink', 'FRAMETESTER', ''), + array('', '', '', '') ); $show = false; -} elseif (REQUEST_ISSET_POST(('do_delete'))) { +} elseif (REQUEST_ISSET_POST('do_delete')) { // Remove entries from database ADMIN_DELETE_ENTRIES_CONFIRM(REQUEST_POST('id'), 'surfbar_urls', array(), array(), array(), true); -} elseif (REQUEST_ISSET_POST(('lock'))) { +} elseif (REQUEST_ISSET_POST('lock')) { // Un-/lock selected URLs. This does not work for pending URLs ADMIN_LOCK_ENTRIES_CONFIRM( - REQUEST_POST('id'), + REQUEST_POST('id'), 'surfbar_urls', - array('id', 'userid', 'url', 'registered', 'status'), - array('bigintval', 'generateUserProfileLink', 'FRAMETESTER', '', 'surfbarTranslateUserStatus'), - array('', '', '', '', '') + array('id', 'userid', 'url', 'registered', 'status'), + array('bigintval', 'generateUserProfileLink', 'FRAMETESTER', '', 'surfbarTranslateUserStatus'), + array('', '', '', '', '') ); $show = false; -} elseif (REQUEST_ISSET_POST(('do_lock'))) { +} elseif (REQUEST_ISSET_POST('do_lock')) { // Un-/lock selected URLs. This does not work for pending URLs ADMIN_LOCK_ENTRIES_CONFIRM( - REQUEST_POST('id'), + REQUEST_POST('id'), 'surfbar_urls', - array(), - array(), - array(), - array('status' => array('ACTIVE' => 'LOCKED', 'LOCKED' => 'ACTIVE')), - true + array(), + array(), + array(), + array('status' => array('ACTIVE' => 'LOCKED', 'LOCKED' => 'ACTIVE')), + true ); -} elseif (REQUEST_ISSET_POST(('undelete'))) { +} elseif (REQUEST_ISSET_POST('undelete')) { // Undelete selected URLs. This does only work for deleted URLs... ;-) ADMIN_UNDELETE_ENTRIES_CONFIRM( - REQUEST_POST('id'), + REQUEST_POST('id'), 'surfbar_urls', - array('id', 'userid', 'url', 'registered', 'status'), - array('bigintval', 'generateUserProfileLink', 'FRAMETESTER', '', 'surfbarTranslateUserStatus'), - array('', '', '', '', '') + array('id', 'userid', 'url', 'registered', 'status'), + array('bigintval', 'generateUserProfileLink', 'FRAMETESTER', '', 'surfbarTranslateUserStatus'), + array('', '', '', '', '') ); $show = false; -} elseif (REQUEST_ISSET_POST(('do_undelete'))) { +} elseif (REQUEST_ISSET_POST('do_undelete')) { // Undelete selected URLs. This does only work for deleted URLs... ;-) ADMIN_UNDELETE_ENTRIES_CONFIRM( - REQUEST_POST('id'), + REQUEST_POST('id'), 'surfbar_urls', - array(), - array(), - array(), - array('status' => array('DELETED' => 'ACTIVE')), - true + array(), + array(), + array(), + array('status' => array('DELETED' => 'ACTIVE')), + true ); } // Show entries? -if (!$show) return false; +if ($show === false) return false; // List all URLs $result = SQL_QUERY("SELECT id, userid, url, views_total, status, UNIX_TIMESTAMP(registered) AS registered, UNIX_TIMESTAMP(last_locked) AS last_locked, lock_reason diff --git a/inc/modules/admin/what-lock_user.php b/inc/modules/admin/what-lock_user.php index bfd2f3b8b9..7a05b88d12 100644 --- a/inc/modules/admin/what-lock_user.php +++ b/inc/modules/admin/what-lock_user.php @@ -59,7 +59,7 @@ if (REQUEST_ISSET_GET('uid')) { SQL_FREERESULT($result_user); // Is a lock reason set? - if ((REQUEST_ISSET_POST(('lock'))) && ($status != 'LOCKED')) { + if ((REQUEST_ISSET_POST('lock')) && ($status != 'LOCKED')) { // Ok, lock the account! if (GET_EXT_VERSION('user') >= '0.3.5') { // Lock with reason diff --git a/inc/modules/admin/what-unlock_emails.php b/inc/modules/admin/what-unlock_emails.php index 09af56904d..18d6561cf1 100644 --- a/inc/modules/admin/what-unlock_emails.php +++ b/inc/modules/admin/what-unlock_emails.php @@ -54,7 +54,7 @@ FROM `{!_MYSQL_PREFIX!}_pool` WHERE `data_type`='ADMIN' ORDER BY `timestamp` ASC", __FILE__, __LINE__); -if ((SQL_NUMROWS($result_main) > 0) || (REQUEST_ISSET_POST(('lock')))) { +if ((SQL_NUMROWS($result_main) > 0) || (REQUEST_ISSET_POST('lock'))) { // Count checked checkboxes $SEL = 0; if (REQUEST_ISSET_POST('sel')) { @@ -79,7 +79,7 @@ INNER JOIN `{!_MYSQL_PREFIX!}_payments` AS pay ON po.payment_id=pay.id WHERE po.id=%s LIMIT 1", - array($id), __FILE__, __LINE__); + array($id), __FILE__, __LINE__); // Update wents fine? if (SQL_NUMROWS($result) == 1) { @@ -99,21 +99,21 @@ LIMIT 1", 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__); + array(bigintval($DATA['sender'])), __FILE__, __LINE__); // Subtract bonus points from system BONUS_POINTS_HANDLER(getConfig('bonus_order')); } // END - if // Load email template - $msg_user = LOAD_EMAIL_TEMPLATE("order-accept", array(), $DATA['sender']); + $msg_user = LOAD_EMAIL_TEMPLATE('order-accept', array(), $DATA['sender']); // Send email sendEmail($DATA['sender'], MEMBER_ORDER_ACCEPTED, $msg_user); // Unlock selected email SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_pool` SET data_type='NEW' WHERE `id`=%s AND data_type='ADMIN' LIMIT 1", - array($id), __FILE__, __LINE__); + array($id), __FILE__, __LINE__); } // END - if } // END - foreach @@ -136,7 +136,7 @@ LIMIT 1", // Load URL and subject from pool $result = SQL_QUERY_ESC("SELECT url, subject, sender FROM `{!_MYSQL_PREFIX!}_pool` WHERE `id`=%s LIMIT 1", - array($id), __FILE__, __LINE__); + array($id), __FILE__, __LINE__); // Load data $DATA = SQL_FETCHARRAY($result); @@ -153,7 +153,7 @@ LIMIT 1", // Redirect URL SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_pool` SET url='%s', data_type='NEW' WHERE `id`=%s LIMIT 1", - array(REQUEST_POST('redirect'), $id),__FILE__, __LINE__); + array(REQUEST_POST('redirect'), $id),__FILE__, __LINE__); // Prepare data for the row template $content = array( @@ -163,18 +163,18 @@ LIMIT 1", ); // Load row template and switch colors - $OUT .= LOAD_TEMPLATE("admin_unlock_emails_redir_row", true, $content); + $OUT .= LOAD_TEMPLATE('admin_unlock_emails_redir_row', true, $content); $SW = 3 - $SW; } define('__URL_ROWS', $OUT); // Load main template - LOAD_TEMPLATE("admin_unlock_emails_redir"); + LOAD_TEMPLATE('admin_unlock_emails_redir'); } else { // Nothing selected LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_MAILS_NOTHING_CHECKED')); } - } elseif ((REQUEST_ISSET_POST(('lock'))) && ($SEL > 0) && (getConfig('url_blacklist') == 'Y')) { + } elseif ((REQUEST_ISSET_POST('lock')) && ($SEL > 0) && (getConfig('url_blacklist') == 'Y')) { // Lock URLs foreach (REQUEST_POST('sel') as $id => $url) { // Secure id number @@ -182,11 +182,11 @@ LIMIT 1", // Lookup in blacklist $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_url_blacklist` WHERE `url`='%s' LIMIT 1", - array($url), __FILE__, __LINE__); + array($url), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 0) { // Did not find a record so we can add it... :) SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_url_blacklist` (`url`,`pool_id`) VALUES ('%s',%s)", - array($url, $id), __FILE__, __LINE__); + array($url, $id), __FILE__, __LINE__); } // END - if // Free memory @@ -195,7 +195,7 @@ LIMIT 1", // Output message 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')) { + } 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 $OUT = ''; $SW = 2; while ($content = SQL_FETCHARRAY($result_main)) { @@ -217,7 +217,7 @@ LIMIT 1", ); // Load row template and switch colors - $OUT .= LOAD_TEMPLATE("admin_unlock_emails_row", true, $content); + $OUT .= LOAD_TEMPLATE('admin_unlock_emails_row', true, $content); $SW = 3 - $SW; } // END - while @@ -231,8 +231,8 @@ LIMIT 1", define('__REJECT_URL', $REJECT); // Load main template - LOAD_TEMPLATE("admin_unlock_emails"); - } elseif ((REQUEST_ISSET_POST(('lock'))) && (getConfig('url_blacklist') != 'Y')) { + LOAD_TEMPLATE('admin_unlock_emails'); + } elseif ((REQUEST_ISSET_POST('lock')) && (getConfig('url_blacklist') != 'Y')) { // URL blacklist not activated LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_URL_BLACKLIST_DISABLED')); } else {