loadTemplate('admin_settings_saved', false, $message);
} elseif ((isFormSent('edit')) || (isFormSent('del'))) {
// Load all data
- $OUT = ''; $SW = 2;
+ $OUT = '';
foreach (postRequestParameter('id') as $id => $sel) {
// Load entry
$result = SQL_QUERY_ESC("SELECT `pay_name`, `pay_rate`, `pay_min_count`, `pay_currency` FROM `{?_MYSQL_PREFIX?}_sponsor_paytypes` WHERE `id`='%s' LIMIT 1",
// Transfer data to array
$content = array(
'id' => bigintval($id),
- 'sw' => bigintval($SW),
'name' => htmlspecialchars($name),
'rate' => translateComma($rate),
'min' => bigintval($min),
// Entry invalid
$OUT .= loadTemplate('admin_list_sponsor_pay_404', true, $id);
}
-
- // Switch colors
- $SW = 3 - $SW;
} // END - foreach
// Load main template depending on mode (edit/delete)
// Do we have some paytypes setup?
if (SQL_NUMROWS($result) > 0) {
// Prepare variables for listing
- $OUT = ''; $SW = 2;
+ $OUT = '';
// List alle found payment types
while ($content = SQL_FETCHARRAY($result)) {
// Remember data in array
$content = array(
- 'sw' => $SW,
'id' => $content['id'],
'name' => $content['pay_name'],
'rate' => translateComma($content['pay_rate']),
// Add row
$OUT .= loadTemplate('admin_list_sponsor_pay_row', true, $content);
-
- // Switch colors
- $SW = 3 - $SW;
} // END - while
// Load list template