$inoffice = true; } if ($slots[$i] & 2) { $inoffice = false; } if (!$inoffice) { $slots[$i] |= 4; $prov[$i] = $i; } } } $ckavail = true; // If the requested date is a holiday/closed date we need to alert the user about it and let him choose if he wants to proceed ////// $is_holiday = false; $holidays_controller = new Holidays_Controller(); $holidays = $holidays_controller->get_holidays_by_date_range($sdate, $edate); if (in_array($sdate, $holidays)) { $is_holiday = true; $ckavail = true; } ////// // The cktime parameter is a number of minutes into the starting day of a // tentative appointment that is to be checked. If it is present then we are // being asked to check if this indicated slot is available, and to submit // the opener and go away quietly if it is. If it's not then we have more // work to do. if (isset($_REQUEST['cktime'])) { $cktime = 0 + $_REQUEST['cktime']; $ckindex = (int) ($cktime * 60 / $slotsecs); for ($j = $ckindex; $j < $ckindex + $evslots; ++$j) {
* * @package OpenEMR * @author sharonco <*****@*****.**> * @link http://www.open-emr.org */ set_time_limit(0); // Disable magic quotes and fake register globals. $sanitize_all_escapes = true; $fake_register_globals = false; require_once '../../globals.php'; require_once $GLOBALS['srcdir'] . '/acl.inc'; require_once "Holidays_Controller.php"; if (!acl_check('admin', 'super')) { die(xlt('Not authorized')); } $holidays_controller = new Holidays_Controller(); $csv_file_data = $holidays_controller->get_file_csv_data(); //this part download the CSV file after the click on the href link if ($_GET['download_file'] == 1) { $target_file = $holidays_controller->get_target_file(); if (!file_exists($target_file)) { echo xlt('file missing'); } else { header('HTTP/1.1 200 OK'); header('Cache-Control: no-cache, must-revalidate'); header("Pragma: no-cache"); header("Expires: 0"); header("Content-type: text/csv"); header("Content-Disposition: attachment; filename=holiday.csv"); readfile($target_file); exit;