Daniel Barbero Martin 0769c61b19 add map user edit
Former-commit-id: 0adbeea2f272233a9bd105bbb3d7d02ea3759ad7
2019-04-09 18:18:10 +02:00

15 lines
555 B
PHP

<?php
// Script setup.
ini_set('error_reporting', E_ALL);
date_default_timezone_set('UTC');
require './includes/parser.inc';
$map_width = empty($_GET['w']) || !is_numeric($_GET['w']) || $_GET['w'] > 1280 ? 600 : (int) $_GET['w'];
$map_height = round($map_width / 2);
$timezones = timezone_picker_parse_files($map_width, $map_height, 'tz_world.txt', 'tz_islands.txt');
header('Content-Type: application/json');
header('Cache-Control: public, max-age: 3600');
print json_encode($timezones, (JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP | JSON_HEX_QUOT));