View of /trunk/map_reader/JP5m/chk.php
Parent Directory
|
Revision Log
Revision 2 -
(download)
(annotate)
Tue Jun 1 02:41:12 2010 UTC (3 years ago) by tuis
File size: 995 byte(s)
Tue Jun 1 02:41:12 2010 UTC (3 years ago) by tuis
File size: 995 byte(s)
first
<?php
require_once './config.php';
require_once '../func.php';
$size = 256;
$name = "09ld371";
$mgnf = 1.0;
$seal = 20;
/*
if (isset($_GET["size"])) {
$size = $_GET["size"];
}
if (isset($_GET["name"])) {
$name = $_GET["name"];
}
if (isset($_GET["mag"])) {
$mgnf = $_GET["mag"];
}
if (isset($_GET["sea"])) {
$seal = $_GET["sea"];
}
*/
if (!ctype_digit($size)) error_proc("size.");
if (!ctype_digit($seal)) error_proc("sea level.");
if (!is_numeric($mgnf)) error_proc("magnification.");
if (!ctype_alnum($name)) error_proc("file name. no alnum.");
if ($size<=0) $size = 512;
if ($mgnf<=0.0) $mgnf = 1.0;
$len = strlen($name);
if ($len!=7) error_proc("file name. incorrect length.");
$name = strtolower($name);
if (!preg_match('/^[0-9][0-9][a-z][a-z][0-9][0-9][1-4]$/', $name)) error_proc("file name. incorrect name.");
$m = make_mapname_5m($name);
if (!isset($m)) error_proc("make_mapname.");
$d = read_geo_data($m, $size);
print_geo_data($d, $size, $seal, $mgnf);
?>
| ViewVC Help | |
| Powered by ViewVC 1.0.0 |

