[Mapbender-commits] r2161 - branches/2.4.5/http/php

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Mon Mar 3 09:29:08 EST 2008


Author: greq
Date: 2008-03-03 09:29:08 -0500 (Mon, 03 Mar 2008)
New Revision: 2161

Removed:
   branches/2.4.5/http/php/download.php
Log:
no more needed, function direct in php-file

Deleted: branches/2.4.5/http/php/download.php
===================================================================
--- branches/2.4.5/http/php/download.php	2008-03-03 14:24:20 UTC (rev 2160)
+++ branches/2.4.5/http/php/download.php	2008-03-03 14:29:08 UTC (rev 2161)
@@ -1,72 +0,0 @@
-<?php
-#$Id$
-# http://www.mapbender.org/ExportMapimage
-#
-# Copyright (C) 2002 CCGIS
-#
-# This program 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, or (at your option)
-# any later version.
-#
-# This program 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 this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-
-ob_start();
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf"); 
-
-$download = array();
-
- 
-
-$download["dir"]  = TMPDIR;
-$download["file"] = trim($_REQUEST["download"]);
-
-
-
-if(!(bool)$download["file"]) {
-	die("No filename given.");
-}
-
-if((int)strpos($download["file"],"..") !== 0) {
-	die("Illegal filename given.");
-}
-
-$img = $download["dir"]."/".$download["file"]; 
-
-if(!file_exists($img) || !is_readable($img)) {
-	die("An error occured.");
-	
-}
-
-$now_date = date("Ymd_His");
-
-switch(substr($download["file"],-4)) {
-	case ".png":
-		$filename = "map_export__".$now_date.".png";
-		header('Content-Type: image/png');
-		break;
-	case "jpeg":
-		$filename = "map_export__".$now_date.".jpeg";
-		header('Content-Type: image/jpeg');
-		break;
-	case ".tif";
-		$filename = "map_export__".$now_date.".tif";
-		header('Content-Type: image/tif');
-		break;
-	default:
-		die("An error occured.");
-}
-
-header("Content-Disposition: attachment; filename=\"".$filename."\"");
-
-readfile(implode($download));
-
-?>
\ No newline at end of file



More information about the Mapbender_commits mailing list