true, ); /** * @var array $workflow_acl * @access public */ var $workflow_acl; /** * Constructor * @access public * @return object */ function ui_adminsource() { $this->workflow_acl = Factory::getInstance('workflow_acl'); $denyAccess = true; if ($this->workflow_acl->checkWorkflowAdmin($_SESSION['phpgw_info']['workflow']['account_id'])) { /* the user is an Expresso/Workflow admin */ $denyAccess = false; } else { if ($GLOBALS['phpgw']->acl->check('admin_workflow', 1, 'workflow')) { $pid = (int) $_GET['p_id']; /* check if the user can admin the informed process */ $denyAccess = !$this->workflow_acl->check_process_access($_SESSION['phpgw_info']['workflow']['account_id'], $pid); } } if ($denyAccess) { $GLOBALS['phpgw']->common->phpgw_header(); echo parse_navbar(); echo lang('access not permitted'); $GLOBALS['phpgw']->log->message('F-Abort, Unauthorized access to workflow.ui_adminprocesses'); $GLOBALS['phpgw']->log->commit(); $GLOBALS['phpgw']->common->phpgw_exit(); } } /** * Show user interface admin source form * @access public * @return object */ function form() { $smarty = Factory::getInstance('workflow_smarty', false); $smarty->setHeader(workflow_smarty::SHOW_HEADER | workflow_smarty::SHOW_NAVIGATION_BAR | workflow_smarty::SHOW_FOOTER, $GLOBALS['phpgw_info']['apps']['workflow']['title'] . ' - ' . lang('Admin Processes Sources')); $javaScripts = $this->get_common_js(); $javaScripts .= $this->get_js_link('workflow','jscode', 'prototype'); $javaScripts .= $this->get_js_link('workflow','adminsource', 'php_folder'); $javaScripts .= $this->get_js_link('workflow','adminsource', 'templates_folder'); $javaScripts .= $this->get_js_link('workflow','adminsource', 'resources_folder'); $javaScripts .= $this->get_js_link('workflow','adminsource', 'includes_folder'); $javaScripts .= $this->get_js_link('workflow','jscode', 'lightbox'); $javaScripts .= $this->get_js_link('workflow','adminsource', 'main'); $css = $this->get_common_css(); $css .= $this->get_css_link('lb'); $tabs = array( 'Atividades', 'Includes', 'Templates', 'Resources' ); $smarty->assign('header', $smarty->expressoHeader); $smarty->assign('footer', $smarty->expressoFooter); $smarty->assign('txt_loading', lang('loading')); $smarty->assign('javaScripts', $javaScripts); $smarty->assign('css', $css); $smarty->assign('tabs', $tabs); $smarty->assign('processID', $_GET['p_id']); $smarty->display('adminsource.tpl'); } } ?>