- $SW = 3 - $SW;
- }
- }
- define('__MENU_ROWS', $OUT);
- define('__CNT_VALUE', $cnt);
-
- // Load template
- LOAD_TEMPLATE("admin_gmenu_delete");
-} elseif ((IS_FORM_SENT()) && (!IS_DEMO())) {
- // An action is done...
- switch (REQUEST_POST('ok'))
- {
- case "edit": // Edit menu
- foreach (REQUEST_POST('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, REQUEST_POST('sel_action', $sel), REQUEST_POST('sel_what', $sel), $sel),__FILE__, __LINE__);
- }
- LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SETTINGS_SAVED'));
- break;
-
- case "del": // Delete menu
- foreach (REQUEST_POST('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__);
- }
- LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SETTINGS_SAVED'));
- break;
-
- case "status": // Change access levels
- foreach (REQUEST_POST('sel') as $sel => $menu) {
- // Secure selector
- $sel = bigintval($sel);