", $code); $code = $code[0]; // Output message LOAD_TEMPLATE('admin_yoomedia_error', false, sprintf("{--ADMIN_YOOMEDIA_ERROR_%s--}", strtoupper(yoomediaTranslateError($code)))); return false; } // Prepare all entries $OUT = ''; $SW = 2; foreach ($result as $entry) { // Translate some data $entry['pay'] = translateComma($entry['pay'], true, 5); $entry['remain'] = translateComma($entry['remain']); $entry['sw'] = $SW; // Check reload lock $reload = YOOMEDIA_CHECK_RELOAD($entry['id'], $entry['reload'], 'textmail'); // Is this mail already sent? if ($reload !== false) { // Init countdown $countdown = 0; // Not manually locked? if ($reload > 0) { // Calculate countdown $countdown = $reload + ($entry['reload'] * 60*60) - time(); // Countdown < 60 seconds and bigger zero? if (($countdown < 60) && ($countdown > 0)) { // Fix to one minute $countdown = 60; } // END - if // Add reload lock $entry['already'] = sprintf(getMessage('ADMIN_YOOMEDIA_TEXTMAIL_SEND_AGAIN'), createFancyTime($countdown)); } else { // Never resentable unless manual removal $entry['already'] = getMessage('ADMIN_YOOMEDIA_TEXTMAIL_MANUALLY_LOCKED'); } // Load row template for displaying $OUT .= LOAD_TEMPLATE('admin_list_yoomedia_tm_already', true, $entry); } else { // Load row template with buttons $OUT .= LOAD_TEMPLATE('admin_list_yoomedia_tm_row', true, $entry); } // Switch color $SW = 3 - $SW; } // END - if // Load main template LOAD_TEMPLATE('admin_list_yoomedia_tm', false, $OUT); // ?>