define('SERVER_URL', "http://www.mxchange.org");
// Current SVN revision
-define('CURR_SVN_REVISION', "699");
+define('CURR_SVN_REVISION', "700");
// Take a prime number which is long (if you know a longer one please try it out!)
define('_PRIME', 591623);
if (SQL_NUMROWS($result) == 1) {
// Old order found
list($subject, $text, $payment, $tstamp, $url, $target, $cat, $zip) = SQL_FETCHROW($result);
- SQL_FREERESULT($result);
// Fix max receivers when it is too much
- if ($target > $CATS['uids'][$cat]) $target = $CATS['uids'][$cat];
+ if ((isset($CATS['uids'][$cat])) && ($target > $CATS['uids'][$cat])) $target = $CATS['uids'][$cat];
// Old order is grabbed
$OLD_ORDER = true;
$url = "http://";
}
+ // Free result
+ SQL_FREERESULT($result);
+
// 01 2 21 12 2 23 443 3 3210
if ((!empty($_POST['data'])) || ((getConfig('order_multi_page') == "N") && ((!IS_ADMIN()) && (!EXT_IS_ACTIVE("html_mail"))))) {
// Pre-output categories
if (EXT_IS_ACTIVE("bonus")) {
// Load bonus ID
$result = SQL_QUERY_ESC("SELECT stats_id, bonus_id, link_type FROM "._MYSQL_PREFIX."_user_links WHERE userid=%s ORDER BY bonus_id DESC, stats_id DESC",
- array($GLOBALS['userid']), __FILE__, __LINE__);
+ array($GLOBALS['userid']), __FILE__, __LINE__);
} else {
// Don't load bonus ID
$result = SQL_QUERY_ESC("SELECT stats_id, stats_id, link_type FROM "._MYSQL_PREFIX."_user_links WHERE userid=%s ORDER BY stats_id DESC",
- array($GLOBALS['userid']), __FILE__, __LINE__);
+ array($GLOBALS['userid']), __FILE__, __LINE__);
}
// Mails left for confirmation?
$sum = 0; $SW = 2; $OUT = "";
while (list($id, $id2, $type) = SQL_FETCHROW($result)) {
// Load data from stats table...
- $cat = "";
+ $cat = ""; $result_data = false;
switch ($type)
{
case "NORMAL":
ON s.pool_id=p.id
WHERE s.id=%s
LIMIT 1",
- array(bigintval($id)), __FILE__, __LINE__);
+ array(bigintval($id)), __FILE__, __LINE__);
$type = "mailid"; $DATA = $id; $PROBLEM = NORMAL_MAIL_PROBLEM;
break;
array(bigintval($id2)), __FILE__, __LINE__);
$type = "bonusid"; $DATA = $id2; $PROBLEM = BONUS_MAIL_PROBLEM;
break;
+
+ default: // Unknown type detected!
+ DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown mail type %s detected.", $type));
+ break;
}
// Data found to this mail?
} else {
LOAD_TEMPLATE("member_unconfirmed_table_nopoints");
}
-}
- else
-{
+} else {
// No mails left to confirm... :)
LOAD_TEMPLATE("admin_settings_saved", false, MEMBER_NO_MAILS_TO_CONFIRM);
}