Support nouveau webservice

This commit is contained in:
Michael RICOIS 2011-01-13 09:47:06 +00:00
parent 8237c63d15
commit a26bb42250
2 changed files with 10 additions and 8 deletions

View File

@ -46,6 +46,7 @@ $definePerms = array(
function hasPerm($perm, $userInfos = '')
{
$return = true;
if (is_object($userInfos)) { $userInfos = (array)$userInfos; }
if( $userInfos == '' && isset($_SESSION['tabInfo']['droits']) ){
$userInfos = $_SESSION['tabInfo'];
}elseif( $userInfos == '' && !isset($_SESSION['tabInfo']['droits']) ||
@ -91,7 +92,7 @@ function checkPerm($page, $perm = '')
function formElementPerm($userInfos){
global $definePerms, $firephp;
$return = '';
FB::log($userInfos, 'userInfos');
if (is_object($userInfos)) { $userInfos = (array)$userInfos; }
$listeDroits = array_key_exists('droitsClients',$userInfos) ?
explode(' ', $userInfos['droitsClients']) : array();
foreach($definePerms as $perm => $infos){

View File

@ -1,16 +1,17 @@
<?php
$definePref = array(
'NAF4' => array( 'init' => '', 'txt' => 'Afficher les anciens NAF'),
'NACE' => array( 'init' => '', 'txt' => 'Afficher les codes NACES'),
'NEWS' => array( 'init' => '', 'txt' => 'Afficher les news Google&copy;'),
'MAPPY' => array( 'init' => '', 'txt' => 'Afficher les fa&ccedil;ades d\'immeubles'),
'CARTES' => array( 'init' => '', 'txt' => 'Afficher les cartes et les plans'),
'VOIRSURV' => array( 'init' => '', 'txt' => 'Afficher les entités sous surveillances'),
);
'NAF4' => array( 'init' => '', 'txt' => 'Afficher les anciens NAF'),
'NACE' => array( 'init' => '', 'txt' => 'Afficher les codes NACES'),
'NEWS' => array( 'init' => '', 'txt' => 'Afficher les news Google&copy;'),
'MAPPY' => array( 'init' => '', 'txt' => 'Afficher les fa&ccedil;ades d\'immeubles'),
'CARTES' => array( 'init' => '', 'txt' => 'Afficher les cartes et les plans'),
'VOIRSURV' => array( 'init' => '', 'txt' => 'Afficher les entités sous surveillances'),
);
function hasPref($name, $userInfo = ''){
$return = FALSE;
if (is_object($userInfo)) { $userInfo = (array)$userInfo; }
if($userInfo == '' && isset($_SESSION['tabInfo']['pref']) ){
$userInfo = $_SESSION['tabInfo'];
}elseif($userInfo == '' && !isset($_SESSION['tabInfo']['pref']) ||