. */ /** * @brief Form to add a grant to a user, pop up page (User administration) * * * @file * @author Claire Figueras * @date $date$ * @version $Revision$ * @ingroup admin */ $core_tools = new core_tools(); $core_tools->load_lang(); $core_tools->test_admin('admin_users', 'apps'); $ugc = new dbquery(); //loading all the enabled groups in an array $ugc->connect(); $ugc->query("select group_id, group_desc from ".$_SESSION['tablename']['usergroups']." where enabled = 'Y' order by group_desc asc"); $tab=array(); $i=0; while($value = $ugc->fetch_array()) { $tab[$i]['ID'] = $value[0] ; $tab[$i]['LABEL'] = $ugc->show_string($value[1]); $i++; } $tab2 = array(); if ( count($_SESSION['m_admin']['users']['groups']) > 0 ) { //$tabtmp = array(); for($i=0; $i < count($_SESSION['m_admin']['users']['groups']); $i++) { array_push($tab2, array('ID'=> $_SESSION['m_admin']['users']['groups'][$i]['GROUP_ID'], 'LABEL' => $_SESSION['m_admin']['users']['groups'][$i]['LABEL'])); } } $res = $tab; for($j=0; $j < count($tab); $j++) { for($k=0; $k < count($tab2); $k++) { if($tab[$j]['ID'] == $tab2[$k]['ID']) { unset($res[$j]); break; } } } $res = array_values($res); //here we loading the html $core_tools->load_html(); //here we building the header $core_tools->load_header(); $time = $core_tools->get_session_time_expire(); ?>