File "x_layerinfo.phtml"
Full path: /www/map/mapserver-extensions/pmapper-4.2.0/plugins/layerinfo/x_layerinfo.phtml
File size: 571 B
MIME-type: text/x-php
Charset: utf-8
<?php
require_once("../../incphp/pmsession.phtml");
require_once("../../incphp/globals.phtml");
$group = $_REQUEST['group'];
$xmlFile = $_SESSION['pluginsConfig']['layerinfo']['configfile'];
$xml = simplexml_load_file($_SESSION['PM_BASECONFIG_DIR'] . "/$xmlFile");
$grpNode = $xml->xpath("//group[@name='$group']");
if (!$grpNode) {
$grpXml = "No information available for selected layer";
} else {
$grpXml = $grpNode[0]->asXML();
}
header("Content-Type: text/html; charset=$defCharset");
// return JS object literals "{}" for XMLHTTP request
echo $grpXml;
?>