true, ); /** * @var object $bo * @access public */ var $bo; protected $HTMLFile; protected $type; /** * Constructor * @access public * @return object */ function ui_phpeditor() { $this->bo = CreateObject('workflow.bo_editor'); $this->loadVariables(); } protected function loadVariables() { $this->HTMLFile = 'editor.html'; $this->type = 'php'; } /** * Build php editor form * @access public * @return void */ function form() { $smarty = $GLOBALS['workflow']['factory']->getInstance('workflow_smarty', false); $processManager = new ProcessManager($GLOBALS['workflow']['workflowObjects']->getDBGalaxia()->Link_ID); $proccessInfo = $processManager->get_process($_GET['proc_id']); $javaScripts = $this->get_common_js(); $javaScripts .= $this->get_js_link('workflow','phpeditor', 'main'); $css = $this->get_common_css(); $fileData = $this->bo->get_source($proccessInfo['wf_normalized_name'],$_REQUEST['file_name'],$_REQUEST['type']); $smarty->assign('type', $this->type); $smarty->assign('HTMLFile', $this->HTMLFile); $smarty->assign('javaScripts', $javaScripts); $smarty->assign('css', $css); $smarty->assign('txt_loading', lang('loading')); $smarty->assign('processName', $_GET['proc_name']); $smarty->assign('fileName', $_GET['file_name']); $smarty->assign('tipoCodigo', $_GET['type']); $smarty->assign('processID', $_GET['proc_id']); $smarty->assign('activityId', $_GET['activity_id']); $smarty->assign('processNameVersion', "{$proccessInfo['wf_name']} (v{$proccessInfo['wf_version']})"); $smarty->assign('fileData', $fileData); $smarty->display('editor.tpl'); } } ?>