[Mapbender-commits] r1533 - trunk/mapbender/http/javascripts

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Wed Jul 25 06:39:30 EDT 2007


Author: christoph
Date: 2007-07-25 06:39:30 -0400 (Wed, 25 Jul 2007)
New Revision: 1533

Removed:
   trunk/mapbender/http/javascripts/mod_insertWmcIntoDb.php
Log:
moved to /php/

Deleted: trunk/mapbender/http/javascripts/mod_insertWmcIntoDb.php
===================================================================
--- trunk/mapbender/http/javascripts/mod_insertWmcIntoDb.php	2007-07-25 08:56:56 UTC (rev 1532)
+++ trunk/mapbender/http/javascripts/mod_insertWmcIntoDb.php	2007-07-25 10:39:30 UTC (rev 1533)
@@ -1,98 +0,0 @@
-<?php
-#$Id: mod_insertWmcIntoDb.php 507 2006-11-20 10:55:57Z christoph $
-#$Header: /cvsroot/mapbender/mapbender/http/javascripts/mod_insertWmcIntoDb.php,v 1.19 2006/03/09 14:02:42 uli_rothstein Exp $
-# 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.
-
-include("../../conf/mapbender.conf");
-session_start();
-$gui_id = $_REQUEST["gui_id"];
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<html>
-<head>
-<!-- 
-Licensing: See the GNU General Public License for more details.
-http://www.gnu.org/copyleft/gpl.html
-or:
-mapbender/licence/ 
--->
-
-<meta http-equiv="cache-control" content="no-cache">
-<meta http-equiv="pragma" content="no-cache">
-<meta http-equiv="expires" content="0">
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>MB2 - <?php  echo  $_REQUEST["gui_id"];?></title>
-<?php
-
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-?>
-</head>
-<body>
-</body>
-</html>
-<?php
-
-function mb_utf8_encode ($str) {
-	if(CHARSET=="UTF-8") return utf8_encode($str);
-	return $str;
-}
-function mb_utf8_decode ($str) {
-	if(CHARSET=="UTF-8") return utf8_decode($str);
-	return $str;
-}
-
-if ($_POST["data"]) {
-	$d = explode("____", $_POST["data"]);	
-	// Display WMC 
-	//echo "<pre>" . stripslashes($d[2]) . "</pre>";
-	$alert = $d[4];
-	$session = $d[5];
-	
-	if ($session) {
-		echo "<script>document.write('<b>saving workspace...</b>');</script>";
-
-		if (isset($_SESSION['mb_wmc'])) {
-			$_SESSION['mb_wmc'] = stripslashes(str_replace("&", "&#38;" , mb_utf8_encode(html_entity_decode($d[2]))));
-		}
-		echo "<script>function obsolete(){window.close();} window.setTimeout('obsolete()', 1000);</script>";
-	}
-	else {
-		if ($d[3] && $d[0]) {
-			$sql = "INSERT INTO mb_user_wmc VALUES ('" . $d[3] . "', '" . $d[0] . "', '" . str_replace("&", "&#38;" , mb_utf8_encode(html_entity_decode($d[2]))) . "', '" . $d[1] . "', '" . time() . "')";
-			
-			
-			$res = db_query($sql);
-			if ($d[1]) {
-				 $wmc_title = "'" . $d[1] . "' ";
-			}
-			if (db_error()) {
-					 echo "<script>var title = \"" . $wmc_title . "\";alert(\"Error while saving WMC document \" + title + \"!\");</script>";
-			}
-			else {
-				if ($alert) {
-					 echo "<script>var title = \"" . $wmc_title . "\";alert(\"WMC document \" + title + \"has been saved!\")</script>";
-				}
-			}
-		}
-	}
-	
-}
-?>
\ No newline at end of file



More information about the Mapbender_commits mailing list