- loadTemplate('admin_gmenu_delete', false, $content);
-} elseif ((isFormSent()) && (!isDemoModeActive())) {
- // An action is done...
- switch (postRequestParameter('ok')) {
- case 'edit': // Edit menu
- foreach (postRequestParameter('sel') as $sel => $menu) {
- // Secure selector
- $sel = bigintval($sel);
-
- // Update entry
- SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `title`='%s', `action`='%s', `what`='%s' WHERE ".$AND." AND `id`=%s LIMIT 1",
- array($menu, postRequestParameter('sel_action', $sel), postRequestParameter('sel_what', $sel), $sel),__FILE__, __LINE__);
- } // END - foreach
- loadTemplate('admin_settings_saved', false, '{--SETTINGS_SAVED--}');
- break;
-
- case 'del': // Delete menu
- foreach (postRequestParameter('sel') as $sel => $menu) {
- // Delete enty
- SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE ".$AND." AND `id`=%s LIMIT 1",
- array(bigintval($sel)), __FILE__, __LINE__);
- } // END - foreach
- loadTemplate('admin_settings_saved', false, '{--SETTINGS_SAVED--}');
- break;
-
- case 'status': // Change access levels
- foreach (postRequestParameter('sel') as $sel => $menu) {
- // Secure selector
- $sel = bigintval($sel);
-
- // Update entry
- SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `visible`='%s', `locked`='%s' WHERE ".$AND." AND `id`=%s LIMIT 1",
- array(postRequestParameter('visible', $sel), postRequestParameter('locked', $sel), $sel), __FILE__, __LINE__);
- } // END - foreach
- loadTemplate('admin_settings_saved', false, '{--SETTINGS_SAVED--}');
- break;
-
- default: // Unexpected action
- logDebugMessage(__FILE__, __LINE__, sprintf("Unsupported action %s detected.", postRequestParameter('ok')));
- loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_UNKNOWN_OKAY', postRequestParameter('ok')));
- break;
- } // END - switch
-} elseif ((isPostRequestParameterSet('status')) && (countPostSelection() > 0) && (!isDemoModeActive())) {