} elseif ($action == 'insert_view') { /////////////////////////////////////////////////////////////////////////////// $view = clone $current_view; $view->set_label($params['view_label']); $view->save(); $view_id = $view->get_id(); $view_label = $view->get_label(); $obmbookmarkproperty = "set_cal_view_id=$view_id"; $msg = "\"obmbookmark_id\": \"$view_id\", \"obmbookmark_label\":\"$view_label\", \"obmbookmarkproperties\":\"$obmbookmarkproperty\""; json_ok_msg("$l_view : $l_insert_ok"); echo "({".$display['json'].",$msg})"; exit(); } elseif ($action == 'delete_view') { /////////////////////////////////////////////////////////////////////////////// $view = CalendarView::get_from_id($params['view_id']); $msg = $view->delete(); json_ok_msg("$l_view : $l_delete_ok"); echo "({".$display['json'].",$msg})"; exit(); } elseif ($action == 'insert_default_view') { /////////////////////////////////////////////////////////////////////////////// if ($_SESSION['set_cal_default_view']) { $obm_default_view = run_query_calendar_update_default_view($params['view_id']); } else { $obm_default_view = run_query_calendar_insert_default_view($params['view_id']); } $_SESSION['set_cal_default_view'] = $params['view_id']; json_ok_msg("$l_view_default : $l_insert_ok"); echo "({".$display['json']."})";