[5307] | 1 | <?php |
---|
| 2 | /**************************************************************************\ |
---|
| 3 | * eGroupWare * |
---|
| 4 | * http://www.egroupware.org * |
---|
| 5 | * -------------------------------------------- * |
---|
| 6 | * This program is free software; you can redistribute it and/or modify it * |
---|
| 7 | * under the terms of the GNU General Public License as published by the * |
---|
| 8 | * Free Software Foundation; either version 2 of the License, or (at your * |
---|
| 9 | * option) any later version. * |
---|
| 10 | \**************************************************************************/ |
---|
| 11 | |
---|
| 12 | $lib_folder = dirname(__FILE__) . SEP . 'report' . SEP; |
---|
| 13 | |
---|
| 14 | require_once(dirname(__FILE__) . SEP . 'class.ui_ajaxinterface.inc.php'); |
---|
| 15 | require_once($lib_folder . 'xajax/xajax.inc.php'); |
---|
| 16 | include($lib_folder . 'includes/php/listagem/cad_listagem.xajax.php'); |
---|
| 17 | include($lib_folder . 'includes/classes/Formulario.class.php'); |
---|
| 18 | include($lib_folder . 'includes/classes/Listagem.class.php'); |
---|
| 19 | |
---|
| 20 | /** |
---|
| 21 | * Monta a interface inicial da Lista de Controle de Acesso |
---|
| 22 | * |
---|
| 23 | * @package Workflow |
---|
| 24 | * @author Jair Pereira - pereira.jair@gmail.com |
---|
| 25 | * @license http://www.gnu.org/copyleft/gpl.html GPL |
---|
| 26 | */ |
---|
| 27 | class reports extends ui_ajaxinterface |
---|
| 28 | { |
---|
| 29 | /** |
---|
| 30 | * Relaciona os mï¿œtodos pï¿œblicos da classe |
---|
| 31 | * |
---|
| 32 | * @var array $public_functions |
---|
| 33 | * @access private |
---|
| 34 | */ |
---|
| 35 | var $public_functions = array( |
---|
| 36 | 'form' => true, |
---|
| 37 | 'view' => true, |
---|
| 38 | ); |
---|
| 39 | |
---|
| 40 | /** |
---|
| 41 | * Verifica permissï¿œo do usuï¿œrio atual para rodar a lista de controle de acesso |
---|
| 42 | * Caso nᅵo tenha permissᅵo, emite mensagem e encerra execuᅵᅵo |
---|
| 43 | * |
---|
| 44 | * @return void |
---|
| 45 | * @access public |
---|
| 46 | */ |
---|
| 47 | function reports() |
---|
| 48 | { |
---|
| 49 | if (!Factory::getInstance('workflow_acl')->checkWorkflowAdmin($GLOBALS['phpgw_info']['user']['account_id'])) |
---|
| 50 | { |
---|
| 51 | $GLOBALS['phpgw']->common->phpgw_header(); |
---|
| 52 | echo parse_navbar(); |
---|
| 53 | echo lang('access not permitted'); |
---|
| 54 | $GLOBALS['phpgw']->log->message('F-Abort, Unauthorized access to workflow.reports.form'); |
---|
| 55 | $GLOBALS['phpgw']->log->commit(); |
---|
| 56 | $GLOBALS['phpgw']->common->phpgw_exit(); |
---|
| 57 | } |
---|
| 58 | } |
---|
| 59 | |
---|
| 60 | /** |
---|
| 61 | * Monta a pï¿œgina inicial da interface de controle de acesso, a partir do template, e |
---|
| 62 | * executa o mï¿œtodo inicial JavaScript para preencher dadas |
---|
| 63 | * |
---|
| 64 | * @return void |
---|
| 65 | * @access public |
---|
| 66 | */ |
---|
| 67 | function form() |
---|
| 68 | { |
---|
| 69 | $GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['workflow']['title'] . ' - ' . lang('Reports'); |
---|
| 70 | $GLOBALS['phpgw_info']['flags'] = array('noheader' => false, 'nonavbar' => false, 'currentapp' => 'workflow'); |
---|
| 71 | $smarty = Factory::getInstance('workflow_smarty'); |
---|
| 72 | |
---|
| 73 | $javaScripts = $this->get_common_js(); |
---|
| 74 | $css = $this->get_common_css(); |
---|
| 75 | |
---|
| 76 | $smarty->assign('header', $smarty->expressoHeader); |
---|
| 77 | $smarty->assign('footer', $smarty->expressoFooter); |
---|
| 78 | $smarty->assign('txt_loading', lang("loading")); |
---|
| 79 | $smarty->assign('javaScripts', $javaScripts); |
---|
| 80 | |
---|
| 81 | $lib_folder = dirname(__FILE__) . SEP . 'report' . SEP; |
---|
| 82 | |
---|
| 83 | ob_start(); |
---|
| 84 | include($lib_folder . 'cad_listagem.php'); |
---|
| 85 | $html = ob_get_contents(); |
---|
| 86 | ob_end_clean(); |
---|
| 87 | |
---|
| 88 | $smarty->assign('css', $css); |
---|
| 89 | $smarty->assign('reports_content', $html); |
---|
| 90 | |
---|
| 91 | $smarty->display('reports.tpl'); |
---|
| 92 | |
---|
| 93 | } |
---|
| 94 | |
---|
| 95 | function view() |
---|
| 96 | { |
---|
| 97 | $GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['workflow']['title'] . ' - ' . lang('Reports'); |
---|
| 98 | $GLOBALS['phpgw_info']['flags'] = array('noheader' => false, 'nonavbar' => false, 'currentapp' => 'workflow'); |
---|
| 99 | $smarty = Factory::getInstance('workflow_smarty'); |
---|
| 100 | |
---|
| 101 | $javaScripts = $this->get_common_js(); |
---|
| 102 | $css = $this->get_common_css(); |
---|
| 103 | |
---|
| 104 | $smarty->assign('header', $smarty->expressoHeader); |
---|
| 105 | $smarty->assign('footer', $smarty->expressoFooter); |
---|
| 106 | $smarty->assign('txt_loading', lang("loading")); |
---|
| 107 | $smarty->assign('javaScripts', $javaScripts); |
---|
| 108 | |
---|
| 109 | $lib_folder = dirname(__FILE__) . SEP . 'report' . SEP; |
---|
| 110 | |
---|
| 111 | ob_start(); |
---|
| 112 | include($lib_folder . 'includes/php/listagem/lst_view.php'); |
---|
| 113 | $html = ob_get_contents(); |
---|
| 114 | ob_end_clean(); |
---|
| 115 | |
---|
| 116 | $smarty->assign('css', $css); |
---|
| 117 | $smarty->assign('reports_content', $html); |
---|
| 118 | |
---|
| 119 | $smarty->display('reports.tpl'); |
---|
| 120 | |
---|
| 121 | } |
---|
| 122 | } |
---|
| 123 | ?> |
---|