mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
2011-01-20 Miguel de Dios <miguel.dedios@artica.es>
* operation/agentes/status_monitor.php: fixed and optimized the extract the list of Module name for the select box in the filter. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3753 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
914e60d163
commit
aa27bfe149
@ -1,3 +1,8 @@
|
|||||||
|
2011-01-20 Miguel de Dios <miguel.dedios@artica.es>
|
||||||
|
|
||||||
|
* operation/agentes/status_monitor.php: fixed and optimized the extract the
|
||||||
|
list of Module name for the select box in the filter.
|
||||||
|
|
||||||
2011-01-20 Miguel de Dios <miguel.dedios@artica.es>
|
2011-01-20 Miguel de Dios <miguel.dedios@artica.es>
|
||||||
|
|
||||||
* operation/agentes/estado_generalagente.php: fixed when the agent haven't
|
* operation/agentes/estado_generalagente.php: fixed when the agent haven't
|
||||||
|
@ -72,9 +72,38 @@ echo '</td></tr><tr><td valign="middle">'.__('Module name').'</td>';
|
|||||||
echo '<td valign="middle">';
|
echo '<td valign="middle">';
|
||||||
|
|
||||||
$user_groups = implode (",", array_keys (get_user_groups ()));
|
$user_groups = implode (",", array_keys (get_user_groups ()));
|
||||||
$user_agents = array_keys (get_group_agents($user_groups));
|
//$user_agents = array_keys (get_group_agents($user_groups));
|
||||||
|
|
||||||
|
//$modules = get_db_all_rows_filter ('tagente_modulo', array('id_agente' => $user_agents, 'nombre' => '<>delete_pending'), 'DISTINCT(nombre)');
|
||||||
|
|
||||||
|
$sql = '
|
||||||
|
select distinct(nombre)
|
||||||
|
from tagente_modulo
|
||||||
|
where nombre <> "delete_pending" and id_agente in
|
||||||
|
(
|
||||||
|
select id_agente
|
||||||
|
from tagente where id_grupo IN (
|
||||||
|
select id_grupo
|
||||||
|
from tusuario_perfil
|
||||||
|
where id_usuario = "' . $config['id_user'] . '"
|
||||||
|
and id_perfil IN (
|
||||||
|
select id_perfil
|
||||||
|
from tperfil where agent_view = 1
|
||||||
|
)
|
||||||
|
)
|
||||||
|
OR 0 IN (
|
||||||
|
select id_grupo
|
||||||
|
from tusuario_perfil
|
||||||
|
where id_usuario = "' . $config['id_user'] . '"
|
||||||
|
and id_perfil IN (
|
||||||
|
select id_perfil
|
||||||
|
from tperfil where agent_view = 1
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)';
|
||||||
|
|
||||||
|
$modules = get_db_all_rows_sql($sql);
|
||||||
|
|
||||||
$modules = get_db_all_rows_filter ('tagente_modulo', array('id_agente' => $user_agents, 'nombre' => '<>delete_pending'), 'DISTINCT(nombre)');
|
|
||||||
print_select (index_array ($modules, 'nombre', 'nombre'), "ag_modulename",
|
print_select (index_array ($modules, 'nombre', 'nombre'), "ag_modulename",
|
||||||
$ag_modulename, 'this.form.submit();', __('All'), '', false, false, true, '', false, 'width: 150px;');
|
$ag_modulename, 'this.form.submit();', __('All'), '', false, false, true, '', false, 'width: 150px;');
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user