0) { // Load all actions $OUT_ACT = ''; $SW = 2; while ($content = SQL_FETCHARRAY($result_act)) { // Prepare data for the row template // @TODO Rewritings: conv->conv_rate,name->conv_name in template $content = array( 'sw' => $SW, 'title' => $content['title'], 'conv' => round($content['conv_rate']), 'name' => $content['conv_name'], ); // Load row template and switch color $OUT_ACT .= loadTemplate('guest_sponsor_act_row', true, $content); $SW = 3 - $SW; } // END - while // Check for pay types $result_pay = SQL_QUERY('SELECT `pay_name`, `pay_rate`, `pay_min_count`, `pay_currency` FROM `{?_MYSQL_PREFIX?}_sponsor_paytypes` ORDER BY `pay_name` ASC', __FILE__, __LINE__); if (SQL_NUMROWS($result_pay) > 0) { // Load all pay types $OUT_PAY = ''; $SW = 2; while ($content = SQL_FETCHARRAY($result_pay)) { // Prepare data for the row template $content['sw'] = $SW; // Load row template and switch color $OUT_PAY .= loadTemplate('guest_sponsor_pay_row', true, $content); $SW = 3 - $SW; } } else { // No pay types setuped so far! $OUT_PAY = loadTemplate('guest_sponsor_infos_none_row', loadTemplate('admin_settings_saved', true, '{--SPONSOR_NO_ACTIONS_ACTIVATED--}')); } } else { // No actions activated so far! $OUT_ACT = loadTemplate('guest_sponsor_infos_none_row', loadTemplate('admin_settings_saved', true, '{--SPONSOR_NO_ACTIONS_ACTIVATED--}')); $OUT_PAY = loadTemplate('guest_sponsor_infos_none_row', loadTemplate('admin_settings_saved', true, '{--SPONSOR_NO_ACTIONS_ACTIVATED--}')); } // Free memory SQL_FREERESULT($result_act); SQL_FREERESULT($result_pay); // Transfer rows to an array $content = array( 'actions' => $OUT_ACT, 'paytypes' => $OUT_PAY ); // Load main template loadTemplate('guest_sponsor_infos', false, $content); // [EOF] ?>