svn commit: r782 - trunk/mapbender/http/php/mod_meetingPoint.php

astrid_emde at osgeo.org astrid_emde at osgeo.org
Thu Oct 5 05:50:55 EDT 2006


Author: astrid_emde
Date: 2006-10-05 09:50:54+0000
New Revision: 782

Added:
   trunk/mapbender/http/php/mod_meetingPoint.php

Log:
new iframe to edit meeting points

Added: trunk/mapbender/http/php/mod_meetingPoint.php
Url: https://mapbender.osgeo.org/source/browse/mapbender/trunk/mapbender/http/php/mod_meetingPoint.php?view=auto&rev=782
==============================================================================
--- (empty file)
+++ trunk/mapbender/http/php/mod_meetingPoint.php	2006-10-05 09:50:54+0000
@@ -0,0 +1,139 @@
+<?PHP
+# $Id$
+# http://www.mapbender.org/index.php/MeetingPoint
+# 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.
+
+session_start();
+
+require("../php/mb_validateSession.php");
+require_once("../../conf/mapbender.conf");
+$con = db_connect(DBSERVER,OWNER,PW);
+db_select_db(DB,$con);
+
+$gui_id = $_SESSION["mb_user_gui"];
+
+$sql = "SELECT DISTINCT e_target FROM gui_element WHERE e_id = '".$_REQUEST["e_id_css"]."' AND fkey_gui_id = $1";
+$v = array($gui_id);
+$t = array('s');
+#echo $sql;
+#echo $gui_id;
+$res = db_prep_query($sql, $v, $t);
+$cnt = 0;
+while($row = db_fetch_array($res)){    
+	$e_target = $row["e_target"];
+	$cnt++;
+}
+if($cnt > 1){
+	echo "alert('legend: ID not unique!');";
+}
+#echo "var mod_meetingPoint_target = '".$e_target."';";
+#echo "t: ".$e_target;
+?>
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+<head>
+<title>meetingPoint</title>
+
+<link rel="stylesheet" type="text/css" href="../css/meetingPoint.css" />
+<script language='JavaScript'>
+<!--
+
+function validate(){
+	var mycheck = true;
+	var checkObj= document.forms[0].mytext.value;
+	if(checkObj == '') {
+    	alert ("Bitte geben Sie einen Text an!");
+    	checkObj.focus();
+        mycheck=false;
+    }
+    
+    var checkObj= document.forms[0].x.value;
+    if(checkObj == '') {
+    	alert ("Bitte geben Sie die Klickposition an!");
+        mycheck = false;
+    }
+
+    if(mycheck == true){
+    	my_meetingPoint = document.forms[0].myurl.value + "?";
+    	my_meetingPoint += "name=" + document.forms[0].myuser.value;
+    	my_meetingPoint += "&password=" + document.forms[0].mypw.value;
+    	my_meetingPoint += "&mb_user_myGui=" + document.forms[0].mygui.value;
+    	
+    	//var ind = parent.getMapObjIndexByName(mod_meetingPoint_target);
+    	var ind = parent.getMapObjIndexByName('mapframe1');
+    	var coord = parent.mb_mapObj[ind].extent.split(",");
+    	
+    	my_meetingPoint += "&mb_myBBOX=" + parseFloat(coord[0]) + ",";
+		my_meetingPoint +=  parseFloat(coord[1]) + ",";
+		my_meetingPoint +=  parseFloat(coord[2]) + ",";
+		my_meetingPoint +=  parseFloat(coord[3]) ;
+
+    	my_meetingPoint += "&mb_myPOI=" + document.forms[0].mytext.value + ",";
+    	my_meetingPoint += document.forms[0].x.value + ",";
+    	my_meetingPoint += document.forms[0].y.value;
+
+    	
+    	prompt("Ihr Treffpunkt. Kopieren Sie den Link. ",my_meetingPoint);
+    	//document.getElementById("mymeetingPoint").href = my_meetingPoint;
+
+    	//prompt("Link",document.getElementById("mymeetingPoint").href);
+    }
+      
+    
+}
+
+function emptyfields(){
+	document.forms[0].mytext.value ='';
+	document.forms[0].x.value ='';
+	document.forms[0].y.value =  '';
+
+}
+
+function goBack(where){
+    document.location.href=where;
+}
+
+
+-->
+</script>
+
+</head>
+<body>
+
+<form action="" >
+
+Text &nbsp;<input class='strinput' type="hidden" name='myurl' value='<?php  echo LOGIN;  ?>'>
+
+<input class='strinput' type="hidden" name='mygui' value='<?php  echo $_SESSION["mb_user_gui"];  ?>'>
+
+<input class='strinput' type="hidden" name='myuser' value='<?php  echo $_SESSION["mb_user_name"];  ?>'>
+
+<input class='strinput' type="hidden" name='mypw' value='<?php  echo $_SESSION["mb_user_password"];  ?>'>
+
+<input class='strinput' type="text" name='mytext' value=''>
+<br>
+<input class="okbutton" name="Send"   type="button" value="ok" onclick="validate();">
+<input class="ibutton" type="button" value="cancel" onClick="emptyfields();">
+<br>
+<input class='coord' type="text" name='x' value='' readonly>
+<input class='coord' type="text" name='y' value='' readonly>
+<br>
+</form>
+</body>
+</html>




More information about the Mapbender_commits mailing list