[fusion-commits] r1229 - branches/fusion-1.0/MapGuide/php

svn_fusion at osgeo.org svn_fusion at osgeo.org
Mon Mar 10 12:47:02 EDT 2008


Author: assefa
Date: 2008-03-10 12:47:02 -0400 (Mon, 10 Mar 2008)
New Revision: 1229

Modified:
   branches/fusion-1.0/MapGuide/php/SaveMapFrame.php
Log:
Use layout and scale. Correct few bugs

Modified: branches/fusion-1.0/MapGuide/php/SaveMapFrame.php
===================================================================
--- branches/fusion-1.0/MapGuide/php/SaveMapFrame.php	2008-03-10 16:02:05 UTC (rev 1228)
+++ branches/fusion-1.0/MapGuide/php/SaveMapFrame.php	2008-03-10 16:47:02 UTC (rev 1229)
@@ -35,7 +35,7 @@
     <script type="text/javascript" charset="utf-8">
     function Save(){
         setTimeout(function(){
-            window.frames['theImage'].document.execCommand('SaveAs', true, "<?php echo $_REQUEST['mapname'].'.'.$REQUEST['format']?>");
+            window.frames['theImage'].document.execCommand('SaveAs', true, "<?php echo $_REQUEST['mapname'].'.'.$_REQUEST['format']?>");
         },2500);
     };
     </script>
@@ -43,11 +43,16 @@
 <body onload='Save()'>
 <H4>Preparing Image for download...</H4>
 <?php
-include('MGCommon.php');
-echo "<iframe style='visibility: hidden;' id='theImage' src='SaveMap.php?format=".$_REQUEST['format'].
-                            "&mapname=".$_REQUEST['mapname'].
-                            "&session=".$_REQUEST['session'].
-                            "'></iframe>";
+include('Common.php');
+$szLayout="";
+if (isset($_REQUEST['layout']) &&  $_REQUEST['layout'] != "")
+  $szLayout = "&layout=".$_REQUEST['layout'];
+
+$szScale="";
+if (isset($_REQUEST['scale']) &&  $_REQUEST['scale'] != "")
+  $szScale = "&scale=".$_REQUEST['scale'];
+
+echo "<iframe style='visibility: hidden;' id='theImage' src='SaveMap.php?format=".trim($_REQUEST['format'])."&mapname=".$_REQUEST['mapname']."&session=".$_REQUEST['session']. $szLayout . $szScale."'></iframe>";
 ?>
 </body>
 </html>



More information about the fusion-commits mailing list