0) { // Mail orders are in pool so we can display them $SW = 2; $OUT = ""; while ($pool = SQL_FETCHROW($result)) { // Prepare data for the template $content = array( 'sw' => $SW, 'cat' => GET_CATEGORY(bigintval($pool[1])), 'pay' => GET_PAYMENT(bigintval($pool[2])), 'subj' => COMPILE_CODE($pool[3]), 'url' => DEREFERER($pool[4]), 'stamp' => MAKE_DATETIME($pool[5], "0"), 'recs' => $pool[6], 'sent' => MAKE_DATETIME($pool[7], "0"), 'clix' => $pool[8], 'perc' => COMPILE_CODE($pool[8] / $pool[6] * 100)."%", ); // Load row template and switch colors $OUT .= LOAD_TEMPLATE("member_stats_row", true, $content); $SW = 3 - $SW; } // Free memory SQL_FREERESULT($result); // Remember rows in template define('__STATS_ROWS', $OUT); // Load main template LOAD_TEMPLATE("member_stats_table"); } else { // No mail orders fond LOAD_TEMPLATE("admin_settings_saved", false, MEMBER_NO_MAILS_IN_POOL); } // ?>