} // 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
} 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')) {
// 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
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
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')) {
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) {
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
// 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);
// 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(
);
// 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
// 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
// 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)) {
);
// 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
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 {