0) { // Load all actions $OUT_ACT = ""; $SW = 2; while (list($title, $conv, $name) = SQL_FETCHROW($result_act)) { // Prepare data for the row template $content = array( 'sw' => $SW, 'title' => $title, 'conv' => round($conv), 'name' => $name, ); // Load row template and switch color $OUT_ACT .= LOAD_TEMPLATE("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", __FILE__, __LINE__); if (SQL_NUMROWS($result_pay) > 0) { // Load all pay types $OUT_PAY = ""; $SW = 2; while (list($name, $rate, $min, $curr) = SQL_FETCHROW($result_pay)) { // Prepare data for the row template $content = array( 'sw' => $SW, 'name' => $name, 'rate' => TRANSLATE_COMMA($rate), 'min' => $min, 'curr' => $curr, 'price' => TRANSLATE_COMMA($min), ); // Load row template and switch color $OUT_PAY .= LOAD_TEMPLATE("guest_sponsor_pay_row", true, $content); $SW = 3 - $SW; } } else { // No pay types setuped so far! $OUT_PAY = " ".LOAD_TEMPLATE("admin_settings_saved", true, SPONSOR_NO_ACTIONS_ACTIVATED)." "; } } else { // No actions activated so far! $OUT_ACT = " ".LOAD_TEMPLATE("admin_settings_saved", true, SPONSOR_NO_ACTIONS_ACTIVATED)." "; $OUT_PAY = " ".LOAD_TEMPLATE("admin_settings_saved", true, SPONSOR_NO_ACTIONS_ACTIVATED)." "; } // Transfer rows to constans define('__SPONSOR_ACTIONS' , $OUT_ACT); define('__SPONSOR_PAYTYPES', $OUT_PAY); // Free memory if (isset($result_act)) SQL_FREERESULT($result_act); if (isset($result_pay)) SQL_FREERESULT($result_pay); // Load main template LOAD_TEMPLATE("guest_sponsor_infos"); // ?>