. * * For more information, contact Colosa Inc, 2566 Le Jeune Rd., * Coral Gables, FL, 33134, USA, or email info@colosa.com. * */ global $RBAC; $access = $RBAC->userCanAccess('PM_FACTORY'); if( $access != 1 ){ switch ($access) { case -1: G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels'); G::header('location: ../login/login'); die; break; case -2: G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels'); G::header('location: ../login/login'); die; break; default: G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels'); G::header('location: ../login/login'); die; break; } } /**************************/ function parseItemArray( $array ) { if (!isset ($array->item) && !is_array($array) ) { return null; } $result = array(); if ( isset ( $array->item ) ) { foreach ($array->item as $key => $value) { $result[$value->key] = $value->value; } } else { foreach ($array as $key => $value) { $result[$value->key] = $value->value; } } return $result; } try { G::LoadClass('processes'); $oProcess = new Processes(); $oProcess->ws_open_public (); $result = $oProcess->ws_ProcessList ( ); $processes[] = array ( 'uid' => 'char', 'name' => 'char', 'age' => 'integer', 'balance' => 'float' ); if ( $result->status_code == 0 && isset($result->processes) ) { foreach ( $result->processes as $key => $val ) { $process = parseItemArray($val); $processes[] = $process; } } $_DBArray['processes'] = $processes; $_SESSION['_DBArray'] = $_DBArray; G::LoadClass( 'ArrayPeer'); $c = new Criteria ('dbarray'); $c->setDBArrayTable('processes'); $G_MAIN_MENU = 'processmaker'; $G_ID_MENU_SELECTED = 'PROCESSES'; $G_PUBLISH = new Publisher; $G_PUBLISH->AddContent('propeltable', 'paged-table', 'processes/processes_ListPublic', $c); $oHeadPublisher =& headPublisher::getSingleton(); //$oHeadPublisher->addScriptCode('leimnud.Package.Load("newAccount",{Type:"file",Absolute:true,Path:"/jscore/newAccount.js"});'); $oHeadPublisher->addScriptCode(" var oPanel; var oPanel2; var showDetails = function(sUID) { oPanel = new leimnud.module.panel(); oPanel.options = { size:{w:650,h:550}, position:{x:0,y:0,center:true}, title:'', theme:'firefox', statusBar:true, control :{resize:false,roll:false,drag:true}, fx :{modal:true,opacity:true,blinkToFront:false,fadeIn:false} }; oPanel.events = { remove: function() { delete(oPanel); }.extend(this) }; oPanel.make(); oPanel.loader.show(); var oRPC = new leimnud.module.rpc.xmlhttp({ url : 'processes_Ajax', args: 'action=showDetailsPMDWL&data=' + {pro_uid:sUID}.toJSONString() }); oRPC.callback = function(rpc){ oPanel.loader.hide(); var scs = rpc.xmlhttp.responseText.extractScript(); oPanel.addContent(rpc.xmlhttp.responseText); scs.evalScript(); }.extend(this); oRPC.make(); }; "); G::RenderPage('publish', 'blank'); } catch ( Exception $e ) { $G_PUBLISH = new Publisher; $aMessage['MESSAGE'] = $e->getMessage(); $G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/showMessage', '', $aMessage ); G::RenderPage( 'publish', 'blank' ); }