Annotation of /trunk/map_reader/JP5m/index.php
Parent Directory
|
Revision Log
Revision 2 - (view) (download)
| 1 : | tuis | 2 | <?php |
| 2 : | |||
| 3 : | require_once './config.php'; | ||
| 4 : | require_once '../func.php'; | ||
| 5 : | |||
| 6 : | |||
| 7 : | $size = 512; | ||
| 8 : | $name = ""; | ||
| 9 : | $mgnf = 1.0; | ||
| 10 : | $seal = GEO_SEA_LEVEL; | ||
| 11 : | $rate = GEO_MAP_XYRATE; | ||
| 12 : | |||
| 13 : | |||
| 14 : | if (isset($_GET["size"])) { | ||
| 15 : | $size = $_GET["size"]; | ||
| 16 : | } | ||
| 17 : | if (isset($_GET["name"])) { | ||
| 18 : | $name = $_GET["name"]; | ||
| 19 : | } | ||
| 20 : | if (isset($_GET["mag"])) { | ||
| 21 : | $mgnf = $_GET["mag"]; | ||
| 22 : | } | ||
| 23 : | if (isset($_GET["sea"])) { | ||
| 24 : | $seal = $_GET["sea"]; | ||
| 25 : | } | ||
| 26 : | if (isset($_GET["rate"])) { | ||
| 27 : | $rate = $_GET["rate"]; | ||
| 28 : | } | ||
| 29 : | |||
| 30 : | if (!ctype_digit($size)) error_proc("size."); | ||
| 31 : | if (!ctype_digit($seal)) error_proc("sea level."); | ||
| 32 : | if (!is_numeric ($mgnf)) error_proc("magnification."); | ||
| 33 : | if (!is_numeric ($rate)) error_proc("X Y rate."); | ||
| 34 : | if (!ctype_alnum($name)) error_proc("file name. no alnum."); | ||
| 35 : | if ($size<=0) $size = 512; | ||
| 36 : | if ($mgnf<=0.0) $mgnf = 1.0; | ||
| 37 : | if ($rate<=0.0) $rate = GEO_MAP_XYRATE; | ||
| 38 : | |||
| 39 : | $len = strlen($name); | ||
| 40 : | if ($len!=7) error_proc("file name. incorrect length."); | ||
| 41 : | |||
| 42 : | $name = strtolower($name); | ||
| 43 : | if (!preg_match('/^[0-9][0-9][a-z][a-z][0-9][0-9][1-4]$/', $name)) error_proc("file name. incorrect name."); | ||
| 44 : | |||
| 45 : | |||
| 46 : | $m = make_mapname_5m($name); | ||
| 47 : | if (!isset($m)) error_proc("make_mapname."); | ||
| 48 : | |||
| 49 : | $d = read_geo_data($m, $size, $rate); | ||
| 50 : | print_geo_data($d, $size, $seal, $mgnf, $rate); | ||
| 51 : | |||
| 52 : | |||
| 53 : | ?> |
| ViewVC Help | |
| Powered by ViewVC 1.0.0 |

