[Mapbender-commits] r1480 - trunk/mapbender/http/php

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Wed Jul 11 04:54:14 EDT 2007


Author: sven
Date: 2007-07-11 04:54:14 -0400 (Wed, 11 Jul 2007)
New Revision: 1480

Added:
   trunk/mapbender/http/php/mod_SelectKeyword.php
Log:
addon for gazetteerMetadata - 
new window to display all keywords in a list for selection

Added: trunk/mapbender/http/php/mod_SelectKeyword.php
===================================================================
--- trunk/mapbender/http/php/mod_SelectKeyword.php	                        (rev 0)
+++ trunk/mapbender/http/php/mod_SelectKeyword.php	2007-07-11 08:54:14 UTC (rev 1480)
@@ -0,0 +1,65 @@
+<?php
+# $Id$
+# ttp://www.mapbender.org/index.php/mod_SelectKeyword
+# 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.
+
+require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
+$con = db_connect($DBSERVER,$OWNER,$PW);
+db_select_db(DB,$con);
+
+?>
+
+<html>
+<head>
+<title></title>
+<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.'">';	
+?>
+
+<script language='JavaScript'>
+<!--
+function insertValue(val){
+   window.opener.document.form1.search.value = val;
+   window.close();
+}
+-->
+</script>
+</head>
+
+<body onload='resizeTo(380,500);' >
+
+<?php
+$sql = "Select keyword_id, ltrim(keyword) as keyword from keyword order by upper(ltrim(keyword));";
+$res = db_query($sql);
+
+echo "<select size='20' name='keywordlist' ondblClick='insertValue(this.value)'>\n";
+ 
+$cnt = 0;
+while($row = db_fetch_array($res)){    
+	echo "<option value='". $row["keyword"]."' >";
+	echo $row["keyword"];
+	$cnt++;
+	echo "</option>";
+}
+echo "</select>";
+
+?>
+</body>
+</html>


Property changes on: trunk/mapbender/http/php/mod_SelectKeyword.php
___________________________________________________________________
Name: svn:keywords
   + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision



More information about the Mapbender_commits mailing list