addYouAreHereLink('admin', __FILE__);
// Do we edit/delete/change main menus or sub menus?
-$AND = "(`what` = '' OR `what` IS NULL)"; $SUB = '';
+$AND = "(`what` = '' OR `what` IS NULL)"; $subMenu = '';
if (isGetRequestParameterSet('sub')) {
$AND = sprintf("`action`='%s' AND `what` != '' AND `what` IS NOT NULL", getRequestParameter('sub'));
- $SUB = getRequestParameter('sub');
+ $subMenu = getRequestParameter('sub');
} // END - if
// List all menu points and make them editable
if ((isFormSent('edit')) && (ifPostContainsSelections()) && (!isDemoModeActive())) {
// Edit menu entries
// @TODO Kill all constants in this file
- $content['sub'] = $SUB;
+ $content['sub'] = $subMenu;
$content['chk'] = countPostSelection();
$count = '0'; $OUT = '';
foreach (postRequestParameter('sel') as $sel => $confirm) {
} // END - if
} // END - foreach
- $content['rows'] = $OUT;
+ $content['rows'] = $OUT;
+ $content['sub'] = $subMenu;
+ $content['chk'] = countPostSelection();
$content['count'] = $count;
// Load template
loadTemplate('admin_edit_admin_menu_form', false, $content);
} elseif ((isFormSent('delete')) && (ifPostContainsSelections()) && (!isDemoModeActive())) {
// Prepare misc content
- $content['sub'] = $SUB;
+ $content['sub'] = $subMenu;
$content['chk'] = countPostSelection();
// Del menu entries with or without confirmation
SQL_FREERESULT($result);
} // END - if
} // END - switch
- $content['rows'] = $OUT;
+
+ $content['rows'] = $OUT;
+ $content['sub'] = $subMenu;
+ $content['chk'] = countPostSelection();
$content['count'] = $count;
// Load template
// Do we have entries?
if (!SQL_HASZERONUMS($result)) {
- // Remember sub value
- $content['sub'] = $SUB;
-
// Init variables
$OUT = '';
$count = '0';
// Process all entries
while ($content = SQL_FETCHARRAY($result)) {
+ // Remember sub value
+ $content['sub'] = $subMenu;
+
// Count this entry
$count++;
// Init navigation variable
$content['navi'] = '';
- if (($content['sort'] == '0') || (($content['sort'] == 1) && (!empty($SUB)))) {
+ if (($content['sort'] == '0') || (($content['sort'] == 1) && (!empty($subMenu)))) {
// Is highest position
$content['navi'] = '<a href="{%url=modules.php?module=admin&what=adminedit&sub=' . $content['sub'] . '&act=' . $content['action'] . '&w=' . $content['what'] . '&tid=' . ($content['sort']+1) . '&fid=' . $content['sort'] . '%}">{--LOWER--}</a>';
} elseif ($count == SQL_NUMROWS($result)) {
// Remember all rows
$content['rows'] = $OUT;
+ $content['sub'] = $subMenu;
// Free memory
SQL_FREERESULT($result);
'action' => adminAddMenuSelectionBox('guest', 'action', 'sel_action[' . $sel . ']', $content['action']),
'what' => adminAddMenuSelectionBox('guest', 'what' , 'sel_what[' . $sel . ']', $content['what']),
'menu' => $content['title'],
+ 'sub' => $subMenu
);
// Load row template
} // END - if
} // END - foreach
- $content['rows'] = $OUT;
+ $content['rows'] = $OUT;
+ $content['chk'] = countPostSelection();
+ $content['sub'] = $subMenu;
$content['count'] = $count;
// Load template
SQL_FREERESULT($result);
} // END - if
} // END - foreach
- $content['rows'] = $OUT;
+
+ $content['rows'] = $OUT;
+ $content['chk'] = countPostSelection();
+ $content['sub'] = $subMenu;
$content['count'] = $count;
// Load template
SQL_FREERESULT($result);
} // END - if
} // END - foreach
+
+ $content['rows'] = $OUT;
+ $content['chk'] = countPostSelection();
+ $content['sub'] = $subMenu;
$content['count'] = $count;
- $content['rows'] = $OUT;
// Load template
loadTemplate('admin_guest_menu_status', false, $content);
// Do we have entries?
if (!SQL_HASZERONUMS($result)) {
- // Set sub value
- $content['sub'] = $subMenu;
-
// Init variables
$count = '0';
$OUT = '';
// Process all menu entries
while ($content = SQL_FETCHARRAY($result)) {
+ // Set sub value
+ $content['sub'] = $subMenu;
+
$count++;
if (($content['sort'] == '0') || (($content['sort'] == 1) && (!empty($subMenu)))) {
// Is highest position
$OUT .= loadTemplate('admin_menu_overview_row', true, $content);
} // END - while
- // Add rows
+ // Add rows/sub
$content['rows'] = $OUT;
+ $content['sub'] = $subMenu;
// Free memory
SQL_FREERESULT($result);
SQL_FREERESULT($result);
} // END - if
} // END - foreach
- $content['rows'] = $OUT;
+
+ $content['rows'] = $OUT;
+ $content['chk'] = countPostSelection();
+ $content['sub'] = $subMenu;
$content['count'] = $count;
// Load template
SQL_FREERESULT($result);
} // END - if
} // END - foreach
- $content['rows'] = $OUT;
+
+ $content['rows'] = $OUT;
+ $content['chk'] = countPostSelection();
+ $content['sub'] = $subMenu;
$content['count'] = $count;
// Load template
// Some are there?
if (!SQL_HASZERONUMS($result)) {
- // Set sub value
- $content['sub'] = $subMenu;
-
$count = '0'; $OUT = '';
while ($content = SQL_FETCHARRAY($result)) {
+ // Set sub value
+ $content['sub'] = $subMenu;
+
// Init navigation
$content['navi'] = '';
$count++;
// Free memory
SQL_FREERESULT($result);
- // Remember rows in array
+ // Remember rows/sub in array
$content['rows'] = $OUT;
+ $content['sub'] = $subMenu;
// Load main template
loadTemplate('admin_member_menu_overview', false, $content);