loadTemplate('admin_settings_saved', false, $content);
} elseif ((countPostSelection() > 0) && (isFormSent('edit'))) {
// Edit banner
- $SW = 2; $OUT = '';
+ $OUT = '';
foreach (postRequestParameter('sel') as $id => $sel) {
// Load data
$result = SQL_QUERY_ESC("SELECT url, alternate, visible FROM `{?_MYSQL_PREFIX?}_refbanner` WHERE `id`=%s LIMIT 1",
// Preapre data for the row
$content = array(
- 'sw' => $SW,
'id' => $id,
'url' => $url,
'alt' => $alt,
// Load row template and switch color
$OUT .= loadTemplate('admin_refbanner_edit_row', true, $content);
- $SW = 3 - $SW;
- }
+ } // END - foreach
// Load main template
loadTemplate('admin_refbanner_edit', false, $OUT);
// Entries found?
if (SQL_NUMROWS($result) > 0) {
// Make referal banner editable and deletable
- $OUT = ''; $SW = 2;
+ $OUT = '';
while ($content = SQL_FETCHARRAY($result)) {
// Preapre data for the row
// @TODO Rewritings: alt->alternate,cnt->counter,clx->clicks in template
$content = array(
- 'sw' => $SW,
'id' => $content['id'],
'url' => $content['url'],
'alt' => $content['alternate'],
// Load row template and switch color
$OUT .= loadTemplate('admin_refbanner_row', true, $content);
- $SW = 3 - $SW;
- }
+ } // END - while
// Free memory
SQL_FREERESULT($result);