'.__('Error adding module').'';
}
}
}
echo '
'.__('Modules successfully added ').'
';
}
// Main header
echo "".__('Agent configuration')." » ".__('Module templates')."
";
// ==========================
// TEMPLATE ASSIGMENT FORM
// ==========================
echo "".__('Available templates')."
";
echo '';
// ==========================
// MODULE VISUALIZATION TABLE
// ==========================
echo "".__('Assigned modules')."
";
$sql = sprintf ("SELECT * FROM tagente_modulo WHERE id_agente = %d ORDER BY id_module_group, nombre", $id_agente);
$result = get_db_all_rows_sql ($sql);
if ($result === false) {
$result = array ();
}
$table->width = 700;
$table->cellpadding = 4;
$table->cellspacing = 4;
$table->class = "databox";
$table->head = array ();
$table->data = array ();
$table->align = array ();
$table->head[0] = __('Module name');
$table->head[1] = __('Type');
$table->head[2] = __('Description');
$table->head[3] = __('Action');
$table->align[1] = "center";
$table->align[3] = "center";
foreach ($result as $row) {
$data = array ();
$data[0] = $row["nombre"];
if ($row["id_tipo_modulo"] > 0) {
$data[1] = '';
} else {
$data[1] = '';
}
$data[2] = mb_substr ($row["descripcion"], 0, 60);
$data[3] = ' ';
$data[3] .= '';
array_push ($table->data, $data);
}
if (!empty ($table->data)) {
print_table ($table);
unset ($table);
} else {
echo 'No modules
';
}
?>