if (isset($_REQUEST["date2"])) { $_REQUEST["date2"] = sanitize_search_string(get_request_var("date2")); } include_once $config["base_path"] . "/lib/time.php"; /* initialize the timespan array */ $timespan = array(); /* set variables for first time use */ initialize_timespan($timespan); $timeshift = set_timeshift(); /* if the user does not want to see timespan selectors */ if (read_graph_config_option("timespan_sel") == "") { set_preset_timespan($timespan); /* the user does want to see them */ } else { process_html_variables(); process_user_input($timespan, $timeshift); } /* save session variables */ finalize_timespan($timespan); /* initialize the timespan selector for first use */ function initialize_timespan(&$timespan) { /* initialize the default timespan if not set */ if (!isset($_SESSION["sess_current_timespan"]) || isset($_POST["button_clear_x"])) { $_SESSION["sess_current_timespan"] = read_graph_config_option("default_timespan"); $_REQUEST["predefined_timespan"] = read_graph_config_option("default_timespan"); $_SESSION["custom"] = 0; } /* initialize the date sessions if not set */ if (!isset($_SESSION["sess_current_date1"])) { set_preset_timespan($timespan);
+-------------------------------------------------------------------------+ */ /* initialize the timespan array */ $timespan = array(); /* set variables for first time use */ initialize_timespan($timespan); /* if the user does not want to see timespan selectors */ if (read_graph_config_option("timespan_sel") == "") { set_preset_timespan($timespan); /* the user does want to see them */ }else { process_html_variables(); process_user_input($timespan); } /* save session variables */ finalize_timespan($timespan); /* initialize the timespan selector for first use */ function initialize_timespan(&$timespan) { /* initialize the default timespan if not set */ if ((!isset($_SESSION["sess_current_timespan"])) || (isset($_POST["button_clear_x"]))) { $_SESSION["sess_current_timespan"] = read_graph_config_option("default_timespan"); $_SESSION["custom"] = 0; } /* initialize the date sessions if not set */ if (!isset($_SESSION["sess_current_date1"])) { set_preset_timespan($timespan);