[Mapbender-commits] r1244 - trunk/mapbender/http/javascripts
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Wed Mar 28 04:45:37 EDT 2007
Author: christoph
Date: 2007-03-28 04:45:37 -0400 (Wed, 28 Mar 2007)
New Revision: 1244
Modified:
trunk/mapbender/http/javascripts/mod_addWMS.php
Log:
refactoring
Modified: trunk/mapbender/http/javascripts/mod_addWMS.php
===================================================================
--- trunk/mapbender/http/javascripts/mod_addWMS.php 2007-03-28 08:42:06 UTC (rev 1243)
+++ trunk/mapbender/http/javascripts/mod_addWMS.php 2007-03-28 08:45:37 UTC (rev 1244)
@@ -17,22 +17,27 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+$gui_id = $_REQUEST["gui_id"];
-$gui_id = $_REQUEST["gui_id"];
require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
+
$con = db_connect($DBSERVER,$OWNER,$PW);
db_select_db(DB,$con);
+
$sql = "SELECT e_requires, e_target FROM gui_element WHERE e_id = 'addWMS' 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)){
+
+while ($row = db_fetch_array($res)) {
$e_target = $row["e_target"];
$e_require = $row["e_requires"];
$cnt++;
}
-if($cnt > 1){ echo "alert('addWMS: ID not unique!');";}
+if($cnt > 1){
+ echo "alert('addWMS: ID not unique!');";
+}
echo "var mod_addWMS_data = '".$e_require."';";
$target = explode(",", $e_target);
echo "var mod_addWMS_target1 = '".trim($target[0])."';";
More information about the Mapbender_commits
mailing list