G::header('location: ../login/login'); die; } G::LoadClass('configuration'); $c = new Configurations(); $configPage = $c->getConfiguration('eventList', 'pageSize', '', $_SESSION['USER_LOGGED']); $Config['pageSize'] = isset($configPage['pageSize']) ? $configPage['pageSize'] : 20; $G_MAIN_MENU = 'processmaker'; $G_SUB_MENU = 'logs'; $G_ID_MENU_SELECTED = 'logs'; $G_ID_SUB_MENU_SELECTED = 'EVENT'; //get values for the comboBoxes $userUid = isset($_SESSION['USER_LOGGED']) && $_SESSION['USER_LOGGED'] != '' ? $_SESSION['USER_LOGGED'] : null; $status = array(array('', G::LoadTranslation('ID_ALL')), array("PENDING", G::LoadTranslation('ID_OPEN')), array("COMPLETED", G::LoadTranslation('ID_CLOSE'))); $type = array(array('', G::LoadTranslation('ID_ALL')), array('SEND_MESSAGE', G::LoadTranslation('ID_EVENT_MESSAGE')), array('EXECUTE_TRIGGER', G::LoadTranslation('ID_EVENT_TIMER')), array('EXECUTE_CONDITIONAL_TRIGGER', G::LoadTranslation('ID_EVENT_CONDITIONAL'))); $processes = getProcessArray($userUid); $G_PUBLISH = new Publisher(); $oHeadPublisher =& headPublisher::getSingleton(); $oHeadPublisher->addExtJsScript('events/eventList', false); //adding a javascript file .js $oHeadPublisher->addContent('events/eventList'); //adding a html file .html. //sending the columns to display in grid $oHeadPublisher->assign('typeValues', $type); $oHeadPublisher->assign('statusValues', $status); $oHeadPublisher->assign('processValues', $processes); function getProcessArray($userUid) { global $oAppCache; require_once "classes/model/AppCacheView.php"; $processes = array();
"Authorization" => "Basic " . base64_encode($client['CLIENT_ID'] . ":" . $client['CLIENT_SECRET']) ); $request = new \OAuth2\Request(array(), $request, array(), array(), array(), $server, null, $headers); $oauthServer = new \ProcessMaker\Services\OAuth2\Server(); $response = $oauthServer->postToken($request, true); $clientToken = $response->getParameters(); $clientToken["client_id"] = $client['CLIENT_ID']; $clientToken["client_secret"] = $client['CLIENT_SECRET']; $items = "[" . implode(",", $arrayTabItem) ."]"; $userUid = (isset($_SESSION["USER_LOGGED"]) && $_SESSION["USER_LOGGED"] != "")? $_SESSION["USER_LOGGED"] : null; $processes = getProcessArray($action, $userUid); $headPublisher->assign("pageSize", $pageSize); //Sending the page size $headPublisher->assign("action", $action); //Sending the fields to get from proxy $headPublisher->assign("Items", $items); $headPublisher->assign("processValues", $processes); //Sending the columns to display in grid $headPublisher->assign("varSkin", SYS_SKIN); //Sending the current Skin $headPublisher->assign("FORMATS", $conf->getFormats()); $headPublisher->assign("urlProxy", $urlProxy); $headPublisher->assign('credentials', $clientToken ); $headPublisher->addExtJsScript("app/main", true); $headPublisher->addExtJsScript("cases/casesListConsolidated", false); //Adding a JavaScript file .js $headPublisher->addContent("cases/casesListConsolidated"); //Adding a HTML file .html G::RenderPage("publish", "extJs");