* $Author:: $ *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
- * Copyright (c) 2009 - 2013 by Mailer Developer Team *
+ * Copyright (c) 2009 - 2015 by Mailer Developer Team *
* For more information visit: http://mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
addYouAreHereLink('admin', __FILE__);
// Check for mails
-$result_main = SQL_QUERY("SELECT
+$result_main = sqlQuery("SELECT
`id`,
`url`,
`subject`,
ORDER BY
`timestamp` ASC", __FILE__, __LINE__);
-if ((!SQL_HASZERONUMS($result_main)) || (isFormSent('lock'))) {
+if ((!ifSqlHasZeroNumRows($result_main)) || (isFormSent('lock'))) {
if (isFormSent('accept')) {
if (ifPostContainsSelections()) {
// Accept mail orders
$content = getPoolDataFromId($id);
// Found some data?
- if (count($content) > 0) {
+ if (isFilledArray($content)) {
// Is the surfbar installed?
// @TODO Rewrite these if-blocks to a filter
if ((isExtensionActive('surfbar')) && (getConfig('surfbar_migrate_order') == 'Y')) {
// Check for bonus extension version >= 0.4.4 for the order bonus
if ((isExtensionInstalledAndNewer('bonus', '0.4.4')) && (isBonusRallyeActive())) {
// Add points directly
- SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `bonus_order`=`bonus_order`+{?bonus_order?} WHERE `userid`=%s LIMIT 1",
+ sqlQueryEscaped("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `bonus_order`=`bonus_order`+{?bonus_order?} WHERE `userid`=%s LIMIT 1",
array(bigintval($content['sender'])), __FILE__, __LINE__);
// Subtract bonus points from system
} elseif ((!isFormSent('lock')) && (!isFormSent('accept')) && (!isFormSent('reject'))) {
// Mail orders are in pool so we can display them
$OUT = '';
- while ($content = SQL_FETCHARRAY($result_main)) {
+ while ($content = sqlFetchArray($result_main)) {
// Prepare data for the template
$content['timestamp'] = generateDateTime($content['timestamp'], 2);
} // END - while
// Free memory
- SQL_FREERESULT($result_main);
+ sqlFreeResult($result_main);
// Remember in array
$content['rows'] = $OUT;