Beispiel #1
0
function GetParameters()
{
    global $params, $selText, $locale;
    global $mapName, $sessionId, $bufferName, $lcolor, $ffcolor, $fbcolor, $layersParam, $popup;
    global $transparent, $distance, $units, $linestyle, $fillstyle, $thickness, $merge, $foretrans;
    $sessionId = ValidateSessionId(GetParameter($params, 'SESSION'));
    $locale = ValidateLocaleString(GetParameter($params, 'LOCALE'));
    $mapName = ValidateMapName(GetParameter($params, 'MAPNAME'));
    $lcolor = ValidateColorString(GetParameter($params, 'LCOLOR'));
    $ffcolor = ValidateColorString(GetParameter($params, 'FFCOLOR'));
    $fbcolor = ValidateColorString(GetParameter($params, 'FBCOLOR'));
    $popup = GetIntParameter($params, 'POPUP');
    $transparent = GetIntParameter($params, 'TRANSPARENT');
    $distance = GetDecimalFromLocalizedString(GetParameter($params, 'DISTANCE'), $locale);
    if (isset($params['MERGE'])) {
        $merge = 1;
    }
    $foretrans = GetDoubleParameter($params, 'FORETRANS');
    $thickness = GetDoubleParameter($params, 'THICKNESS');
    $bufferName = GetParameter($params, 'BUFFER');
    $layersParam = GetParameter($params, 'LAYERS');
    $units = GetParameter($params, 'UNITS');
    $linestyle = GetParameter($params, 'LINESTYLE');
    $fillstyle = GetParameter($params, 'FILLSTYLE');
    $selText = GetParameter($params, 'SELECTION');
    //unescape strings
    //
    if (ini_get("magic_quotes_sybase") == "1") {
        $selText = str_replace("''", "'", $selText);
    } else {
        if (get_magic_quotes_gpc() == "1") {
            //Unescape double quotes
            $selText = str_replace('\\"', '"', $selText);
            //remove additional backslash
            $selText = str_replace("\\", "", $selText);
        }
    }
    if ((int) $foretrans < 0 || (int) $foretrans > 100) {
        $foretrans = 50;
    }
}
Beispiel #2
0
function GetParameters()
{
    global $params, $locale;
    global $mapName, $sessionId, $bufferName, $lcolor, $ffcolor, $fbcolor, $layersParam, $popup;
    global $transparent, $distance, $units, $linestyle, $fillstyle, $thickness, $merge, $foretrans;
    if (isset($params['locale'])) {
        $locale = $params['locale'];
    }
    $mapName = $params['mapname'];
    $sessionId = $params['session'];
    $popup = $params['popup'];
    $bufferName = $params['BUFFER'];
    $layersParam = $params['layers'];
    $lcolor = $params['lcolor'];
    $ffcolor = $params['ffcolor'];
    $fbcolor = $params['fbcolor'];
    $foretrans = $params['FORETRANS'];
    $transparent = $params['transparent'];
    $distance = GetDecimalFromLocalizedString($params['DISTANCE'], $locale);
    $units = $params['UNITS'];
    $linestyle = $params['LINESTYLE'];
    $fillstyle = $params['FILLSTYLE'];
    $thickness = $params['THICKNESS'];
    if (isset($params['MERGE'])) {
        $merge = 1;
    }
    if ((int) $foretrans < 0 || (int) $foretrans > 100) {
        $foretrans = 50;
    }
}