+ // Load data from stats table...
+ // @TODO Rewrite this to includes/filter
+ switch ($type) {
+ case 'NORMAL':
+ $result_data = SQL_QUERY_ESC("SELECT `subject`,`timestamp_ordered` AS `timestamp`,`cat_id` FROM `{?_MYSQL_PREFIX?}_user_stats` WHERE `id`=%s LIMIT 1",
+ array(bigintval($id)), __FILE__, __LINE__);
+ $type = 'mailid'; $mailId = $id; $problemMessage = '{--NORMAL_MAIL_PROBLEM--}';
+ $LINK = '<a href="{%url=mailid.php?userid=' . getRequestParameter('userid') . '&mailid=' . $id . '%}" target="_blank">' . $id . '</a>';
+ break;
+
+ case 'BONUS':
+ $result_data = SQL_QUERY_ESC("SELECT `subject`,`timestamp`,`cat_id` FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `id`=%s LIMIT 1",
+ array(bigintval($id2)), __FILE__, __LINE__);
+ $type = 'bonusid'; $mailId = $id2; $problemMessage = '{--BONUS_MAIL_PROBLEM--}';
+ $LINK = '<a href="{%url=mailid.php?userid=' . getRequestParameter('userid') . '&bonusid=' . $id2 . '%}" target="_blank">' . $id2 . '</a>';
+ break;
+
+ default: // Problem in application detected!
+ // Log the error
+ logDebugMessage(__FILE__, __LINE__, sprintf("Invalid email type %s detected.", $type));
+ break;
+ } // END - switch
+
+ // Do we have an entry?