/** * Init function, parse JSON result string */ function __construct($json) { // Remove problematic characters for JSON parsing $json = str_replace(array('\\"'), array("''"), $json); $this->jsonList = PMCommon::parseJSON($json); //pm_logDebug(3, $this->jsonList); $dateAndTime = date('Y-m-d_H-i-s'); $this->currentTimeForFileName = $dateAndTime; $this->tempFilePath = $_SESSION['web_imagepath'] . $this->currentTimeForFileName . '_' . session_id(); $this->tempFileLocation = $_SESSION['web_imageurl'] . $this->currentTimeForFileName . '_' . session_id(); }
if (count($plugin_jsTocInitList) > 0) { echo "'" . implode("','", $plugin_jsTocInitList) . "'"; } ?> ]; <?php // only load configuration for activated plugins $ini['pluginsConfig'] = $_SESSION['pluginsConfig']; // add allGroups if not defined in XML config if (!$ini['map']['allGroups']) { $ini['map']['allGroups']['group'] = $_SESSION['allGroups']; } ?> PM.ini = <?php echo PMCommon::parseJSON($ini, false); ?> ; <?php echo PMCommon::writeJSArrays(); ?> $.merge(PM.categoriesClosed, <?php echo "['" . implode("','", $_SESSION['categoriesClosed']) . "']"; ?> ); // Query layers: modify query results in js PM.modifyQueryResultsFunctions = [<?php if (count($plugin_jsModifyQueryResultsFunctions) > 0) {
<?php header("Content-type: text/javascript"); require_once "../group.php"; require_once "../pmsession.php"; $gLanguage = $_SESSION["gLanguage"]; require_once "../common.php"; require_once "../locale/language_" . $gLanguage . ".php"; // Print list with locales for access via JS foreach ($_sl as $k => $v) { print "PM.Locales.list['{$k}'] = '" . str_replace('\\\\r\\\\n', '\\r\\n', addslashes($v)) . "';\n"; } // Write compressed JS functions from plugins $plugin_jsFileList = $_SESSION['plugin_jsFileList']; $debugLevel = $_SESSION['debugLevel']; if (count($plugin_jsFileList) > 0) { foreach ($plugin_jsFileList as $jsLoc) { $jsFile = $_SESSION['PM_BASE_DIR'] . "/{$jsLoc}"; print PMCommon::compressJavaScriptFile($jsFile, $debugLevel); } } print "PM.grouplist = " . PMCommon::parseJSON($_SESSION['grouplist'], false) . ";";
****************************************************************************** * * Copyright (c) 2003-2006 Armin Burger * * This file is part of p.mapper. * * p.mapper is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. See the COPYING file. * * p.mapper is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with p.mapper; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * ******************************************************************************/ // prevent XSS require_once "../pmsession.php"; require_once "../common.php"; require_once "../globals.php"; $sessionvar = $_REQUEST['sessionvar']; $sessionvarJson = PMCommon::parseJSON($_SESSION['categories'], false); pm_logDebug(3, $sessionvarJson, "x_getsessionvar.php, JSON for session var {$sessionvar}"); header("Content-Type: text/plain; charset={$defCharset}"); //echo "{" . $sessionvar . ":" . $sessionvarJson . "}"; echo $sessionvarJson;