svn commit: r800 - trunk/mapbender/http/classes/class_administration.php
christoph at osgeo.org
christoph at osgeo.org
Thu Oct 19 05:11:11 EDT 2006
Author: christoph
Date: 2006-10-19 09:11:10+0000
New Revision: 800
Modified:
trunk/mapbender/http/classes/class_administration.php
Log:
added function getWmsPermission
Modified: trunk/mapbender/http/classes/class_administration.php
Url: https://mapbender.osgeo.org/source/browse/mapbender/trunk/mapbender/http/classes/class_administration.php?view=diff&rev=800&p1=trunk/mapbender/http/classes/class_administration.php&p2=trunk/mapbender/http/classes/class_administration.php&r1=799&r2=800
==============================================================================
--- trunk/mapbender/http/classes/class_administration.php (original)
+++ trunk/mapbender/http/classes/class_administration.php 2006-10-19 09:11:10+0000
@@ -727,6 +727,30 @@
return false;
}
}
+ function getWmsPermission($wms_id, $user_id) {
+ $array_guis = $this->getGuisByPermission($user_id);
+ $v = array();
+ $t = array();
+ $sql = "SELECT * FROM gui_wms WHERE fkey_gui_id IN (";
+ $c = 1;
+ for($i=0; $i<count($array_guis); $i++){
+ if($i>0){ $sql .= ",";}
+ $sql .= "$".$c;
+ $c++;
+ array_push($v, $array_guis[$i]);
+ array_push($t, 's');
+ }
+ $sql .= ") AND fkey_wms_id = $".$c;
+ array_push($v,$wms_id);
+ array_push($t,'i');
+ $res = db_prep_query($sql,$v,$t);
+ if($row = db_fetch_array($res)){
+ return true;
+ }
+ else{
+ return false;
+ }
+ }
function getLayerIdByLayerName($wms_id, $layer_name){
$sql = "SELECT layer_id FROM layer WHERE ";
$sql .= "fkey_wms_id = $1 AND layer_name = $2";
More information about the Mapbender_commits
mailing list