示例#1
0
    $topology=NULL;
    if (isset($_REQUEST['topology'])) {
      $topology=$_REQUEST['topology'];
    }

    require_once("LayerData.php");
    get_layer_table_schema($layer_tablename, $row_id, $topology);
    break;

  case 'getLayers':
    if (isset($_REQUEST['theme_id'])) {
      $theme_id=$_REQUEST['theme_id'];
    }

    require_once("LayerData.php");
    get_layers($theme_id);
    break;

  case 'getLayerDetails':
    $layer_tablename=check_layer_tablename_provided();

    $fids=NULL;
    if (isset($_REQUEST['fids'])) {
      $fids=$_REQUEST['fids'];
    }

    require_once("LayerData.php");
    get_layer_details($layer_tablename, $fids);
    break;

  case 'getLinkTableSchema':
 case "get_sub_children":
     $where_clause = "WHERE pid = " . $_POST['sub_id'];
     $xml = perform_search($where_clause);
     echo $xml;
     break;
     // get files
 // get files
 case "get_sub_files":
     $files = get_files($_POST['sub_id']);
     $xml = generate_object_list_xml($files);
     echo $xml;
     break;
     // get layers
 // get layers
 case "get_sub_layers":
     $layers = get_layers($_POST['sub_id']);
     $xml = generate_object_list_xml($layers);
     echo $xml;
     break;
     // display form
 // display form
 case "display_form":
     display_form($_POST['sub_id']);
     // nothing echoed back. see method.
     break;
     // update name of submission
 // update name of submission
 case "update_sub_name":
     update_sub_name($_POST['sub_id'], escape_special_chars($_POST['sub_name']));
     // nothing echoed back. see method.
     break;
示例#3
0
    $xmax = $xmin;
}
if ($ymax < $ymin) {
    $ymax = $ymin;
}
$xsize = $xmax - $xmin + 1;
$ysize = $ymax - $ymin + 1;
$llmin = tile2latlon($xmin, $ymax);
$llmax = tile2latlon($xmax, $ymin);
$lat_min = $llmin[0];
$lon_min = $llmin[1];
$lat_max = $llmax[2];
$lon_max = $llmax[3];
$scale = req_num('scale', 256);
$tiles = isset($_REQUEST['tiles']) && preg_match('/^[a-z0-9|-]+$/', $_REQUEST['tiles']) ? $_REQUEST['tiles'] : 'mapnik';
$layers = get_layers($tiles, $zoom);
$redirect = 'http://' . $_SERVER['HTTP_HOST'] . rtrim(dirname($_SERVER['PHP_SELF']), '/\\') . '/';
$permalink = $redirect . "bigmap.php?xmin={$xmin}&xmax={$xmax}&ymin={$ymin}&ymax={$ymax}&zoom={$zoom}&scale={$scale}&tiles={$tiles}";
$basename = isset($_REQUEST['basename']) ? $_REQUEST['basename'] : 'bigmap';
$action = isset($_REQUEST['action']) ? $_REQUEST['action'] : '';
if ($action == 'ozimap') {
    require 'ozimap.php';
    exit;
} else {
    if ($action == 'wld') {
        require 'wld.php';
        exit;
    } else {
        if ($action == 'kml') {
            require 'kml.php';
            exit;
示例#4
0
file:	cstc_csgts.php

desc:	server side script for the carrier sekanni 
		geospatial toolset interface.
		the client makes requests to this script through
		ajax
---------------------------------------------------------------*/
include_once 'classes/class_login.php';
include_once 'classes/class_submission_layer.php';
session_start();
if (isset($_GET['ajax_req'])) {
    switch ($_GET['ajax_req']) {
        // user wishes to obtain available
        // layers for operations
        case "get_layers":
            $layers = get_layers($_SESSION['obj_login']);
            echo json_encode($layers);
            //print_r($layers); //
            break;
    }
} else {
    if (isset($_GET['download_file'])) {
        // only permit the download if the
        // file being requested was the zip
        // file that was saved
        if (isset($_SESSION['output_file']) && substr_count($_GET['download_file'], $_SESSION['output_file']) == 1) {
            download_file($_GET['download_file']);
        }
    } else {
        if (isset($_POST['ajax_req'])) {
            switch ($_POST['ajax_req']) {