%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
Server IP : 49.231.201.246 / Your IP : 216.73.216.149 Web Server : Apache/2.4.18 (Ubuntu) System : Linux 246 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64 User : root ( 0) PHP Version : 7.0.33-0ubuntu0.16.04.16 Disable Function : exec,passthru,shell_exec,system,proc_open,popen,pcntl_exec MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /proc/thread-self/root/var/www/html/ppaobm/vendor/bower-asset/fullcalendar/demos/php/ |
Upload File : |
<?php //-------------------------------------------------------------------------------------------------- // This script reads event data from a JSON file and outputs those events which are within the range // supplied by the "start" and "end" GET parameters. // // An optional "timeZone" GET parameter will force all ISO8601 date stings to a given timeZone. // // Requires PHP 5.2.0 or higher. //-------------------------------------------------------------------------------------------------- // Require our Event class and datetime utilities require dirname(__FILE__) . '/utils.php'; // Short-circuit if the client did not give us a date range. if (!isset($_GET['start']) || !isset($_GET['end'])) { die("Please provide a date range."); } // Parse the start/end parameters. // These are assumed to be ISO8601 strings with no time nor timeZone, like "2013-12-29". // Since no timeZone will be present, they will parsed as UTC. $range_start = parseDateTime($_GET['start']); $range_end = parseDateTime($_GET['end']); // Parse the timeZone parameter if it is present. $timeZone = null; if (isset($_GET['timeZone'])) { $timeZone = new DateTimeZone($_GET['timeZone']); } // Read and parse our events JSON file into an array of event data arrays. $json = file_get_contents(dirname(__FILE__) . '/../json/events.json'); $input_arrays = json_decode($json, true); // Accumulate an output array of event data arrays. $output_arrays = array(); foreach ($input_arrays as $array) { // Convert the input array into a useful Event object $event = new Event($array, $timeZone); // If the event is in-bounds, add it to the output if ($event->isWithinDayRange($range_start, $range_end)) { $output_arrays[] = $event->toArray(); } } // Send JSON to the client. echo json_encode($output_arrays);