Location: PHPKode > projects > jjfmapper > jjfmapper/examples/gauntlet/map.php
<?php

if (file_exists ('lockfile'))
{
    $lockmsg = <<<EOS
This application will not function until the file called "lockfile" is deleted
from its directory.  This is to prevent the inadvertant publishing of this
application on the public internet.  This application is intended for use on
a closed network.
EOS;
    header ('text/plain');
    echo ($lockmsg);
    die;
}

include_once ('tidy.php');
include_once ('config.php');

if (isset ($_REQUEST['c']) && $_REQUEST['c'] != '')
{
    $config = $_REQUEST['c'];
} else {
    $config = <<<EOS
<jjfmapper>
<output format="png" width="400" height="125"/>
<projection lat="0" lon="0" padding="1*"/>
<layer z="0"
        format="background"
        color="white"/>
<layer z="1"
        format="text"
        text="JJFMapper output image."
        align="center"
        valign="center"
        color="black"/>
</jjfmapper>    
EOS;
}

$config = tidy ($config);

include_once ($jjfmapper_main);
$map = new jjfmapper($config);
$im = $map->run();

if (is_resource ($im))
{
    if (isset ($_REQUEST['postp']))
    {
        imagestring ($im,5,5,5,'Post processed image!',0);
    }
    header ('Content-type: image/png');
    imagepng ($im);
    imagedestroy ($im);
}


?>
Return current item: jjfmapper