svn commit: r319 - trunk/mapbender/http/php/mod_updateWMS.php

uli at osgeo.org uli at osgeo.org
Tue May 16 08:57:43 EDT 2006


Author: uli
Date: 2006-05-16 12:57:42+0000
New Revision: 319

Modified:
   trunk/mapbender/http/php/mod_updateWMS.php

Log:
db_prep_query included

Modified: trunk/mapbender/http/php/mod_updateWMS.php
Url: https://mapbender.osgeo.org/source/browse/mapbender/trunk/mapbender/http/php/mod_updateWMS.php?view=diff&rev=319&p1=trunk/mapbender/http/php/mod_updateWMS.php&p2=trunk/mapbender/http/php/mod_updateWMS.php&r1=318&r2=319
==============================================================================
--- trunk/mapbender/http/php/mod_updateWMS.php	(original)
+++ trunk/mapbender/http/php/mod_updateWMS.php	2006-05-16 12:57:42+0000
@@ -56,7 +56,7 @@
 <form name='form1' action='<?php  $PHP_SELF ?>' method='POST'>
 <?php
 
-$con = db_connect($DBSERVER,$OWNER,$PW);
+$con = db_connect(DBSERVER,OWNER,PW);
 
 require_once("../classes/class_administration.php");
 $admin = new administration();
@@ -65,17 +65,23 @@
 $wms_id_own = $admin->getWmsByOwnGuis($ownguis);
 
 if (count($wms_id_own)>0 AND count($ownguis)>0 AND count($permguis)>0){
+	$v = array();
+	$t = array();
+	$c = 1;
 	$sql = "SELECT wms_id, wms_title, wms_getcapabilities  FROM wms ";
 	$sql .= "WHERE wms_id IN(";
 	for($i=0; $i<count($wms_id_own); $i++){
 		if($wms_id_own[$i] != ''){
-		if($i>0){ $sql .= ",";}
-		$sql .= "'".$wms_id_own[$i]."'";
+			if($i>0){ $sql .= ",";}
+			$sql .= "$".$c;
+			array_push($v,$wms_id_own[$i]);
+			array_push($t,'i');
+			$c++;
 		}
 	}
 	$sql .= ")";
 	$sql .= " ORDER BY wms_title";
-	$res = db_query($sql);
+	$res = db_prep_query($sql,$v,$t);
 	$cnt = 0;
 	echo "<select name='selWMS' size='15' onchange='sel()'>";
 	while($row = db_fetch_array($res)){




More information about the Mapbender_commits mailing list