- $SW = 3 - $SW;
- }
- }
- define('__MENU_ROWS', $OUT);
- define('__CNT_VALUE', $cnt);
-
- // Load template
- LOAD_TEMPLATE("admin_gmenu_delete");
-}
- elseif ((isset($_POST['ok'])) && (!IS_DEMO()))
-{
- // An action is done...
- switch ($_POST['ok'])
- {
- case "edit": // Edit menu
- foreach ($_POST['sel'] as $sel => $menu)
- {
- // Secure selector
- $sel = bigintval($sel);
-
- // Update entry
- $query = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_guest_menu SET title='%s', action='%s', what='%s' WHERE ".$AND." AND id=%s LIMIT 1",
- array($menu, $_POST['sel_action'][$sel], $_POST['sel_what'][$sel], $sel),__FILE__, __LINE__);
- }
- LOAD_TEMPLATE("admin_data_saved");
- break;
-
- case "del": // Delete menu
- foreach ($_POST['sel'] as $sel => $menu)
- {
- // Delete enty
- $query = 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_data_saved");
- break;
-
- case "status": // Change access levels
- foreach ($_POST['sel'] as $sel => $menu)
- {
- // Secure selector
- $sel = bigintval($sel);