} // END - if
} // END - if
- if (REQUEST_ISSET_POST(('accept'))) {
+ if (REQUEST_ISSET_POST('accept')) {
if ($SEL > 0) {
// Accept mail orders
foreach (REQUEST_POST('sel') as $id => $value) {
$id = bigintval($id);
// Order placed in queue...
- $result = SQL_QUERY_ESC("SELECT po.url, po.subject, po.sender, pay.payment, po.payment_id
-FROM `{!_MYSQL_PREFIX!}_pool` AS po
-INNER JOIN `{!_MYSQL_PREFIX!}_payments` AS pay
-ON po.payment_id=pay.id
-WHERE po.id=%s
+ $result = SQL_QUERY_ESC("SELECT
+ po.url, po.subject, po.sender, pay.payment, po.payment_id
+FROM
+ `{!_MYSQL_PREFIX!}_pool` AS po
+INNER JOIN
+ `{!_MYSQL_PREFIX!}_payments` AS pay
+ON
+ po.payment_id=pay.id
+WHERE
+ po.id=%s
LIMIT 1",
array($id), __FILE__, __LINE__);
// Check for bonus extension version >= 0.4.4 for the order bonus
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",
+ 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__);
// Subtract bonus points from system
} // END - if
// Load email template
- $msg_user = LOAD_EMAIL_TEMPLATE('order-accept', array(), $DATA['sender']);
+ $message_user = LOAD_EMAIL_TEMPLATE('order-accept', array(), $DATA['sender']);
// Send email
- sendEmail($DATA['sender'], MEMBER_ORDER_ACCEPTED, $msg_user);
+ sendEmail($DATA['sender'], MEMBER_ORDER_ACCEPTED, $message_user);
// Unlock selected email
- SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_pool` SET data_type='NEW' WHERE `id`=%s AND data_type='ADMIN' LIMIT 1",
+ SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_pool` SET `data_type`='NEW' WHERE `id`=%s AND `data_type`='ADMIN' LIMIT 1",
array($id), __FILE__, __LINE__);
} // END - if
} // END - foreach
$id = bigintval($id);
// Load URL and subject from pool
- $result = SQL_QUERY_ESC("SELECT url, subject, sender FROM `{!_MYSQL_PREFIX!}_pool` WHERE `id`=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT `url`, `subject`, `sender` FROM `{!_MYSQL_PREFIX!}_pool` WHERE `id`=%s LIMIT 1",
array($id), __FILE__, __LINE__);
// Load data
SQL_FREERESULT($result);
// Load email template and send it away
- $msg_user = LOAD_EMAIL_TEMPLATE("order-reject", array(), $DATA['sender']);
- sendEmail($DATA['sender'], getMessage('MEMBER_ORDER_REJECTED'), $msg_user);
+ $message_user = LOAD_EMAIL_TEMPLATE('order-reject', array(), $DATA['sender']);
+ sendEmail($DATA['sender'], getMessage('MEMBER_ORDER_REJECTED'), $message_user);
// If you do not enter an URL to redirect to, your URL will be set!
if ((!REQUEST_ISSET_POST(('redirect'))) || (REQUEST_POST('redirect') == 'http://')) REQUEST_SET_POST('redirect', constant('URL'));
// Redirect URL
- SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_pool` SET url='%s', data_type='NEW' WHERE `id`=%s LIMIT 1",
+ 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__);
// Prepare data for the row template
// 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)) {