- $OUT .= LOAD_TEMPLATE("admin_menu_404_row", true, $content);
- }
- $SW = 3 - $SW;
- }
- }
- define('__MENU_ROWS', $OUT);
- define('__CNT_VALUE', $cnt);
- //
- LOAD_TEMPLATE("admin_mmenu_status");
-}
- elseif ((isset($_POST['ok'])) && (!IS_DEMO()))
-{
- // An act is done...
- foreach ($_POST['sel'] as $sel=>$menu)
- {
- $AND = "what = ''";
- $sel = bigintval($sel);
- if (!empty($SUB)) $AND = "action='".$SUB."'";
- switch ($_POST['ok'])
- {
- case "edit": // Edit menu
- $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_member_menu SET title='%s', action='%s', what='%s', descr='%s' WHERE ".$AND." AND id=%s LIMIT 1",
- array($menu, $_POST['sel_act'][$sel], $_POST['sel_what'][$sel], $_POST['sel_descr'][$sel], $sel), __FILE__, __LINE__);
- break;
-
- case "del": // Delete menu
- $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_member_menu WHERE ".$AND." AND id=%s LIMIT 1",
- array($sel), __FILE__, __LINE__);
- break;
-
- case "status": // Change status of menus
- $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_member_menu SET visible='%s', locked='%s' WHERE ".$AND." AND id=%s LIMIT 1",
- array($_POST['visible'][$sel], $_POST['locked'][$sel], $sel), __FILE__, __LINE__);
- break;
- }
- break;
- }