svn commit: r379 - trunk/mapbender/http/php/mod_help.php
uli at osgeo.org
uli at osgeo.org
Fri Jun 2 09:10:51 EDT 2006
Author: uli
Date: 2006-06-02 13:10:50+0000
New Revision: 379
Added:
trunk/mapbender/http/php/mod_help.php (contents, props changed)
Log:
new module for dynamic help
Added: trunk/mapbender/http/php/mod_help.php
Url: https://mapbender.osgeo.org/source/browse/mapbender/trunk/mapbender/http/php/mod_help.php?view=auto&rev=379
==============================================================================
--- (empty file)
+++ trunk/mapbender/http/php/mod_help.php 2006-06-02 13:10:50+0000
@@ -0,0 +1,55 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mod_help
+# 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("../../conf/mapbender.conf");
+$con = db_connect(DBSERVER,OWNER,PW);
+db_select_db(DB,$con);
+
+?>
+<html>
+<head><title></title></head>
+<script language="JavaScript" type="text/javascript">
+function init(){
+ var str = "<img src='../img/transparent.gif' width='1000' height='1000' usemap='#mod_help_imagemap' border='0'>";
+ str += "<map name='mod_help_imagemap'>";
+ <?php
+ $gui_id = $_REQUEST["gui_id"];
+ $sql = "SELECT * FROM gui_element WHERE fkey_gui_id = $1 AND e_url <> ''";
+ $v = array($gui_id);
+ $t = array('s');
+ $res = db_prep_query($sql, $v, $t);
+ $cnt = 0;
+ while($row = db_fetch_array($res)){
+ echo "str += '<area onmouseover=\"mod_help_highlight(true)\" onmouseout=\"mod_help_highlight(false)\" shape=\"rect\" coords=\"".$row['e_left'].",".$row['e_top'].",";
+ echo ($row['e_left']+$row['e_width']).",".($row['e_top']+$row['e_height'])."\" href=\"".$row["e_url"]."\" alt=\"HELP\" ";
+ if($row["e_id"] != 'help'){
+ echo "target=\"_blank\"";
+ }
+ echo ">';";
+ $cnt++;
+ }
+ ?>
+ str += "</map>";
+ parent.mod_help_set_str(str);
+}
+</script>
+
+<body onload='init();'>
+</body>
+</html>
\ No newline at end of file
More information about the Mapbender_commits
mailing list