[fusion-commits] r1230 - trunk/MapGuide/php
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Mon Mar 10 12:53:15 EDT 2008
Author: assefa
Date: 2008-03-10 12:53:15 -0400 (Mon, 10 Mar 2008)
New Revision: 1230
Modified:
trunk/MapGuide/php/SaveMapFrame.php
Log:
Use layout and scale. Correct few bugs (#21)
Modified: trunk/MapGuide/php/SaveMapFrame.php
===================================================================
--- trunk/MapGuide/php/SaveMapFrame.php 2008-03-10 16:47:02 UTC (rev 1229)
+++ trunk/MapGuide/php/SaveMapFrame.php 2008-03-10 16:53:15 UTC (rev 1230)
@@ -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,17 @@
<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