svn commit: r287 - trunk/mapbender/http/javascripts/mod_toggleModule.php
vera_schulze at osgeo.org
vera_schulze at osgeo.org
Mon May 15 07:57:42 EDT 2006
Author: vera_schulze
Date: 2006-05-15 11:57:42+0000
New Revision: 287
Modified:
trunk/mapbender/http/javascripts/mod_toggleModule.php (contents, props changed)
Log:
Code cleaning ready
Modified: trunk/mapbender/http/javascripts/mod_toggleModule.php
Url: https://mapbender.osgeo.org/source/browse/mapbender/trunk/mapbender/http/javascripts/mod_toggleModule.php?view=diff&rev=287&p1=trunk/mapbender/http/javascripts/mod_toggleModule.php&p2=trunk/mapbender/http/javascripts/mod_toggleModule.php&r1=286&r2=287
==============================================================================
--- trunk/mapbender/http/javascripts/mod_toggleModule.php (original)
+++ trunk/mapbender/http/javascripts/mod_toggleModule.php 2006-05-15 11:57:42+0000
@@ -1,6 +1,6 @@
<?php
-#$Id: mod_toggleModule.php,v 1.8 2005/09/13 18:16:42 bjoern_heuser Exp $
-#$Header: /cvsroot/mapbender/mapbender/http/javascripts/mod_toggleModule.php,v 1.8 2005/09/13 18:16:42 bjoern_heuser Exp $
+# $Id$
+# http://www.mapbender.org/index.php/mod_toggleModule.php
# Copyright (C) 2002 CCGIS
#
# This program is free software; you can redistribute it and/or modify
@@ -22,14 +22,18 @@
require_once("../../conf/mapbender.conf");
$con = db_connect($DBSERVER,$OWNER,$PW);
db_select_db(DB,$con);
-$sql = "SELECT e_target FROM gui_element WHERE e_id = 'toggleModule' AND fkey_gui_id = '".$gui_id."'";
-$res = db_query($sql);
+$sql = "SELECT e_target FROM gui_element WHERE e_id = 'toggleModule' AND fkey_gui_id = $1";
+$v = array($gui_id);
+$t = array('s');
+$res = db_prep_query($sql, $v, $t);
$cnt = 0;
while($row = db_fetch_array($res)){
- $e_target = $row["e_target"];
- $cnt++;
+ $e_target = $row["e_target"];
+ $cnt++;
+}
+if($cnt > 1){
+ echo "alert('toggleModule: ID not unique!');";
}
-if($cnt > 1){ echo "alert('toggleModule: ID not unique!');";}
echo "var mod_toggleModule ='".$e_target."';";
?>
mb_registerInitFunctions('mod_toggleModule_init()');
More information about the Mapbender_commits
mailing list