2012-10-19 17:17:53 -04:00
|
|
|
<?php
|
2017-02-15 16:26:02 +00:00
|
|
|
|
2015-03-16 17:26:48 -04:00
|
|
|
$filter = new InputFilter();
|
2017-12-04 13:25:35 +00:00
|
|
|
$_GET = $filter->xssFilterHard($_GET, "url");
|
|
|
|
|
switch ($RBAC->userCanAccess('PM_SUPERVISOR')) {
|
2012-10-19 17:17:53 -04:00
|
|
|
case - 2:
|
2017-12-04 13:25:35 +00:00
|
|
|
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels');
|
|
|
|
|
G::header('location: ../login/login');
|
2012-10-19 17:17:53 -04:00
|
|
|
die();
|
|
|
|
|
break;
|
|
|
|
|
case - 1:
|
2017-12-04 13:25:35 +00:00
|
|
|
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
|
|
|
|
|
G::header('location: ../login/login');
|
2012-10-19 17:17:53 -04:00
|
|
|
die();
|
|
|
|
|
break;
|
|
|
|
|
}
|
2016-06-08 10:46:58 -04:00
|
|
|
|
2016-08-30 14:56:18 -04:00
|
|
|
//If the user does not have the permission and the user can be access from url
|
2016-06-08 10:46:58 -04:00
|
|
|
$processUser = new ProcessUser();
|
2016-10-07 14:27:54 -04:00
|
|
|
$userAccess = $processUser->validateUserAccess($_GET['PRO_UID'], $_SESSION['USER_LOGGED']);
|
2017-12-04 13:25:35 +00:00
|
|
|
if (!$userAccess) {
|
|
|
|
|
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
|
|
|
|
|
G::header('location: ../login/login');
|
2016-06-08 10:46:58 -04:00
|
|
|
die();
|
|
|
|
|
}
|
|
|
|
|
|
2017-12-04 13:25:35 +00:00
|
|
|
$_SESSION = $filter->xssFilterHard($_SESSION, "url");
|
2012-10-19 17:17:53 -04:00
|
|
|
if ((int) $_SESSION['INDEX'] < 1) {
|
2015-03-16 17:26:48 -04:00
|
|
|
$_SERVER['HTTP_REFERER'] = $filter->xssFilterHard($_SERVER['HTTP_REFERER']);
|
2017-12-04 13:25:35 +00:00
|
|
|
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
|
|
|
|
|
G::header('location: ' . $_SERVER['HTTP_REFERER']);
|
2012-10-19 17:17:53 -04:00
|
|
|
die();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Menues */
|
|
|
|
|
$G_MAIN_MENU = 'processmaker';
|
|
|
|
|
$G_SUB_MENU = 'cases';
|
|
|
|
|
$G_ID_MENU_SELECTED = 'CASES';
|
|
|
|
|
$G_ID_SUB_MENU_SELECTED = 'CASES_TO_REVISE';
|
|
|
|
|
|
|
|
|
|
/* Prepare page before to show */
|
2017-12-04 13:25:35 +00:00
|
|
|
$oTemplatePower = new TemplatePower(PATH_TPL . 'cases/cases_Step.html');
|
2012-10-19 17:17:53 -04:00
|
|
|
$oTemplatePower->prepare();
|
|
|
|
|
$G_PUBLISH = new Publisher();
|
|
|
|
|
$oCase = new Cases();
|
2017-12-04 13:25:35 +00:00
|
|
|
$Fields = $oCase->loadCase($_SESSION['APPLICATION']);
|
2012-10-19 17:17:53 -04:00
|
|
|
|
2017-12-04 13:25:35 +00:00
|
|
|
$oHeadPublisher = headPublisher::getSingleton();
|
|
|
|
|
$oHeadPublisher->addScriptCode("
|
2012-07-18 19:07:08 -04:00
|
|
|
if (typeof parent != 'undefined') {
|
|
|
|
|
if (parent.showCaseNavigatorPanel) {
|
|
|
|
|
parent.showCaseNavigatorPanel('{$Fields['APP_STATUS']}');
|
2011-02-25 14:14:38 +00:00
|
|
|
}
|
2017-12-04 13:25:35 +00:00
|
|
|
}");
|
2012-07-18 19:07:08 -04:00
|
|
|
// DEPRECATED this script call is marked for removal since almost all the interface is extJS based
|
2017-12-04 13:25:35 +00:00
|
|
|
$oHeadPublisher->addScriptCode('
|
2011-03-25 09:14:06 -04:00
|
|
|
var Cse = {};
|
|
|
|
|
Cse.panels = {};
|
|
|
|
|
var leimnud = new maborak();
|
|
|
|
|
leimnud.make();
|
|
|
|
|
leimnud.Package.Load("rpc,drag,drop,panel,app,validator,fx,dom,abbr",{Instance:leimnud,Type:"module"});
|
|
|
|
|
leimnud.Package.Load("cases",{Type:"file",Absolute:true,Path:"/jscore/cases/core/cases.js"});
|
|
|
|
|
leimnud.Package.Load("cases_Step",{Type:"file",Absolute:true,Path:"/jscore/cases/core/cases_Step.js"});
|
|
|
|
|
leimnud.Package.Load("processmap",{Type:"file",Absolute:true,Path:"/jscore/processmap/core/processmap.js"});
|
|
|
|
|
leimnud.exec(leimnud.fix.memoryLeak);
|
|
|
|
|
leimnud.event.add(window,"load",function(){
|
2017-12-04 13:25:35 +00:00
|
|
|
' . (isset($_SESSION['showCasesWindow']) ? 'try{' . $_SESSION['showCasesWindow'] . '}catch(e){}' : '') . '
|
2010-12-02 23:34:41 +00:00
|
|
|
});
|
2017-12-04 13:25:35 +00:00
|
|
|
');
|
2012-07-18 19:07:08 -04:00
|
|
|
// DEPRECATED this script call is marked for removal
|
2017-12-04 13:25:35 +00:00
|
|
|
$G_PUBLISH->AddContent('template', '', '', '', $oTemplatePower);
|
2012-10-19 17:17:53 -04:00
|
|
|
|
2017-12-04 13:25:35 +00:00
|
|
|
if (! isset($_GET['type'])) {
|
2012-10-19 17:17:53 -04:00
|
|
|
$_GET['type'] = 'DYNAFORM';
|
|
|
|
|
}
|
2017-12-04 13:25:35 +00:00
|
|
|
if (! isset($_GET['position'])) {
|
2015-09-24 16:17:57 -04:00
|
|
|
$_GET['position'] = $_SESSION['STEP_POSITION'];
|
2017-12-04 13:25:35 +00:00
|
|
|
} else {
|
|
|
|
|
if ($_GET['type'] == 'DYNAFORM') {
|
2015-09-24 16:17:57 -04:00
|
|
|
$criteria = new Criteria();
|
|
|
|
|
|
|
|
|
|
$criteria->addSelectColumn(StepSupervisorPeer::STEP_POSITION);
|
|
|
|
|
$criteria->add(StepSupervisorPeer::PRO_UID, $_SESSION['PROCESS'], Criteria::EQUAL);
|
|
|
|
|
$criteria->add(StepSupervisorPeer::STEP_UID_OBJ, $_GET['DYN_UID'], Criteria::EQUAL);
|
|
|
|
|
|
|
|
|
|
$rsCriteria = StepSupervisorPeer::doSelectRS($criteria);
|
|
|
|
|
$rsCriteria->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
|
|
|
|
$rsCriteria->next();
|
2016-08-30 14:56:18 -04:00
|
|
|
$aRow = $rsCriteria->getRow();
|
2015-09-24 16:17:57 -04:00
|
|
|
|
|
|
|
|
$_GET['position'] = $aRow['STEP_POSITION'];
|
2017-12-04 13:25:35 +00:00
|
|
|
} else {
|
2015-09-24 16:17:57 -04:00
|
|
|
$_GET['position'] = 1;
|
|
|
|
|
}
|
2012-10-19 17:17:53 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$_SESSION['STEP_POSITION'] = (int) $_GET['position'];
|
|
|
|
|
|
2012-07-18 19:07:08 -04:00
|
|
|
//Obtain previous and next step - Start
|
2017-12-04 13:25:35 +00:00
|
|
|
if (isset($_GET['type'])) {
|
2012-10-19 17:17:53 -04:00
|
|
|
$sType = $_GET['type'];
|
|
|
|
|
} else {
|
|
|
|
|
$sType = '';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['PREVIOUS_STEP_LABEL'] = '';
|
|
|
|
|
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['NEXT_STEP_LABEL'] = '';
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Added By erik
|
|
|
|
|
* date: 16-05-08
|
|
|
|
|
* Description: this was added for the additional database connections
|
|
|
|
|
*/
|
2017-12-04 13:25:35 +00:00
|
|
|
if (! isset($_GET['ex'])) {
|
2016-08-26 17:24:26 -04:00
|
|
|
$_GET['ex'] = $_GET['position'];
|
|
|
|
|
}
|
|
|
|
|
|
2017-12-04 13:25:35 +00:00
|
|
|
$oDbConnections = new DbConnections($_SESSION['PROCESS']);
|
2012-10-19 17:17:53 -04:00
|
|
|
$oDbConnections->loadAdditionalConnections();
|
|
|
|
|
|
|
|
|
|
$G_PUBLISH = new Publisher();
|
|
|
|
|
if ($_GET['DYN_UID'] != '') {
|
|
|
|
|
$_SESSION['CURRENT_DYN_UID'] = $_GET['DYN_UID'];
|
2017-02-14 21:24:08 +00:00
|
|
|
|
2015-05-07 16:44:30 -04:00
|
|
|
$FieldsPmDynaform = $Fields;
|
|
|
|
|
$FieldsPmDynaform["PRO_UID"] = $_SESSION['PROCESS'];
|
|
|
|
|
$FieldsPmDynaform["CURRENT_DYNAFORM"] = $_GET['DYN_UID'];
|
2017-08-11 15:49:39 -04:00
|
|
|
$a = new PmDynaform($FieldsPmDynaform);
|
2015-05-07 16:44:30 -04:00
|
|
|
if ($a->isResponsive()) {
|
2022-12-15 12:47:29 -04:00
|
|
|
$a->printEditSupervisor(['DEL_INDEX' => $_GET['DEL_INDEX']]);
|
2017-12-04 13:25:35 +00:00
|
|
|
} else {
|
|
|
|
|
$G_PUBLISH->AddContent('dynaform', 'xmlform', $_SESSION['PROCESS'] . '/' . $_GET['DYN_UID'], '', $Fields['APP_DATA'], 'cases_SaveDataSupervisor?UID=' . $_GET['DYN_UID'] . '&ex=' . $_GET['ex']);
|
2015-05-07 16:44:30 -04:00
|
|
|
}
|
2012-10-19 17:17:53 -04:00
|
|
|
}
|
|
|
|
|
|
2017-12-04 13:25:35 +00:00
|
|
|
G::RenderPage('publish', 'blank');
|
2010-12-02 23:34:41 +00:00
|
|
|
?>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
/*------------------------------ To Revise Routines ---------------------------*/
|
2011-02-25 14:14:38 +00:00
|
|
|
// DEPRECATED this JS section is marked for removal
|
2010-12-02 23:34:41 +00:00
|
|
|
function setSelect()
|
|
|
|
|
{
|
2015-04-21 09:35:39 -04:00
|
|
|
var ex=<?php echo $filter->xssFilterHard($_GET['ex'])?>;
|
2012-07-18 18:38:53 -04:00
|
|
|
try {
|
|
|
|
|
for(i=1; i<50; i++) {
|
|
|
|
|
if (i == ex) {
|
2012-03-20 18:46:20 -04:00
|
|
|
document.getElementById('focus'+i).innerHTML = '<img src="/images/bulletButton.gif" />';
|
2012-07-18 18:38:53 -04:00
|
|
|
} else {
|
2012-03-20 18:46:20 -04:00
|
|
|
document.getElementById('focus'+i).innerHTML = '';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} catch (e){
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
2010-12-02 23:34:41 +00:00
|
|
|
}
|
2012-10-19 17:17:53 -04:00
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<?php
|