Merge remote-tracking branch 'upstream/3.0.1.7-Gmail' into BY-237
Conflicts: workflow/engine/methods/cases/cases_Derivate.php
This commit is contained in:
@@ -1374,7 +1374,10 @@ function copyMoveExecuteTree($uidFolder, $newUidFolder)
|
||||
{
|
||||
require_once ("classes/model/AppDocument.php");
|
||||
require_once ('classes/model/AppFolder.php');
|
||||
|
||||
if($newUidFolder==="root") {
|
||||
return $newUidFolder;
|
||||
}
|
||||
|
||||
$appFoder = new AppFolder ();
|
||||
$folderContent = $appFoder->getFolderContent($uidFolder);
|
||||
$folderOrigin = $appFoder->getFolderStructure($uidFolder);
|
||||
|
||||
@@ -49,7 +49,8 @@ if ($actionAjax == 'historyDynaformGrid_Ajax') {
|
||||
$oCase = new Cases();
|
||||
|
||||
$aProcesses = Array ();
|
||||
$c = $oCase->getallDynaformsCriteria( $_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['CURRENT_TASK'], $_SESSION['USER_LOGGED'] );
|
||||
$c = $oCase->getallDynaformsCriteria( $_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['CURRENT_TASK'],
|
||||
$_SESSION['USER_LOGGED'] , $_SESSION['INDEX']);
|
||||
|
||||
if ($c->getDbName() == 'dbarray') {
|
||||
$rs = ArrayBasePeer::doSelectRs( $c );
|
||||
|
||||
@@ -315,70 +315,15 @@ function getAllUsersArray ($action)
|
||||
return $users;
|
||||
}
|
||||
|
||||
function getStatusArray ($action, $userUid)
|
||||
function getStatusArray($action, $userUid)
|
||||
{
|
||||
global $oAppCache;
|
||||
$status = array ();
|
||||
$status[] = array ('',G::LoadTranslation( 'ID_ALL_STATUS' ));
|
||||
//get the list based in the action provided
|
||||
switch ($action) {
|
||||
case 'sent':
|
||||
$cStatus = $oAppCache->getSentListProcessCriteria( $userUid ); // a little slow
|
||||
break;
|
||||
case 'simple_search':
|
||||
case 'search':
|
||||
$cStatus = new Criteria( 'workflow' );
|
||||
$cStatus->clearSelectColumns();
|
||||
$cStatus->setDistinct();
|
||||
$cStatus->addSelectColumn( ApplicationPeer::APP_STATUS );
|
||||
$oDataset = ApplicationPeer::doSelectRS( $cStatus );
|
||||
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||
$oDataset->next();
|
||||
while ($aRow = $oDataset->getRow()) {
|
||||
$status[] = array ($aRow['APP_STATUS'],G::LoadTranslation( 'ID_CASES_STATUS_' . $aRow['APP_STATUS'] )
|
||||
); //here we can have a translation for the status ( the second param)
|
||||
$oDataset->next();
|
||||
}
|
||||
return $status;
|
||||
break;
|
||||
case 'selfservice':
|
||||
$cStatus = $oAppCache->getUnassignedListCriteria( $userUid );
|
||||
break;
|
||||
case 'paused':
|
||||
$cStatus = $oAppCache->getPausedListCriteria( $userUid );
|
||||
break;
|
||||
case 'to_revise':
|
||||
$cStatus = $oAppCache->getToReviseListCriteria( $userUid );
|
||||
// $cStatus = $oAppCache->getPausedListCriteria($userUid);
|
||||
break;
|
||||
case 'to_reassign':
|
||||
$cStatus = $oAppCache->getToReassignListCriteria($userUid);
|
||||
break;
|
||||
case 'todo':
|
||||
case 'draft':
|
||||
case 'gral':
|
||||
// case 'to_revise' :
|
||||
default:
|
||||
return $status;
|
||||
break;
|
||||
}
|
||||
|
||||
//get the status for this user in this action only for participated, unassigned, paused
|
||||
// if ( $action != 'todo' && $action != 'draft' && $action != 'to_revise') {
|
||||
if ($action != 'todo' && $action != 'draft') {
|
||||
//$cStatus = new Criteria('workflow');
|
||||
$cStatus->clearSelectColumns();
|
||||
$cStatus->setDistinct();
|
||||
$cStatus->addSelectColumn( AppCacheViewPeer::APP_STATUS );
|
||||
$oDataset = AppCacheViewPeer::doSelectRS( $cStatus, Propel::getDbConnection('workflow_ro') );
|
||||
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||
$oDataset->next();
|
||||
while ($aRow = $oDataset->getRow()) {
|
||||
$status[] = array ($aRow['APP_STATUS'],G::LoadTranslation( 'ID_CASES_STATUS_' . $aRow['APP_STATUS'] ));
|
||||
//here we can have a translation for the status ( the second param)
|
||||
$oDataset->next();
|
||||
}
|
||||
}
|
||||
$status = array();
|
||||
$status[] = array('', G::LoadTranslation('ID_ALL_STATUS'));
|
||||
$status[] = array('COMPLETED', G::LoadTranslation('ID_CASES_STATUS_COMPLETED'));
|
||||
$status[] = array('DRAFT', G::LoadTranslation('ID_CASES_STATUS_DRAFT'));
|
||||
$status[] = array('TO_DO', G::LoadTranslation('ID_CASES_STATUS_TO_DO'));
|
||||
$status[] = array('CANCELLED', G::LoadTranslation('ID_CASES_STATUS_CANCELLED'));
|
||||
|
||||
return $status;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
if (!isset($_SESSION['USER_LOGGED'])) {
|
||||
$response = new stdclass();
|
||||
$response = new stdClass();
|
||||
$response->message = G::LoadTranslation('ID_LOGIN_AGAIN');
|
||||
$response->lostSession = true;
|
||||
print G::json_encode( $response );
|
||||
print G::json_encode($response);
|
||||
die();
|
||||
}
|
||||
/**
|
||||
@@ -46,13 +46,13 @@ $_POST = $filter->xssFilterHard($_POST);
|
||||
$_REQUEST = $filter->xssFilterHard($_REQUEST);
|
||||
$_SESSION = $filter->xssFilterHard($_SESSION);
|
||||
|
||||
$actionAjax = isset( $_REQUEST['actionAjax'] ) ? $_REQUEST['actionAjax'] : null;
|
||||
$actionAjax = isset($_REQUEST['actionAjax']) ? $_REQUEST['actionAjax'] : null;
|
||||
|
||||
function filterUserListArray($users = array(), $filter = '')
|
||||
{
|
||||
$filteredUsers = array();
|
||||
foreach ($users as $user) {
|
||||
if(stripos($user['USR_FULLNAME'], $filter) || empty($filter)) {
|
||||
if (stripos($user['USR_FULLNAME'], $filter) || empty($filter)) {
|
||||
$filteredUsers[] = $user;
|
||||
}
|
||||
}
|
||||
@@ -62,15 +62,16 @@ function filterUserListArray($users = array(), $filter = '')
|
||||
if ($actionAjax == "userValues") {
|
||||
//global $oAppCache;
|
||||
$oAppCache = new AppCacheView();
|
||||
$action = isset( $_REQUEST['action'] ) ? $_REQUEST['action'] : null;
|
||||
$query = isset( $_REQUEST['query'] ) ? $_REQUEST['query'] : null;
|
||||
$action = isset($_REQUEST['action']) ? $_REQUEST['action'] : null;
|
||||
$query = isset($_REQUEST['query']) ? $_REQUEST['query'] : null;
|
||||
$users = array();
|
||||
$users[] = array ("USR_UID" => "", "USR_FULLNAME" => G::LoadTranslation( "ID_ALL_USERS" ));
|
||||
$users[] = array ("USR_UID" => "CURRENT_USER", "USR_FULLNAME" => G::LoadTranslation( "ID_CURRENT_USER" ));
|
||||
$users[] = array("USR_UID" => "", "USR_FULLNAME" => G::LoadTranslation("ID_ALL_USERS"));
|
||||
$users[] = array("USR_UID" => "CURRENT_USER", "USR_FULLNAME" => G::LoadTranslation("ID_CURRENT_USER"));
|
||||
$users = filterUserListArray($users, $query);
|
||||
//now get users, just for the Search action
|
||||
switch ($action) {
|
||||
case 'search_simple':
|
||||
case 'to_reassign':
|
||||
case 'search':
|
||||
G::LoadClass("configuration");
|
||||
|
||||
@@ -78,24 +79,24 @@ if ($actionAjax == "userValues") {
|
||||
|
||||
$confEnvSetting = $conf->getFormats();
|
||||
|
||||
$cUsers = new Criteria( 'workflow' );
|
||||
$cUsers = new Criteria('workflow');
|
||||
$cUsers->clearSelectColumns();
|
||||
$cUsers->addSelectColumn(UsersPeer::USR_UID);
|
||||
$cUsers->addSelectColumn(UsersPeer::USR_USERNAME);
|
||||
$cUsers->addSelectColumn(UsersPeer::USR_FIRSTNAME);
|
||||
$cUsers->addSelectColumn(UsersPeer::USR_LASTNAME);
|
||||
$cUsers->add( UsersPeer::USR_STATUS, 'CLOSED', Criteria::NOT_EQUAL );
|
||||
$cUsers->add(UsersPeer::USR_STATUS, 'CLOSED', Criteria::NOT_EQUAL);
|
||||
|
||||
if (!is_null($query)) {
|
||||
$filters = $cUsers->getNewCriterion( UsersPeer::USR_FIRSTNAME, '%'.$query.'%', Criteria::LIKE )->addOr(
|
||||
$cUsers->getNewCriterion( UsersPeer::USR_LASTNAME, '%'.$query.'%', Criteria::LIKE )->addOr(
|
||||
$cUsers->getNewCriterion( UsersPeer::USR_USERNAME, '%'.$query.'%', Criteria::LIKE )));
|
||||
$cUsers->addOr( $filters );
|
||||
$filters = $cUsers->getNewCriterion(UsersPeer::USR_FIRSTNAME, '%' . $query . '%', Criteria::LIKE)
|
||||
->addOr($cUsers->getNewCriterion(UsersPeer::USR_LASTNAME, '%' . $query . '%', Criteria::LIKE)
|
||||
->addOr($cUsers->getNewCriterion(UsersPeer::USR_USERNAME, '%' . $query . '%', Criteria::LIKE)));
|
||||
$cUsers->addAnd($filters);
|
||||
}
|
||||
$cUsers->setLimit(20);
|
||||
$cUsers->addAscendingOrderByColumn(UsersPeer::TABLE_NAME . "." . $conf->userNameFormatGetFirstFieldByUsersTable());
|
||||
$oDataset = UsersPeer::doSelectRS( $cUsers );
|
||||
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||
$oDataset = UsersPeer::doSelectRS($cUsers);
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
|
||||
while ($oDataset->next()) {
|
||||
$row = $oDataset->getRow();
|
||||
@@ -110,139 +111,65 @@ if ($actionAjax == "userValues") {
|
||||
break;
|
||||
}
|
||||
//return $users;
|
||||
return print G::json_encode( $users );
|
||||
return print G::json_encode($users);
|
||||
}
|
||||
|
||||
if ($actionAjax == "processListExtJs") {
|
||||
$action = isset( $_REQUEST['action'] ) ? $_REQUEST['action'] : null;
|
||||
$categoryUid = isset( $_REQUEST['CATEGORY_UID'] ) ? $_REQUEST['CATEGORY_UID'] : null;
|
||||
$userUid = (isset( $_SESSION['USER_LOGGED'] ) && $_SESSION['USER_LOGGED'] != '') ? $_SESSION['USER_LOGGED'] : null;
|
||||
$action = isset($_REQUEST['action']) ? $_REQUEST['action'] : null;
|
||||
$query = isset($_REQUEST['query']) ? $_REQUEST['query'] : null;
|
||||
$categoryUid = isset($_REQUEST['CATEGORY_UID']) ? $_REQUEST['CATEGORY_UID'] : null;
|
||||
$userUid = (isset($_SESSION['USER_LOGGED']) && $_SESSION['USER_LOGGED'] != '') ? $_SESSION['USER_LOGGED'] : null;
|
||||
|
||||
global $oAppCache;
|
||||
$oAppCache = new AppCacheView();
|
||||
$processes = Array ();
|
||||
$processes[] = array ('',G::LoadTranslation( 'ID_ALL_PROCESS' )
|
||||
);
|
||||
$processes = array();
|
||||
//in search action, the query to obtain all process is too slow, so we need to query directly to
|
||||
//process and content tables, and for that reason we need the current language in AppCacheView.
|
||||
$oConf = new Configurations();
|
||||
$oConf->loadConfig($x, 'APP_CACHE_VIEW_ENGINE', '', '', '', '');
|
||||
$appCacheViewEngine = $oConf->aConfig;
|
||||
$lang = isset($appCacheViewEngine['LANG']) ? $appCacheViewEngine['LANG'] : 'en';
|
||||
|
||||
//get the list based in the action provided
|
||||
switch ($action) {
|
||||
case 'draft':
|
||||
$cProcess = $oAppCache->getDraftListCriteria( $userUid ); //fast enough
|
||||
break;
|
||||
case 'sent':
|
||||
$cProcess = $oAppCache->getSentListProcessCriteria( $userUid ); // fast enough
|
||||
break;
|
||||
case 'simple_search':
|
||||
case 'search':
|
||||
//in search action, the query to obtain all process is too slow, so we need to query directly to
|
||||
//process and content tables, and for that reason we need the current language in AppCacheView.
|
||||
G::loadClass( 'configuration' );
|
||||
$oConf = new Configurations();
|
||||
$oConf->loadConfig( $x, 'APP_CACHE_VIEW_ENGINE', '', '', '', '' );
|
||||
$appCacheViewEngine = $oConf->aConfig;
|
||||
$lang = isset( $appCacheViewEngine['LANG'] ) ? $appCacheViewEngine['LANG'] : 'en';
|
||||
|
||||
$cProcess = new Criteria( 'workflow' );
|
||||
$cProcess->clearSelectColumns();
|
||||
$cProcess->addSelectColumn( ProcessPeer::PRO_UID );
|
||||
$cProcess->addSelectColumn( ContentPeer::CON_VALUE );
|
||||
if ($categoryUid) {
|
||||
$cProcess->add( ProcessPeer::PRO_CATEGORY, $categoryUid );
|
||||
}
|
||||
$del = DBAdapter::getStringDelimiter();
|
||||
$conds = array ();
|
||||
$conds[] = array (ProcessPeer::PRO_UID,ContentPeer::CON_ID);
|
||||
$conds[] = array (ContentPeer::CON_CATEGORY,$del . 'PRO_TITLE' . $del);
|
||||
$conds[] = array (ContentPeer::CON_LANG,$del . $lang . $del);
|
||||
$cProcess->addJoinMC( $conds, Criteria::LEFT_JOIN );
|
||||
$cProcess->add( ProcessPeer::PRO_STATUS, 'ACTIVE' );
|
||||
$cProcess->addAscendingOrderByColumn(ContentPeer::CON_VALUE);
|
||||
|
||||
$oDataset = ProcessPeer::doSelectRS( $cProcess );
|
||||
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||
$oDataset->next();
|
||||
|
||||
while ($aRow = $oDataset->getRow()) {
|
||||
$processes[] = array ($aRow['PRO_UID'],$aRow['CON_VALUE']
|
||||
);
|
||||
$oDataset->next();
|
||||
}
|
||||
return print G::json_encode( $processes );
|
||||
break;
|
||||
case 'unassigned':
|
||||
$cProcess = $oAppCache->getUnassignedListCriteria( $userUid );
|
||||
break;
|
||||
case 'paused':
|
||||
$cProcess = $oAppCache->getPausedListCriteria( $userUid );
|
||||
break;
|
||||
case 'to_revise':
|
||||
$cProcess = $oAppCache->getToReviseListCriteria( $userUid );
|
||||
break;
|
||||
case 'to_reassign':
|
||||
$cProcess = $oAppCache->getToReassignListCriteria($userUid);
|
||||
break;
|
||||
case 'gral':
|
||||
$cProcess = $oAppCache->getGeneralListCriteria();
|
||||
break;
|
||||
case 'todo':
|
||||
default:
|
||||
$cProcess = $oAppCache->getToDoListCriteria( $userUid ); //fast enough
|
||||
break;
|
||||
}
|
||||
$cProcess = new Criteria('workflow');
|
||||
//get the processes for this user in this action
|
||||
$cProcess->clearSelectColumns();
|
||||
$cProcess->addSelectColumn( AppCacheViewPeer::PRO_UID );
|
||||
$cProcess->addSelectColumn( AppCacheViewPeer::APP_PRO_TITLE );
|
||||
$cProcess->setDistinct( AppCacheViewPeer::PRO_UID );
|
||||
$cProcess->addSelectColumn(ProcessPeer::PRO_UID);
|
||||
$cProcess->addAsColumn('PRO_TITLE', ContentPeer::CON_VALUE);
|
||||
if ($categoryUid) {
|
||||
require_once 'classes/model/Process.php';
|
||||
$cProcess->addAlias( 'CP', 'PROCESS' );
|
||||
$cProcess->add( 'CP.PRO_CATEGORY', $categoryUid, Criteria::EQUAL );
|
||||
$cProcess->addJoin( AppCacheViewPeer::PRO_UID, 'CP.PRO_UID', Criteria::LEFT_JOIN );
|
||||
$cProcess->addAsColumn( 'CATEGORY_UID', 'CP.PRO_CATEGORY' );
|
||||
$cProcess->add(ProcessPeer::PRO_CATEGORY, $categoryUid);
|
||||
}
|
||||
|
||||
$cProcess->addAscendingOrderByColumn(AppCacheViewPeer::APP_PRO_TITLE);
|
||||
$del = \DBAdapter::getStringDelimiter();
|
||||
$conds = array();
|
||||
$conds[] = array(ProcessPeer::PRO_UID, ContentPeer::CON_ID);
|
||||
$conds[] = array(ContentPeer::CON_CATEGORY, $del . 'PRO_TITLE' . $del);
|
||||
$conds[] = array(ContentPeer::CON_LANG, $del . $lang . $del);
|
||||
$cProcess->addJoinMC($conds, Criteria::LEFT_JOIN);
|
||||
$cProcess->add(ProcessPeer::PRO_STATUS, 'ACTIVE');
|
||||
|
||||
$oDataset = AppCacheViewPeer::doSelectRS( $cProcess, Propel::getDbConnection('workflow_ro') );
|
||||
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||
$oDataset->next();
|
||||
|
||||
while ($aRow = $oDataset->getRow()) {
|
||||
$processes[] = array ($aRow['PRO_UID'],$aRow['APP_PRO_TITLE']
|
||||
);
|
||||
$oDataset->next();
|
||||
if (!is_null($query)) {
|
||||
$filters = $cProcess->getNewCriterion(ContentPeer::CON_VALUE, '%' . $query . '%', Criteria::LIKE);
|
||||
$cProcess->addAnd($filters);
|
||||
}
|
||||
return print G::json_encode( $processes );
|
||||
|
||||
$cProcess->addAscendingOrderByColumn(ContentPeer::CON_VALUE);
|
||||
|
||||
$oDataset = ProcessPeer::doSelectRS($cProcess);
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
|
||||
while ($oDataset->next()) {
|
||||
$aRow = $oDataset->getRow();
|
||||
$processes[] = $aRow;
|
||||
}
|
||||
return print G::json_encode($processes);
|
||||
}
|
||||
|
||||
if ($actionAjax == "getUsersToReassign") {
|
||||
$taskUid = $_POST['taskUid'];
|
||||
$search = $_POST['search'];
|
||||
$pageSize = $_POST['pageSize'];
|
||||
|
||||
$sortField = (isset($_POST['sort']))? $_POST['sort'] : '';
|
||||
$sortDir = (isset($_POST['dir']))? $_POST['dir'] : '';
|
||||
$start = (isset($_POST['start']))? $_POST['start'] : 0;
|
||||
$limit = (isset($_POST['limit']))? $_POST['limit'] : $pageSize;
|
||||
|
||||
$response = [];
|
||||
|
||||
try {
|
||||
$case = new \ProcessMaker\BusinessModel\Cases();
|
||||
|
||||
$result = $case->getUsersToReassign($_SESSION['USER_LOGGED'], $taskUid, ['filter' => $search], $sortField, $sortDir, $start, $limit);
|
||||
|
||||
$response['status'] = 'OK';
|
||||
$response['success'] = true;
|
||||
$response['resultTotal'] = $result['total'];
|
||||
$response['resultRoot'] = $result['data'];
|
||||
} catch (Exception $e) {
|
||||
$response['status'] = 'ERROR';
|
||||
$response['message'] = $e->getMessage();
|
||||
}
|
||||
|
||||
echo G::json_encode($response);
|
||||
$_SESSION['TASK'] = $_REQUEST['TAS_UID'];
|
||||
$case = new Cases();
|
||||
$task = new Task();
|
||||
$tasks = $task->load($_SESSION['TASK']);
|
||||
$result = new stdClass();
|
||||
$result->data = $case->getUsersToReassign($_SESSION['TASK'], $_SESSION['USER_LOGGED'], $_SESSION['PRO_UID']);
|
||||
print G::json_encode($result);
|
||||
}
|
||||
if ($actionAjax == 'reassignCase') {
|
||||
|
||||
@@ -259,47 +186,48 @@ if ($actionAjax == 'reassignCase') {
|
||||
$TO_USR_UID = $_POST['USR_UID'];
|
||||
|
||||
try {
|
||||
$cases->reassignCase( $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['USER_LOGGED'], $TO_USR_UID );
|
||||
$caseData = $app->load( $_SESSION['APPLICATION'] );
|
||||
$userData = $user->load( $TO_USR_UID );
|
||||
$cases->reassignCase($_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['USER_LOGGED'], $TO_USR_UID);
|
||||
$caseData = $app->load($_SESSION['APPLICATION']);
|
||||
$userData = $user->load($TO_USR_UID);
|
||||
//print_r($caseData);
|
||||
$data['APP_NUMBER'] = $caseData['APP_NUMBER'];
|
||||
$data['USER'] = $userData['USR_LASTNAME'] . ' ' . $userData['USR_FIRSTNAME']; //TODO change with the farmated username from environment conf
|
||||
$result = new stdclass();
|
||||
$result = new stdClass();
|
||||
$result->status = 0;
|
||||
$result->msg = G::LoadTranslation( 'ID_REASSIGNMENT_SUCCESS', SYS_LANG, $data );
|
||||
$result->msg = G::LoadTranslation('ID_REASSIGNMENT_SUCCESS', SYS_LANG, $data);
|
||||
} catch (Exception $e) {
|
||||
$result->status = 1;
|
||||
$result->msg = $e->getMessage();
|
||||
}
|
||||
|
||||
print G::json_encode( $result );
|
||||
print G::json_encode($result);
|
||||
|
||||
}
|
||||
|
||||
if ($actionAjax == 'showHistoryMessage') {
|
||||
?>
|
||||
<link rel="stylesheet" type="text/css" href="/css/classic.css" />
|
||||
<link rel="stylesheet" type="text/css" href="/css/classic.css"/>
|
||||
<style type="text/css">
|
||||
html {
|
||||
color: black !important;
|
||||
}
|
||||
html {
|
||||
color: black !important;
|
||||
}
|
||||
|
||||
body {
|
||||
color: black !important;
|
||||
}
|
||||
body {
|
||||
color: black !important;
|
||||
}
|
||||
</style>
|
||||
<script language="Javascript">
|
||||
//!Code that simulated reload library javascript maborak
|
||||
var leimnud = {};
|
||||
leimnud.exec = "";
|
||||
leimnud.fix = {};
|
||||
leimnud.fix.memoryLeak = "";
|
||||
leimnud.fix.memoryLeak = "";
|
||||
leimnud.browser = {};
|
||||
leimnud.browser.isIphone = "";
|
||||
leimnud.browser.isIphone = "";
|
||||
leimnud.iphone = {};
|
||||
leimnud.iphone.make = function(){};
|
||||
function ajax_function(ajax_server, funcion, parameters, method){
|
||||
leimnud.iphone.make = function(){
|
||||
};
|
||||
function ajax_function(ajax_server, funcion, parameters, method) {
|
||||
}
|
||||
//!
|
||||
</script>
|
||||
@@ -314,19 +242,22 @@ if ($actionAjax == 'showHistoryMessage') {
|
||||
$G_PUBLISH = new Publisher();
|
||||
$oCase = new Cases();
|
||||
|
||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_MessagesView', '', $oCase->getHistoryMessagesTrackerView( $_POST['APP_UID'], $_POST['APP_MSG_UID'] ) );
|
||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'cases/cases_MessagesView', '', $oCase->getHistoryMessagesTrackerView($_POST['APP_UID'], $_POST['APP_MSG_UID']));
|
||||
|
||||
?>
|
||||
|
||||
|
||||
?>
|
||||
<script language="javascript">
|
||||
<?php
|
||||
global $G_FORM;
|
||||
?>
|
||||
function loadForm_<?php echo $G_FORM->id;?>(parametro1){
|
||||
}
|
||||
<?php
|
||||
global $G_FORM;
|
||||
?>
|
||||
function loadForm_<?php echo $G_FORM->id;?>(parametro1){
|
||||
}
|
||||
</script>
|
||||
<?php
|
||||
|
||||
G::RenderPage( 'publish', 'raw' );
|
||||
G::RenderPage('publish', 'raw');
|
||||
}
|
||||
|
||||
if ($actionAjax == 'showDynaformListHistory') {
|
||||
@@ -338,170 +269,204 @@ if ($actionAjax == 'showDynaformListHistory') {
|
||||
$_POST["TAS_UID"] = $_REQUEST["TAS_UID"];
|
||||
|
||||
?>
|
||||
<link rel="stylesheet" type="text/css" href="/css/classic.css" />
|
||||
<link rel="stylesheet" type="text/css" href="/css/classic.css"/>
|
||||
<style type="text/css">
|
||||
html {
|
||||
color: black !important;
|
||||
}
|
||||
body {
|
||||
color: black !important;
|
||||
}
|
||||
html {
|
||||
color: black !important;
|
||||
}
|
||||
body {
|
||||
color: black !important;
|
||||
}
|
||||
</style>
|
||||
<script language="Javascript">
|
||||
globalMd5Return=function(s,raw,hexcase,chrsz) {
|
||||
raw=raw||false;
|
||||
hexcase=hexcase||false;
|
||||
chrsz=chrsz||8;
|
||||
function safe_add(x,y) {
|
||||
var lsw=(x&0xFFFF)+(y&0xFFFF);
|
||||
var msw=(x>>16)+(y>>16)+(lsw>>16);
|
||||
return(msw<<16)|(lsw&0xFFFF)
|
||||
globalMd5Return = function (s, raw, hexcase, chrsz) {
|
||||
raw = raw || false;
|
||||
hexcase = hexcase || false;
|
||||
chrsz = chrsz || 8;
|
||||
function safe_add(x, y) {
|
||||
var lsw = (x & 0xFFFF) + (y & 0xFFFF);
|
||||
var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
|
||||
return (msw << 16) | (lsw & 0xFFFF);
|
||||
}
|
||||
|
||||
function bit_rol(num, cnt) {
|
||||
return (num << cnt) | (num >>> (32 - cnt));
|
||||
}
|
||||
|
||||
function md5_cmn(q, a, b, x, s, t) {
|
||||
return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s), b);
|
||||
}
|
||||
|
||||
function md5_ff(a, b, c, d, x, s, t) {
|
||||
return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t);
|
||||
}
|
||||
|
||||
function md5_gg(a, b, c, d, x, s, t) {
|
||||
return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t);
|
||||
}
|
||||
|
||||
function md5_hh(a, b, c, d, x, s, t) {
|
||||
return md5_cmn(b ^ c ^ d, a, b, x, s, t);
|
||||
}
|
||||
|
||||
function md5_ii(a, b, c, d, x, s, t) {
|
||||
return md5_cmn(c ^ (b | (~d)), a, b, x, s, t);
|
||||
}
|
||||
|
||||
function core_md5(x, len) {
|
||||
x[len >> 5] |= 0x80 << ((len) % 32);
|
||||
x[(((len + 64) >>> 9) << 4) + 14] = len;
|
||||
var a = 1732584193;
|
||||
var b = -271733879;
|
||||
var c = -1732584194;
|
||||
var d = 271733878;
|
||||
for (var i = 0; i < x.length; i += 16) {
|
||||
var olda = a;
|
||||
var oldb = b;
|
||||
var oldc = c;
|
||||
var oldd = d;
|
||||
a = md5_ff(a, b, c, d, x[i + 0], 7, -680876936);
|
||||
d = md5_ff(d, a, b, c, x[i + 1], 12, -389564586);
|
||||
c = md5_ff(c, d, a, b, x[i + 2], 17, 606105819);
|
||||
b = md5_ff(b, c, d, a, x[i + 3], 22, -1044525330);
|
||||
a = md5_ff(a, b, c, d, x[i + 4], 7, -176418897);
|
||||
d = md5_ff(d, a, b, c, x[i + 5], 12, 1200080426);
|
||||
c = md5_ff(c, d, a, b, x[i + 6], 17, -1473231341);
|
||||
b = md5_ff(b, c, d, a, x[i + 7], 22, -45705983);
|
||||
a = md5_ff(a, b, c, d, x[i + 8], 7, 1770035416);
|
||||
d = md5_ff(d, a, b, c, x[i + 9], 12, -1958414417);
|
||||
c = md5_ff(c, d, a, b, x[i + 10], 17, -42063);
|
||||
b = md5_ff(b, c, d, a, x[i + 11], 22, -1990404162);
|
||||
a = md5_ff(a, b, c, d, x[i + 12], 7, 1804603682);
|
||||
d = md5_ff(d, a, b, c, x[i + 13], 12, -40341101);
|
||||
c = md5_ff(c, d, a, b, x[i + 14], 17, -1502002290);
|
||||
b = md5_ff(b, c, d, a, x[i + 15], 22, 1236535329);
|
||||
a = md5_gg(a, b, c, d, x[i + 1], 5, -165796510);
|
||||
d = md5_gg(d, a, b, c, x[i + 6], 9, -1069501632);
|
||||
c = md5_gg(c, d, a, b, x[i + 11], 14, 643717713);
|
||||
b = md5_gg(b, c, d, a, x[i + 0], 20, -373897302);
|
||||
a = md5_gg(a, b, c, d, x[i + 5], 5, -701558691);
|
||||
d = md5_gg(d, a, b, c, x[i + 10], 9, 38016083);
|
||||
c = md5_gg(c, d, a, b, x[i + 15], 14, -660478335);
|
||||
b = md5_gg(b, c, d, a, x[i + 4], 20, -405537848);
|
||||
a = md5_gg(a, b, c, d, x[i + 9], 5, 568446438);
|
||||
d = md5_gg(d, a, b, c, x[i + 14], 9, -1019803690);
|
||||
c = md5_gg(c, d, a, b, x[i + 3], 14, -187363961);
|
||||
b = md5_gg(b, c, d, a, x[i + 8], 20, 1163531501);
|
||||
a = md5_gg(a, b, c, d, x[i + 13], 5, -1444681467);
|
||||
d = md5_gg(d, a, b, c, x[i + 2], 9, -51403784);
|
||||
c = md5_gg(c, d, a, b, x[i + 7], 14, 1735328473);
|
||||
b = md5_gg(b, c, d, a, x[i + 12], 20, -1926607734);
|
||||
a = md5_hh(a, b, c, d, x[i + 5], 4, -378558);
|
||||
d = md5_hh(d, a, b, c, x[i + 8], 11, -2022574463);
|
||||
c = md5_hh(c, d, a, b, x[i + 11], 16, 1839030562);
|
||||
b = md5_hh(b, c, d, a, x[i + 14], 23, -35309556);
|
||||
a = md5_hh(a, b, c, d, x[i + 1], 4, -1530992060);
|
||||
d = md5_hh(d, a, b, c, x[i + 4], 11, 1272893353);
|
||||
c = md5_hh(c, d, a, b, x[i + 7], 16, -155497632);
|
||||
b = md5_hh(b, c, d, a, x[i + 10], 23, -1094730640);
|
||||
a = md5_hh(a, b, c, d, x[i + 13], 4, 681279174);
|
||||
d = md5_hh(d, a, b, c, x[i + 0], 11, -358537222);
|
||||
c = md5_hh(c, d, a, b, x[i + 3], 16, -722521979);
|
||||
b = md5_hh(b, c, d, a, x[i + 6], 23, 76029189);
|
||||
a = md5_hh(a, b, c, d, x[i + 9], 4, -640364487);
|
||||
d = md5_hh(d, a, b, c, x[i + 12], 11, -421815835);
|
||||
c = md5_hh(c, d, a, b, x[i + 15], 16, 530742520);
|
||||
b = md5_hh(b, c, d, a, x[i + 2], 23, -995338651);
|
||||
a = md5_ii(a, b, c, d, x[i + 0], 6, -198630844);
|
||||
d = md5_ii(d, a, b, c, x[i + 7], 10, 1126891415);
|
||||
c = md5_ii(c, d, a, b, x[i + 14], 15, -1416354905);
|
||||
b = md5_ii(b, c, d, a, x[i + 5], 21, -57434055);
|
||||
a = md5_ii(a, b, c, d, x[i + 12], 6, 1700485571);
|
||||
d = md5_ii(d, a, b, c, x[i + 3], 10, -1894986606);
|
||||
c = md5_ii(c, d, a, b, x[i + 10], 15, -1051523);
|
||||
b = md5_ii(b, c, d, a, x[i + 1], 21, -2054922799);
|
||||
a = md5_ii(a, b, c, d, x[i + 8], 6, 1873313359);
|
||||
d = md5_ii(d, a, b, c, x[i + 15], 10, -30611744);
|
||||
c = md5_ii(c, d, a, b, x[i + 6], 15, -1560198380);
|
||||
b = md5_ii(b, c, d, a, x[i + 13], 21, 1309151649);
|
||||
a = md5_ii(a, b, c, d, x[i + 4], 6, -145523070);
|
||||
d = md5_ii(d, a, b, c, x[i + 11], 10, -1120210379);
|
||||
c = md5_ii(c, d, a, b, x[i + 2], 15, 718787259);
|
||||
b = md5_ii(b, c, d, a, x[i + 9], 21, -343485551);
|
||||
a = safe_add(a, olda);
|
||||
b = safe_add(b, oldb);
|
||||
c = safe_add(c, oldc);
|
||||
d = safe_add(d, oldd);
|
||||
}
|
||||
function bit_rol(num,cnt) {
|
||||
return(num<<cnt)|(num>>>(32-cnt))
|
||||
return [a, b, c, d];
|
||||
}
|
||||
|
||||
function str2binl(str) {
|
||||
var bin = [];
|
||||
var mask = (1 << chrsz) - 1;
|
||||
for (var i = 0; i < str.length * chrsz; i += chrsz) {
|
||||
bin[i >> 5] |= (str.charCodeAt(i / chrsz) & mask) << (i % 32);
|
||||
}
|
||||
function md5_cmn(q,a,b,x,s,t) {
|
||||
return safe_add(bit_rol(safe_add(safe_add(a,q),safe_add(x,t)),s),b)
|
||||
return bin;
|
||||
}
|
||||
|
||||
function binl2str(bin) {
|
||||
var str = "";
|
||||
var mask = (1 << chrsz) - 1;
|
||||
for (var i = 0; i < bin.length * 32; i += chrsz) {
|
||||
str += String.fromCharCode((bin[i >> 5] >>> (i % 32)) & mask);
|
||||
}
|
||||
function md5_ff(a,b,c,d,x,s,t) {
|
||||
return md5_cmn((b&c)|((~b)&d),a,b,x,s,t)
|
||||
}
|
||||
function md5_gg(a,b,c,d,x,s,t) {
|
||||
return md5_cmn((b&d)|(c&(~d)),a,b,x,s,t)
|
||||
}
|
||||
function md5_hh(a,b,c,d,x,s,t) {
|
||||
return md5_cmn(b^c^d,a,b,x,s,t)
|
||||
}
|
||||
function md5_ii(a,b,c,d,x,s,t) {
|
||||
return md5_cmn(c^(b|(~d)),a,b,x,s,t)
|
||||
}
|
||||
function core_md5(x,len) {
|
||||
x[len>>5]|=0x80<<((len)%32);
|
||||
x[(((len+64)>>>9)<<4)+14]=len;
|
||||
var a=1732584193;
|
||||
var b=-271733879;
|
||||
var c=-1732584194;
|
||||
var d=271733878;
|
||||
for(var i=0;i<x.length;i+=16) {
|
||||
var olda=a;
|
||||
var oldb=b;
|
||||
var oldc=c;
|
||||
var oldd=d;
|
||||
a=md5_ff(a,b,c,d,x[i+0],7,-680876936);
|
||||
d=md5_ff(d,a,b,c,x[i+1],12,-389564586);
|
||||
c=md5_ff(c,d,a,b,x[i+2],17,606105819);
|
||||
b=md5_ff(b,c,d,a,x[i+3],22,-1044525330);
|
||||
a=md5_ff(a,b,c,d,x[i+4],7,-176418897);
|
||||
d=md5_ff(d,a,b,c,x[i+5],12,1200080426);
|
||||
c=md5_ff(c,d,a,b,x[i+6],17,-1473231341);
|
||||
b=md5_ff(b,c,d,a,x[i+7],22,-45705983);
|
||||
a=md5_ff(a,b,c,d,x[i+8],7,1770035416);
|
||||
d=md5_ff(d,a,b,c,x[i+9],12,-1958414417);
|
||||
c=md5_ff(c,d,a,b,x[i+10],17,-42063);
|
||||
b=md5_ff(b,c,d,a,x[i+11],22,-1990404162);
|
||||
a=md5_ff(a,b,c,d,x[i+12],7,1804603682);
|
||||
d=md5_ff(d,a,b,c,x[i+13],12,-40341101);
|
||||
c=md5_ff(c,d,a,b,x[i+14],17,-1502002290);
|
||||
b=md5_ff(b,c,d,a,x[i+15],22,1236535329);
|
||||
a=md5_gg(a,b,c,d,x[i+1],5,-165796510);
|
||||
d=md5_gg(d,a,b,c,x[i+6],9,-1069501632);
|
||||
c=md5_gg(c,d,a,b,x[i+11],14,643717713);
|
||||
b=md5_gg(b,c,d,a,x[i+0],20,-373897302);
|
||||
a=md5_gg(a,b,c,d,x[i+5],5,-701558691);
|
||||
d=md5_gg(d,a,b,c,x[i+10],9,38016083);
|
||||
c=md5_gg(c,d,a,b,x[i+15],14,-660478335);
|
||||
b=md5_gg(b,c,d,a,x[i+4],20,-405537848);
|
||||
a=md5_gg(a,b,c,d,x[i+9],5,568446438);
|
||||
d=md5_gg(d,a,b,c,x[i+14],9,-1019803690);
|
||||
c=md5_gg(c,d,a,b,x[i+3],14,-187363961);
|
||||
b=md5_gg(b,c,d,a,x[i+8],20,1163531501);
|
||||
a=md5_gg(a,b,c,d,x[i+13],5,-1444681467);
|
||||
d=md5_gg(d,a,b,c,x[i+2],9,-51403784);
|
||||
c=md5_gg(c,d,a,b,x[i+7],14,1735328473);
|
||||
b=md5_gg(b,c,d,a,x[i+12],20,-1926607734);
|
||||
a=md5_hh(a,b,c,d,x[i+5],4,-378558);
|
||||
d=md5_hh(d,a,b,c,x[i+8],11,-2022574463);
|
||||
c=md5_hh(c,d,a,b,x[i+11],16,1839030562);
|
||||
b=md5_hh(b,c,d,a,x[i+14],23,-35309556);
|
||||
a=md5_hh(a,b,c,d,x[i+1],4,-1530992060);
|
||||
d=md5_hh(d,a,b,c,x[i+4],11,1272893353);
|
||||
c=md5_hh(c,d,a,b,x[i+7],16,-155497632);
|
||||
b=md5_hh(b,c,d,a,x[i+10],23,-1094730640);
|
||||
a=md5_hh(a,b,c,d,x[i+13],4,681279174);
|
||||
d=md5_hh(d,a,b,c,x[i+0],11,-358537222);
|
||||
c=md5_hh(c,d,a,b,x[i+3],16,-722521979);
|
||||
b=md5_hh(b,c,d,a,x[i+6],23,76029189);
|
||||
a=md5_hh(a,b,c,d,x[i+9],4,-640364487);
|
||||
d=md5_hh(d,a,b,c,x[i+12],11,-421815835);
|
||||
c=md5_hh(c,d,a,b,x[i+15],16,530742520);
|
||||
b=md5_hh(b,c,d,a,x[i+2],23,-995338651);
|
||||
a=md5_ii(a,b,c,d,x[i+0],6,-198630844);
|
||||
d=md5_ii(d,a,b,c,x[i+7],10,1126891415);
|
||||
c=md5_ii(c,d,a,b,x[i+14],15,-1416354905);
|
||||
b=md5_ii(b,c,d,a,x[i+5],21,-57434055);
|
||||
a=md5_ii(a,b,c,d,x[i+12],6,1700485571);
|
||||
d=md5_ii(d,a,b,c,x[i+3],10,-1894986606);
|
||||
c=md5_ii(c,d,a,b,x[i+10],15,-1051523);
|
||||
b=md5_ii(b,c,d,a,x[i+1],21,-2054922799);
|
||||
a=md5_ii(a,b,c,d,x[i+8],6,1873313359);
|
||||
d=md5_ii(d,a,b,c,x[i+15],10,-30611744);
|
||||
c=md5_ii(c,d,a,b,x[i+6],15,-1560198380);
|
||||
b=md5_ii(b,c,d,a,x[i+13],21,1309151649);
|
||||
a=md5_ii(a,b,c,d,x[i+4],6,-145523070);
|
||||
d=md5_ii(d,a,b,c,x[i+11],10,-1120210379);
|
||||
c=md5_ii(c,d,a,b,x[i+2],15,718787259);
|
||||
b=md5_ii(b,c,d,a,x[i+9],21,-343485551);
|
||||
a=safe_add(a,olda);b=safe_add(b,oldb);
|
||||
c=safe_add(c,oldc);d=safe_add(d,oldd)
|
||||
}
|
||||
return[a,b,c,d]
|
||||
}
|
||||
function str2binl(str){var bin=[];var mask=(1<<chrsz)-1;for(var i=0;i<str.length*chrsz;i+=chrsz){bin[i>>5]|=(str.charCodeAt(i/chrsz)&mask)<<(i%32)}
|
||||
return bin}
|
||||
function binl2str(bin){var str="";var mask=(1<<chrsz)-1;for(var i=0;i<bin.length*32;i+=chrsz){str+=String.fromCharCode((bin[i>>5]>>>(i%32))&mask)}return str}
|
||||
function binl2hex(binarray){var hex_tab=hexcase?"0123456789ABCDEF":"0123456789abcdef";var str="";for(var i=0;i<binarray.length*4;i++){str+=hex_tab.charAt((binarray[i>>2]>>((i%4)*8+4))&0xF)+hex_tab.charAt((binarray[i>>2]>>((i%4)*8))&0xF)}
|
||||
return str}
|
||||
return(raw?binl2str(core_md5(str2binl(s),s.length*chrsz)):binl2hex(core_md5(str2binl(s),s.length*chrsz)))};
|
||||
return str;
|
||||
}
|
||||
|
||||
function binl2hex(binarray) {
|
||||
var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef";
|
||||
var str = "";
|
||||
for (var i = 0; i < binarray.length * 4; i++) {
|
||||
str += hex_tab.charAt((binarray[i >> 2] >> ((i % 4) * 8 + 4)) & 0xF) + hex_tab.charAt((binarray[i >> 2] >> ((i % 4) * 8)) & 0xF);
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
return (raw ? binl2str(core_md5(str2binl(s), s.length * chrsz)) : binl2hex(core_md5(str2binl(s), s.length * chrsz)));
|
||||
};
|
||||
|
||||
//!Code that simulated reload library javascript maborak
|
||||
var leimnud = {};
|
||||
leimnud.exec = "";
|
||||
leimnud.fix = {};
|
||||
leimnud.fix.memoryLeak = "";
|
||||
leimnud.fix.memoryLeak = "";
|
||||
leimnud.browser = {};
|
||||
leimnud.browser.isIphone = "";
|
||||
leimnud.browser.isIphone = "";
|
||||
leimnud.iphone = {};
|
||||
leimnud.iphone.make = function(){};
|
||||
function ajax_function(ajax_server, funcion, parameters, method){
|
||||
}
|
||||
leimnud.iphone.make = function () {
|
||||
};
|
||||
function ajax_function(ajax_server, funcion, parameters, method) {
|
||||
}
|
||||
|
||||
function toggleTable(tablename){
|
||||
function toggleTable(tablename) {
|
||||
//table= document.getElementByName(tablename);
|
||||
table= document.getElementById(tablename);
|
||||
if(table.style.display == ''){
|
||||
table.style.display = 'none';
|
||||
}else{
|
||||
table.style.display = '';
|
||||
table = document.getElementById(tablename);
|
||||
if (table.style.display == '') {
|
||||
table.style.display = 'none';
|
||||
} else {
|
||||
table.style.display = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function noesFuncion(idIframe) {
|
||||
function noesFuncion(idIframe) {
|
||||
window.parent.tabIframeWidthFix2(idIframe);
|
||||
}
|
||||
}
|
||||
|
||||
function onResizeIframe(idIframe){
|
||||
function onResizeIframe(idIframe) {
|
||||
|
||||
|
||||
window.onresize = noesFuncion(idIframe);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
var showDynaformHistoryGlobal = {};
|
||||
showDynaformHistoryGlobal.dynUID = '';
|
||||
showDynaformHistoryGlobal.tablename = '';
|
||||
showDynaformHistoryGlobal.dynDate = '';
|
||||
showDynaformHistoryGlobal.dynTitle = '';
|
||||
function showDynaformHistory(dynUID,tablename,dynDate,dynTitle){
|
||||
function showDynaformHistory(dynUID, tablename, dynDate, dynTitle) {
|
||||
showDynaformHistoryGlobal.dynUID = dynUID;
|
||||
showDynaformHistoryGlobal.tablename = tablename;
|
||||
showDynaformHistoryGlobal.dynDate = dynDate;
|
||||
@@ -512,54 +477,56 @@ if ($actionAjax == 'showDynaformListHistory') {
|
||||
var dynDate = showDynaformHistoryGlobal.dynDate;
|
||||
var dynTitle = showDynaformHistoryGlobal.dynTitle;
|
||||
|
||||
var idUnique = globalMd5Return(dynUID+tablename+dynDate+dynTitle);
|
||||
var idUnique = globalMd5Return(dynUID + tablename + dynDate + dynTitle);
|
||||
|
||||
var tabData = window.parent.Ext.util.JSON.encode(showDynaformHistoryGlobal);
|
||||
var tabName = 'dynaformChangeLogViewHistory'+idUnique;
|
||||
var tabTitle = 'View('+dynTitle+' '+dynDate+')';
|
||||
var tabData = window.parent.Ext.util.JSON.encode(showDynaformHistoryGlobal);
|
||||
var tabName = 'dynaformChangeLogViewHistory' + idUnique;
|
||||
var tabTitle = 'View(' + dynTitle + ' ' + dynDate + ')';
|
||||
|
||||
window.parent.ActionTabFrameGlobal.tabData = tabData;
|
||||
window.parent.ActionTabFrameGlobal.tabName = tabName;
|
||||
window.parent.ActionTabFrameGlobal.tabTitle = tabTitle;
|
||||
|
||||
window.parent.Actions.tabFrame(tabName);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<?php
|
||||
|
||||
require_once 'classes/model/AppHistory.php';
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent( 'view', 'cases/cases_DynaformHistory' );
|
||||
$G_PUBLISH->AddContent('view', 'cases/cases_DynaformHistory');
|
||||
|
||||
G::RenderPage( 'publish', 'raw' );
|
||||
G::RenderPage('publish', 'raw');
|
||||
}
|
||||
|
||||
if ($actionAjax == 'dynaformChangeLogViewHistory') {
|
||||
|
||||
?>
|
||||
<link rel="stylesheet" type="text/css" href="/css/classic.css" />
|
||||
<link rel="stylesheet" type="text/css" href="/css/classic.css"/>
|
||||
<style type="text/css">
|
||||
html {
|
||||
color: black !important;
|
||||
}
|
||||
body {
|
||||
color: black !important;
|
||||
}
|
||||
html {
|
||||
color: black !important;
|
||||
}
|
||||
|
||||
body {
|
||||
color: black !important;
|
||||
}
|
||||
</style>
|
||||
<script language="Javascript">
|
||||
//!Code that simulated reload library javascript maborak
|
||||
var leimnud = {};
|
||||
leimnud.exec = "";
|
||||
leimnud.fix = {};
|
||||
leimnud.fix.memoryLeak = "";
|
||||
leimnud.fix.memoryLeak = "";
|
||||
leimnud.browser = {};
|
||||
leimnud.browser.isIphone = "";
|
||||
leimnud.browser.isIphone = "";
|
||||
leimnud.iphone = {};
|
||||
leimnud.iphone.make = function(){};
|
||||
function ajax_function(ajax_server, funcion, parameters, method){
|
||||
leimnud.iphone.make = function () {
|
||||
};
|
||||
function ajax_function(ajax_server, funcion, parameters, method) {
|
||||
}
|
||||
//!
|
||||
</script>
|
||||
</script>
|
||||
<?php
|
||||
|
||||
$_POST['DYN_UID'] = $_REQUEST['DYN_UID'];
|
||||
@@ -573,43 +540,46 @@ if ($actionAjax == 'dynaformChangeLogViewHistory') {
|
||||
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['NEXT_STEP_LABEL'] = '';
|
||||
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['NEXT_STEP'] = '#';
|
||||
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['NEXT_ACTION'] = 'return false;';
|
||||
$G_PUBLISH->AddContent( 'dynaform', 'xmlform', $_SESSION['PROCESS'] . '/' . $_POST['DYN_UID'], '', $Fields['APP_DATA'], '', '', 'view' );
|
||||
$G_PUBLISH->AddContent('dynaform', 'xmlform', $_SESSION['PROCESS'] . '/' . $_POST['DYN_UID'], '',
|
||||
$Fields['APP_DATA'], '', '', 'view');
|
||||
|
||||
?>
|
||||
<script language="javascript">
|
||||
<?php
|
||||
global $G_FORM;
|
||||
?>
|
||||
function loadForm_<?php echo $G_FORM->id;?>(parametro1){
|
||||
<?php
|
||||
global $G_FORM;
|
||||
?>
|
||||
function loadForm_<?php echo $G_FORM->id;?>(parametro1) {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<?php
|
||||
G::RenderPage( 'publish', 'raw' );
|
||||
G::RenderPage('publish', 'raw');
|
||||
}
|
||||
if ($actionAjax == 'historyDynaformGridPreview') {
|
||||
?>
|
||||
<link rel="stylesheet" type="text/css" href="/css/classic.css" />
|
||||
<link rel="stylesheet" type="text/css" href="/css/classic.css"/>
|
||||
<style type="text/css">
|
||||
html {
|
||||
color: black !important;
|
||||
}
|
||||
body {
|
||||
color: black !important;
|
||||
}
|
||||
html {
|
||||
color: black !important;
|
||||
}
|
||||
|
||||
body {
|
||||
color: black !important;
|
||||
}
|
||||
</style>
|
||||
<script language="Javascript">
|
||||
|
||||
//!Code that simulated reload library javascript maborak
|
||||
//!Code that simulated reload library javascript maborak
|
||||
var leimnud = {};
|
||||
leimnud.exec = "";
|
||||
leimnud.fix = {};
|
||||
leimnud.fix.memoryLeak = "";
|
||||
leimnud.fix.memoryLeak = "";
|
||||
leimnud.browser = {};
|
||||
leimnud.browser.isIphone = "";
|
||||
leimnud.browser.isIphone = "";
|
||||
leimnud.iphone = {};
|
||||
leimnud.iphone.make = function(){};
|
||||
function ajax_function(ajax_server, funcion, parameters, method){
|
||||
leimnud.iphone.make = function () {
|
||||
};
|
||||
function ajax_function(ajax_server, funcion, parameters, method) {
|
||||
}
|
||||
//!
|
||||
</script>
|
||||
@@ -618,28 +588,28 @@ if ($actionAjax == 'historyDynaformGridPreview') {
|
||||
//!dataIndex
|
||||
$_POST["DYN_UID"] = $_REQUEST["DYN_UID"];
|
||||
|
||||
G::LoadClass( 'case' );
|
||||
|
||||
$G_PUBLISH = new Publisher();
|
||||
$oCase = new Cases();
|
||||
$Fields = $oCase->loadCase( $_SESSION['APPLICATION'] );
|
||||
$Fields = $oCase->loadCase($_SESSION['APPLICATION']);
|
||||
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['PREVIOUS_STEP_LABEL'] = '';
|
||||
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['NEXT_STEP_LABEL'] = '';
|
||||
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['NEXT_STEP'] = '#';
|
||||
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['NEXT_ACTION'] = 'return false;';
|
||||
$_SESSION['DYN_UID_PRINT'] = $_POST['DYN_UID'];
|
||||
$G_PUBLISH->AddContent( 'dynaform', 'xmlform', $_SESSION['PROCESS'] . '/' . $_POST['DYN_UID'], '', $Fields['APP_DATA'], '', '', 'view' );
|
||||
$G_PUBLISH->AddContent('dynaform', 'xmlform', $_SESSION['PROCESS'] . '/' . $_POST['DYN_UID'], '',
|
||||
$Fields['APP_DATA'],
|
||||
'', '', 'view');
|
||||
|
||||
?>
|
||||
<script language="javascript">
|
||||
<?php
|
||||
global $G_FORM;
|
||||
?>
|
||||
function loadForm_<?php echo $G_FORM->id;?>(parametro1){
|
||||
<?php
|
||||
global $G_FORM;
|
||||
?>
|
||||
function loadForm_<?php echo $G_FORM->id;?>(parametro1) {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<?php
|
||||
G::RenderPage( 'publish', 'raw' );
|
||||
G::RenderPage('publish', 'raw');
|
||||
}
|
||||
|
||||
|
||||
@@ -560,7 +560,8 @@ switch (($_POST['action']) ? $_POST['action'] : $_REQUEST['action']) {
|
||||
$oCase = new Cases();
|
||||
$aProcesses = Array ();
|
||||
$G_PUBLISH = new Publisher();
|
||||
$c = $oCase->getAllUploadedDocumentsCriteria( $_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['TASK'], $_SESSION['USER_LOGGED'] );
|
||||
$c = $oCase->getAllUploadedDocumentsCriteria( $_SESSION['PROCESS'], $_SESSION['APPLICATION'],
|
||||
$_SESSION['CURRENT_TASK'], $_SESSION['USER_LOGGED'], $_SESSION['INDEX']);
|
||||
|
||||
if ($c->getDbName() == 'dbarray') {
|
||||
$rs = ArrayBasePeer::doSelectRs( $c );
|
||||
@@ -597,7 +598,8 @@ switch (($_POST['action']) ? $_POST['action'] : $_REQUEST['action']) {
|
||||
$oCase = new Cases();
|
||||
$aProcesses = Array ();
|
||||
$G_PUBLISH = new Publisher();
|
||||
$c = $oCase->getAllGeneratedDocumentsCriteria( $_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['TASK'], $_SESSION['USER_LOGGED'] );
|
||||
$c = $oCase->getAllGeneratedDocumentsCriteria($_SESSION['PROCESS'], $_SESSION['APPLICATION'],
|
||||
$_SESSION['CURRENT_TASK'], $_SESSION['USER_LOGGED'], $_SESSION['INDEX']);
|
||||
|
||||
if ($c->getDbName() == 'dbarray') {
|
||||
$rs = ArrayBasePeer::doSelectRs( $c );
|
||||
|
||||
@@ -197,11 +197,13 @@ try {
|
||||
|
||||
// Send notifications Mobile - Start
|
||||
try {
|
||||
$oLight = new \ProcessMaker\BusinessModel\Light();
|
||||
$nextIndex = $oLight->getInformationDerivatedCase($appFields['APP_UID'], $appFields['DEL_INDEX']);
|
||||
$notificationMobile = new \ProcessMaker\BusinessModel\Light\NotificationDevice();
|
||||
$notificationMobile->routeCaseNotification($_SESSION['USER_LOGGED'], $_SESSION['PROCESS'], $_SESSION['TASK'],
|
||||
$appFields, $_POST['form']['TASKS'], $nextIndex, $appFields['DEL_INDEX']);
|
||||
if ($notificationMobile->checkMobileNotifications()) {
|
||||
$oLight = new \ProcessMaker\BusinessModel\Light();
|
||||
$nextIndex = $oLight->getInformationDerivatedCase($appFields['APP_UID'], $appFields['DEL_INDEX']);
|
||||
$notificationMobile->routeCaseNotification($_SESSION['USER_LOGGED'], $_SESSION['PROCESS'], $_SESSION['TASK'],
|
||||
$appFields, $_POST['form']['TASKS'], $nextIndex, $appFields['DEL_INDEX']);
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
\G::log(G::loadTranslation( 'ID_NOTIFICATION_ERROR' ) . '|' . $e->getMessage() , PATH_DATA, "mobile.log");
|
||||
}
|
||||
|
||||
@@ -215,7 +215,7 @@ if(preg_match("/^.*\(.*MSIE (\d+)\..+\).*$/", $_SERVER["HTTP_USER_AGENT"], $arra
|
||||
$ieVersion = intval($arrayMatch[1]);
|
||||
}
|
||||
|
||||
if (isset( $_GET['breakpoint'] ) && $ieVersion != 11) {
|
||||
if (isset($_GET['breakpoint'])) {
|
||||
|
||||
$G_PUBLISH->AddContent( 'view', 'cases/showDebugFrameLoader' );
|
||||
$G_PUBLISH->AddContent( 'view', 'cases/showDebugFrameBreaker' );
|
||||
|
||||
@@ -31,7 +31,16 @@ $conf = new Configurations();
|
||||
|
||||
$pmVersion = (preg_match("/^([\d\.]+).*$/", System::getVersion(), $arrayMatch))? $arrayMatch[1] : ""; //Otherwise: Branch master
|
||||
|
||||
$arrayFlagImportFileExtension = array("pm", "pmx", "bpmn");
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if (true) {
|
||||
$arrayFlagImportFileExtension = array("pm", "pmx", "pmx2", "bpmn");
|
||||
} else {
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$arrayFlagImportFileExtension = array("pm", "pmx", "bpmn");
|
||||
/*----------------------------------********---------------------------------*/
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
$arrayFlagMenuNewOption = array("pm" => true, "bpmn" => true);
|
||||
|
||||
if ($pmVersion != "") {
|
||||
@@ -82,7 +91,7 @@ $oHeadPublisher->assign('extJsViewState', $oHeadPublisher->getExtJsViewState());
|
||||
|
||||
$deleteCasesFlag = false;
|
||||
global $RBAC;
|
||||
if($RBAC->userCanAccess('DELETE_PROCESS_CASES') === 1) {
|
||||
if($RBAC->userCanAccess('PM_DELETE_PROCESS_CASES') === 1) {
|
||||
$deleteCasesFlag = true;
|
||||
}
|
||||
$oHeadPublisher->assign('deleteCasesFlag', $deleteCasesFlag);
|
||||
|
||||
4
workflow/engine/methods/processes/processObjects.php
Normal file
4
workflow/engine/methods/processes/processObjects.php
Normal file
@@ -0,0 +1,4 @@
|
||||
<?php
|
||||
$list = new \ProcessMaker\BusinessModel\Migrator\ExportObjects();
|
||||
$objects = $list->objectList();
|
||||
echo $objects;
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
global $RBAC;
|
||||
$RBAC->requirePermissions( 'DELETE_PROCESS_CASES', 'PM_FACTORY' );
|
||||
$RBAC->requirePermissions( 'PM_DELETE_PROCESS_CASES', 'PM_FACTORY' );
|
||||
|
||||
try {
|
||||
$uids = explode(',', $_POST['PRO_UIDS']);
|
||||
|
||||
@@ -29,14 +29,27 @@ try {
|
||||
if(empty($_GET)){
|
||||
$proUid = Bootstrap::json_decode( $_POST['data']);
|
||||
$_GET["pro_uid"] = $proUid->pro_uid;
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$_GET["objects"] = $proUid->objects;
|
||||
/*----------------------------------********---------------------------------*/
|
||||
}
|
||||
if (\BpmnProject::exists($_GET["pro_uid"])) {
|
||||
$exporter = new ProcessMaker\Exporter\XmlExporter($_GET["pro_uid"]);
|
||||
$getProjectName = $exporter->truncateName($exporter->getProjectName(),false);
|
||||
if (\BpmnProject::exists($_GET["pro_uid"]) && isset($_GET['objects'])) {
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$_GET["objects"] = \G::json_decode($_GET['objects']);
|
||||
if (sizeof($_GET['objects']) == 0) {
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$exporter = new ProcessMaker\Exporter\XmlExporter($_GET["pro_uid"]);
|
||||
$getProjectName = $exporter->truncateName($exporter->getProjectName(), false);
|
||||
|
||||
$version = ProcessMaker\Util\Common::getLastVersion($outputDir . $getProjectName . "-*.pmx") + 1;
|
||||
$outputFilename = sprintf("%s-%s.%s", str_replace(" ","_",$getProjectName), $version, "pmx");
|
||||
$outputFilename = $exporter->saveExport($outputDir . $outputFilename);
|
||||
$version = ProcessMaker\Util\Common::getLastVersion($outputDir . $getProjectName . "-*.pmx") + 1;
|
||||
$outputFilename = sprintf("%s-%s.%s", str_replace(" ", "_", $getProjectName), $version, "pmx");
|
||||
$outputFilename = $exporter->saveExport($outputDir . $outputFilename);
|
||||
/*----------------------------------********---------------------------------*/
|
||||
}else{
|
||||
$granularExporter = new \ProcessMaker\BusinessModel\Migrator\GranularExporter($_GET['pro_uid']);
|
||||
$outputFilename = $granularExporter->export($_GET['objects']);
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
} else {
|
||||
$oProcess = new Processes();
|
||||
$proFields = $oProcess->serializeProcess($_GET["pro_uid"]);
|
||||
|
||||
@@ -26,12 +26,14 @@ use \ProcessMaker\Importer\XmlImporter;
|
||||
|
||||
ini_set("max_execution_time", 0);
|
||||
$affectedGroups = array();
|
||||
|
||||
$granularImport = false;
|
||||
$objectImport = '';
|
||||
$objectsToImport = '';
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if (PMLicensedFeatures::getSingleton()->verifyfeature("B0oWlBLY3hHdWY0YUNpZEtFQm5CeTJhQlIwN3IxMEkwaG4=") &&
|
||||
isset($_FILES["PROCESS_FILENAME"]) &&
|
||||
$_FILES["PROCESS_FILENAME"]["error"] == 0 &&
|
||||
preg_match("/^(?:pm|pmx)$/", pathinfo($_FILES["PROCESS_FILENAME"]["name"], PATHINFO_EXTENSION))
|
||||
preg_match("/^(?:pm|pmx|pmx2)$/", pathinfo($_FILES["PROCESS_FILENAME"]["name"], PATHINFO_EXTENSION))
|
||||
) {
|
||||
//Check disabled code
|
||||
$response = array();
|
||||
@@ -53,10 +55,9 @@ if (PMLicensedFeatures::getSingleton()->verifyfeature("B0oWlBLY3hHdWY0YUNpZEtFQm
|
||||
}
|
||||
break;
|
||||
case "pmx":
|
||||
case "pmx2":
|
||||
$importer = new XmlImporter();
|
||||
|
||||
$data = $importer->load($_FILES["PROCESS_FILENAME"]["tmp_name"]);
|
||||
|
||||
if (isset($data["tables"]["workflow"]["triggers"]) && is_array($data["tables"]["workflow"]["triggers"]) && !empty($data["tables"]["workflow"]["triggers"])) {
|
||||
$arrayTrigger = $data["tables"]["workflow"]["triggers"];
|
||||
$projectTitle = $data["tables"]["bpmn"]["project"][0]["prj_name"];
|
||||
@@ -109,8 +110,9 @@ if (PMLicensedFeatures::getSingleton()->verifyfeature("B0oWlBLY3hHdWY0YUNpZEtFQm
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
if (isset($_FILES["PROCESS_FILENAME"]) &&
|
||||
pathinfo($_FILES["PROCESS_FILENAME"]["name"], PATHINFO_EXTENSION) == "pmx"
|
||||
if (isset($_FILES["PROCESS_FILENAME"]) && (pathinfo($_FILES["PROCESS_FILENAME"]["name"], PATHINFO_EXTENSION) == "pmx"
|
||||
|| pathinfo($_FILES["PROCESS_FILENAME"]["name"], PATHINFO_EXTENSION) == "pmx2")
|
||||
|
||||
) {
|
||||
$importer = new XmlImporter();
|
||||
$importer->setData("usr_uid", $_SESSION["USER_LOGGED"]);
|
||||
@@ -120,61 +122,98 @@ if (isset($_FILES["PROCESS_FILENAME"]) &&
|
||||
try {
|
||||
$opt1 = XmlImporter::IMPORT_OPTION_CREATE_NEW;
|
||||
$opt2 = XmlImporter::GROUP_IMPORT_OPTION_CREATE_NEW;
|
||||
if($_POST['generateUid'] === 'generate') {
|
||||
$generateUid = true;
|
||||
$prjUid = $importer->import($opt1,$opt2,$generateUid);
|
||||
} elseif($_POST['generateUid'] === 'keep') {
|
||||
$generateUid = false;
|
||||
$prjUid = $importer->import($opt1,$opt2,$generateUid);
|
||||
} else {
|
||||
$prjUid = $importer->import();
|
||||
}
|
||||
$prjUid = '';
|
||||
$proType = '';
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$granularImport = false;
|
||||
$objectsToImport = '';
|
||||
|
||||
G::LoadClass( 'Process' );
|
||||
$oProcess = new Process();
|
||||
$processData = $oProcess->load( $prjUid );
|
||||
$proType = $processData["PRO_TYPE"];
|
||||
|
||||
$result = array(
|
||||
"success" => true,
|
||||
"catchMessage" => '',
|
||||
"ExistProcessInDatabase" => 0,
|
||||
"ExistGroupsInDatabase" => 0,
|
||||
"notExistProcessInDatabase" => 0,
|
||||
"affectedGroups" => '',
|
||||
"sNewProUid" => $prjUid,
|
||||
"project_type" => 'bpmn',
|
||||
"project_type_aux" => $proType
|
||||
);
|
||||
} catch (Exception $e) {
|
||||
$groupsExists = ($e->getCode() == XmlImporter::IMPORT_STAT_GROUP_ALREADY_EXISTS)? 1 : 0;
|
||||
if($groupsExists === 1) {
|
||||
$arrayGroups = XmlImporter::$affectedGroups;
|
||||
if(sizeof($arrayGroups)) {
|
||||
foreach ($arrayGroups as $group) {
|
||||
$affectedGroups[] = $group["GRP_TITLE"];
|
||||
}
|
||||
$affectedGroups = implode(', ', $affectedGroups);
|
||||
$data = $importer->load();
|
||||
if (version_compare($data['version'], '3.0', '>')) {
|
||||
$objectsToImport = [];
|
||||
$objects = (isset($data['objects'])) ? explode('|', $data['objects']) : "";
|
||||
$ids = new \ProcessMaker\BusinessModel\Migrator\ExportObjects();
|
||||
$objects = $ids->getIdObjectList($objects);
|
||||
foreach ($objects as $object) {
|
||||
$objectsToImport[] = (object)array('id' => $object, 'action' => 'replace');
|
||||
}
|
||||
}
|
||||
$result = array(
|
||||
"success" => true,
|
||||
"catchMessage" => (in_array($e->getCode(), array(
|
||||
XmlImporter::IMPORT_STAT_TARGET_ALREADY_EXISTS,
|
||||
XmlImporter::IMPORT_STAT_GROUP_ALREADY_EXISTS,
|
||||
XmlImporter::IMPORTED_PROJECT_DOES_NOT_EXISTS
|
||||
)))? "" : $e->getMessage(),
|
||||
"ExistProcessInDatabase" => ($e->getCode() == XmlImporter::IMPORT_STAT_TARGET_ALREADY_EXISTS)? 1 : 0,
|
||||
"ExistGroupsInDatabase" => $groupsExists,
|
||||
"notExistProcessInDatabase" => ($e->getCode() == XmlImporter::IMPORTED_PROJECT_DOES_NOT_EXISTS) ? 1 : 0,
|
||||
"affectedGroups" => !empty($affectedGroups)? $affectedGroups : '',
|
||||
"sNewProUid" => "",
|
||||
"project_type" => "bpmn",
|
||||
|
||||
"proFileName" => $_FILES["PROCESS_FILENAME"]["name"],
|
||||
"groupBeforeAccion" => "uploadFileNewProcess",
|
||||
"importOption" => 0
|
||||
if (isset($_POST['objectsToImport']) && sizeof(G::json_decode($_POST['objectsToImport']))){
|
||||
$objectsToImport = G::json_decode($_POST['objectsToImport']);
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if ($_POST['generateUid'] === 'generate') {
|
||||
$generateUid = true;
|
||||
$prjUid = $importer->import($opt1, $opt2, $generateUid, $objectsToImport);
|
||||
} elseif ($_POST['generateUid'] === 'keep') {
|
||||
$generateUid = false;
|
||||
$prjUid = $importer->import($opt1, $opt2, $generateUid, $objectsToImport);
|
||||
} else {
|
||||
$prjUid = $importer->import();
|
||||
}
|
||||
G::LoadClass('Process');
|
||||
$oProcess = new Process();
|
||||
$processData = $oProcess->load($prjUid);
|
||||
$proType = $processData["PRO_TYPE"];
|
||||
$granularImport = false;
|
||||
$objectImport = '';
|
||||
|
||||
$result = array(
|
||||
"success" => true,
|
||||
"catchMessage" => '',
|
||||
"ExistProcessInDatabase" => 0,
|
||||
"ExistGroupsInDatabase" => 0,
|
||||
"notExistProcessInDatabase" => 0,
|
||||
"affectedGroups" => '',
|
||||
"sNewProUid" => $prjUid,
|
||||
"project_type" => 'bpmn',
|
||||
"isGranularImport" => $granularImport,
|
||||
"objectGranularImport" => $objectImport,
|
||||
"project_type_aux" => $proType
|
||||
);
|
||||
} catch (Exception $e) {
|
||||
/*----------------------------------********---------------------------------*/
|
||||
switch (get_class($e)) {
|
||||
case 'ProcessMaker\BusinessModel\Migrator\ImportException':
|
||||
$result = $e->getNameException();
|
||||
die($result);
|
||||
break;
|
||||
default:
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$groupsExists = ($e->getCode() == XmlImporter::IMPORT_STAT_GROUP_ALREADY_EXISTS) ? 1 : 0;
|
||||
if ($groupsExists === 1) {
|
||||
$arrayGroups = XmlImporter::$affectedGroups;
|
||||
if (sizeof($arrayGroups)) {
|
||||
foreach ($arrayGroups as $group) {
|
||||
$affectedGroups[] = $group["GRP_TITLE"];
|
||||
}
|
||||
$affectedGroups = implode(', ', $affectedGroups);
|
||||
}
|
||||
}
|
||||
$result = array(
|
||||
"success" => true,
|
||||
"catchMessage" => (in_array($e->getCode(), array(
|
||||
XmlImporter::IMPORT_STAT_TARGET_ALREADY_EXISTS,
|
||||
XmlImporter::IMPORT_STAT_GROUP_ALREADY_EXISTS,
|
||||
XmlImporter::IMPORTED_PROJECT_DOES_NOT_EXISTS
|
||||
))) ? "" : $e->getMessage(),
|
||||
"ExistProcessInDatabase" => ($e->getCode() == XmlImporter::IMPORT_STAT_TARGET_ALREADY_EXISTS) ? 1 : 0,
|
||||
"ExistGroupsInDatabase" => $groupsExists,
|
||||
"notExistProcessInDatabase" => ($e->getCode() == XmlImporter::IMPORTED_PROJECT_DOES_NOT_EXISTS) ? 1 : 0,
|
||||
"affectedGroups" => !empty($affectedGroups) ? $affectedGroups : '',
|
||||
"sNewProUid" => '',
|
||||
"project_type" => 'bpmn',
|
||||
"isGranularImport" => $granularImport,
|
||||
"objectGranularImport" => $objectImport,
|
||||
"proFileName" => $_FILES["PROCESS_FILENAME"]["name"],
|
||||
"groupBeforeAccion" => 'uploadFileNewProcess',
|
||||
"importOption" => 0
|
||||
);
|
||||
/*----------------------------------********---------------------------------*/
|
||||
break;
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
}
|
||||
|
||||
echo G::json_encode($result);
|
||||
@@ -182,8 +221,10 @@ if (isset($_FILES["PROCESS_FILENAME"]) &&
|
||||
}
|
||||
|
||||
if (isset($_POST["PRO_FILENAME"]) &&
|
||||
file_exists(PATH_DOCUMENT . "input" . PATH_SEP . $_POST["PRO_FILENAME"]) &&
|
||||
pathinfo(PATH_DOCUMENT . "input" . PATH_SEP . $_POST["PRO_FILENAME"], PATHINFO_EXTENSION) == "pmx"
|
||||
file_exists(PATH_DOCUMENT . "input" . PATH_SEP . $_POST["PRO_FILENAME"]) && (pathinfo(PATH_DOCUMENT . "input" .
|
||||
PATH_SEP . $_POST["PRO_FILENAME"], PATHINFO_EXTENSION) == "pmx" || pathinfo(PATH_DOCUMENT . "input" .
|
||||
PATH_SEP . $_POST["PRO_FILENAME"], PATHINFO_EXTENSION) == "pmx2")
|
||||
|
||||
) {
|
||||
$option = XmlImporter::IMPORT_OPTION_CREATE_NEW;
|
||||
|
||||
@@ -215,47 +256,102 @@ if (isset($_POST["PRO_FILENAME"]) &&
|
||||
$importer->setSourceFile(PATH_DOCUMENT . "input" . PATH_SEP . $_POST["PRO_FILENAME"]);
|
||||
|
||||
try {
|
||||
$prjUid = $importer->import($option, $optionGroup, false);
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$objectsToImport = '';
|
||||
$data = $importer->load();
|
||||
// only uploadFileNewProcessExist
|
||||
if (version_compare($data['version'], '3.0', '>') && isset($_POST['objectsToImport']) && $_POST['objectsToImport'] === '' && $_POST['IMPORT_OPTION']==="1") {
|
||||
$objectImport = (isset($data['objects'])) ? explode('|', $data['objects']) : "";
|
||||
$ids = new \ProcessMaker\BusinessModel\Migrator\ExportObjects();
|
||||
$objectImport = $ids->getIdObjectList($objectImport);
|
||||
$granularImport = true;
|
||||
$result = array(
|
||||
"success" => true,
|
||||
"catchMessage" => '',
|
||||
"ExistProcessInDatabase" => 0,
|
||||
"ExistGroupsInDatabase" => 0,
|
||||
"notExistProcessInDatabase" => 0,
|
||||
"affectedGroups" => '',
|
||||
"sNewProUid" => '',
|
||||
"project_type" => 'bpmn',
|
||||
"isGranularImport" => $granularImport,
|
||||
"objectGranularImport" => $objectImport,
|
||||
"project_type_aux" => ''
|
||||
);
|
||||
echo G::json_encode($result);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
if (version_compare($data['version'], '3.0', '>') && $_POST['IMPORT_OPTION']==="3") {
|
||||
$objectsToImport = [];
|
||||
$objects = (isset($data['objects'])) ? explode('|', $data['objects']) : "";
|
||||
$ids = new \ProcessMaker\BusinessModel\Migrator\ExportObjects();
|
||||
$objects = $ids->getIdObjectList($objects);
|
||||
foreach ($objects as $object) {
|
||||
$objectsToImport[] = (object)array('id' => $object, 'action' => 'replace');
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($_POST['objectsToImport']) && sizeof(G::json_decode($_POST['objectsToImport']))){
|
||||
$objectsToImport = G::json_decode($_POST['objectsToImport']);
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$prjUid = $importer->import($option, $optionGroup, false, $objectsToImport);
|
||||
|
||||
G::LoadClass( 'Process' );
|
||||
$oProcess = new Process();
|
||||
$processData = $oProcess->load( $prjUid );
|
||||
$proType = $processData["PRO_TYPE"];
|
||||
|
||||
$result = array(
|
||||
"success" => true,
|
||||
"catchMessage" => '',
|
||||
"success" => true,
|
||||
"catchMessage" => '',
|
||||
"ExistProcessInDatabase" => 0,
|
||||
"ExistGroupsInDatabase" => 0,
|
||||
"ExistGroupsInDatabase" => '',
|
||||
"sNewProUid" => $prjUid,
|
||||
"project_type" => 'bpmn',
|
||||
"project_type_aux" => $proType
|
||||
"ExistGroupsInDatabase" => 0,
|
||||
"ExistGroupsInDatabase" => '',
|
||||
"sNewProUid" => $prjUid,
|
||||
"project_type" => 'bpmn',
|
||||
"isGranularImport" => '',
|
||||
"objectGranularImport" => '',
|
||||
"project_type_aux" => $proType
|
||||
);
|
||||
} catch (Exception $e) {
|
||||
$groupsExists = ($e->getCode() == XmlImporter::IMPORT_STAT_GROUP_ALREADY_EXISTS)? 1 : 0;
|
||||
if($groupsExists === 1) {
|
||||
$arrayGroups = XmlImporter::$affectedGroups;
|
||||
if(sizeof($arrayGroups)) {
|
||||
foreach($arrayGroups as $group){
|
||||
$affectedGroups[] = $group["GRP_TITLE"];
|
||||
/*----------------------------------********---------------------------------*/
|
||||
switch (get_class($e)) {
|
||||
case 'ProcessMaker\BusinessModel\Migrator\ImportException':
|
||||
$result = $e->getNameException();
|
||||
die($result);
|
||||
break;
|
||||
default:
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$groupsExists = ($e->getCode() == XmlImporter::IMPORT_STAT_GROUP_ALREADY_EXISTS) ? 1 : 0;
|
||||
if ($groupsExists === 1) {
|
||||
$arrayGroups = XmlImporter::$affectedGroups;
|
||||
if (sizeof($arrayGroups)) {
|
||||
foreach ($arrayGroups as $group) {
|
||||
$affectedGroups[] = $group["GRP_TITLE"];
|
||||
}
|
||||
$affectedGroups = implode(', ', $affectedGroups);
|
||||
}
|
||||
}
|
||||
$affectedGroups = implode(', ', $affectedGroups);
|
||||
}
|
||||
$result = array(
|
||||
"success" => true,
|
||||
"catchMessage" => (in_array($e->getCode(), array(XmlImporter::IMPORT_STAT_TARGET_ALREADY_EXISTS, XmlImporter::IMPORT_STAT_GROUP_ALREADY_EXISTS))) ? "" : $e->getMessage(),
|
||||
"ExistProcessInDatabase" => ($e->getCode() == XmlImporter::IMPORT_STAT_TARGET_ALREADY_EXISTS) ? 1 : 0,
|
||||
"ExistGroupsInDatabase" => $groupsExists,
|
||||
"affectedGroups" => !empty($affectedGroups) ? $affectedGroups : '',
|
||||
"sNewProUid" => '',
|
||||
"project_type" => 'bpmn',
|
||||
"isGranularImport" => $granularImport,
|
||||
"objectGranularImport" => $objectImport,
|
||||
"proFileName" => $_POST["PRO_FILENAME"],
|
||||
"groupBeforeAccion" => "uploadFileNewProcess",
|
||||
"importOption" => (isset($_POST["IMPORT_OPTION"])) ? (int)($_POST["IMPORT_OPTION"]) : 0
|
||||
);
|
||||
/*----------------------------------********---------------------------------*/
|
||||
break;
|
||||
}
|
||||
$result = array(
|
||||
"success" => true,
|
||||
"catchMessage" => (in_array($e->getCode(), array(XmlImporter::IMPORT_STAT_TARGET_ALREADY_EXISTS, XmlImporter::IMPORT_STAT_GROUP_ALREADY_EXISTS)))? "" : $e->getMessage(),
|
||||
"ExistProcessInDatabase" => ($e->getCode() == XmlImporter::IMPORT_STAT_TARGET_ALREADY_EXISTS)? 1 : 0,
|
||||
"ExistGroupsInDatabase" => $groupsExists,
|
||||
"affectedGroups" => !empty($affectedGroups)? $affectedGroups : '',
|
||||
"sNewProUid" => "",
|
||||
"project_type" => "bpmn",
|
||||
|
||||
"proFileName" => $_POST["PRO_FILENAME"],
|
||||
"groupBeforeAccion" => "uploadFileNewProcess",
|
||||
"importOption" => (isset($_POST["IMPORT_OPTION"]))? (int)($_POST["IMPORT_OPTION"]) : 0
|
||||
);
|
||||
/*----------------------------------********---------------------------------*/
|
||||
}
|
||||
|
||||
echo G::json_encode($result);
|
||||
|
||||
@@ -1,341 +1,343 @@
|
||||
<?php
|
||||
$request = isset( $_REQUEST['action'] ) ? $_REQUEST['action'] : "";
|
||||
G::LoadClass( 'serverConfiguration' );
|
||||
$oServerConf = &serverConf::getSingleton();
|
||||
$oServerConf->setHeartbeatProperty( 'HB_BEAT_URL', 'http://heartbeat.processmaker.com/syspmLicenseSrv/en/green/services/beat', 'HEART_BEAT_CONF' );
|
||||
|
||||
switch ($request) {
|
||||
case 'processInformation':
|
||||
try {
|
||||
$heartBeatUrl = $oServerConf->getHeartbeatProperty( 'HB_BEAT_URL', 'HEART_BEAT_CONF' );
|
||||
//Test connection
|
||||
if (! (validateConnectivity( $heartBeatUrl ))) {
|
||||
$oServerConf->setHeartbeatProperty( 'HB_NEXT_BEAT_DATE', strtotime( "+1 day" ), 'HEART_BEAT_CONF' );
|
||||
throw new Exception( "Heartbeat::No connection" );
|
||||
}
|
||||
//Build Data to be sent
|
||||
$params = buildData();
|
||||
|
||||
//Send the information
|
||||
postHeartBeat( $params );
|
||||
} catch (Exception $e) {
|
||||
G::pr( $e->getMessage() );
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
function validateConnectivity ($url)
|
||||
{
|
||||
ini_set( 'allow_url_fopen', 1 );
|
||||
$sContent = file_get_conditional_contents( $url );
|
||||
$sw_connect = true;
|
||||
//if ($sContent == '' || $sContent === false || strpos ( $sContent, 'address location' ) === false ) { 4
|
||||
if ($sContent == '' || $sContent === false) {
|
||||
$sw_connect = false;
|
||||
}
|
||||
return $sw_connect;
|
||||
}
|
||||
|
||||
function file_get_conditional_contents ($szURL)
|
||||
{
|
||||
|
||||
$pCurl = curl_init();
|
||||
curl_setopt( $pCurl, CURLOPT_URL, $szURL );
|
||||
curl_setopt( $pCurl, CURLOPT_RETURNTRANSFER, true );
|
||||
curl_setopt( $pCurl, CURLOPT_HEADER, true );
|
||||
curl_setopt( $pCurl, CURLOPT_FOLLOWLOCATION, false );
|
||||
curl_setopt( $pCurl, CURLOPT_AUTOREFERER, true );
|
||||
//To avoid SSL error
|
||||
curl_setopt( $pCurl, CURLOPT_SSL_VERIFYHOST, 0 );
|
||||
curl_setopt( $pCurl, CURLOPT_SSL_VERIFYPEER, 0 );
|
||||
|
||||
//To avoid timeouts
|
||||
curl_setopt( $pCurl, CURLOPT_CONNECTTIMEOUT, 10 );
|
||||
curl_setopt( $pCurl, CURLOPT_TIMEOUT, 20 );
|
||||
|
||||
curl_setopt( $pCurl, CURLOPT_NOPROGRESS, false );
|
||||
curl_setopt( $pCurl, CURLOPT_VERBOSE, true );
|
||||
|
||||
//Apply proxy settings
|
||||
$sysConf = System::getSystemConfiguration();
|
||||
if ($sysConf['proxy_host'] != '') {
|
||||
curl_setopt( $pCurl, CURLOPT_PROXY, $sysConf['proxy_host'] . ($sysConf['proxy_port'] != '' ? ':' . $sysConf['proxy_port'] : '') );
|
||||
if ($sysConf['proxy_port'] != '') {
|
||||
curl_setopt( $pCurl, CURLOPT_PROXYPORT, $sysConf['proxy_port'] );
|
||||
}
|
||||
if ($sysConf['proxy_user'] != '') {
|
||||
curl_setopt( $pCurl, CURLOPT_PROXYUSERPWD, $sysConf['proxy_user'] . ($sysConf['proxy_pass'] != '' ? ':' . $sysConf['proxy_pass'] : '') );
|
||||
}
|
||||
curl_setopt( $pCurl, CURLOPT_HTTPHEADER, array ('Expect:'
|
||||
) );
|
||||
}
|
||||
|
||||
$szContents = curl_exec( $pCurl );
|
||||
$aInfo = curl_getinfo( $pCurl );
|
||||
|
||||
$curl_session = curl_getinfo( $pCurl, CURLINFO_HTTP_CODE );
|
||||
$headers = curl_getinfo( $pCurl );
|
||||
$header = substr( $szContents, 0, $headers['header_size'] );
|
||||
$content = substr( $szContents, $headers['header_size'] );
|
||||
|
||||
if ($aInfo['http_code'] === 200) {
|
||||
return $content;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function buildData ()
|
||||
{
|
||||
require_once ("classes/model/Users.php");
|
||||
|
||||
G::LoadClass( "serverConfiguration" );
|
||||
G::LoadClass( "system" );
|
||||
|
||||
$oServerConf = &serverConf::getSingleton();
|
||||
|
||||
$os = '';
|
||||
if (file_exists( '/etc/redhat-release' )) {
|
||||
$fnewsize = filesize( '/etc/redhat-release' );
|
||||
$fp = fopen( '/etc/redhat-release', 'r' );
|
||||
$os = trim( fread( $fp, $fnewsize ) );
|
||||
fclose( $fp );
|
||||
}
|
||||
$os .= " (" . PHP_OS . ")";
|
||||
|
||||
$params = array ();
|
||||
$params['ip'] = getenv( 'SERVER_ADDR' );
|
||||
$oServerConf->setHeartbeatProperty( 'HB_BEAT_INDEX', intval( $oServerConf->getHeartbeatProperty( 'HB_BEAT_INDEX', 'HEART_BEAT_CONF' ) ) + 1, 'HEART_BEAT_CONF' );
|
||||
|
||||
$params['index'] = $oServerConf->getHeartbeatProperty( 'HB_BEAT_INDEX', 'HEART_BEAT_CONF' ); //$this->index;
|
||||
$params['beatType'] = is_null( $oServerConf->getHeartbeatProperty( 'HB_BEAT_TYPE', 'HEART_BEAT_CONF' ) ) ? "starting" : $oServerConf->getHeartbeatProperty( 'HB_BEAT_TYPE', 'HEART_BEAT_CONF' ); //1;//$this->beatType;
|
||||
$params['date'] = date( 'Y-m-d H:i:s' );
|
||||
$params['host'] = getenv( 'SERVER_NAME' );
|
||||
$params['os'] = $os;
|
||||
$params['webserver'] = getenv( 'SERVER_SOFTWARE' );
|
||||
$params['php'] = phpversion();
|
||||
$params['pmVersion'] = System::getVersion();
|
||||
if (class_exists( 'pmLicenseManager' )) {
|
||||
$params['pmProduct'] = 'PMEE';
|
||||
} else {
|
||||
$params['pmProduct'] = 'PMCE';
|
||||
}
|
||||
|
||||
$params['logins'] = $oServerConf->logins;
|
||||
$params['workspaces'] = serialize( $oServerConf->getWSList() );
|
||||
$params['plugins'] = serialize( $oServerConf->getPluginsList() );
|
||||
$params['dbVersion'] = $oServerConf->getDBVersion();
|
||||
//$params ['errors'] = serialize( $oServerConf->errors );
|
||||
if ($licInfo = $oServerConf->getProperty( 'LICENSE_INFO' )) {
|
||||
$params['license'] = serialize( $licInfo );
|
||||
}
|
||||
|
||||
///////
|
||||
$criteria = new Criteria( "workflow" );
|
||||
|
||||
$criteria->addSelectColumn( "COUNT(USERS.USR_UID) AS USERS_NUMBER" );
|
||||
$criteria->add( UsersPeer::USR_UID, null, Criteria::ISNOTNULL );
|
||||
|
||||
$rs = UsersPeer::doSelectRS( $criteria );
|
||||
$rs->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||
$rs->next();
|
||||
$row = $rs->getRow();
|
||||
|
||||
$params["users"] = $row["USERS_NUMBER"];
|
||||
|
||||
///////
|
||||
$ee = null;
|
||||
|
||||
if (file_exists( PATH_PLUGINS . "enterprise" . PATH_SEP . "VERSION" )) {
|
||||
$ee = trim( file_get_contents( PATH_PLUGINS . "enterprise" . PATH_SEP . "VERSION" ) );
|
||||
} else {
|
||||
$pluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
$details = $pluginRegistry->getPluginDetails( "enterprise.php" );
|
||||
|
||||
$ee = (! ($details == null)) ? $details->iVersion : null;
|
||||
}
|
||||
|
||||
$params["ee"] = $ee;
|
||||
|
||||
///////
|
||||
$addonNumber = 0;
|
||||
$addonEnabledNumber = 0;
|
||||
|
||||
$pluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
|
||||
$arrayAddon = array ();
|
||||
|
||||
if (file_exists( PATH_DATA_SITE . "ee" )) {
|
||||
$arrayAddon = unserialize( trim( file_get_contents( PATH_DATA_SITE . "ee" ) ) );
|
||||
|
||||
$arrayAddon["enterprise"] = array ("sFilename" => "enterprise-1.tar"
|
||||
);
|
||||
}
|
||||
|
||||
foreach ($arrayAddon as $addon) {
|
||||
$sFileName = substr( $addon["sFilename"], 0, strpos( $addon["sFilename"], "-" ) );
|
||||
|
||||
if (file_exists( PATH_PLUGINS . $sFileName . ".php" )) {
|
||||
$addonDetails = $pluginRegistry->getPluginDetails( $sFileName . ".php" );
|
||||
$enabled = 0;
|
||||
|
||||
if ($addonDetails) {
|
||||
$enabled = ($addonDetails->enabled) ? 1 : 0;
|
||||
}
|
||||
|
||||
if ($enabled == 1) {
|
||||
$addonEnabledNumber = $addonEnabledNumber + 1;
|
||||
}
|
||||
|
||||
$addonNumber = $addonNumber + 1;
|
||||
}
|
||||
}
|
||||
|
||||
$params["addonNumber"] = $addonNumber;
|
||||
$params["addonEnabledNumber"] = $addonEnabledNumber;
|
||||
|
||||
///////
|
||||
$licenseID = null;
|
||||
$licenseType = null;
|
||||
$licenseDomainWorkspace = null;
|
||||
$licenseNumber = 0;
|
||||
|
||||
if (file_exists( PATH_PLUGINS . "enterprise" . PATH_SEP . "class.pmLicenseManager.php" ) && class_exists( 'enterprisePlugin' )) {
|
||||
$licenseManager = &pmLicenseManager::getSingleton();
|
||||
|
||||
preg_match( "/^license_(.*).dat$/", $licenseManager->file, $matches );
|
||||
|
||||
$licenseID = $matches[1];
|
||||
$licenseType = $licenseManager->type;
|
||||
$licenseDomainWorkspace = $licenseManager->info["DOMAIN_WORKSPACE"];
|
||||
|
||||
///////
|
||||
$criteria = new Criteria( "workflow" );
|
||||
|
||||
$criteria->addSelectColumn( "COUNT(LICENSE_MANAGER.LICENSE_UID) AS LICENSE_NUMBER" );
|
||||
$criteria->add( LicenseManagerPeer::LICENSE_UID, null, Criteria::ISNOTNULL );
|
||||
|
||||
$rs = LicenseManagerPeer::doSelectRS( $criteria );
|
||||
$rs->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||
$rs->next();
|
||||
$row = $rs->getRow();
|
||||
|
||||
///////
|
||||
$licenseNumber = ($row["LICENSE_NUMBER"] > 0) ? $row["LICENSE_NUMBER"] : count( glob( PATH_DATA_SITE . "licenses" . PATH_SEP . "*.dat" ) );
|
||||
}
|
||||
|
||||
$params["licenseID"] = $licenseID;
|
||||
$params["licenseType"] = $licenseType;
|
||||
$params["licenseDomainWorkspace"] = $licenseDomainWorkspace;
|
||||
$params["licenseNumber"] = $licenseNumber;
|
||||
|
||||
///////
|
||||
return $params;
|
||||
}
|
||||
|
||||
function postHeartBeat ($params)
|
||||
{
|
||||
if (is_array( $params )) {
|
||||
//No matter what happens with the result let's set the nextBeat to 2 hours from now
|
||||
G::LoadClass( 'serverConfiguration' );
|
||||
$oServerConf = & serverConf::getSingleton();
|
||||
$oServerConf->setHeartbeatProperty( 'HB_NEXT_BEAT_DATE', strtotime( "+2 hour" ), 'HEART_BEAT_CONF' );
|
||||
$nextBeatDate = $oServerConf->getHeartbeatProperty( 'HB_NEXT_BEAT_DATE', 'HEART_BEAT_CONF' );
|
||||
|
||||
$heartBeatUrl = $oServerConf->getHeartbeatProperty( 'HB_BEAT_URL', 'HEART_BEAT_CONF' );
|
||||
|
||||
$ch = curl_init();
|
||||
curl_setopt( $ch, CURLOPT_URL, $heartBeatUrl );
|
||||
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
|
||||
curl_setopt( $ch, CURLOPT_HEADER, true );
|
||||
curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, false );
|
||||
curl_setopt( $ch, CURLOPT_AUTOREFERER, true );
|
||||
//To avoid SSL error
|
||||
curl_setopt( $ch, CURLOPT_SSL_VERIFYHOST, 0 );
|
||||
curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, 0 );
|
||||
|
||||
curl_setopt( $ch, CURLOPT_POST, 1 );
|
||||
curl_setopt( $ch, CURLOPT_POSTFIELDS, $params );
|
||||
|
||||
//To avoid timeouts
|
||||
curl_setopt( $ch, CURLOPT_CONNECTTIMEOUT, 10 );
|
||||
curl_setopt( $ch, CURLOPT_TIMEOUT, 20 );
|
||||
|
||||
//Apply proxy settings
|
||||
$sysConf = System::getSystemConfiguration();
|
||||
if ($sysConf['proxy_host'] != '') {
|
||||
curl_setopt( $ch, CURLOPT_PROXY, $sysConf['proxy_host'] . ($sysConf['proxy_port'] != '' ? ':' . $sysConf['proxy_port'] : '') );
|
||||
if ($sysConf['proxy_port'] != '') {
|
||||
curl_setopt( $ch, CURLOPT_PROXYPORT, $sysConf['proxy_port'] );
|
||||
}
|
||||
if ($sysConf['proxy_user'] != '') {
|
||||
curl_setopt( $ch, CURLOPT_PROXYUSERPWD, $sysConf['proxy_user'] . ($sysConf['proxy_pass'] != '' ? ':' . $sysConf['proxy_pass'] : '') );
|
||||
}
|
||||
curl_setopt( $ch, CURLOPT_HTTPHEADER, array ('Expect:'
|
||||
) );
|
||||
}
|
||||
|
||||
$response = curl_exec( $ch );
|
||||
$curl_session = curl_getinfo( $ch, CURLINFO_HTTP_CODE );
|
||||
$headers = curl_getinfo( $ch );
|
||||
$header = substr( $response, 0, $headers['header_size'] );
|
||||
$content = substr( $response, $headers['header_size'] );
|
||||
curl_close( $ch );
|
||||
|
||||
if ($headers['http_code'] == 200) {
|
||||
$oServerConf->setHeartbeatProperty( 'HB_BEAT_TYPE', 'beat', 'HEART_BEAT_CONF' );
|
||||
$oServerConf->resetLogins();
|
||||
$oServerConf->setHeartbeatProperty( 'HB_NEXT_BEAT_DATE', strtotime( "+7 day" ), 'HEART_BEAT_CONF' );
|
||||
//Reset Errors
|
||||
|
||||
|
||||
} else {
|
||||
//Catch the error
|
||||
|
||||
|
||||
$oServerConf->setHeartbeatProperty( 'HB_NEXT_BEAT_DATE', strtotime( "+1 day" ), 'HEART_BEAT_CONF' );
|
||||
}
|
||||
|
||||
}
|
||||
/*
|
||||
|
||||
$ch = curl_init ();
|
||||
curl_setopt ( $ch, CURLOPT_URL, $heartBeatUrl );
|
||||
curl_setopt ( $ch, CURLOPT_RETURNTRANSFER, true );
|
||||
curl_setopt ( $ch, CURLOPT_HEADER, true );
|
||||
curl_setopt ( $ch, CURLOPT_FOLLOWLOCATION, false );
|
||||
curl_setopt ( $ch, CURLOPT_AUTOREFERER, true );
|
||||
//To avoid SSL error
|
||||
curl_setopt ( $ch, CURLOPT_SSL_VERIFYHOST, 0 );
|
||||
curl_setopt ( $ch, CURLOPT_SSL_VERIFYPEER, 0 );
|
||||
|
||||
curl_setopt ( $ch, CURLOPT_POST, 1 );
|
||||
curl_setopt ( $ch, CURLOPT_POSTFIELDS, $params );
|
||||
|
||||
//To avoid timeouts
|
||||
curl_setopt ( $ch, CURLOPT_CONNECTTIMEOUT, 10 );
|
||||
curl_setopt ( $ch, CURLOPT_TIMEOUT, 20 );
|
||||
|
||||
$response = curl_exec ( $ch );
|
||||
$curl_session = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||
$headers = curl_getinfo ( $ch );
|
||||
$header = substr ( $response, 0, $headers ['header_size'] );
|
||||
$content = substr ( $response, $headers ['header_size'] );
|
||||
curl_close ( $ch );
|
||||
|
||||
if ($headers ['http_code'] == 200) {
|
||||
$this->beatType = 'beat';
|
||||
$this->resetLogins ();
|
||||
$this->nextBeatDate = strtotime ( "+7 day" ); //next beat in 7 days
|
||||
//Reset Errors
|
||||
$this->errors=array();
|
||||
} else {
|
||||
//Catch the error
|
||||
$this->errors[]=$curl_session;
|
||||
$this->nextBeatDate = strtotime ( "+1 day" ); //retry in 30 mins
|
||||
}
|
||||
|
||||
$this->saveSingleton ();
|
||||
*/
|
||||
}
|
||||
|
||||
/* This file will be improved in future versions */
|
||||
//$request = isset( $_REQUEST['action'] ) ? $_REQUEST['action'] : "";
|
||||
//G::LoadClass( 'serverConfiguration' );
|
||||
//$oServerConf = &serverConf::getSingleton();
|
||||
//$oServerConf->setHeartbeatProperty( 'HB_BEAT_URL', 'http://heartbeat.processmaker.com/syspmLicenseSrv/en/green/services/beat', 'HEART_BEAT_CONF' );
|
||||
//
|
||||
//switch ($request) {
|
||||
// case 'processInformation':
|
||||
// try {
|
||||
// $heartBeatUrl = $oServerConf->getHeartbeatProperty( 'HB_BEAT_URL', 'HEART_BEAT_CONF' );
|
||||
// //Test connection
|
||||
// if (! (validateConnectivity( $heartBeatUrl ))) {
|
||||
// $oServerConf->setHeartbeatProperty( 'HB_NEXT_BEAT_DATE', strtotime( "+1 day" ), 'HEART_BEAT_CONF' );
|
||||
// throw new Exception( "Heartbeat::No connection" );
|
||||
// }
|
||||
// //Build Data to be sent
|
||||
// $params = buildData();
|
||||
//
|
||||
// //Send the information
|
||||
// postHeartBeat( $params );
|
||||
// } catch (Exception $e) {
|
||||
// G::pr( $e->getMessage() );
|
||||
// }
|
||||
// break;
|
||||
//}
|
||||
//
|
||||
//function validateConnectivity ($url)
|
||||
//{
|
||||
// ini_set( 'allow_url_fopen', 1 );
|
||||
// $sContent = file_get_conditional_contents( $url );
|
||||
// $sw_connect = true;
|
||||
// //if ($sContent == '' || $sContent === false || strpos ( $sContent, 'address location' ) === false ) { 4
|
||||
// if ($sContent == '' || $sContent === false) {
|
||||
// $sw_connect = false;
|
||||
// }
|
||||
// return $sw_connect;
|
||||
//}
|
||||
//
|
||||
//function file_get_conditional_contents ($szURL)
|
||||
//{
|
||||
//
|
||||
// $pCurl = curl_init();
|
||||
// curl_setopt( $pCurl, CURLOPT_URL, $szURL );
|
||||
// curl_setopt( $pCurl, CURLOPT_RETURNTRANSFER, true );
|
||||
// curl_setopt( $pCurl, CURLOPT_HEADER, true );
|
||||
// curl_setopt( $pCurl, CURLOPT_FOLLOWLOCATION, false );
|
||||
// curl_setopt( $pCurl, CURLOPT_AUTOREFERER, true );
|
||||
// //To avoid SSL error
|
||||
// curl_setopt( $pCurl, CURLOPT_SSL_VERIFYHOST, 0 );
|
||||
// curl_setopt( $pCurl, CURLOPT_SSL_VERIFYPEER, 0 );
|
||||
//
|
||||
// //To avoid timeouts
|
||||
// curl_setopt( $pCurl, CURLOPT_CONNECTTIMEOUT, 10 );
|
||||
// curl_setopt( $pCurl, CURLOPT_TIMEOUT, 20 );
|
||||
//
|
||||
// curl_setopt( $pCurl, CURLOPT_NOPROGRESS, false );
|
||||
// curl_setopt( $pCurl, CURLOPT_VERBOSE, true );
|
||||
//
|
||||
// //Apply proxy settings
|
||||
// $sysConf = System::getSystemConfiguration();
|
||||
// if ($sysConf['proxy_host'] != '') {
|
||||
// curl_setopt( $pCurl, CURLOPT_PROXY, $sysConf['proxy_host'] . ($sysConf['proxy_port'] != '' ? ':' . $sysConf['proxy_port'] : '') );
|
||||
// if ($sysConf['proxy_port'] != '') {
|
||||
// curl_setopt( $pCurl, CURLOPT_PROXYPORT, $sysConf['proxy_port'] );
|
||||
// }
|
||||
// if ($sysConf['proxy_user'] != '') {
|
||||
// curl_setopt( $pCurl, CURLOPT_PROXYUSERPWD, $sysConf['proxy_user'] . ($sysConf['proxy_pass'] != '' ? ':' . $sysConf['proxy_pass'] : '') );
|
||||
// }
|
||||
// curl_setopt( $pCurl, CURLOPT_HTTPHEADER, array ('Expect:'
|
||||
// ) );
|
||||
// }
|
||||
//
|
||||
// $szContents = curl_exec( $pCurl );
|
||||
// $aInfo = curl_getinfo( $pCurl );
|
||||
//
|
||||
// $curl_session = curl_getinfo( $pCurl, CURLINFO_HTTP_CODE );
|
||||
// $headers = curl_getinfo( $pCurl );
|
||||
// $header = substr( $szContents, 0, $headers['header_size'] );
|
||||
// $content = substr( $szContents, $headers['header_size'] );
|
||||
//
|
||||
// if ($aInfo['http_code'] === 200) {
|
||||
// return $content;
|
||||
// }
|
||||
//
|
||||
// return false;
|
||||
//}
|
||||
//
|
||||
//function buildData ()
|
||||
//{
|
||||
// require_once ("classes/model/Users.php");
|
||||
//
|
||||
// G::LoadClass( "serverConfiguration" );
|
||||
// G::LoadClass( "system" );
|
||||
//
|
||||
// $oServerConf = &serverConf::getSingleton();
|
||||
//
|
||||
// $os = '';
|
||||
// if (file_exists( '/etc/redhat-release' )) {
|
||||
// $fnewsize = filesize( '/etc/redhat-release' );
|
||||
// $fp = fopen( '/etc/redhat-release', 'r' );
|
||||
// $os = trim( fread( $fp, $fnewsize ) );
|
||||
// fclose( $fp );
|
||||
// }
|
||||
// $os .= " (" . PHP_OS . ")";
|
||||
//
|
||||
// $params = array ();
|
||||
// $params['ip'] = getenv( 'SERVER_ADDR' );
|
||||
// $oServerConf->setHeartbeatProperty( 'HB_BEAT_INDEX', intval( $oServerConf->getHeartbeatProperty( 'HB_BEAT_INDEX', 'HEART_BEAT_CONF' ) ) + 1, 'HEART_BEAT_CONF' );
|
||||
//
|
||||
// $params['index'] = $oServerConf->getHeartbeatProperty( 'HB_BEAT_INDEX', 'HEART_BEAT_CONF' ); //$this->index;
|
||||
// $params['beatType'] = is_null( $oServerConf->getHeartbeatProperty( 'HB_BEAT_TYPE', 'HEART_BEAT_CONF' ) ) ? "starting" : $oServerConf->getHeartbeatProperty( 'HB_BEAT_TYPE', 'HEART_BEAT_CONF' ); //1;//$this->beatType;
|
||||
// $params['date'] = date( 'Y-m-d H:i:s' );
|
||||
// $params['host'] = getenv( 'SERVER_NAME' );
|
||||
// $params['os'] = $os;
|
||||
// $params['webserver'] = getenv( 'SERVER_SOFTWARE' );
|
||||
// $params['php'] = phpversion();
|
||||
// $params['pmVersion'] = System::getVersion();
|
||||
// if (class_exists( 'pmLicenseManager' )) {
|
||||
// $params['pmProduct'] = 'PMEE';
|
||||
// } else {
|
||||
// $params['pmProduct'] = 'PMCE';
|
||||
// }
|
||||
//
|
||||
// $params['logins'] = $oServerConf->logins;
|
||||
// $params['workspaces'] = serialize( $oServerConf->getWSList() );
|
||||
// $params['plugins'] = serialize( $oServerConf->getPluginsList() );
|
||||
// $params['dbVersion'] = $oServerConf->getDBVersion();
|
||||
// //$params ['errors'] = serialize( $oServerConf->errors );
|
||||
// if ($licInfo = $oServerConf->getProperty( 'LICENSE_INFO' )) {
|
||||
// $params['license'] = serialize( $licInfo );
|
||||
// }
|
||||
//
|
||||
// ///////
|
||||
// $criteria = new Criteria( "workflow" );
|
||||
//
|
||||
// $criteria->addSelectColumn( "COUNT(USERS.USR_UID) AS USERS_NUMBER" );
|
||||
// $criteria->add( UsersPeer::USR_UID, null, Criteria::ISNOTNULL );
|
||||
//
|
||||
// $rs = UsersPeer::doSelectRS( $criteria );
|
||||
// $rs->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||
// $rs->next();
|
||||
// $row = $rs->getRow();
|
||||
//
|
||||
// $params["users"] = $row["USERS_NUMBER"];
|
||||
//
|
||||
// ///////
|
||||
// $ee = null;
|
||||
//
|
||||
// if (file_exists( PATH_PLUGINS . "enterprise" . PATH_SEP . "VERSION" )) {
|
||||
// $ee = trim( file_get_contents( PATH_PLUGINS . "enterprise" . PATH_SEP . "VERSION" ) );
|
||||
// } else {
|
||||
// $pluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
// $details = $pluginRegistry->getPluginDetails( "enterprise.php" );
|
||||
//
|
||||
// $ee = (! ($details == null)) ? $details->iVersion : null;
|
||||
// }
|
||||
//
|
||||
// $params["ee"] = $ee;
|
||||
//
|
||||
// ///////
|
||||
// $addonNumber = 0;
|
||||
// $addonEnabledNumber = 0;
|
||||
//
|
||||
// $pluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
//
|
||||
// $arrayAddon = array ();
|
||||
//
|
||||
// if (file_exists( PATH_DATA_SITE . "ee" )) {
|
||||
// $arrayAddon = unserialize( trim( file_get_contents( PATH_DATA_SITE . "ee" ) ) );
|
||||
//
|
||||
// $arrayAddon["enterprise"] = array ("sFilename" => "enterprise-1.tar"
|
||||
// );
|
||||
// }
|
||||
//
|
||||
// foreach ($arrayAddon as $addon) {
|
||||
// $sFileName = substr( $addon["sFilename"], 0, strpos( $addon["sFilename"], "-" ) );
|
||||
//
|
||||
// if (file_exists( PATH_PLUGINS . $sFileName . ".php" )) {
|
||||
// $addonDetails = $pluginRegistry->getPluginDetails( $sFileName . ".php" );
|
||||
// $enabled = 0;
|
||||
//
|
||||
// if ($addonDetails) {
|
||||
// $enabled = ($addonDetails->enabled) ? 1 : 0;
|
||||
// }
|
||||
//
|
||||
// if ($enabled == 1) {
|
||||
// $addonEnabledNumber = $addonEnabledNumber + 1;
|
||||
// }
|
||||
//
|
||||
// $addonNumber = $addonNumber + 1;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// $params["addonNumber"] = $addonNumber;
|
||||
// $params["addonEnabledNumber"] = $addonEnabledNumber;
|
||||
//
|
||||
// ///////
|
||||
// $licenseID = null;
|
||||
// $licenseType = null;
|
||||
// $licenseDomainWorkspace = null;
|
||||
// $licenseNumber = 0;
|
||||
//
|
||||
// if (file_exists( PATH_PLUGINS . "enterprise" . PATH_SEP . "class.pmLicenseManager.php" ) && class_exists( 'enterprisePlugin' )) {
|
||||
// $licenseManager = &pmLicenseManager::getSingleton();
|
||||
//
|
||||
// preg_match( "/^license_(.*).dat$/", $licenseManager->file, $matches );
|
||||
//
|
||||
// $licenseID = $matches[1];
|
||||
// $licenseType = $licenseManager->type;
|
||||
// $licenseDomainWorkspace = $licenseManager->info["DOMAIN_WORKSPACE"];
|
||||
//
|
||||
// ///////
|
||||
// $criteria = new Criteria( "workflow" );
|
||||
//
|
||||
// $criteria->addSelectColumn( "COUNT(LICENSE_MANAGER.LICENSE_UID) AS LICENSE_NUMBER" );
|
||||
// $criteria->add( LicenseManagerPeer::LICENSE_UID, null, Criteria::ISNOTNULL );
|
||||
//
|
||||
// $rs = LicenseManagerPeer::doSelectRS( $criteria );
|
||||
// $rs->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||
// $rs->next();
|
||||
// $row = $rs->getRow();
|
||||
//
|
||||
// ///////
|
||||
// $licenseNumber = ($row["LICENSE_NUMBER"] > 0) ? $row["LICENSE_NUMBER"] : count( glob( PATH_DATA_SITE . "licenses" . PATH_SEP . "*.dat" ) );
|
||||
// }
|
||||
//
|
||||
// $params["licenseID"] = $licenseID;
|
||||
// $params["licenseType"] = $licenseType;
|
||||
// $params["licenseDomainWorkspace"] = $licenseDomainWorkspace;
|
||||
// $params["licenseNumber"] = $licenseNumber;
|
||||
//
|
||||
// ///////
|
||||
// return $params;
|
||||
//}
|
||||
//
|
||||
//function postHeartBeat ($params)
|
||||
//{
|
||||
// if (is_array( $params )) {
|
||||
// //No matter what happens with the result let's set the nextBeat to 2 hours from now
|
||||
// G::LoadClass( 'serverConfiguration' );
|
||||
// $oServerConf = & serverConf::getSingleton();
|
||||
// $oServerConf->setHeartbeatProperty( 'HB_NEXT_BEAT_DATE', strtotime( "+2 hour" ), 'HEART_BEAT_CONF' );
|
||||
// $nextBeatDate = $oServerConf->getHeartbeatProperty( 'HB_NEXT_BEAT_DATE', 'HEART_BEAT_CONF' );
|
||||
//
|
||||
// $heartBeatUrl = $oServerConf->getHeartbeatProperty( 'HB_BEAT_URL', 'HEART_BEAT_CONF' );
|
||||
//
|
||||
// $ch = curl_init();
|
||||
// curl_setopt( $ch, CURLOPT_URL, $heartBeatUrl );
|
||||
// curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
|
||||
// curl_setopt( $ch, CURLOPT_HEADER, true );
|
||||
// curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, false );
|
||||
// curl_setopt( $ch, CURLOPT_AUTOREFERER, true );
|
||||
// //To avoid SSL error
|
||||
// curl_setopt( $ch, CURLOPT_SSL_VERIFYHOST, 0 );
|
||||
// curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, 0 );
|
||||
//
|
||||
// curl_setopt( $ch, CURLOPT_POST, 1 );
|
||||
// curl_setopt( $ch, CURLOPT_POSTFIELDS, $params );
|
||||
//
|
||||
// //To avoid timeouts
|
||||
// curl_setopt( $ch, CURLOPT_CONNECTTIMEOUT, 10 );
|
||||
// curl_setopt( $ch, CURLOPT_TIMEOUT, 20 );
|
||||
//
|
||||
// //Apply proxy settings
|
||||
// $sysConf = System::getSystemConfiguration();
|
||||
// if ($sysConf['proxy_host'] != '') {
|
||||
// curl_setopt( $ch, CURLOPT_PROXY, $sysConf['proxy_host'] . ($sysConf['proxy_port'] != '' ? ':' . $sysConf['proxy_port'] : '') );
|
||||
// if ($sysConf['proxy_port'] != '') {
|
||||
// curl_setopt( $ch, CURLOPT_PROXYPORT, $sysConf['proxy_port'] );
|
||||
// }
|
||||
// if ($sysConf['proxy_user'] != '') {
|
||||
// curl_setopt( $ch, CURLOPT_PROXYUSERPWD, $sysConf['proxy_user'] . ($sysConf['proxy_pass'] != '' ? ':' . $sysConf['proxy_pass'] : '') );
|
||||
// }
|
||||
// curl_setopt( $ch, CURLOPT_HTTPHEADER, array ('Expect:'
|
||||
// ) );
|
||||
// }
|
||||
//
|
||||
// $response = curl_exec( $ch );
|
||||
// $curl_session = curl_getinfo( $ch, CURLINFO_HTTP_CODE );
|
||||
// $headers = curl_getinfo( $ch );
|
||||
// $header = substr( $response, 0, $headers['header_size'] );
|
||||
// $content = substr( $response, $headers['header_size'] );
|
||||
// curl_close( $ch );
|
||||
//
|
||||
// if ($headers['http_code'] == 200) {
|
||||
// $oServerConf->setHeartbeatProperty( 'HB_BEAT_TYPE', 'beat', 'HEART_BEAT_CONF' );
|
||||
// $oServerConf->resetLogins();
|
||||
// $oServerConf->setHeartbeatProperty( 'HB_NEXT_BEAT_DATE', strtotime( "+7 day" ), 'HEART_BEAT_CONF' );
|
||||
// //Reset Errors
|
||||
//
|
||||
//
|
||||
// } else {
|
||||
// //Catch the error
|
||||
//
|
||||
//
|
||||
// $oServerConf->setHeartbeatProperty( 'HB_NEXT_BEAT_DATE', strtotime( "+1 day" ), 'HEART_BEAT_CONF' );
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// /*
|
||||
//
|
||||
// $ch = curl_init ();
|
||||
// curl_setopt ( $ch, CURLOPT_URL, $heartBeatUrl );
|
||||
// curl_setopt ( $ch, CURLOPT_RETURNTRANSFER, true );
|
||||
// curl_setopt ( $ch, CURLOPT_HEADER, true );
|
||||
// curl_setopt ( $ch, CURLOPT_FOLLOWLOCATION, false );
|
||||
// curl_setopt ( $ch, CURLOPT_AUTOREFERER, true );
|
||||
// //To avoid SSL error
|
||||
// curl_setopt ( $ch, CURLOPT_SSL_VERIFYHOST, 0 );
|
||||
// curl_setopt ( $ch, CURLOPT_SSL_VERIFYPEER, 0 );
|
||||
//
|
||||
// curl_setopt ( $ch, CURLOPT_POST, 1 );
|
||||
// curl_setopt ( $ch, CURLOPT_POSTFIELDS, $params );
|
||||
//
|
||||
// //To avoid timeouts
|
||||
// curl_setopt ( $ch, CURLOPT_CONNECTTIMEOUT, 10 );
|
||||
// curl_setopt ( $ch, CURLOPT_TIMEOUT, 20 );
|
||||
//
|
||||
// $response = curl_exec ( $ch );
|
||||
// $curl_session = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||
// $headers = curl_getinfo ( $ch );
|
||||
// $header = substr ( $response, 0, $headers ['header_size'] );
|
||||
// $content = substr ( $response, $headers ['header_size'] );
|
||||
// curl_close ( $ch );
|
||||
//
|
||||
// if ($headers ['http_code'] == 200) {
|
||||
// $this->beatType = 'beat';
|
||||
// $this->resetLogins ();
|
||||
// $this->nextBeatDate = strtotime ( "+7 day" ); //next beat in 7 days
|
||||
// //Reset Errors
|
||||
// $this->errors=array();
|
||||
// } else {
|
||||
// //Catch the error
|
||||
// $this->errors[]=$curl_session;
|
||||
// $this->nextBeatDate = strtotime ( "+1 day" ); //retry in 30 mins
|
||||
// }
|
||||
//
|
||||
// $this->saveSingleton ();
|
||||
// */
|
||||
//}
|
||||
//
|
||||
//
|
||||
@@ -177,7 +177,7 @@ switch ($_POST['action']) {
|
||||
$zipCode = $form['USR_ZIP_CODE'] ? " - Zip Code: ". $form['USR_ZIP_CODE'] : "";
|
||||
$position = $form['USR_POSITION'] ? " - Position: ". $form['USR_POSITION'] : "";
|
||||
$role = $form['USR_ROLE'] ? " - Role: ". $form['USR_ROLE'] : "";
|
||||
$languageDef = $form['USR_DEFAULT_LANG'] ? " - Default Language: ". $form['USR_DEFAULT_LANG'] : "";
|
||||
$languageDef = (isset($form['USR_DEFAULT_LANG']))? " - Default Language: " . $form['USR_DEFAULT_LANG'] : "";
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$costByHour = $form['USR_COST_BY_HOUR'] ? $form['USR_COST_BY_HOUR'] : "";
|
||||
$unit = $form['USR_UNIT_COST'] ? $form['USR_UNIT_COST'] : "";
|
||||
@@ -222,7 +222,7 @@ switch ($_POST['action']) {
|
||||
$aData['USR_POSITION'] = $form['USR_POSITION'];
|
||||
// $aData['USR_RESUME'] = $form['USR_RESUME'];
|
||||
$aData['USR_ROLE'] = $form['USR_ROLE'];
|
||||
$aData['USR_DEFAULT_LANG'] = $form['USR_DEFAULT_LANG'];
|
||||
$aData['USR_DEFAULT_LANG'] = (isset($form['USR_DEFAULT_LANG']))? $form['USR_DEFAULT_LANG'] : '';
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$aData['USR_COST_BY_HOUR'] = $form['USR_COST_BY_HOUR'];
|
||||
$aData['USR_UNIT_COST'] = $form['USR_UNIT_COST'];
|
||||
|
||||
Reference in New Issue
Block a user