<?php # # Updates Lab data (Similar to revert) # Called via POST from lab_config_home.php # Redirects back after update is complete # include "../includes/header.php"; include "../includes/db_constants.php"; //include("../export/backup_lib.php"); //include("../includes/user_lib.php"); $saved_session = SessionUtil::save(); //$labConfigId = 129; $labConfigId = $_REQUEST['labConfigId']; $base = $labConfigId . "00000000000"; $dateFrom = $_REQUEST['yearFrom'] . $_REQUEST['monthFrom'] . $_REQUEST['dayFrom']; $dateTo = $_REQUEST['yearTo'] . $_REQUEST['monthTo'] . $_REQUEST['dayTo']; function page_redirect($is_done, $lid) { if ($lid != 0) { $url_string = "lab_config_home.php?id=" . $_REQUEST['lid']; } else { $url_string = "lab_configs.php?id=0"; } if ($is_done === true) { $url_string .= "&revert=1"; } else { $url_string .= "&revert=0"; } header("Location:" . $url_string); }