} elseif (!IS_MEMBER()) {
LOAD_URL("modules.php?module=index");
} elseif ((!EXT_IS_ACTIVE("order")) && (!IS_ADMIN())) {
- addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "order");
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "order");
return;
}
if (($HOLIDAY == "Y") && (GET_EXT_VERSION("holiday") >= "0.1.3")) {
// Holiday is active!
- LOAD_TEMPLATE("admin_settings_saved", false, HOLIDAY_ORDER_NOT_POSSIBLE);
+ LOAD_TEMPLATE("admin_settings_saved", false, getMessage('HOLIDAY_ORDER_NOT_POSSIBLE'));
} elseif ((REQUEST_ISSET_POST(('frametester'))) && ($ALLOWED > 0) && (REQUEST_POST('receiver') > 0)) {
// Continue with the frametester, we first need to store the data temporary in the pool
//
// Load receivers from database
$TEST = array(); $cnt = 0;
- while (list($REC) = SQL_FETCHROW($result)) {
+ while ($content = SQL_FETCHARRAY($result)) {
if ($HOLIDAY) {
// Check for his holiday status
$result_holiday = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_user_holidays`
WHERE userid=%s AND holiday_start < UNIX_TIMESTAMP() AND holiday_end > UNIX_TIMESTAMP() LIMIT 1",
- array(bigintval($REC)), __FILE__, __LINE__);
- if (SQL_NUMROWS($result_holiday) == 1) $REC = 0; // Exclude user who are in holiday
+ array(bigintval($content['userid'])), __FILE__, __LINE__);
+ if (SQL_NUMROWS($result_holiday) == 1) $content['userid'] = 0; // Exclude user who are in holiday
// Free memory
SQL_FREERESULT($result_holiday);
} // END - if
- if ($REC > 0) {
+ if ($content['userid'] > 0) {
// Add receiver
- $TEST[] = $REC;
+ $TEST[] = $content['userid'];
$cnt++;
} // END - if
} // END - while
} // END - if
// ... and begin loading stuff
- while (list($id, $cat) = SQL_FETCHROW($result_cats)) {
- $CATS['id'][] = bigintval($id);
- $CATS['name'][] = $cat;
+ while ($content = SQL_FETCHARRAY($result_cats)) {
+ $CATS['id'][] = bigintval($content['id']);
+ $CATS['name'][] = $content['cat'];
// Select users in current category
$result_uids = SQL_QUERY_ESC("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_cats` WHERE cat_id=%s AND userid != '%s' ORDER BY userid",
- array(bigintval($id), $GLOBALS['userid']), __FILE__, __LINE__);
+ array(bigintval($content['id']), $GLOBALS['userid']), __FILE__, __LINE__);
$uid_cnt = 0;
while (list($ucat) = SQL_FETCHROW($result_uids)) {
if (SQL_NUMROWS($result) == 1) {
// Old order found
- list($subject, $text, $payment, $tstamp, $url, $target, $cat, $zip) = SQL_FETCHROW($result);
+ list($subject, $text, $payment, $tstamp, $url, $target, $content['cat'], $zip) = SQL_FETCHROW($result);
// Fix max receivers when it is too much
- if ((isset($CATS['uids'][$cat])) && ($target > $CATS['uids'][$cat])) $target = $CATS['uids'][$cat];
+ if ((isset($CATS['uids'][$content['cat']])) && ($target > $CATS['uids'][$content['cat']])) $target = $CATS['uids'][$content['cat']];
// Old order is grabbed
$OLD_ORDER = true;
$CAT = "";
foreach ($CATS['id'] as $key => $value) {
$CAT .= " <option value=\"".$value."\"";
- if (($OLD_ORDER) && ($cat == $value)) $CAT .= " selected=\"selected\"";
+ if (($OLD_ORDER) && ($content['cat'] == $value)) $CAT .= " selected=\"selected\"";
$CAT .= ">".$CATS['name'][$key]." (".$CATS['uids'][$key]." {--USER_IN_CAT--})</option>\n";
} // END - foreach