[Mapbender-commits] r2869 - in branches/nimix_dev: . http/frames http/html http/print http/tools resources/db/mysql resources/db/update

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Mon Aug 18 12:10:50 EDT 2008


Author: nimix
Date: 2008-08-18 12:10:50 -0400 (Mon, 18 Aug 2008)
New Revision: 2869

Added:
   branches/nimix_dev/resources/db/mysql/mysql_gettext.sql
Modified:
   branches/nimix_dev/http/frames/index.php
   branches/nimix_dev/http/frames/login.php
   branches/nimix_dev/http/html/mod_treefolder2.php
   branches/nimix_dev/http/print/mod_printPDF.php
   branches/nimix_dev/http/print/mod_printPDF_pdf.php
   branches/nimix_dev/http/print/printPDF.conf
   branches/nimix_dev/http/print/printPDF_b.conf
   branches/nimix_dev/http/print/print_functions.php
   branches/nimix_dev/http/tools/mapbender_setup.php
   branches/nimix_dev/last_merged.txt
   branches/nimix_dev/resources/db/update/update_2.6.sql
Log:
merge

Modified: branches/nimix_dev/http/frames/index.php
===================================================================
--- branches/nimix_dev/http/frames/index.php	2008-08-18 16:07:47 UTC (rev 2868)
+++ branches/nimix_dev/http/frames/index.php	2008-08-18 16:10:50 UTC (rev 2869)
@@ -19,7 +19,6 @@
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
 require("../php/mb_validateSession.php");
-require_once(dirname(__FILE__)."/../classes/class_locale.php");
 require_once(dirname(__FILE__)."/../classes/class_gui.php");
 
 $_SESSION["mb_user_gui"] = $gui_id;
@@ -30,6 +29,7 @@
 //
 if (!in_array($gui_id, $_SESSION["mb_user_guis"])) {
 	$e = new mb_exception("mb_validateSession.php: User: " . $_SESSION["mb_user_id"] . " not allowed to access GUI " . $gui_id);
+	session_write_close();
 	header("Location: ".LOGIN);
 	die();
 }
@@ -77,6 +77,8 @@
 <?php
 $currentApplication = new gui($gui_id);
 echo $currentApplication->toHtml();
-echo "<script type='text/javascript' src='../javascripts/map.php?".$urlParameters."&mb_myBBOX=".$_REQUEST["mb_myBBOX"]."'></script>";
+$mapPhpParameters = $urlParameters."&mb_myBBOX=".$_REQUEST["mb_myBBOX"];
+echo "<script type='text/javascript' src='../javascripts/map.php?".$mapPhpParameters."'></script>";
+
 ?>
-</html>
\ No newline at end of file
+</html>

Modified: branches/nimix_dev/http/frames/login.php
===================================================================
--- branches/nimix_dev/http/frames/login.php	2008-08-18 16:07:47 UTC (rev 2868)
+++ branches/nimix_dev/http/frames/login.php	2008-08-18 16:10:50 UTC (rev 2869)
@@ -56,7 +56,6 @@
 $name = $_REQUEST["name"];
 $password = $_REQUEST["password"];
 
-$loginMax = MAXLOGIN;
 
 if(!isset($name) || $name == ''){
   echo "<script type='text/javascript'>";
@@ -116,7 +115,7 @@
 		include(dirname(__FILE__)."/../../conf/session.conf");
 	}	
 	if($_SESSION["mb_user_id"]){
-		if($row["mb_user_login_count"] < $loginMax){
+		if($row["mb_user_login_count"] <= MAXLOGIN){
 			$sql_del_cnt =  "UPDATE mb_user SET mb_user_login_count = 0 WHERE mb_user_id = $1";
 			$v = array($_SESSION['mb_user_id']);
 			$t = array("i");
@@ -133,11 +132,17 @@
 			}
 			#only one gui is provided
 			if(count($arrayGUIs) == 1){
+				if (isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == "on") {
+					$myURL = "Location: https://".$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF'])."/index.php?".strip_tags (SID)."&gui_id=".$arrayGUIs[0];
+				}
+				else {
 				$myURL = "Location: http://".$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF'])."/index.php?".strip_tags (SID)."&gui_id=".$arrayGUIs[0];            
+				}
 				# params for the initial call
 				if(isset($_REQUEST["mb_myBBOX"])){
 					$myURL .= "&mb_myBBOX=".$_REQUEST["mb_myBBOX"];
 				}
+				session_write_close();
 				header ($myURL);
 				exit;
 			}
@@ -153,7 +158,12 @@
 		$v = array($name);
 		$t = array('s');
 		db_prep_query($sql_set_cnt,$v,$t);				
+		if (isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == "on") {
+			header ("Location: https://".$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF'])."/login.php?name=".$name);
+		}
+		else {
 		header ("Location: http://".$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF'])."/login.php?name=".$name);
+		}
 		exit();
 	}
 }

Modified: branches/nimix_dev/http/html/mod_treefolder2.php
===================================================================
--- branches/nimix_dev/http/html/mod_treefolder2.php	2008-08-18 16:07:47 UTC (rev 2868)
+++ branches/nimix_dev/http/html/mod_treefolder2.php	2008-08-18 16:10:50 UTC (rev 2869)
@@ -17,8 +17,8 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
 $gui_id = $_SESSION["mb_user_gui"];
-require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
 ?>
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
 <HTML>
@@ -47,9 +47,20 @@
    $e_target = db_result($res,0,"e_target");   
    echo "mod_treeGDE_map = '".$e_target."';";   
 echo "</script>";
+session_write_close();
 ?>
 <SCRIPT language="JavaScript" type="text/javascript">
 
+var msgObj = {};
+msgObj.tooltipHandleWms = '<?php echo _mb("(De)activate this service");?>';
+msgObj.tooltipLayerVisible = '<?php echo _mb("Toggles the visibility of this service");?>';
+msgObj.tooltipLayerQuerylayer = '<?php echo _mb("Toggles the queryability of this service");?>';
+msgObj.tooltipLayerContextMenu = '<?php echo _mb("Opens the layer context menu");?>';
+msgObj.tooltipWmsContextMenu = '<?php echo _mb("Opens the WMS context menu");?>';
+msgObj.tooltipRemoveWms = '<?php echo _mb("Removes the selected WMS");?>';
+msgObj.tooltipMoveSelectionUp = '<?php echo _mb("Moves the selection up");?>';
+msgObj.tooltipMoveSelectionDown = '<?php echo _mb("Moves the selection down");?>';
+
 var jst_container = "document.getElementById('treeContainer')";
 var jst_image_folder = imagedir;
 var jst_display_root = false;
@@ -517,7 +528,7 @@
 								if(menu.indexOf("hide")!=-1)c_menu+="menu_hide";
 								c_menu+="]";
 								controls=null;
-								if(switchwms=='true')controls='<INPUT type="checkbox" checked onclick="handleSelectedWMS(\''+arrNodes[0][0]+'|'+parent.mb_mapObj[i].wms[ii].wms_id+'\');" />';
+								if(switchwms=='true')controls='<INPUT type="checkbox" title="' + msgObj.tooltipHandleWms + '" checked onclick="handleSelectedWMS(\''+arrNodes[0][0]+'|'+parent.mb_mapObj[i].wms[ii].wms_id+'\');" />';
 								if(wmsbuttons == 'true'&&metadatalink == 'true')controls+='<a href="'+'javascript:openwindow(\''+ defaultMetadataUrl + '&id='+temp.layer_uid+'\');'+'"><img src="'+imagedir+'/info.png" /></a>';
 								addNode(arrNodes[0][0],[parent.mb_mapObj[i].wms[ii].wms_id,[temp.layer_title,((metadatalink=='true'&&wmsbuttons != 'true')?('javascript:openwindow(\"'+ defaultMetadataUrl + '&id='+temp.layer_uid+'\");'):"javascript:select("+i+","+ii+","+iii+");"),,,temp.layer_title,eval(c_menu),controls,[i,ii,iii]]],false,false,reverse=="true");
 								parentObj = arrNodes[0][0]+"|"+parent.mb_mapObj[i].wms[ii].wms_id;              
@@ -552,8 +563,8 @@
 									if(menu.indexOf("hide")!=-1)c_menu+="menu_hide";
 									c_menu+="]";
 									
-									controls='<input type="checkbox" '+(temp.layer_name==""?'style="display:none;" ':"")+((temp.gui_layer_visible=='1')?'checked ':'')+(temp.gui_layer_selectable!='1'?'disabled ':'')+"onclick=\"handleSelectedLayer('"+mod_treeGDE_map+"','"+parent.mb_mapObj[i].wms[ii].wms_id+"','"+temp.layer_name+"','visible',this.checked?1:0);handleSelection('"+parentObj+parentLayer+"|"+temp.layer_id+"', 0);updateParent('"+parentObj+parentLayer+"');"+((ficheckbox == 'false')?"handleSelectedLayer('"+mod_treeGDE_map+"','"+parent.mb_mapObj[i].wms[ii].wms_id+"','"+temp.layer_name+"','querylayer',this.checked?1:0)":"")+"\" />";
-									if(ficheckbox == 'true')controls+='<input type="checkbox" '+(temp.gui_layer_querylayer=='1'?'checked ':'')+(temp.gui_layer_queryable!='1'?'disabled ':'')+"onclick=\"handleSelectedLayer('"+mod_treeGDE_map+"','"+parent.mb_mapObj[i].wms[ii].wms_id+"','"+temp.layer_name+"','querylayer',this.checked?1:0);handleSelection('"+parentObj+parentLayer+"|"+temp.layer_id+"', 1)\" />";
+									controls='<input type="checkbox"  title="' + msgObj.tooltipLayerVisible + '"'+(temp.layer_name==""?'style="display:none;" ':"")+((temp.gui_layer_visible=='1')?'checked ':'')+(temp.gui_layer_selectable!='1'?'disabled ':'')+"onclick=\"handleSelectedLayer('"+mod_treeGDE_map+"','"+parent.mb_mapObj[i].wms[ii].wms_id+"','"+temp.layer_name+"','visible',this.checked?1:0);handleSelection('"+parentObj+parentLayer+"|"+temp.layer_id+"');updateParent('"+parentObj+parentLayer+"');"+((ficheckbox == 'false')?"handleSelectedLayer('"+mod_treeGDE_map+"','"+parent.mb_mapObj[i].wms[ii].wms_id+"','"+temp.layer_name+"','querylayer',this.checked?1:0)":"")+"\" />";
+									if(ficheckbox == 'true')controls+='<input type="checkbox" title="' + msgObj.tooltipLayerQuerylayer + '" '+(temp.gui_layer_querylayer=='1'?'checked ':'')+(temp.gui_layer_queryable!='1'?'disabled ':'')+"onclick=\"handleSelectedLayer('"+mod_treeGDE_map+"','"+parent.mb_mapObj[i].wms[ii].wms_id+"','"+temp.layer_name+"','querylayer',this.checked?1:0);checkChildren('"+parentObj+parentLayer+"|"+temp.layer_id+"', 1, this.checked?1:0)\" />";
 									if(wmsbuttons == 'true'&&metadatalink == 'true')controls+='<a href="'+'javascript:openwindow(\''+ defaultMetadataUrl + '&id='+temp.layer_uid+'\');'+'"><img src="'+imagedir+'/info.png" /></a>';
 									addNode(parentObj + parentLayer, [temp.layer_id,[temp.layer_title,((metadatalink=='true'&&wmsbuttons != 'true')?('javascript:openwindow(\"'+ defaultMetadataUrl + '&id='+temp.layer_uid+'\");'):"javascript:select("+i+","+ii+","+iii+");"),,((c_menu!='[]'&&temp.layer_name!="")?'menu.png':null),temp.layer_title,eval(c_menu),controls,[i,ii,iii]]],false,false,reverse=="true");
 								}
@@ -601,9 +612,9 @@
 <SCRIPT language="JavaScript" type="text/javascript">
 if(wmsbuttons=='true'){
 	document.writeln("<div>"); 
-	document.writeln('<a href="javascript:move_up()"><img src="'+imagedir+'/move_up.png" alt="move up" style="position:relative;top:0px;left:0px;"/></a>'); 
-	document.writeln('<a href="javascript:move_down()"><img src="'+imagedir+'/move_down.png" alt="move down" style="position:relative;top:0px;left:-3px"/></a>'); 
-	document.writeln('<a href="javascript:remove_wms()"><img src="'+imagedir+'/delete_wms.png" alt="remove wms" style="position:relative;top:0px;left:-6px"/></a>'); 
+	document.writeln('<a href="javascript:move_up()"><img title="'+msgObj.tooltipMoveSelectionUp+'" src="'+imagedir+'/move_up.png" alt="move up" style="position:relative;top:0px;left:0px;"/></a>'); 
+	document.writeln('<a href="javascript:move_down()"><img title="'+msgObj.tooltipMoveSelectionDown+'" src="'+imagedir+'/move_down.png" alt="move down" style="position:relative;top:0px;left:-3px"/></a>'); 
+	document.writeln('<a href="javascript:remove_wms()"><img title="'+msgObj.tooltipRemoveWms+'" src="'+imagedir+'/delete_wms.png" alt="remove wms" style="position:relative;top:0px;left:-6px"/></a>'); 
 	document.writeln("</div>"); 
 }
 </SCRIPT>

Modified: branches/nimix_dev/http/print/mod_printPDF.php
===================================================================
--- branches/nimix_dev/http/print/mod_printPDF.php	2008-08-18 16:07:47 UTC (rev 2868)
+++ branches/nimix_dev/http/print/mod_printPDF.php	2008-08-18 16:10:50 UTC (rev 2869)
@@ -198,6 +198,7 @@
 			map_height = <?php echo $a0l_map_height; ?>;
 		}     
 		var pos = pt.makeClickPos2RealWorldPos(target, map_width , map_height);
+		var prevscale= pt.mb_getScale(target);
 		pt.mb_mapObj[ind].extent = coord[0] + "," + pos[1] + "," + pos[0] + "," +  coord[3];
 
 		pt.mb_mapObj[ind].width = Math.round(map_width);
@@ -208,7 +209,7 @@
 		pt.window.frames[target].document.getElementById("maps").style.height = Math.round(map_height);
 
 		//pt.setMapRequest(target);		
-		pt.mb_repaintScale(target, null, null, pt.mb_getScale(target));
+		pt.mb_repaintScale(target, null, null, prevscale);
       	document.form1.map_url.value = '';
 		for(var i=0; i<pt.mb_mapObj[ind].wms.length; i++){
 			if(pt.mb_mapObj[ind].wms[i].gui_wms_visible > 0){

Modified: branches/nimix_dev/http/print/mod_printPDF_pdf.php
===================================================================
--- branches/nimix_dev/http/print/mod_printPDF_pdf.php	2008-08-18 16:07:47 UTC (rev 2868)
+++ branches/nimix_dev/http/print/mod_printPDF_pdf.php	2008-08-18 16:10:50 UTC (rev 2869)
@@ -17,11 +17,7 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
-#require_once(dirname(__FILE__) . "/../php/mb_validateSession.php");
-ob_start();
-session_start();
-ini_set('error_reporting', 'E_ALL & ~ E_NOTICE');
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
 
 include (dirname(__FILE__)."/../classes/class.ezpdf.php");
 include (dirname(__FILE__)."/../classes/class_stripRequest.php");
@@ -30,7 +26,6 @@
 include (dirname(__FILE__)."/../print/".$_REQUEST["conf"]);
 include (dirname(__FILE__)."/../classes/class_SaveLegend.php");
 include (dirname(__FILE__)."/../print/print_functions.php");
-require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
 
 if($log == true){
 	include (dirname(__FILE__)."/../classes/class_log.php");
@@ -157,75 +152,77 @@
 }
 $coord = mb_split(",",$map_extent);
 
-// analyse overview url and draw rectangle with position
-$o_url = new stripRequest($overview_url);
-$overview_width = round($o_url->get("width"));
-$overview_height = round($o_url->get("height"));
-
-if($factor>1){
-	$o_url->set('width',(intval($o_url->get('width'))*4));
-	$o_url->set('height',(intval($o_url->get('height'))*4));
-	if(in_array($o_url->get('map'),$highqualitymapfiles)){	
-			$o_url->set('map',preg_replace("/\.map/","_4.map",$o_url->get('map')));		
-			$overview_url = $o_url->url;	
+if($overview === true){
+	// analyse overview url and draw rectangle with position
+	$o_url = new stripRequest($overview_url);
+	$overview_width = round($o_url->get("width"));
+	$overview_height = round($o_url->get("height"));
+	
+	if($factor>1){
+		$o_url->set('width',(intval($o_url->get('width'))*4));
+		$o_url->set('height',(intval($o_url->get('height'))*4));
+		if(in_array($o_url->get('map'),$highqualitymapfiles)){	
+				$o_url->set('map',preg_replace("/\.map/","_4.map",$o_url->get('map')));		
+				$overview_url = $o_url->url;	
+		}
 	}
-}
+	
+	if($matching == true){
+		$overview_url = preg_replace($pattern,$replacement,$overview_url);  
+	}
+	
+	
+	if ($size == "A4" && $format == "portrait"){
+		$overview_left = $a4p_overviewOffset_left;
+		$overview_bottom =$a4p_overviewOffset_bottom;
+	}elseif ($size == "A4" && $format == "landscape"){
+		$overview_left = $a4l_overviewOffset_left;
+		$overview_bottom =$a4l_overviewOffset_bottom;
+	}elseif ($size == "A3" && $format == "portrait"){
+		$overview_left = $a3p_overviewOffset_left;
+		$overview_bottom =$a3p_overviewOffset_bottom;
+	}elseif ($size == "A3" && $format == "landscape"){
+		$overview_left = $a3l_overviewOffset_left;
+		$overview_bottom = $a3l_overviewOffset_bottom;
+	}elseif ($size == "A2" && $format == "portrait"){
+		$overview_left = $a2p_overviewOffset_left;
+		$overview_bottom =$a2p_overviewOffset_bottom;
+	}elseif ($size == "A2" && $format == "landscape"){
+		$overview_left = $a2l_overviewOffset_left;
+		$overview_bottom = $a2l_overviewOffset_bottom;
+	}elseif ($size == "A1" && $format == "portrait"){
+		$overview_left = $a1p_overviewOffset_left;
+		$overview_bottom =$a1p_overviewOffset_bottom;
+	}elseif ($size == "A1" && $format == "landscape"){
+		$overview_left = $a1l_overviewOffset_left;
+		$overview_bottom = $a1l_overviewOffset_bottom;
+	}elseif ($size == "A0" && $format == "portrait"){
+		$overview_left = $a0p_overviewOffset_left;
+		$overview_bottom =$a0p_overviewOffset_bottom;
+	}elseif ($size == "A0" && $format == "landscape"){
+		$overview_left = $a0l_overviewOffset_left;
+		$overview_bottom = $a0l_overviewOffset_bottom;
+	}
+	
+	$o_extent = $o_url->get("BBOX");
+	
+	$array_overview_url[0] = $overview_url;
+	if($log == true){
+		$l = new log("printPDF_overview",$array_overview_url);
+	}
+	
+	/*
+	$o_new = new stripRequest($overview_url);
+	$o_new->set('width',50);
+	$o_new->set('height',50);
+	//$o->set('BBOX',$overview_extent);
+	$o_url_new =$o_new->url;
+	$array_overview[0] = $overview_url;
+	$array_overview[1] = $o_url;
+	*/
+}	
 
-if($matching == true){
-	$overview_url = preg_replace($pattern,$replacement,$overview_url);  
-}
-
-
-if ($size == "A4" && $format == "portrait"){
-	$overview_left = $a4p_overviewOffset_left;
-	$overview_bottom =$a4p_overviewOffset_bottom;
-}elseif ($size == "A4" && $format == "landscape"){
-	$overview_left = $a4l_overviewOffset_left;
-	$overview_bottom =$a4l_overviewOffset_bottom;
-}elseif ($size == "A3" && $format == "portrait"){
-	$overview_left = $a3p_overviewOffset_left;
-	$overview_bottom =$a3p_overviewOffset_bottom;
-}elseif ($size == "A3" && $format == "landscape"){
-	$overview_left = $a3l_overviewOffset_left;
-	$overview_bottom = $a3l_overviewOffset_bottom;
-}elseif ($size == "A2" && $format == "portrait"){
-	$overview_left = $a2p_overviewOffset_left;
-	$overview_bottom =$a2p_overviewOffset_bottom;
-}elseif ($size == "A2" && $format == "landscape"){
-	$overview_left = $a2l_overviewOffset_left;
-	$overview_bottom = $a2l_overviewOffset_bottom;
-}elseif ($size == "A1" && $format == "portrait"){
-	$overview_left = $a1p_overviewOffset_left;
-	$overview_bottom =$a1p_overviewOffset_bottom;
-}elseif ($size == "A1" && $format == "landscape"){
-	$overview_left = $a1l_overviewOffset_left;
-	$overview_bottom = $a1l_overviewOffset_bottom;
-}elseif ($size == "A0" && $format == "portrait"){
-	$overview_left = $a0p_overviewOffset_left;
-	$overview_bottom =$a0p_overviewOffset_bottom;
-}elseif ($size == "A0" && $format == "landscape"){
-	$overview_left = $a0l_overviewOffset_left;
-	$overview_bottom = $a0l_overviewOffset_bottom;
-}
-
-$o_extent = $o_url->get("BBOX");
-
-$array_overview_url[0] = $overview_url;
-if($log == true){
-	$l = new log("printPDF_overview",$array_overview_url);
-}
-
 /*
-$o_new = new stripRequest($overview_url);
-$o_new->set('width',50);
-$o_new->set('height',50);
-//$o->set('BBOX',$overview_extent);
-$o_url_new =$o_new->url;
-$array_overview[0] = $overview_url;
-$array_overview[1] = $o_url;
-*/
-
-/*
  * north arrow
  */
 if($size == "A4" && $format == "portrait"){

Modified: branches/nimix_dev/http/print/printPDF.conf
===================================================================
--- branches/nimix_dev/http/print/printPDF.conf	2008-08-18 16:07:47 UTC (rev 2868)
+++ branches/nimix_dev/http/print/printPDF.conf	2008-08-18 16:10:50 UTC (rev 2869)
@@ -1,385 +1,384 @@
-<?php
-
-include_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-# filename for temporary imagefiles
-$filename = TMPDIR."/map_".substr(md5(uniqid(rand())),0,7).".png";
-
-/*
-* DOWNLOAD
-*/
-$download = true;
-$downloadFile = TMPDIR."/map_".substr(md5(uniqid(rand())),0,7).".pdf";
-$downloadText = _("Download: Map as PDF...");
-
-/*
-*run print as iframe or window
-*/
-$type = 'iframe';
-
-
-
-/*
-* Legend
-*/
-$legend=true;
-$label_legend = _('print legend');
-$legendFilename = TMPDIR."/legend_".substr(md5(uniqid(rand())),0,7).".png";
-$legendFilenameUserPolygon = TMPDIR."/legend_".substr(md5(uniqid(rand())),0,7).".png";
-$legendText = _("Legend");
-$legendFooter = _("powered by Mapbender");
-$legendImage = "./img/mapbender_logo.png";
-$legendImage_width = 90;
-$legendImage_height = 13;
-
-
-# log requests, class 'class_log.php' required
-$log = false;
-
-# delete images:
-$unlink = true;
-
-# labeling
-if(CHARSET=="UTF-8"){ 
-	$new_comment1 = utf8_decode($_REQUEST["comment1"]);
-	$new_comment2 = utf8_decode($_REQUEST["comment2"]);
-}
-else{
-	$new_comment1 = $_REQUEST["comment1"];
-	$new_comment2 = $_REQUEST["comment2"];
-}
-
-$text1 = _("Print preview");
-$text2 = "- Mapbender -";
-$text3 = "";
-$text4 = _("Scale 1:"). " ".$_REQUEST["map_scale"];
-$text5 = _("Date:") . " ".date("d.m.Y",strtotime("now"));
-
-$text6 = _("Notes:");
-$text7 = "";
-$text8 = $new_comment1;
-$text9 = $new_comment2;
-$text10 = "";
-
-
-$text11 = _("This copy has been automatically generated and is thus not valid without signature.");
-$text12 = _("This copy is protected by law (Par. 3 Abs. 1 VermKatG NW). It can be duplicaedted, modified, published or be passed to third parties only in agreement with");
-$text13 = _("the publisher, except duplicates and modifications aimed at internal use of government agencies or private use.");
-
-$text14 = _("This copy is protected,");
-$text15 = _("ask me!!!!");
-$text16 = _("or the publisher");
-$text17 = _("or use is internally.");
-
-/*
-* Labeling for buttons, textfields ...
-*/
-
-$label_format = _("Format:");
-$label_format_a4 = "A4";
-$label_format_a3 = "A3";
-$label_format_a2 = "A2";
-$label_format_a1 = "A1";
-$label_format_a0 = "A0";
-
-$label_orientation = _("Orientation:");
-$label_portrait = _("portrait");
-$label_landscape = _("landscape");
-
-$label_72dpi = sprintf(_("Quality: %d dpi"), 72);
-$label_288dpi = sprintf(_("Quality: %d dpi"), 288);
-
-$label_comment = _("Comment (max. 30)");
-$comment_length = 30;
-
-$label_button = _('print');
-
-/*
-* default
-* url string matching and replacement
-*/
-$matching = false;
-$pattern =  "/192\.168\.2\.113/";
-$replacement = "192.168.2.5";
-
-/*
-* high quality printing 288dpi
-* highquality mapfiles will be supplemented with "_4"
-* example: germany.map -> germany_4.map
-*/
-
-
-$highquality = true;
-$highqualitymapfiles = array(
-	"/data/umn/germany/germany_demo.map",
-	"/data/umn/mapbender_user/mapbender_user.map"
-);
-
-# Dots per cm (72 dpi):
-# 28.346456692913385826771653543307 
-$DPC = 28.35;
-
-# available formats:
-$a4 = true;
-$a3 = true;
-$a2 = true;
-$a1 = false;
-$a0 = false;
-
-# dimensions of the map:
-
-# A4 portrait
-$a4p_mapOffset_left = 3.3 * $DPC;
-$a4p_mapOffset_bottom = 3 * $DPC;
-$a4p_map_width = 15.7 * $DPC; 
-$a4p_map_height = 22 * $DPC; 
-$a4p_page_width = 21 * $DPC;
-$a4p_page_height = 29.7 * $DPC;
-$a4p_header_height = 2.6 * $DPC;
-$a4p_footer_height = 1.12 * $DPC;
-        
-# A4 landscape
-$a4l_mapOffset_left = 2.3 * $DPC;
-$a4l_mapOffset_bottom = 1.8 * $DPC;
-$a4l_map_width = 25.2 * $DPC;
-$a4l_map_height = 16.4 * $DPC; 
-$a4l_page_width = 29.7 * $DPC;
-$a4l_page_height = 21 * $DPC;   
-$a4l_header_width = 8.5 * $DPC;
-$a4l_header_height = 6 * $DPC;
-        
-# A3 protrait
-$a3p_mapOffset_left = 3.3 * $DPC;
-$a3p_mapOffset_bottom = 3 * $DPC;
-$a3p_map_width = 24.1 * $DPC;
-$a3p_map_height = 36.7 * $DPC;
-$a3p_page_width = 29.7 * $DPC;
-$a3p_page_height = 42 * $DPC;
-$a3p_header_width =  8.5 * $DPC;
-$a3p_header_height = 6 * $DPC;
-
-# A3 landscape        
-$a3l_mapOffset_left = 2.3 * $DPC;
-$a3l_mapOffset_bottom = 1.8 * $DPC;
-$a3l_map_width = 37.4 * $DPC;
-$a3l_map_height = 25.4 * $DPC; 
-$a3l_page_width = 42 * $DPC;
-$a3l_page_height = 29.7 * $DPC;
-$a3l_header_width =  8.5 * $DPC;
-$a3l_header_height = 6 * $DPC;
-
-# a2 protrait
-$a2p_mapOffset_left = 3.2 * $DPC;
-$a2p_mapOffset_bottom = 2.3 * $DPC;
-$a2p_map_width = 37.3 * $DPC;
-$a2p_map_height = 54.8 * $DPC;
-$a2p_page_width = 42 * $DPC;
-$a2p_page_height = 59.4 * $DPC;
-$a2p_header_width =  8.5 * $DPC;
-$a2p_header_height = 6 * $DPC;
-
-# a2 landscape        
-$a2l_mapOffset_left = 3.2 * $DPC;
-$a2l_mapOffset_bottom = 2.3 * $DPC;
-$a2l_map_width = 54.1 * $DPC;
-$a2l_map_height = 37.3 * $DPC; 
-$a2l_page_width = 59.4 * $DPC;
-$a2l_page_height = 42 * $DPC;
-$a2l_header_width =  8.5 * $DPC;
-$a2l_header_height = 6 * $DPC;
-
-# a1 portrait
-$a1p_mapOffset_left = 3.2 * $DPC;
-$a1p_mapOffset_bottom = 2.3 * $DPC;
-$a1p_map_width = 54.5 * $DPC;
-$a1p_map_height = 79.5 * $DPC;
-$a1p_page_width = 59.4 * $DPC;
-$a1p_page_height = 84 * $DPC;
-$a1p_header_width =  8.5 * $DPC;
-$a1p_header_height = 6 * $DPC;
-
-# a1 landscape        
-$a1l_mapOffset_left = 3.2 * $DPC;
-$a1l_mapOffset_bottom = 2.3 * $DPC;
-$a1l_map_width = 79.5 * $DPC;
-$a1l_map_height = 55.5 * $DPC; 
-$a1l_page_width = 84 * $DPC;
-$a1l_page_height = 59.4 * $DPC;
-$a1l_header_width =  8.5 * $DPC;
-$a1l_header_height = 6 * $DPC;
-
-# a0 portrait
-$a0p_mapOffset_left = 3.2 * $DPC;
-$a0p_mapOffset_bottom = 2.3 * $DPC;
-$a0p_map_width = 79 * $DPC;
-$a0p_map_height = 115 * $DPC;
-$a0p_page_width = 84 * $DPC;
-$a0p_page_height = 118.8 * $DPC;
-$a0p_header_width =  8.5 * $DPC;
-$a0p_header_height = 6 * $DPC;
-
-# a0 landscape        
-$a0l_mapOffset_left = 3.2 * $DPC;
-$a0l_mapOffset_bottom = 2.3 * $DPC;
-$a0l_map_width = 113 * $DPC;
-$a0l_map_height = 80.5 * $DPC; 
-$a0l_page_width = 118.8 * $DPC;
-$a0l_page_height = 84 * $DPC;
-$a0l_header_width =  8.5 * $DPC;
-$a0l_header_height = 6 * $DPC;
-
-/*
-* Overview
-*/
-$overview = true;
-$a4p_overviewOffset_left = $a4p_mapOffset_left;
-$a4p_overviewOffset_bottom = $a4p_mapOffset_bottom;
-
-$a4l_overviewOffset_left = $a4l_mapOffset_left;
-$a4l_overviewOffset_bottom = $a4l_mapOffset_bottom;
-
-$a3p_overviewOffset_left = $a3p_mapOffset_left;
-$a3p_overviewOffset_bottom = $a3p_mapOffset_bottom;
-
-$a3l_overviewOffset_left = $a3l_mapOffset_left;
-$a3l_overviewOffset_bottom = $a3l_mapOffset_bottom;
-
-$a2p_overviewOffset_left = $a2p_mapOffset_left;
-$a2p_overviewOffset_bottom = $a2p_mapOffset_bottom;
-
-$a2l_overviewOffset_left = $a2l_mapOffset_left;
-$a2l_overviewOffset_bottom = $a2l_mapOffset_bottom;
-
-$a1p_overviewOffset_left = $a1p_mapOffset_left;
-$a1p_overviewOffset_bottom = $a1p_mapOffset_bottom;
-
-$a1l_overviewOffset_left = $a1l_mapOffset_left;
-$a1l_overviewOffset_bottom = $a1l_mapOffset_bottom;
-
-$a0p_overviewOffset_left = $a0p_mapOffset_left;
-$a0p_overviewOffset_bottom = $a0p_mapOffset_bottom;
-
-$a0l_overviewOffset_left = $a0l_mapOffset_left;
-$a0l_overviewOffset_bottom = $a0l_mapOffset_bottom;
-
-
-
-/*
-* Northarrow
-*/
-$northarrow = true;
-$northarrowImage = "./img/northarrow.png";
-
-$a4p_northarrow_left = $a4p_mapOffset_left + 160;
-$a4p_northarrow_bottom = $a4p_mapOffset_bottom +2 ;
-
-$a4l_northarrow_left = $a4l_mapOffset_left + 5;
-$a4l_northarrow_bottom = $a4l_mapOffset_bottom + $a4l_map_height - 40;
-
-$a3p_northarrow_left = $a3p_mapOffset_left +5;
-$a3p_northarrow_bottom = $a3p_mapOffset_bottom + $a3p_map_height - 80;
-
-$a3l_northarrow_left = $a3l_mapOffset_left + 5;
-$a3l_northarrow_bottom = $a3l_mapOffset_bottom + $a3l_map_height - 40;
-
-$a2p_northarrow_left = $a2p_mapOffset_left +5;
-$a2p_northarrow_bottom = $a2p_mapOffset_bottom + $a2p_map_height - 80;
-
-$a2l_northarrow_left = $a2l_mapOffset_left + 5;
-$a2l_northarrow_bottom = $a2l_mapOffset_bottom + $a2l_map_height - 80;
-
-$a1p_northarrow_left = $a1p_mapOffset_left +5;
-$a1p_northarrow_bottom = $a1p_mapOffset_bottom + $a1p_map_height - 80;
-
-$a1l_northarrow_left = $a1l_mapOffset_left + 5;
-$a1l_northarrow_bottom = $a1l_mapOffset_bottom + $a1l_map_height - 160;
-
-$a0p_northarrow_left = $a0p_mapOffset_left +5;
-$a0p_northarrow_bottom = $a0p_mapOffset_bottom + $a0p_map_height - 80;
-
-$a0l_northarrow_left = $a0l_mapOffset_left + 5;
-$a0l_northarrow_bottom = $a0l_mapOffset_bottom + $a0l_map_height - 160;
-
-$northarrowImage_width = 15; 
-$northarrowImage_height = 35; 
-
-/*
-* special image for the map-page
-*/
-$special = true;
-$specialImage = "../img/mapbender_oo.png";
-
-$a4p_special_left = $a4p_mapOffset_left + $a4p_map_width - 50 ;
-$a4p_special_bottom = $a4p_mapOffset_bottom + $a4p_map_height + 80; 
-
-$a4l_special_left = $a4l_mapOffset_left + $a4l_map_width - $a4l_header_width + 0.8 * $DPC + 10 ;
-$a4l_special_bottom = $a4l_mapOffset_bottom + 54; 
-
-$a3p_special_left = $a3p_mapOffset_left + $a3p_map_width - $a3p_header_width ;
-$a3p_special_bottom = $a3p_mapOffset_bottom + 30; 
-
-$a3l_special_left = $a3l_mapOffset_left + $a3l_map_width - $a3l_header_width + 0.8 * $DPC + 10;
-$a3l_special_bottom = $a3l_mapOffset_bottom + 60; 
-
-$a2p_special_left = $a2p_mapOffset_left + $a2p_map_width - $a2p_header_width + 0.1 *$DPC ;
-$a2p_special_bottom = $a2p_mapOffset_bottom + 110; 
-
-$a2l_special_left = $a2l_mapOffset_left + $a2l_map_width - $a2l_header_width + 0.2 * $DPC ;
-$a2l_special_bottom = $a2l_mapOffset_bottom + 110; 
-
-$a1p_special_left = $a1p_mapOffset_left + $a1p_map_width - $a1p_header_width + 0.1 *$DPC ;
-$a1p_special_bottom = $a1p_mapOffset_bottom + 110; 
-
-$a1l_special_left = $a1l_mapOffset_left + $a1l_map_width - $a1l_header_width + 0.2 * $DPC ;
-$a1l_special_bottom = $a1l_mapOffset_bottom + 110; 
-
-$a0p_special_left = $a0p_mapOffset_left + $a0p_map_width - $a0p_header_width + 0.1 *$DPC ;
-$a0p_special_bottom = $a0p_mapOffset_bottom + 110; 
-
-$a0l_special_left = $a0l_mapOffset_left + $a0l_map_width - $a0l_header_width + 0.2 * $DPC ;
-$a0l_special_bottom = $a0l_mapOffset_bottom + 110; 
-
-$specialImage_width = 65; 
-$specialImage_height = 15;  
-
-
-/*
-* dynamic scalebar
-*/
-$scalebar = true;
-$units = "Meter";
-
-$a4p_scalebar_left = $a4p_mapOffset_left + 2 * $a4p_map_width/3;
-$a4p_scalebar_bottom = $a4p_mapOffset_bottom  + 0.5 * $DPC;
-
-$a4l_scalebar_left = $a4l_mapOffset_left + $a4l_map_width/4 ;
-$a4l_scalebar_bottom = $a4l_mapOffset_bottom +  + 0.5 * $DPC;
-
-$a3p_scalebar_left = $a3p_mapOffset_left  + $a3p_map_width/4 ;
-$a3p_scalebar_bottom = $a3p_mapOffset_bottom + 0.5 * $DPC;
-
-$a3l_scalebar_left = $a3l_mapOffset_left  + $a3l_map_width/4 ;
-$a3l_scalebar_bottom = $a3l_mapOffset_bottom +  + 0.5 * $DPC;
-
-$a2p_scalebar_left = $a2p_mapOffset_left  + $a2p_map_width/4 ;
-$a2p_scalebar_bottom = $a2p_mapOffset_bottom + 0.5 * $DPC;
-
-$a2l_scalebar_left = $a2l_mapOffset_left  + $a2l_map_width/4 ;
-$a2l_scalebar_bottom = $a2l_mapOffset_bottom +  + 0.5 * $DPC;
-
-$a1p_scalebar_left = $a1p_mapOffset_left  + $a1p_map_width/4 ;
-$a1p_scalebar_bottom = $a1p_mapOffset_bottom + 0.5 * $DPC;
-
-$a1l_scalebar_left = $a1l_mapOffset_left  + $a1l_map_width/4 ;
-$a1l_scalebar_bottom = $a1l_mapOffset_bottom +  + 0.5 * $DPC;
-
-$a0p_scalebar_left = $a0p_mapOffset_left  + $a0p_map_width/4 ;
-$a0p_scalebar_bottom = $a0p_mapOffset_bottom + 0.5 * $DPC;
-
-$a0l_scalebar_left = $a0l_mapOffset_left  + $a0l_map_width/4 ;
-$a0l_scalebar_bottom = $a0l_mapOffset_bottom +  + 0.5 * $DPC;
-
-$scalebar_width = 3 * $DPC;
-$scalebar_height = 0.18 * $DPC;
- 
-
-?>
+<?php
+include_once(dirname(__FILE__)."/../../core/globalSettings.php");
+include_once(dirname(__FILE__)."/../classes/class_administration.php");
+$admin = new administration();
+
+# filename for temporary imagefiles
+$filename = TMPDIR."/map_".substr(md5(uniqid(rand())),0,7).".png";
+
+/*
+* DOWNLOAD
+*/
+$download = true;
+$downloadFile = TMPDIR."/map_".substr(md5(uniqid(rand())),0,7).".pdf";
+$downloadText = _mb("Download: Map as PDF...");
+
+/*
+*run print as iframe or window
+*/
+$type = 'iframe';
+
+
+
+/*
+* Legend
+*/
+$legend=true;
+$label_legend = _mb('print legend');
+$legendFilename = TMPDIR."/legend_".substr(md5(uniqid(rand())),0,7).".png";
+$legendFilenameUserPolygon = TMPDIR."/legend_".substr(md5(uniqid(rand())),0,7).".png";
+$legendText = $admin->char_decode(_mb("Legend"));
+$legendFooter = $admin->char_decode(_mb("powered by Mapbender"));
+$legendImage = "./img/mapbender_logo.png";
+$legendImage_width = 90;
+$legendImage_height = 13;
+
+
+# log requests, class 'class_log.php' required
+$log = false;
+
+# delete images:
+$unlink = true;
+
+# labeling
+$new_comment1 = $admin->char_decode($_REQUEST["comment1"]);
+$new_comment2 = $admin->char_decode($_REQUEST["comment2"]);
+
+$text1 = $admin->char_decode(_mb("Print preview"));
+$text2 = "- Mapbender -";
+$text3 = "";
+$text4 = $admin->char_decode(_mb("Scale 1:")). " ".$_REQUEST["map_scale"];
+$text5 = $admin->char_decode(_mb("Date:")) . " ".date("d.m.Y",strtotime("now"));
+
+$text6 = $admin->char_decode(_mb("Notes:"));
+$text7 = "";
+$text8 = $new_comment1;
+$text9 = $new_comment2;
+$text10 = "";
+
+
+$text11 = $admin->char_decode(_mb("This copy has been automatically generated and is thus not valid without signature."));
+$text12 = $admin->char_decode(_mb("This copy is protected by law (Par. 3 Abs. 1 VermKatG NW). It can be duplicaedted, modified, published or be passed to third parties only in agreement with"));
+$text13 = $admin->char_decode(_mb("the publisher, except duplicates and modifications aimed at internal use of government agencies or private use."));
+
+$text14 = $admin->char_decode(_mb("This copy is protected,"));
+$text15 = $admin->char_decode(_mb("ask me!!!!"));
+$text16 = $admin->char_decode(_mb("or the publisher"));
+$text17 = $admin->char_decode(_mb("or use is internally."));
+
+/*
+* Labeling for buttons, textfields ...
+*/
+
+$label_format = _mb("Format");
+$label_format_a4 = "A4";
+$label_format_a3 = "A3";
+$label_format_a2 = "A2";
+$label_format_a1 = "A1";
+$label_format_a0 = "A0";
+
+$label_orientation = _mb("Orientation");
+$label_portrait = _mb("portrait");
+$label_landscape = _mb("landscape");
+
+$label_quality = _mb("Quality");
+$label_72dpi = "72 dpi";
+$label_288dpi = "288 dpi";
+
+$label_comment1 = _mb("Comment 1:");
+$label_comment2 = _mb("Comment 2:");
+$comment1_length = 30;
+$comment2_length = 30;
+
+$label_button = _mb("print");
+
+/*
+* default
+* url string matching and replacement
+*/
+$matching = false;
+$pattern =  "/192\.168\.2\.113/";
+$replacement = "192.168.2.5";
+
+/*
+* high quality printing 288dpi
+* highquality mapfiles will be supplemented with "_4"
+* example: germany.map -> germany_4.map
+*/
+
+
+$highquality = true;
+$highqualitymapfiles = array(
+	"/data/umn/germany/germany_demo.map",
+	"/data/umn/mapbender_user/mapbender_user.map"
+);
+
+# Dots per cm (72 dpi):
+# 28.346456692913385826771653543307 
+$DPC = 28.35;
+
+# available formats:
+$a4 = true;
+$a3 = true;
+$a2 = true;
+$a1 = false;
+$a0 = false;
+
+# dimensions of the map:
+
+# A4 portrait
+$a4p_mapOffset_left = 3.3 * $DPC;
+$a4p_mapOffset_bottom = 3 * $DPC;
+$a4p_map_width = 15.7 * $DPC; 
+$a4p_map_height = 22 * $DPC; 
+$a4p_page_width = 21 * $DPC;
+$a4p_page_height = 29.7 * $DPC;
+$a4p_header_height = 2.6 * $DPC;
+$a4p_footer_height = 1.12 * $DPC;
+        
+# A4 landscape
+$a4l_mapOffset_left = 2.3 * $DPC;
+$a4l_mapOffset_bottom = 1.8 * $DPC;
+$a4l_map_width = 25.2 * $DPC;
+$a4l_map_height = 16.4 * $DPC; 
+$a4l_page_width = 29.7 * $DPC;
+$a4l_page_height = 21 * $DPC;   
+$a4l_header_width = 8.5 * $DPC;
+$a4l_header_height = 6 * $DPC;
+        
+# A3 protrait
+$a3p_mapOffset_left = 3.3 * $DPC;
+$a3p_mapOffset_bottom = 3 * $DPC;
+$a3p_map_width = 24.1 * $DPC;
+$a3p_map_height = 36.7 * $DPC;
+$a3p_page_width = 29.7 * $DPC;
+$a3p_page_height = 42 * $DPC;
+$a3p_header_width =  8.5 * $DPC;
+$a3p_header_height = 6 * $DPC;
+
+# A3 landscape        
+$a3l_mapOffset_left = 2.3 * $DPC;
+$a3l_mapOffset_bottom = 1.8 * $DPC;
+$a3l_map_width = 37.4 * $DPC;
+$a3l_map_height = 25.4 * $DPC; 
+$a3l_page_width = 42 * $DPC;
+$a3l_page_height = 29.7 * $DPC;
+$a3l_header_width =  8.5 * $DPC;
+$a3l_header_height = 6 * $DPC;
+
+# a2 protrait
+$a2p_mapOffset_left = 3.2 * $DPC;
+$a2p_mapOffset_bottom = 2.3 * $DPC;
+$a2p_map_width = 37.3 * $DPC;
+$a2p_map_height = 54.8 * $DPC;
+$a2p_page_width = 42 * $DPC;
+$a2p_page_height = 59.4 * $DPC;
+$a2p_header_width =  8.5 * $DPC;
+$a2p_header_height = 6 * $DPC;
+
+# a2 landscape        
+$a2l_mapOffset_left = 3.2 * $DPC;
+$a2l_mapOffset_bottom = 2.3 * $DPC;
+$a2l_map_width = 54.1 * $DPC;
+$a2l_map_height = 37.3 * $DPC; 
+$a2l_page_width = 59.4 * $DPC;
+$a2l_page_height = 42 * $DPC;
+$a2l_header_width =  8.5 * $DPC;
+$a2l_header_height = 6 * $DPC;
+
+# a1 portrait
+$a1p_mapOffset_left = 3.2 * $DPC;
+$a1p_mapOffset_bottom = 2.3 * $DPC;
+$a1p_map_width = 54.5 * $DPC;
+$a1p_map_height = 79.5 * $DPC;
+$a1p_page_width = 59.4 * $DPC;
+$a1p_page_height = 84 * $DPC;
+$a1p_header_width =  8.5 * $DPC;
+$a1p_header_height = 6 * $DPC;
+
+# a1 landscape        
+$a1l_mapOffset_left = 3.2 * $DPC;
+$a1l_mapOffset_bottom = 2.3 * $DPC;
+$a1l_map_width = 79.5 * $DPC;
+$a1l_map_height = 55.5 * $DPC; 
+$a1l_page_width = 84 * $DPC;
+$a1l_page_height = 59.4 * $DPC;
+$a1l_header_width =  8.5 * $DPC;
+$a1l_header_height = 6 * $DPC;
+
+# a0 portrait
+$a0p_mapOffset_left = 3.2 * $DPC;
+$a0p_mapOffset_bottom = 2.3 * $DPC;
+$a0p_map_width = 79 * $DPC;
+$a0p_map_height = 115 * $DPC;
+$a0p_page_width = 84 * $DPC;
+$a0p_page_height = 118.8 * $DPC;
+$a0p_header_width =  8.5 * $DPC;
+$a0p_header_height = 6 * $DPC;
+
+# a0 landscape        
+$a0l_mapOffset_left = 3.2 * $DPC;
+$a0l_mapOffset_bottom = 2.3 * $DPC;
+$a0l_map_width = 113 * $DPC;
+$a0l_map_height = 80.5 * $DPC; 
+$a0l_page_width = 118.8 * $DPC;
+$a0l_page_height = 84 * $DPC;
+$a0l_header_width =  8.5 * $DPC;
+$a0l_header_height = 6 * $DPC;
+
+/*
+* Overview
+*/
+$overview = true;
+$a4p_overviewOffset_left = $a4p_mapOffset_left;
+$a4p_overviewOffset_bottom = $a4p_mapOffset_bottom;
+
+$a4l_overviewOffset_left = $a4l_mapOffset_left;
+$a4l_overviewOffset_bottom = $a4l_mapOffset_bottom;
+
+$a3p_overviewOffset_left = $a3p_mapOffset_left;
+$a3p_overviewOffset_bottom = $a3p_mapOffset_bottom;
+
+$a3l_overviewOffset_left = $a3l_mapOffset_left;
+$a3l_overviewOffset_bottom = $a3l_mapOffset_bottom;
+
+$a2p_overviewOffset_left = $a2p_mapOffset_left;
+$a2p_overviewOffset_bottom = $a2p_mapOffset_bottom;
+
+$a2l_overviewOffset_left = $a2l_mapOffset_left;
+$a2l_overviewOffset_bottom = $a2l_mapOffset_bottom;
+
+$a1p_overviewOffset_left = $a1p_mapOffset_left;
+$a1p_overviewOffset_bottom = $a1p_mapOffset_bottom;
+
+$a1l_overviewOffset_left = $a1l_mapOffset_left;
+$a1l_overviewOffset_bottom = $a1l_mapOffset_bottom;
+
+$a0p_overviewOffset_left = $a0p_mapOffset_left;
+$a0p_overviewOffset_bottom = $a0p_mapOffset_bottom;
+
+$a0l_overviewOffset_left = $a0l_mapOffset_left;
+$a0l_overviewOffset_bottom = $a0l_mapOffset_bottom;
+
+
+
+/*
+* Northarrow
+*/
+$northarrow = true;
+$northarrowImage = "./img/northarrow.png";
+
+$a4p_northarrow_left = $a4p_mapOffset_left + 160;
+$a4p_northarrow_bottom = $a4p_mapOffset_bottom +2 ;
+
+$a4l_northarrow_left = $a4l_mapOffset_left + 5;
+$a4l_northarrow_bottom = $a4l_mapOffset_bottom + $a4l_map_height - 40;
+
+$a3p_northarrow_left = $a3p_mapOffset_left +5;
+$a3p_northarrow_bottom = $a3p_mapOffset_bottom + $a3p_map_height - 80;
+
+$a3l_northarrow_left = $a3l_mapOffset_left + 5;
+$a3l_northarrow_bottom = $a3l_mapOffset_bottom + $a3l_map_height - 40;
+
+$a2p_northarrow_left = $a2p_mapOffset_left +5;
+$a2p_northarrow_bottom = $a2p_mapOffset_bottom + $a2p_map_height - 80;
+
+$a2l_northarrow_left = $a2l_mapOffset_left + 5;
+$a2l_northarrow_bottom = $a2l_mapOffset_bottom + $a2l_map_height - 80;
+
+$a1p_northarrow_left = $a1p_mapOffset_left +5;
+$a1p_northarrow_bottom = $a1p_mapOffset_bottom + $a1p_map_height - 80;
+
+$a1l_northarrow_left = $a1l_mapOffset_left + 5;
+$a1l_northarrow_bottom = $a1l_mapOffset_bottom + $a1l_map_height - 160;
+
+$a0p_northarrow_left = $a0p_mapOffset_left +5;
+$a0p_northarrow_bottom = $a0p_mapOffset_bottom + $a0p_map_height - 80;
+
+$a0l_northarrow_left = $a0l_mapOffset_left + 5;
+$a0l_northarrow_bottom = $a0l_mapOffset_bottom + $a0l_map_height - 160;
+
+$northarrowImage_width = 15; 
+$northarrowImage_height = 35; 
+
+/*
+* special image for the map-page
+*/
+$special = true;
+$specialImage = "../img/mapbender_oo.png";
+
+$a4p_special_left = $a4p_mapOffset_left + $a4p_map_width - 50 ;
+$a4p_special_bottom = $a4p_mapOffset_bottom + $a4p_map_height + 80; 
+
+$a4l_special_left = $a4l_mapOffset_left + $a4l_map_width - $a4l_header_width + 0.8 * $DPC + 10 ;
+$a4l_special_bottom = $a4l_mapOffset_bottom + 54; 
+
+$a3p_special_left = $a3p_mapOffset_left + $a3p_map_width - $a3p_header_width ;
+$a3p_special_bottom = $a3p_mapOffset_bottom + 30; 
+
+$a3l_special_left = $a3l_mapOffset_left + $a3l_map_width - $a3l_header_width + 0.8 * $DPC + 10;
+$a3l_special_bottom = $a3l_mapOffset_bottom + 60; 
+
+$a2p_special_left = $a2p_mapOffset_left + $a2p_map_width - $a2p_header_width + 0.1 *$DPC ;
+$a2p_special_bottom = $a2p_mapOffset_bottom + 110; 
+
+$a2l_special_left = $a2l_mapOffset_left + $a2l_map_width - $a2l_header_width + 0.2 * $DPC ;
+$a2l_special_bottom = $a2l_mapOffset_bottom + 110; 
+
+$a1p_special_left = $a1p_mapOffset_left + $a1p_map_width - $a1p_header_width + 0.1 *$DPC ;
+$a1p_special_bottom = $a1p_mapOffset_bottom + 110; 
+
+$a1l_special_left = $a1l_mapOffset_left + $a1l_map_width - $a1l_header_width + 0.2 * $DPC ;
+$a1l_special_bottom = $a1l_mapOffset_bottom + 110; 
+
+$a0p_special_left = $a0p_mapOffset_left + $a0p_map_width - $a0p_header_width + 0.1 *$DPC ;
+$a0p_special_bottom = $a0p_mapOffset_bottom + 110; 
+
+$a0l_special_left = $a0l_mapOffset_left + $a0l_map_width - $a0l_header_width + 0.2 * $DPC ;
+$a0l_special_bottom = $a0l_mapOffset_bottom + 110; 
+
+$specialImage_width = 65; 
+$specialImage_height = 15;  
+
+
+/*
+* dynamic scalebar
+*/
+$scalebar = true;
+$units = "Meter";
+
+$a4p_scalebar_left = $a4p_mapOffset_left + 2 * $a4p_map_width/3;
+$a4p_scalebar_bottom = $a4p_mapOffset_bottom  + 0.5 * $DPC;
+
+$a4l_scalebar_left = $a4l_mapOffset_left + $a4l_map_width/4 ;
+$a4l_scalebar_bottom = $a4l_mapOffset_bottom +  + 0.5 * $DPC;
+
+$a3p_scalebar_left = $a3p_mapOffset_left  + $a3p_map_width/4 ;
+$a3p_scalebar_bottom = $a3p_mapOffset_bottom + 0.5 * $DPC;
+
+$a3l_scalebar_left = $a3l_mapOffset_left  + $a3l_map_width/4 ;
+$a3l_scalebar_bottom = $a3l_mapOffset_bottom +  + 0.5 * $DPC;
+
+$a2p_scalebar_left = $a2p_mapOffset_left  + $a2p_map_width/4 ;
+$a2p_scalebar_bottom = $a2p_mapOffset_bottom + 0.5 * $DPC;
+
+$a2l_scalebar_left = $a2l_mapOffset_left  + $a2l_map_width/4 ;
+$a2l_scalebar_bottom = $a2l_mapOffset_bottom +  + 0.5 * $DPC;
+
+$a1p_scalebar_left = $a1p_mapOffset_left  + $a1p_map_width/4 ;
+$a1p_scalebar_bottom = $a1p_mapOffset_bottom + 0.5 * $DPC;
+
+$a1l_scalebar_left = $a1l_mapOffset_left  + $a1l_map_width/4 ;
+$a1l_scalebar_bottom = $a1l_mapOffset_bottom +  + 0.5 * $DPC;
+
+$a0p_scalebar_left = $a0p_mapOffset_left  + $a0p_map_width/4 ;
+$a0p_scalebar_bottom = $a0p_mapOffset_bottom + 0.5 * $DPC;
+
+$a0l_scalebar_left = $a0l_mapOffset_left  + $a0l_map_width/4 ;
+$a0l_scalebar_bottom = $a0l_mapOffset_bottom +  + 0.5 * $DPC;
+
+$scalebar_width = 3 * $DPC;
+$scalebar_height = 0.18 * $DPC;
+ 
+
+?>

Modified: branches/nimix_dev/http/print/printPDF_b.conf
===================================================================
--- branches/nimix_dev/http/print/printPDF_b.conf	2008-08-18 16:07:47 UTC (rev 2868)
+++ branches/nimix_dev/http/print/printPDF_b.conf	2008-08-18 16:10:50 UTC (rev 2869)
@@ -1,385 +1,383 @@
-<?php
-
-include_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-# filename for temporary imagefiles
-$filename = TMPDIR."/map_".substr(md5(uniqid(rand())),0,7).".png";
-
-/*
-* DOWNLOAD
-*/
-$download = true;
-$downloadFile = TMPDIR."/map_".substr(md5(uniqid(rand())),0,7).".pdf";
-$downloadText = "Download: Karte als PDF...";
-
-/*
-*run print as iframe or window
-*/
-$type = 'window';
-
-
-
-/*
-* Legend
-*/
-$legend=true;
-$label_legend = 'print legend';
-$legendFilename = TMPDIR."/legend_".substr(md5(uniqid(rand())),0,7).".png";
-$legendFilenameUserPolygon = TMPDIR."/legend_".substr(md5(uniqid(rand())),0,7).".png";
-$legendText = "Legende";
-$legendFooter = "powered by Mapbender";
-$legendImage = "./img/mapbender_logo.png";
-$legendImage_width = 90;
-$legendImage_height = 13;
-
-
-# log requests, class 'class_log.php' required
-$log = false;
-
-# delete images:
-$unlink = true;
-
-# labeling
-if(CHARSET=="UTF-8"){ 
-	$new_comment1 = utf8_decode($_REQUEST["comment1"]);
-	$new_comment2 = utf8_decode($_REQUEST["comment2"]);
-}
-else{
-	$new_comment1 = $_REQUEST["comment1"];
-	$new_comment2 = $_REQUEST["comment2"];
-}
-
-$text1 = "Druckansicht";
-$text2 = "- Mapbender -";
-$text3 = "";
-$text4 = "Maßstab 1 : " . $_REQUEST["map_scale"];
-$text5 = "Datum: " . date("d.m.Y",strtotime("now"));;
-
-$text6 = "Notizen:";
-$text7 = "";
-$text8 = $new_comment1;
-$text9 = $new_comment2;
-$text10 = "";
-
-
-$text11 = "Der Auszug ist maschinell erzeugt, er ist ohne Unterschrift gültig.";
-$text12 = "Dieser Auszug ist gesetzlich geschützt (§ 3 Abs. 1 VermKatG NW). Vervielfältigungen, Umarbeitungen, Veröffentlichungen oder die Weitergabe an Dritte nur mit Zustimmung des";
-$text13 = "Herausgebers, ausgenommen Vervielfältigungen und Umarbeitungen zur innerdienstlichen Verwendung bei Behörden oder zum eigenen Gebrauch.";
-
-$text14 = "Dieser Auszug ist gesetzlich geschützt (§ 3 Abs. 1 VermKatG NW). Vervielfältigungen,";
-$text15 = "Umarbeitungen, Veröffentlichungen oder die Weitergabe an Dritte nur mit Zustimmung";
-$text16 = "des Herausgebers, ausgenommen Vervielfältigungen und Umarbeitungen zur inner-";
-$text17 = "dienstlichen Verwendung bei Behörden oder zum eigenen Gebrauch.";
-
-/*
-* Labeling for buttons, textfields ...
-*/
-
-$label_format = "Format:";
-$label_format_a4 = "A4";
-$label_format_a3 = "A3";
-$label_format_a2 = "A2";
-$label_format_a1 = "A1";
-$label_format_a0 = "A0";
-
-$label_orientation = "Orientation: ";
-$label_portrait = "portrait";
-$label_landscape = "landscape";
-
-$label_72dpi = "Quality: 72 dpi";
-$label_288dpi = "Quality: 288 dpi";
-
-$label_comment = "Comment (max. 30)";
-$comment_length = 30;
-
-$label_button = 'print';
-
-/*
-* default
-* url string matching and replacement
-*/
-$matching = false;
-$pattern =  "/192\.168\.2\.113/";
-$replacement = "192.168.2.5";
-
-/*
-* high quality printing 288dpi
-* highquality mapfiles will be supplemented with "_4"
-* example: germany.map -> germany_4.map
-*/
-
-
-$highquality = true;
-$highqualitymapfiles = array(
-	"/data/umn/germany/germany_demo.map",
-	"/data/umn/mapbender_user/mapbender_user.map"
-);
-
-# Dots per cm (72 dpi):
-# 28.346456692913385826771653543307 
-$DPC = 28.35;
-
-# available formats:
-$a4 = true;
-$a3 = true;
-$a2 = true;
-$a1 = true;
-$a0 = true;
-
-# dimensions of the map:
-
-# A4 portrait
-$a4p_mapOffset_left = 3.3 * $DPC;
-$a4p_mapOffset_bottom = 3 * $DPC;
-$a4p_map_width = 15.7 * $DPC; 
-$a4p_map_height = 22 * $DPC; 
-$a4p_page_width = 21 * $DPC;
-$a4p_page_height = 29.7 * $DPC;
-$a4p_header_height = 2.6 * $DPC;
-$a4p_footer_height = 1.12 * $DPC;
-        
-# A4 landscape
-$a4l_mapOffset_left = 2.3 * $DPC;
-$a4l_mapOffset_bottom = 1.8 * $DPC;
-$a4l_map_width = 25.2 * $DPC;
-$a4l_map_height = 16.4 * $DPC; 
-$a4l_page_width = 29.7 * $DPC;
-$a4l_page_height = 21 * $DPC;   
-$a4l_header_width = 8.5 * $DPC;
-$a4l_header_height = 6 * $DPC;
-        
-# A3 protrait
-$a3p_mapOffset_left = 3.3 * $DPC;
-$a3p_mapOffset_bottom = 3 * $DPC;
-$a3p_map_width = 24.1 * $DPC;
-$a3p_map_height = 36.7 * $DPC;
-$a3p_page_width = 29.7 * $DPC;
-$a3p_page_height = 42 * $DPC;
-$a3p_header_width =  8.5 * $DPC;
-$a3p_header_height = 6 * $DPC;
-
-# A3 landscape        
-$a3l_mapOffset_left = 2.3 * $DPC;
-$a3l_mapOffset_bottom = 1.8 * $DPC;
-$a3l_map_width = 37.4 * $DPC;
-$a3l_map_height = 25.4 * $DPC; 
-$a3l_page_width = 42 * $DPC;
-$a3l_page_height = 29.7 * $DPC;
-$a3l_header_width =  8.5 * $DPC;
-$a3l_header_height = 6 * $DPC;
-
-# a2 protrait
-$a2p_mapOffset_left = 3.2 * $DPC;
-$a2p_mapOffset_bottom = 2.3 * $DPC;
-$a2p_map_width = 37.3 * $DPC;
-$a2p_map_height = 54.8 * $DPC;
-$a2p_page_width = 42 * $DPC;
-$a2p_page_height = 59.4 * $DPC;
-$a2p_header_width =  8.5 * $DPC;
-$a2p_header_height = 6 * $DPC;
-
-# a2 landscape        
-$a2l_mapOffset_left = 3.2 * $DPC;
-$a2l_mapOffset_bottom = 2.3 * $DPC;
-$a2l_map_width = 54.1 * $DPC;
-$a2l_map_height = 37.3 * $DPC; 
-$a2l_page_width = 59.4 * $DPC;
-$a2l_page_height = 42 * $DPC;
-$a2l_header_width =  8.5 * $DPC;
-$a2l_header_height = 6 * $DPC;
-
-# a1 portrait
-$a1p_mapOffset_left = 3.2 * $DPC;
-$a1p_mapOffset_bottom = 2.3 * $DPC;
-$a1p_map_width = 54.5 * $DPC;
-$a1p_map_height = 79.5 * $DPC;
-$a1p_page_width = 59.4 * $DPC;
-$a1p_page_height = 84 * $DPC;
-$a1p_header_width =  8.5 * $DPC;
-$a1p_header_height = 6 * $DPC;
-
-# a1 landscape        
-$a1l_mapOffset_left = 3.2 * $DPC;
-$a1l_mapOffset_bottom = 2.3 * $DPC;
-$a1l_map_width = 79.5 * $DPC;
-$a1l_map_height = 55.5 * $DPC; 
-$a1l_page_width = 84 * $DPC;
-$a1l_page_height = 59.4 * $DPC;
-$a1l_header_width =  8.5 * $DPC;
-$a1l_header_height = 6 * $DPC;
-
-# a0 portrait
-$a0p_mapOffset_left = 3.2 * $DPC;
-$a0p_mapOffset_bottom = 2.3 * $DPC;
-$a0p_map_width = 79 * $DPC;
-$a0p_map_height = 115 * $DPC;
-$a0p_page_width = 84 * $DPC;
-$a0p_page_height = 118.8 * $DPC;
-$a0p_header_width =  8.5 * $DPC;
-$a0p_header_height = 6 * $DPC;
-
-# a0 landscape        
-$a0l_mapOffset_left = 3.2 * $DPC;
-$a0l_mapOffset_bottom = 2.3 * $DPC;
-$a0l_map_width = 113 * $DPC;
-$a0l_map_height = 80.5 * $DPC; 
-$a0l_page_width = 118.8 * $DPC;
-$a0l_page_height = 84 * $DPC;
-$a0l_header_width =  8.5 * $DPC;
-$a0l_header_height = 6 * $DPC;
-
-/*
-* Overview
-*/
-$overview = true;
-$a4p_overviewOffset_left = $a4p_mapOffset_left;
-$a4p_overviewOffset_bottom = $a4p_mapOffset_bottom;
-
-$a4l_overviewOffset_left = $a4l_mapOffset_left;
-$a4l_overviewOffset_bottom = $a4l_mapOffset_bottom;
-
-$a3p_overviewOffset_left = $a3p_mapOffset_left;
-$a3p_overviewOffset_bottom = $a3p_mapOffset_bottom;
-
-$a3l_overviewOffset_left = $a3l_mapOffset_left;
-$a3l_overviewOffset_bottom = $a3l_mapOffset_bottom;
-
-$a2p_overviewOffset_left = $a2p_mapOffset_left;
-$a2p_overviewOffset_bottom = $a2p_mapOffset_bottom;
-
-$a2l_overviewOffset_left = $a2l_mapOffset_left;
-$a2l_overviewOffset_bottom = $a2l_mapOffset_bottom;
-
-$a1p_overviewOffset_left = $a1p_mapOffset_left;
-$a1p_overviewOffset_bottom = $a1p_mapOffset_bottom;
-
-$a1l_overviewOffset_left = $a1l_mapOffset_left;
-$a1l_overviewOffset_bottom = $a1l_mapOffset_bottom;
-
-$a0p_overviewOffset_left = $a0p_mapOffset_left;
-$a0p_overviewOffset_bottom = $a0p_mapOffset_bottom;
-
-$a0l_overviewOffset_left = $a0l_mapOffset_left;
-$a0l_overviewOffset_bottom = $a0l_mapOffset_bottom;
-
-
-
-/*
-* Northarrow
-*/
-$northarrow = true;
-$northarrowImage = "./img/northarrow.png";
-
-$a4p_northarrow_left = $a4p_mapOffset_left + 160;
-$a4p_northarrow_bottom = $a4p_mapOffset_bottom +2 ;
-
-$a4l_northarrow_left = $a4l_mapOffset_left + 5;
-$a4l_northarrow_bottom = $a4l_mapOffset_bottom + $a4l_map_height - 40;
-
-$a3p_northarrow_left = $a3p_mapOffset_left +5;
-$a3p_northarrow_bottom = $a3p_mapOffset_bottom + $a3p_map_height - 80;
-
-$a3l_northarrow_left = $a3l_mapOffset_left + 5;
-$a3l_northarrow_bottom = $a3l_mapOffset_bottom + $a3l_map_height - 40;
-
-$a2p_northarrow_left = $a2p_mapOffset_left +5;
-$a2p_northarrow_bottom = $a2p_mapOffset_bottom + $a2p_map_height - 80;
-
-$a2l_northarrow_left = $a2l_mapOffset_left + 5;
-$a2l_northarrow_bottom = $a2l_mapOffset_bottom + $a2l_map_height - 80;
-
-$a1p_northarrow_left = $a1p_mapOffset_left +5;
-$a1p_northarrow_bottom = $a1p_mapOffset_bottom + $a1p_map_height - 80;
-
-$a1l_northarrow_left = $a1l_mapOffset_left + 5;
-$a1l_northarrow_bottom = $a1l_mapOffset_bottom + $a1l_map_height - 160;
-
-$a0p_northarrow_left = $a0p_mapOffset_left +5;
-$a0p_northarrow_bottom = $a0p_mapOffset_bottom + $a0p_map_height - 80;
-
-$a0l_northarrow_left = $a0l_mapOffset_left + 5;
-$a0l_northarrow_bottom = $a0l_mapOffset_bottom + $a0l_map_height - 160;
-
-$northarrowImage_width = 15; 
-$northarrowImage_height = 35; 
-
-/*
-* special image for the map-page
-*/
-$special = true;
-$specialImage = "../img/mapbender_oo.png";
-
-$a4p_special_left = $a4p_mapOffset_left + $a4p_map_width - 50 ;
-$a4p_special_bottom = $a4p_mapOffset_bottom + $a4p_map_height + 80; 
-
-$a4l_special_left = $a4l_mapOffset_left + $a4l_map_width - $a4l_header_width + 0.8 * $DPC + 10 ;
-$a4l_special_bottom = $a4l_mapOffset_bottom + 54; 
-
-$a3p_special_left = $a3p_mapOffset_left + $a3p_map_width - $a3p_header_width ;
-$a3p_special_bottom = $a3p_mapOffset_bottom + 30; 
-
-$a3l_special_left = $a3l_mapOffset_left + $a3l_map_width - $a3l_header_width + 0.8 * $DPC + 10;
-$a3l_special_bottom = $a3l_mapOffset_bottom + 60; 
-
-$a2p_special_left = $a2p_mapOffset_left + $a2p_map_width - $a2p_header_width + 0.1 *$DPC ;
-$a2p_special_bottom = $a2p_mapOffset_bottom + 110; 
-
-$a2l_special_left = $a2l_mapOffset_left + $a2l_map_width - $a2l_header_width + 0.2 * $DPC ;
-$a2l_special_bottom = $a2l_mapOffset_bottom + 110; 
-
-$a1p_special_left = $a1p_mapOffset_left + $a1p_map_width - $a1p_header_width + 0.1 *$DPC ;
-$a1p_special_bottom = $a1p_mapOffset_bottom + 110; 
-
-$a1l_special_left = $a1l_mapOffset_left + $a1l_map_width - $a1l_header_width + 0.2 * $DPC ;
-$a1l_special_bottom = $a1l_mapOffset_bottom + 110; 
-
-$a0p_special_left = $a0p_mapOffset_left + $a0p_map_width - $a0p_header_width + 0.1 *$DPC ;
-$a0p_special_bottom = $a0p_mapOffset_bottom + 110; 
-
-$a0l_special_left = $a0l_mapOffset_left + $a0l_map_width - $a0l_header_width + 0.2 * $DPC ;
-$a0l_special_bottom = $a0l_mapOffset_bottom + 110; 
-
-$specialImage_width = 65; 
-$specialImage_height = 15;  
-
-
-/*
-* dynamic scalebar
-*/
-$scalebar = true;
-$units = "Meter";
-
-$a4p_scalebar_left = $a4p_mapOffset_left + 2 * $a4p_map_width/3;
-$a4p_scalebar_bottom = $a4p_mapOffset_bottom  + 0.5 * $DPC;
-
-$a4l_scalebar_left = $a4l_mapOffset_left + $a4l_map_width/4 ;
-$a4l_scalebar_bottom = $a4l_mapOffset_bottom +  + 0.5 * $DPC;
-
-$a3p_scalebar_left = $a3p_mapOffset_left  + $a3p_map_width/4 ;
-$a3p_scalebar_bottom = $a3p_mapOffset_bottom + 0.5 * $DPC;
-
-$a3l_scalebar_left = $a3l_mapOffset_left  + $a3l_map_width/4 ;
-$a3l_scalebar_bottom = $a3l_mapOffset_bottom +  + 0.5 * $DPC;
-
-$a2p_scalebar_left = $a2p_mapOffset_left  + $a2p_map_width/4 ;
-$a2p_scalebar_bottom = $a2p_mapOffset_bottom + 0.5 * $DPC;
-
-$a2l_scalebar_left = $a2l_mapOffset_left  + $a2l_map_width/4 ;
-$a2l_scalebar_bottom = $a2l_mapOffset_bottom +  + 0.5 * $DPC;
-
-$a1p_scalebar_left = $a1p_mapOffset_left  + $a1p_map_width/4 ;
-$a1p_scalebar_bottom = $a1p_mapOffset_bottom + 0.5 * $DPC;
-
-$a1l_scalebar_left = $a1l_mapOffset_left  + $a1l_map_width/4 ;
-$a1l_scalebar_bottom = $a1l_mapOffset_bottom +  + 0.5 * $DPC;
-
-$a0p_scalebar_left = $a0p_mapOffset_left  + $a0p_map_width/4 ;
-$a0p_scalebar_bottom = $a0p_mapOffset_bottom + 0.5 * $DPC;
-
-$a0l_scalebar_left = $a0l_mapOffset_left  + $a0l_map_width/4 ;
-$a0l_scalebar_bottom = $a0l_mapOffset_bottom +  + 0.5 * $DPC;
-
-$scalebar_width = 3 * $DPC;
-$scalebar_height = 0.18 * $DPC;
- 
-
-?>
+<?php
+include_once(dirname(__FILE__)."/../../core/globalSettings.php");
+include_once(dirname(__FILE__)."/../classes/class_administration.php");
+$admin = new administration();
+
+# filename for temporary imagefiles
+$filename = TMPDIR."/map_".substr(md5(uniqid(rand())),0,7).".png";
+
+/*
+* DOWNLOAD
+*/
+$download = true;
+$downloadFile = TMPDIR."/map_".substr(md5(uniqid(rand())),0,7).".pdf";
+$downloadText = _mb("Download: Map as PDF...");
+
+/*
+*run print as iframe or window
+*/
+$type = 'window';
+
+
+
+/*
+* Legend
+*/
+$legend=true;
+$label_legend = _mb('Print legend');
+$legendFilename = TMPDIR."/legend_".substr(md5(uniqid(rand())),0,7).".png";
+$legendFilenameUserPolygon = TMPDIR."/legend_".substr(md5(uniqid(rand())),0,7).".png";
+$legendText = $admin->char_decode(_mb("Legend"));
+$legendFooter = $admin->char_decode(_mb("powered by Mapbender"));
+$legendImage = "./img/mapbender_logo.png";
+$legendImage_width = 90;
+$legendImage_height = 13;
+
+
+# log requests, class 'class_log.php' required
+$log = false;
+
+# delete images:
+$unlink = true;
+
+# labeling
+$new_comment1 = $admin->char_decode($_REQUEST["comment1"]);
+$new_comment2 = $admin->char_decode($_REQUEST["comment2"]);
+
+$text1 = $admin->char_decode(_mb("Print preview"));
+$text2 = "- Mapbender -";
+$text3 = "";
+$text4 = $admin->char_decode(_mb("Scale 1:")). " ".$_REQUEST["map_scale"];
+$text5 = $admin->char_decode(_mb("Date:")) . " ".date("d.m.Y",strtotime("now"));
+
+$text6 = $admin->char_decode(_mb("Notes:"));
+$text7 = "";
+$text8 = $new_comment1;
+$text9 = $new_comment2;
+$text10 = "";
+
+
+$text11 = $admin->char_decode(_mb("This copy has been automatically generated and is thus not valid without signature."));
+$text12 = $admin->char_decode(_mb("This copy is protected by law (Par. 3 Abs. 1 VermKatG NW). It can be duplicaedted, modified, published or be passed to third parties only in agreement with"));
+$text13 = $admin->char_decode(_mb("the publisher, except duplicates and modifications aimed at internal use of government agencies or private use."));
+
+$text14 = $admin->char_decode(_mb("This copy is protected,"));
+$text15 = $admin->char_decode(_mb("ask me!!!!"));
+$text16 = $admin->char_decode(_mb("or the publisher"));
+$text17 = $admin->char_decode(_mb("or use is internally."));
+
+/*
+* Labeling for buttons, textfields ...
+*/
+
+$label_format = _mb("Format");
+$label_format_a4 = "A4";
+$label_format_a3 = "A3";
+$label_format_a2 = "A2";
+$label_format_a1 = "A1";
+$label_format_a0 = "A0";
+
+$label_orientation = _mb("Orientation");
+$label_portrait = _mb("portrait");
+$label_landscape = _mb("landscape");
+
+$label_72dpi = sprintf(_mb("Quality: %d dpi"), 72);
+$label_288dpi = sprintf(_mb("Quality: %d dpi"), 288);
+
+$label_comment1 = "Comment 1";
+$label_comment2 = "Comment 2";
+$comment1_length = 30;
+$comment2_length = 30;
+
+$label_button = _mb("print");
+
+/*
+* default
+* url string matching and replacement
+*/
+$matching = false;
+$pattern =  "/192\.168\.2\.113/";
+$replacement = "192.168.2.5";
+
+/*
+* high quality printing 288dpi
+* highquality mapfiles will be supplemented with "_4"
+* example: germany.map -> germany_4.map
+*/
+
+
+$highquality = true;
+$highqualitymapfiles = array(
+	"/data/umn/germany/germany_demo.map",
+	"/data/umn/mapbender_user/mapbender_user.map"
+);
+
+# Dots per cm (72 dpi):
+# 28.346456692913385826771653543307 
+$DPC = 28.35;
+
+# available formats:
+$a4 = true;
+$a3 = true;
+$a2 = true;
+$a1 = false;
+$a0 = false;
+
+# dimensions of the map:
+
+# A4 portrait
+$a4p_mapOffset_left = 3.3 * $DPC;
+$a4p_mapOffset_bottom = 3 * $DPC;
+$a4p_map_width = 15.7 * $DPC; 
+$a4p_map_height = 22 * $DPC; 
+$a4p_page_width = 21 * $DPC;
+$a4p_page_height = 29.7 * $DPC;
+$a4p_header_height = 2.6 * $DPC;
+$a4p_footer_height = 1.12 * $DPC;
+        
+# A4 landscape
+$a4l_mapOffset_left = 2.3 * $DPC;
+$a4l_mapOffset_bottom = 1.8 * $DPC;
+$a4l_map_width = 25.2 * $DPC;
+$a4l_map_height = 16.4 * $DPC; 
+$a4l_page_width = 29.7 * $DPC;
+$a4l_page_height = 21 * $DPC;   
+$a4l_header_width = 8.5 * $DPC;
+$a4l_header_height = 6 * $DPC;
+        
+# A3 protrait
+$a3p_mapOffset_left = 3.3 * $DPC;
+$a3p_mapOffset_bottom = 3 * $DPC;
+$a3p_map_width = 24.1 * $DPC;
+$a3p_map_height = 36.7 * $DPC;
+$a3p_page_width = 29.7 * $DPC;
+$a3p_page_height = 42 * $DPC;
+$a3p_header_width =  8.5 * $DPC;
+$a3p_header_height = 6 * $DPC;
+
+# A3 landscape        
+$a3l_mapOffset_left = 2.3 * $DPC;
+$a3l_mapOffset_bottom = 1.8 * $DPC;
+$a3l_map_width = 37.4 * $DPC;
+$a3l_map_height = 25.4 * $DPC; 
+$a3l_page_width = 42 * $DPC;
+$a3l_page_height = 29.7 * $DPC;
+$a3l_header_width =  8.5 * $DPC;
+$a3l_header_height = 6 * $DPC;
+
+# a2 protrait
+$a2p_mapOffset_left = 3.2 * $DPC;
+$a2p_mapOffset_bottom = 2.3 * $DPC;
+$a2p_map_width = 37.3 * $DPC;
+$a2p_map_height = 54.8 * $DPC;
+$a2p_page_width = 42 * $DPC;
+$a2p_page_height = 59.4 * $DPC;
+$a2p_header_width =  8.5 * $DPC;
+$a2p_header_height = 6 * $DPC;
+
+# a2 landscape        
+$a2l_mapOffset_left = 3.2 * $DPC;
+$a2l_mapOffset_bottom = 2.3 * $DPC;
+$a2l_map_width = 54.1 * $DPC;
+$a2l_map_height = 37.3 * $DPC; 
+$a2l_page_width = 59.4 * $DPC;
+$a2l_page_height = 42 * $DPC;
+$a2l_header_width =  8.5 * $DPC;
+$a2l_header_height = 6 * $DPC;
+
+# a1 portrait
+$a1p_mapOffset_left = 3.2 * $DPC;
+$a1p_mapOffset_bottom = 2.3 * $DPC;
+$a1p_map_width = 54.5 * $DPC;
+$a1p_map_height = 79.5 * $DPC;
+$a1p_page_width = 59.4 * $DPC;
+$a1p_page_height = 84 * $DPC;
+$a1p_header_width =  8.5 * $DPC;
+$a1p_header_height = 6 * $DPC;
+
+# a1 landscape        
+$a1l_mapOffset_left = 3.2 * $DPC;
+$a1l_mapOffset_bottom = 2.3 * $DPC;
+$a1l_map_width = 79.5 * $DPC;
+$a1l_map_height = 55.5 * $DPC; 
+$a1l_page_width = 84 * $DPC;
+$a1l_page_height = 59.4 * $DPC;
+$a1l_header_width =  8.5 * $DPC;
+$a1l_header_height = 6 * $DPC;
+
+# a0 portrait
+$a0p_mapOffset_left = 3.2 * $DPC;
+$a0p_mapOffset_bottom = 2.3 * $DPC;
+$a0p_map_width = 79 * $DPC;
+$a0p_map_height = 115 * $DPC;
+$a0p_page_width = 84 * $DPC;
+$a0p_page_height = 118.8 * $DPC;
+$a0p_header_width =  8.5 * $DPC;
+$a0p_header_height = 6 * $DPC;
+
+# a0 landscape        
+$a0l_mapOffset_left = 3.2 * $DPC;
+$a0l_mapOffset_bottom = 2.3 * $DPC;
+$a0l_map_width = 113 * $DPC;
+$a0l_map_height = 80.5 * $DPC; 
+$a0l_page_width = 118.8 * $DPC;
+$a0l_page_height = 84 * $DPC;
+$a0l_header_width =  8.5 * $DPC;
+$a0l_header_height = 6 * $DPC;
+
+/*
+* Overview
+*/
+$overview = true;
+$a4p_overviewOffset_left = $a4p_mapOffset_left;
+$a4p_overviewOffset_bottom = $a4p_mapOffset_bottom;
+
+$a4l_overviewOffset_left = $a4l_mapOffset_left;
+$a4l_overviewOffset_bottom = $a4l_mapOffset_bottom;
+
+$a3p_overviewOffset_left = $a3p_mapOffset_left;
+$a3p_overviewOffset_bottom = $a3p_mapOffset_bottom;
+
+$a3l_overviewOffset_left = $a3l_mapOffset_left;
+$a3l_overviewOffset_bottom = $a3l_mapOffset_bottom;
+
+$a2p_overviewOffset_left = $a2p_mapOffset_left;
+$a2p_overviewOffset_bottom = $a2p_mapOffset_bottom;
+
+$a2l_overviewOffset_left = $a2l_mapOffset_left;
+$a2l_overviewOffset_bottom = $a2l_mapOffset_bottom;
+
+$a1p_overviewOffset_left = $a1p_mapOffset_left;
+$a1p_overviewOffset_bottom = $a1p_mapOffset_bottom;
+
+$a1l_overviewOffset_left = $a1l_mapOffset_left;
+$a1l_overviewOffset_bottom = $a1l_mapOffset_bottom;
+
+$a0p_overviewOffset_left = $a0p_mapOffset_left;
+$a0p_overviewOffset_bottom = $a0p_mapOffset_bottom;
+
+$a0l_overviewOffset_left = $a0l_mapOffset_left;
+$a0l_overviewOffset_bottom = $a0l_mapOffset_bottom;
+
+
+
+/*
+* Northarrow
+*/
+$northarrow = true;
+$northarrowImage = "./img/northarrow.png";
+
+$a4p_northarrow_left = $a4p_mapOffset_left + 160;
+$a4p_northarrow_bottom = $a4p_mapOffset_bottom +2 ;
+
+$a4l_northarrow_left = $a4l_mapOffset_left + 5;
+$a4l_northarrow_bottom = $a4l_mapOffset_bottom + $a4l_map_height - 40;
+
+$a3p_northarrow_left = $a3p_mapOffset_left +5;
+$a3p_northarrow_bottom = $a3p_mapOffset_bottom + $a3p_map_height - 80;
+
+$a3l_northarrow_left = $a3l_mapOffset_left + 5;
+$a3l_northarrow_bottom = $a3l_mapOffset_bottom + $a3l_map_height - 40;
+
+$a2p_northarrow_left = $a2p_mapOffset_left +5;
+$a2p_northarrow_bottom = $a2p_mapOffset_bottom + $a2p_map_height - 80;
+
+$a2l_northarrow_left = $a2l_mapOffset_left + 5;
+$a2l_northarrow_bottom = $a2l_mapOffset_bottom + $a2l_map_height - 80;
+
+$a1p_northarrow_left = $a1p_mapOffset_left +5;
+$a1p_northarrow_bottom = $a1p_mapOffset_bottom + $a1p_map_height - 80;
+
+$a1l_northarrow_left = $a1l_mapOffset_left + 5;
+$a1l_northarrow_bottom = $a1l_mapOffset_bottom + $a1l_map_height - 160;
+
+$a0p_northarrow_left = $a0p_mapOffset_left +5;
+$a0p_northarrow_bottom = $a0p_mapOffset_bottom + $a0p_map_height - 80;
+
+$a0l_northarrow_left = $a0l_mapOffset_left + 5;
+$a0l_northarrow_bottom = $a0l_mapOffset_bottom + $a0l_map_height - 160;
+
+$northarrowImage_width = 15; 
+$northarrowImage_height = 35; 
+
+/*
+* special image for the map-page
+*/
+$special = true;
+$specialImage = "../img/mapbender_oo.png";
+
+$a4p_special_left = $a4p_mapOffset_left + $a4p_map_width - 50 ;
+$a4p_special_bottom = $a4p_mapOffset_bottom + $a4p_map_height + 80; 
+
+$a4l_special_left = $a4l_mapOffset_left + $a4l_map_width - $a4l_header_width + 0.8 * $DPC + 10 ;
+$a4l_special_bottom = $a4l_mapOffset_bottom + 54; 
+
+$a3p_special_left = $a3p_mapOffset_left + $a3p_map_width - $a3p_header_width ;
+$a3p_special_bottom = $a3p_mapOffset_bottom + 30; 
+
+$a3l_special_left = $a3l_mapOffset_left + $a3l_map_width - $a3l_header_width + 0.8 * $DPC + 10;
+$a3l_special_bottom = $a3l_mapOffset_bottom + 60; 
+
+$a2p_special_left = $a2p_mapOffset_left + $a2p_map_width - $a2p_header_width + 0.1 *$DPC ;
+$a2p_special_bottom = $a2p_mapOffset_bottom + 110; 
+
+$a2l_special_left = $a2l_mapOffset_left + $a2l_map_width - $a2l_header_width + 0.2 * $DPC ;
+$a2l_special_bottom = $a2l_mapOffset_bottom + 110; 
+
+$a1p_special_left = $a1p_mapOffset_left + $a1p_map_width - $a1p_header_width + 0.1 *$DPC ;
+$a1p_special_bottom = $a1p_mapOffset_bottom + 110; 
+
+$a1l_special_left = $a1l_mapOffset_left + $a1l_map_width - $a1l_header_width + 0.2 * $DPC ;
+$a1l_special_bottom = $a1l_mapOffset_bottom + 110; 
+
+$a0p_special_left = $a0p_mapOffset_left + $a0p_map_width - $a0p_header_width + 0.1 *$DPC ;
+$a0p_special_bottom = $a0p_mapOffset_bottom + 110; 
+
+$a0l_special_left = $a0l_mapOffset_left + $a0l_map_width - $a0l_header_width + 0.2 * $DPC ;
+$a0l_special_bottom = $a0l_mapOffset_bottom + 110; 
+
+$specialImage_width = 65; 
+$specialImage_height = 15;  
+
+
+/*
+* dynamic scalebar
+*/
+$scalebar = true;
+$units = "Meter";
+
+$a4p_scalebar_left = $a4p_mapOffset_left + 2 * $a4p_map_width/3;
+$a4p_scalebar_bottom = $a4p_mapOffset_bottom  + 0.5 * $DPC;
+
+$a4l_scalebar_left = $a4l_mapOffset_left + $a4l_map_width/4 ;
+$a4l_scalebar_bottom = $a4l_mapOffset_bottom +  + 0.5 * $DPC;
+
+$a3p_scalebar_left = $a3p_mapOffset_left  + $a3p_map_width/4 ;
+$a3p_scalebar_bottom = $a3p_mapOffset_bottom + 0.5 * $DPC;
+
+$a3l_scalebar_left = $a3l_mapOffset_left  + $a3l_map_width/4 ;
+$a3l_scalebar_bottom = $a3l_mapOffset_bottom +  + 0.5 * $DPC;
+
+$a2p_scalebar_left = $a2p_mapOffset_left  + $a2p_map_width/4 ;
+$a2p_scalebar_bottom = $a2p_mapOffset_bottom + 0.5 * $DPC;
+
+$a2l_scalebar_left = $a2l_mapOffset_left  + $a2l_map_width/4 ;
+$a2l_scalebar_bottom = $a2l_mapOffset_bottom +  + 0.5 * $DPC;
+
+$a1p_scalebar_left = $a1p_mapOffset_left  + $a1p_map_width/4 ;
+$a1p_scalebar_bottom = $a1p_mapOffset_bottom + 0.5 * $DPC;
+
+$a1l_scalebar_left = $a1l_mapOffset_left  + $a1l_map_width/4 ;
+$a1l_scalebar_bottom = $a1l_mapOffset_bottom +  + 0.5 * $DPC;
+
+$a0p_scalebar_left = $a0p_mapOffset_left  + $a0p_map_width/4 ;
+$a0p_scalebar_bottom = $a0p_mapOffset_bottom + 0.5 * $DPC;
+
+$a0l_scalebar_left = $a0l_mapOffset_left  + $a0l_map_width/4 ;
+$a0l_scalebar_bottom = $a0l_mapOffset_bottom +  + 0.5 * $DPC;
+
+$scalebar_width = 3 * $DPC;
+$scalebar_height = 0.18 * $DPC;
+ 
+
+?>

Modified: branches/nimix_dev/http/print/print_functions.php
===================================================================
--- branches/nimix_dev/http/print/print_functions.php	2008-08-18 16:07:47 UTC (rev 2868)
+++ branches/nimix_dev/http/print/print_functions.php	2008-08-18 16:10:50 UTC (rev 2869)
@@ -1,5 +1,7 @@
 <?php
 /**
+ * $Id$
+ * 
  * converts the coordinates created via the JavaScript
  * functions in 'mod_measure.php' into an array which 
  * then holds both X- ans Y-values for each point in
@@ -217,12 +219,12 @@
     $thePolyArr = makePolyFromCoord($theFullArr);
 	
 	if (isClosedPolygon($theFullArr)) {
-	  $nr_of_points = count($theFullArr);
 		$isClosed = TRUE;
-	} else {
-	  $nr_of_points = count($theFullArr) - 1;
+	} 
+	else {
 		$isClosed = FALSE;
 	}
+	$nr_of_points = count($theFullArr);
 	
 	// is fill option set?
 	// wenn der erste und letzte punkt nicht �bereinstimmen,


Property changes on: branches/nimix_dev/http/print/print_functions.php
___________________________________________________________________
Name: svn:keywords
   + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision

Modified: branches/nimix_dev/http/tools/mapbender_setup.php
===================================================================
--- branches/nimix_dev/http/tools/mapbender_setup.php	2008-08-18 16:07:47 UTC (rev 2868)
+++ branches/nimix_dev/http/tools/mapbender_setup.php	2008-08-18 16:10:50 UTC (rev 2869)
@@ -21,9 +21,7 @@
  # along with this program; if not, write to the Free Software
  # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  
-include_once(dirname(__FILE__)."/../php/system.php");
-include_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-include_once(dirname(__FILE__)."/../classes/class_mb_exception.php");
+require_once(dirname(__FILE__)."/../../core/globalSettings.php");
  
 ?>
  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
@@ -290,4 +288,4 @@
 	</td></tr>
 </table>
 </body> 
-</html>
\ No newline at end of file
+</html>

Modified: branches/nimix_dev/last_merged.txt
===================================================================
--- branches/nimix_dev/last_merged.txt	2008-08-18 16:07:47 UTC (rev 2868)
+++ branches/nimix_dev/last_merged.txt	2008-08-18 16:10:50 UTC (rev 2869)
@@ -1 +1 @@
-trunk: 2584
\ No newline at end of file
+trunk: 2864
\ No newline at end of file

Copied: branches/nimix_dev/resources/db/mysql/mysql_gettext.sql (from rev 2864, trunk/mapbender/resources/db/mysql/mysql_gettext.sql)
===================================================================
--- branches/nimix_dev/resources/db/mysql/mysql_gettext.sql	                        (rev 0)
+++ branches/nimix_dev/resources/db/mysql/mysql_gettext.sql	2008-08-18 16:10:50 UTC (rev 2869)
@@ -0,0 +1,24 @@
+
+DELIMITER $$
+
+DROP FUNCTION IF EXISTS gettext$$
+
+
+CREATE FUNCTION gettext(locale_arg text, querystring text) RETURNS text READS SQL DATA
+
+BEGIN
+
+DECLARE result text;
+
+SELECT msgstr INTO result FROM translations WHERE locale = locale_arg AND msgid = querystring;
+
+IF result IS NULL THEN
+RETURN querystring;
+ELSE
+RETURN result;
+END IF;
+
+END$$
+
+DELIMITER ;
+

Modified: branches/nimix_dev/resources/db/update/update_2.6.sql
===================================================================
--- branches/nimix_dev/resources/db/update/update_2.6.sql	2008-08-18 16:07:47 UTC (rev 2868)
+++ branches/nimix_dev/resources/db/update/update_2.6.sql	2008-08-18 16:10:50 UTC (rev 2869)
@@ -1,4 +1,4 @@
-UPDATE gui_element SET e_mb_mod = 'map_obj.js,map.js,wms.js,wfs_obj.js,initWms.php' WHERE e_id = 'mapframe1'
+UPDATE gui_element SET e_mb_mod = 'map_obj.js,map.js,wms.js,wfs_obj.js,initWms.php' WHERE e_id = 'mapframe1';
 
 --new fields for wfs_conf
 ALTER TABLE wfs_conf_element ADD COLUMN f_detailpos int4 DEFAULT 0;
@@ -14,3 +14,22 @@
 
 INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES('gui_digitize', 'gazetteerWFS', 'showResultInPopup', '1', 'if value is 1 search results will be displayed in popup, otherwise in gazetteer div' ,'var');
 INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES('gui_digitize', 'gazetteerWFS', 'wfs_spatial_request_conf_filename', 'wfs_additional_spatial_search.conf', 'location and name of the WFS configuration file for spatialRequest' ,'php_var');
+
+--add style class to element var text css of element digitize in gui_digitize
+UPDATE gui_element_vars SET var_value = 'body{
+ font-family: Arial, Helvetica, sans-serif;
+ font-size : 12px;
+ color: #ff00ff;
+ background-color: #ffffff;
+ margin-top: 0px;
+ margin-left: 0px;
+ }
+ .button{
+ height: 18px;
+ width: 32px;
+ }
+ .searchResults{
+	color:#000000;
+	font-size:10px;
+}
+' WHERE fkey_gui_id= 'gui_digitize' AND fkey_e_id='digitize' AND var_name='text css';
\ No newline at end of file



More information about the Mapbender_commits mailing list