This commit is contained in:
Marco Antonio Nina Mena
2017-12-04 13:25:35 +00:00
committed by Julio Cesar Laura Avendaño
parent abe71a6ffe
commit 0d533e19d9
363 changed files with 23948 additions and 44623 deletions

View File

@@ -25,15 +25,14 @@
$G_MAIN_MENU = 'processmaker';
$G_ID_MENU_SELECTED = 'MY_ACCOUNT';
$G_PUBLISH = new Publisher();
$oHeadPublisher = & headPublisher::getSingleton();
$oHeadPublisher = headPublisher::getSingleton();
$oHeadPublisher->addScriptFile('/jscore/src/PM.js');
$oHeadPublisher->addScriptFile('/jscore/src/Sessions.js');
if (isset( $_GET['type'] )) {
$G_PUBLISH->AddContent( 'view', 'users/usersReload' );
G::RenderPage( "publishBlank", "blank" );
if (isset($_GET['type'])) {
$G_PUBLISH->AddContent('view', 'users/usersReload');
G::RenderPage("publishBlank", "blank");
} else {
$G_PUBLISH->AddContent( 'view', 'users/usersLoad' );
G::RenderPage( "publish" );
$G_PUBLISH->AddContent('view', 'users/usersLoad');
G::RenderPage("publish");
}

View File

@@ -1,8 +1,7 @@
<?php
$headPublisher = &headPublisher::getSingleton();
$headPublisher = headPublisher::getSingleton();
$headPublisher->addContent("users" . PATH_SEP . "userMain"); //Adding a html file .html
$headPublisher->addExtJsScript("users" . PATH_SEP . "userMain", true); //Adding a javascript file .js
$headPublisher->assign("CREATE_CLIENT", (isset($_GET["create_app"]))? 1 : 0);
G::RenderPage("publish", "extJs");

View File

@@ -2,11 +2,11 @@
$filter = new InputFilter();
$_POST = $filter->xssFilterHard($_POST);
if(isset($_SESSION['USER_LOGGED'])) {
$_SESSION['USER_LOGGED'] = $filter->xssFilterHard($_SESSION['USER_LOGGED']);
if (isset($_SESSION['USER_LOGGED'])) {
$_SESSION['USER_LOGGED'] = $filter->xssFilterHard($_SESSION['USER_LOGGED']);
}
if(isset($_SESSION['USR_USERNAME'])) {
$_SESSION['USR_USERNAME'] = $filter->xssFilterHard($_SESSION['USR_USERNAME']);
if (isset($_SESSION['USR_USERNAME'])) {
$_SESSION['USR_USERNAME'] = $filter->xssFilterHard($_SESSION['USR_USERNAME']);
}
global $RBAC;
@@ -14,35 +14,35 @@ $result = new StdClass();
switch ($_POST['action']) {
case 'countryList':
require_once ("classes/model/IsoCountry.php");
require_once("classes/model/IsoCountry.php");
$c = new Criteria();
$c->add(IsoCountryPeer::IC_UID, null, Criteria::ISNOTNULL);
$c->addAscendingOrderByColumn(IsoCountryPeer::IC_NAME);
$countries = IsoCountryPeer::doSelect($c);
foreach ($countries as $rowid => $row) {
$oData[] = Array('IC_UID' => $row->getICUid(), 'IC_NAME' => $row->getICName());
$oData[] = array('IC_UID' => $row->getICUid(), 'IC_NAME' => $row->getICName());
}
print (G::json_encode($oData));
print(G::json_encode($oData));
break;
case 'stateList':
require_once ("classes/model/IsoSubdivision.php");
require_once("classes/model/IsoSubdivision.php");
$c = new Criteria();
$country = $_POST['IC_UID'];
$c->add(IsoSubdivisionPeer::IC_UID, $country, Criteria::EQUAL);
$c->addAscendingOrderByColumn(IsoSubdivisionPeer::IS_NAME);
$locations = IsoSubdivisionPeer::doSelect($c);
$oData = Array();
$oData = array();
foreach ($locations as $rowid => $row) {
if (($row->getISUid() != '') && ($row->getISName() != '')) {
$oData[] = Array('IS_UID' => $row->getISUid(), 'IS_NAME' => $row->getISName());
$oData[] = array('IS_UID' => $row->getISUid(), 'IS_NAME' => $row->getISName());
}
}
print (G::json_encode($oData));
print(G::json_encode($oData));
break;
case 'locationList':
require_once ("classes/model/IsoLocation.php");
require_once("classes/model/IsoLocation.php");
$c = new Criteria();
$country = $_POST['IC_UID'];
$state = $_POST['IS_UID'];
@@ -51,13 +51,13 @@ switch ($_POST['action']) {
$c->addAscendingOrderByColumn(IsoLocationPeer::IL_NAME);
$locations = IsoLocationPeer::doSelect($c);
$oData = Array();
$oData = array();
foreach ($locations as $rowid => $row) {
if (($row->getILUid() != '') && ($row->getILName() != '')) {
$oData[] = Array('IL_UID' => $row->getILUid(), 'IL_NAME' => $row->getILName());
$oData[] = array('IL_UID' => $row->getILUid(), 'IL_NAME' => $row->getILName());
}
}
print (G::json_encode($oData));
print(G::json_encode($oData));
break;
case 'usersList':
$filter = (isset($_POST['filter']))? $_POST['filter'] : '';
@@ -95,7 +95,7 @@ switch ($_POST['action']) {
$oData[] = array('CALENDAR_UID' => $row['CALENDAR_UID'], 'CALENDAR_NAME' => $row['CALENDAR_NAME']);
}
}
print (G::json_encode($oData));
print(G::json_encode($oData));
break;
case 'rolesList':
require_once PATH_RBAC . "model/Roles.php";
@@ -104,13 +104,13 @@ switch ($_POST['action']) {
foreach ($rolesData as $rowid => $row) {
$oData[] = array('ROL_UID' => $row['ROL_CODE'], 'ROL_CODE' => $row['ROL_NAME']);
}
print (G::json_encode($oData));
print(G::json_encode($oData));
break;
case 'getUserLogedRole':
require_once 'classes/model/Users.php';
$oUser = new Users();
$aUserLog = $oUser->loadDetailed($_SESSION['USER_LOGGED']);
print (G::json_encode(array(
print(G::json_encode(array(
'USR_UID' => $aUserLog['USR_UID'],
'USR_USERNAME' => $aUserLog['USR_USERNAME'],
'USR_ROLE' => $aUserLog['USR_ROLE']
@@ -121,10 +121,10 @@ switch ($_POST['action']) {
$langs = $Translations->getTranslationEnvironments();
$oData[] = array('LAN_ID' => '', 'LAN_NAME' => '- ' . G::LoadTranslation('ID_NONE') . ' -');
foreach ($langs as $lang) {
$oData[] = array ('LAN_ID' => $lang['LOCALE'],'LAN_NAME' => $lang['LANGUAGE']
$oData[] = array('LAN_ID' => $lang['LOCALE'],'LAN_NAME' => $lang['LANGUAGE']
);
}
print (G::json_encode($oData));
print(G::json_encode($oData));
break;
case 'saveUser':
case 'savePersonalInfo':
@@ -136,7 +136,7 @@ switch ($_POST['action']) {
$form = $user->checkPermissionForEdit($_SESSION['USER_LOGGED'], $permissionsToSaveData, $form);
switch ($_POST['action']) {
case 'saveUser';
case 'saveUser':
if (!$user->checkPermission($_SESSION['USER_LOGGED'], 'PM_USERS')) {
throw new Exception(G::LoadTranslation('ID_USER_NOT_HAVE_PERMISSION', [$_SESSION['USER_LOGGED']]));
}
@@ -180,7 +180,7 @@ switch ($_POST['action']) {
$def_menu = isset($form['PREF_DEFAULT_MENUSELECTED']) ? $form['PREF_DEFAULT_MENUSELECTED'] : '';
$def_cases_menu = isset($form['PREF_DEFAULT_CASES_MENUSELECTED']) ? $form['PREF_DEFAULT_CASES_MENUSELECTED'] : '';
$oConf = new Configurations();
$aConf = Array('DEFAULT_LANG' => $def_lang, 'DEFAULT_MENU' => $def_menu, 'DEFAULT_CASES_MENU' => $def_cases_menu);
$aConf = array('DEFAULT_LANG' => $def_lang, 'DEFAULT_MENU' => $def_menu, 'DEFAULT_CASES_MENU' => $def_cases_menu);
$oConf->aConfig = $aConf;
$oConf->saveConfig('USER_PREFERENCES', '', '', $userUid);
@@ -205,12 +205,12 @@ switch ($_POST['action']) {
$result = new stdClass();
$result->success = true;
print (G::json_encode($result));
print(G::json_encode($result));
} catch (Exception $e) {
$result = new stdClass();
$result->success = false;
$result->error = $e->getMessage();
print (G::json_encode($result));
print(G::json_encode($result));
}
break;
case 'userData':
@@ -302,7 +302,6 @@ switch ($_POST['action']) {
if ($aFields['PREF_DEFAULT_CASES_MENUSELECTED'] != '') {
foreach ($oMenu->Id as $i => $item) {
if ($aFields['PREF_DEFAULT_CASES_MENUSELECTED'] == $item) {
$casesMenuSelected = $oMenu->Labels[$i];
}
@@ -333,39 +332,39 @@ switch ($_POST['action']) {
$result->user = $aFields;
$result->permission = $permissions;
print (G::json_encode($result));
print(G::json_encode($result));
break;
case 'defaultMainMenuOptionList':
foreach ($RBAC->aUserInfo['PROCESSMAKER']['PERMISSIONS'] as $permission) {
switch ($permission['PER_CODE']) {
case 'PM_USERS':
case 'PM_SETUP':
$rows[] = Array('id' => 'PM_SETUP', 'name' => strtoupper(G::LoadTranslation('ID_SETUP'))
$rows[] = array('id' => 'PM_SETUP', 'name' => strtoupper(G::LoadTranslation('ID_SETUP'))
);
break;
case 'PM_CASES':
$rows[] = Array('id' => 'PM_CASES', 'name' => strtoupper(G::LoadTranslation('ID_CASES'))
$rows[] = array('id' => 'PM_CASES', 'name' => strtoupper(G::LoadTranslation('ID_CASES'))
);
break;
case 'PM_FACTORY':
$rows[] = Array('id' => 'PM_FACTORY', 'name' => strtoupper(G::LoadTranslation('ID_APPLICATIONS'))
$rows[] = array('id' => 'PM_FACTORY', 'name' => strtoupper(G::LoadTranslation('ID_APPLICATIONS'))
);
break;
case 'PM_DASHBOARD':
$rows[] = Array('id' => 'PM_DASHBOARD', 'name' => strtoupper(G::LoadTranslation('ID_DASHBOARD'))
$rows[] = array('id' => 'PM_DASHBOARD', 'name' => strtoupper(G::LoadTranslation('ID_DASHBOARD'))
);
/*----------------------------------********---------------------------------*/
// NEW DASHBOARD MODULE
$licensedFeatures = & PMLicensedFeatures::getSingleton();
$licensedFeatures = PMLicensedFeatures::getSingleton();
if ($licensedFeatures->verifyfeature('r19Vm5DK1UrT09MenlLYjZxejlhNUZ1b1NhV0JHWjBsZEJ6dnpJa3dTeWVLVT0=')) {
$rows[] = Array('id' => 'PM_STRATEGIC_DASHBOARD', 'name' => strtoupper(G::LoadTranslation('ID_STRATEGIC_DASHBOARD'))
$rows[] = array('id' => 'PM_STRATEGIC_DASHBOARD', 'name' => strtoupper(G::LoadTranslation('ID_STRATEGIC_DASHBOARD'))
);
}
/*----------------------------------********---------------------------------*/
break;
}
}
print (G::json_encode($rows));
print(G::json_encode($rows));
break;
case 'defaultCasesMenuOptionList':
@@ -374,10 +373,10 @@ switch ($_POST['action']) {
foreach ($oMenu->Id as $i => $item) {
if ($oMenu->Types[$i] != 'blockHeader') {
$rowsCasesMenu[] = Array('id' => $item, 'name' => $oMenu->Labels[$i]);
$rowsCasesMenu[] = array('id' => $item, 'name' => $oMenu->Labels[$i]);
}
}
print (G::json_encode($rowsCasesMenu));
print(G::json_encode($rowsCasesMenu));
break;
case 'testPassword':
require_once 'classes/model/UsersProperties.php';
@@ -430,7 +429,7 @@ switch ($_POST['action']) {
$span = '<span style="color: ' . $color . '; font: 9px tahoma,arial,helvetica,sans-serif;">';
$gif = '<img width="13" height="13" border="0" src="' . $img . '">';
$aFields['DESCRIPTION'] = $span . $gif . $aFields['DESCRIPTION'];
print (G::json_encode($aFields));
print(G::json_encode($aFields));
break;
case 'testUsername':
require_once 'classes/model/Users.php';
@@ -475,7 +474,7 @@ switch ($_POST['action']) {
$password = $_POST["password"];
$resultLogin = $RBAC->VerifyLogin($_SESSION["USR_USERNAME"], $password);
if($resultLogin == $_SESSION["USER_LOGGED"]) {
if ($resultLogin == $_SESSION["USER_LOGGED"]) {
$messageResultLogin = "OK";
} else {
$messageResultLogin = "ERROR";

View File

@@ -9,13 +9,13 @@ if (isset($_GET['USR_UID']) && RBAC::isGuestUserUid($_GET['USR_UID'])) {
//calculating the max upload file size;
use ProcessMaker\Core\System;
$POST_MAX_SIZE = ini_get( 'post_max_size' );
$mul = substr( $POST_MAX_SIZE, - 1 );
$POST_MAX_SIZE = ini_get('post_max_size');
$mul = substr($POST_MAX_SIZE, - 1);
$mul = ($mul == 'M' ? 1048576 : ($mul == 'K' ? 1024 : ($mul == 'G' ? 1073741824 : 1)));
$postMaxSize = (int) $POST_MAX_SIZE * $mul;
$UPLOAD_MAX_SIZE = ini_get( 'upload_max_filesize' );
$mul = substr( $UPLOAD_MAX_SIZE, - 1 );
$UPLOAD_MAX_SIZE = ini_get('upload_max_filesize');
$mul = substr($UPLOAD_MAX_SIZE, - 1);
$mul = ($mul == 'M' ? 1048576 : ($mul == 'K' ? 1024 : ($mul == 'G' ? 1073741824 : 1)));
$uploadMaxSize = (int) $UPLOAD_MAX_SIZE * $mul;
@@ -25,16 +25,16 @@ if ($postMaxSize < $uploadMaxSize) {
//Add year by expiration date
$expirationDate = 1;
$envFile = PATH_CONFIG . 'env.ini';
if (file_exists($envFile) ) {
if (file_exists($envFile)) {
$sysConf = System::getSystemConfiguration($envFile);
if(isset($sysConf['expiration_year']) && $sysConf['expiration_year']>0){
$expirationDate = abs($sysConf['expiration_year']);
if (isset($sysConf['expiration_year']) && $sysConf['expiration_year']>0) {
$expirationDate = abs($sysConf['expiration_year']);
}
}
$languageManagement = 0;
/*----------------------------------********---------------------------------*/
$licensedFeatures = & PMLicensedFeatures::getSingleton();
$licensedFeatures = PMLicensedFeatures::getSingleton();
if ($licensedFeatures->verifyfeature('w2LL3o4NFNiaDRXcFFCYVpJS3Jsall5dmh0ZWtBTkdKR3ROS0VzWGdoLzNQYz0=')) {
$languageManagement = 1;
}
@@ -42,17 +42,18 @@ if ($licensedFeatures->verifyfeature('w2LL3o4NFNiaDRXcFFCYVpJS3Jsall5dmh0ZWtBTkd
$arraySystemConfiguration = System::getSystemConfiguration('', '', config("system.workspace"));
$oHeadPublisher = & headPublisher::getSingleton();
$oHeadPublisher->addExtJsScript( 'users/users', true ); //adding a javascript file .js
$oHeadPublisher->assign( 'USR_UID', $_GET['USR_UID'] );
$oHeadPublisher->assign( 'MODE', $_GET['MODE'] );
$oHeadPublisher->assign( 'MAX_FILES_SIZE', ' (' . $UPLOAD_MAX_SIZE . ') ' );
$oHeadPublisher = headPublisher::getSingleton();
$oHeadPublisher->addExtJsScript('users/users', true); //adding a javascript file .js
$oHeadPublisher->assign('USR_UID', $_GET['USR_UID']);
$oHeadPublisher->assign('MODE', $_GET['MODE']);
$oHeadPublisher->assign('MAX_FILES_SIZE', ' (' . $UPLOAD_MAX_SIZE . ') ');
$oHeadPublisher->assign('SYSTEM_TIME_ZONE', $arraySystemConfiguration['time_zone']);
$oHeadPublisher->assign('TIME_ZONE_DATA', array_map(function ($value) { return [$value, $value]; }, DateTimeZone::listIdentifiers()));
$oHeadPublisher->assign('TIME_ZONE_DATA', array_map(function ($value) {
return [$value, $value];
}, DateTimeZone::listIdentifiers()));
$oHeadPublisher->assign('__SYSTEM_UTC_TIME_ZONE__', (isset($_SESSION['__SYSTEM_UTC_TIME_ZONE__']) && $_SESSION['__SYSTEM_UTC_TIME_ZONE__'])? 1 : 0);
$oHeadPublisher->assign('EXPIRATION_DATE', $expirationDate);
$oHeadPublisher->assign('LANGUAGE_MANAGEMENT', $languageManagement);
$oHeadPublisher->assign('__ACTION__', 'saveUser');
G::RenderPage( 'publish', 'extJs' );
G::RenderPage('publish', 'extJs');

View File

@@ -22,27 +22,27 @@
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
if (($RBAC_Response = $RBAC->userCanAccess( "PM_LOGIN" )) != 1) {
if (($RBAC_Response = $RBAC->userCanAccess("PM_LOGIN")) != 1) {
return $RBAC_Response;
}
global $RBAC;
$access = $RBAC->userCanAccess( 'PM_USERS' );
$access = $RBAC->userCanAccess('PM_USERS');
if ($access != 1) {
switch ($access) {
case - 1:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
G::header('location: ../login/login');
die();
break;
case - 2:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
G::header( 'location: ../login/login' );
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels');
G::header('location: ../login/login');
die();
break;
default:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
G::header('location: ../login/login');
die();
break;
}
@@ -55,16 +55,16 @@ $G_ID_SUB_MENU_SELECTED = 'USERS';
$G_PUBLISH = new Publisher();
$c = new Configurations();
$configEnv = $c->getConfiguration( 'ENVIRONMENT_SETTINGS', '' );
$Config['fullNameFormat'] = isset( $configEnv['format'] ) ? $configEnv['format'] : '@firstName @lastName (@userName)';
$configEnv = $c->getConfiguration('ENVIRONMENT_SETTINGS', '');
$Config['fullNameFormat'] = isset($configEnv['format']) ? $configEnv['format'] : '@firstName @lastName (@userName)';
$oCriteria = new Criteria();
$oCriteria->addSelectColumn( UsersPeer::USR_FIRSTNAME );
$oCriteria->addSelectColumn( UsersPeer::USR_LASTNAME );
$oCriteria->addSelectColumn( UsersPeer::USR_USERNAME );
$oCriteria->add( UsersPeer::USR_UID, $_GET['uUID'] );
$oDataset = UsersPeer::doSelectRS( $oCriteria );
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
$oCriteria->addSelectColumn(UsersPeer::USR_FIRSTNAME);
$oCriteria->addSelectColumn(UsersPeer::USR_LASTNAME);
$oCriteria->addSelectColumn(UsersPeer::USR_USERNAME);
$oCriteria->add(UsersPeer::USR_UID, $_GET['uUID']);
$oDataset = UsersPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
$aRow = $oDataset->getRow();
@@ -91,12 +91,11 @@ $users["USR_AUTH_SOURCE"] = (isset($arrayAuthSources[$_GET["uUID"]]))? $arrayAut
$users["fullNameFormat"] = $Config["fullNameFormat"];
$users["CURRENT_TAB"] = $ctab;
$oHeadPublisher = & headPublisher::getSingleton();
$oHeadPublisher->addExtJsScript( 'users/usersGroups', false ); //adding a javascript file .js
$oHeadPublisher = headPublisher::getSingleton();
$oHeadPublisher->addExtJsScript('users/usersGroups', false); //adding a javascript file .js
// $oHeadPublisher->addContent('users/usersGroups'); //adding a html file .html.
$oHeadPublisher->assign( 'USERS', $users );
$oHeadPublisher->assign('USERS', $users);
$oHeadPublisher->assign( 'hasAuthPerm', ($RBAC->userCanAccess( 'PM_SETUP_ADVANCE' ) == 1) );
G::RenderPage( 'publish', 'extJs' );
$oHeadPublisher->assign('hasAuthPerm', ($RBAC->userCanAccess('PM_SETUP_ADVANCE') == 1));
G::RenderPage('publish', 'extJs');

View File

@@ -4,11 +4,11 @@ global $RBAC;
use ProcessMaker\Core\System;
require_once 'classes/model/Users.php';
unset( $_SESSION['CURRENT_USER'] );
unset($_SESSION['CURRENT_USER']);
$oUser = new Users();
$aFields = $oUser->load( $_SESSION['USER_LOGGED'] );
$aFields = $oUser->load($_SESSION['USER_LOGGED']);
if ($RBAC->userCanAccess( 'PM_EDITPERSONALINFO' ) == 1) { //he has permitions for edit his profile
if ($RBAC->userCanAccess('PM_EDITPERSONALINFO') == 1) { //he has permitions for edit his profile
$canEdit = false;
} else { //he has not permitions for edit his profile, so just view mode will be displayed
$canEdit = true;
@@ -17,13 +17,13 @@ $canEditCalendar = $RBAC->userCanAccess('PM_EDITPERSONALINFO') == 1 &&
$RBAC->userCanAccess('PM_EDITPERSONALINFO_CALENDAR') == 1;
//calculating the max upload file size;
$POST_MAX_SIZE = ini_get( 'post_max_size' );
$mul = substr( $POST_MAX_SIZE, - 1 );
$POST_MAX_SIZE = ini_get('post_max_size');
$mul = substr($POST_MAX_SIZE, - 1);
$mul = ($mul == 'M' ? 1048576 : ($mul == 'K' ? 1024 : ($mul == 'G' ? 1073741824 : 1)));
$postMaxSize = (int) $POST_MAX_SIZE * $mul;
$UPLOAD_MAX_SIZE = ini_get( 'upload_max_filesize' );
$mul = substr( $UPLOAD_MAX_SIZE, - 1 );
$UPLOAD_MAX_SIZE = ini_get('upload_max_filesize');
$mul = substr($UPLOAD_MAX_SIZE, - 1);
$mul = ($mul == 'M' ? 1048576 : ($mul == 'K' ? 1024 : ($mul == 'G' ? 1073741824 : 1)));
$uploadMaxSize = (int) $UPLOAD_MAX_SIZE * $mul;
@@ -33,16 +33,16 @@ if ($postMaxSize < $uploadMaxSize) {
//Add year by expiration date
$expirationDate = 1;
$envFile = PATH_CONFIG . 'env.ini';
if (file_exists($envFile) ) {
if (file_exists($envFile)) {
$sysConf = System::getSystemConfiguration($envFile);
if(isset($sysConf['expiration_year']) && $sysConf['expiration_year']>0){
$expirationDate = abs($sysConf['expiration_year']);
if (isset($sysConf['expiration_year']) && $sysConf['expiration_year']>0) {
$expirationDate = abs($sysConf['expiration_year']);
}
}
$languageManagement = 0;
/*----------------------------------********---------------------------------*/
$licensedFeatures = & PMLicensedFeatures::getSingleton();
$licensedFeatures = PMLicensedFeatures::getSingleton();
if ($licensedFeatures->verifyfeature('w2LL3o4NFNiaDRXcFFCYVpJS3Jsall5dmh0ZWtBTkdKR3ROS0VzWGdoLzNQYz0=')) {
$languageManagement = 1;
}
@@ -50,21 +50,23 @@ if ($licensedFeatures->verifyfeature('w2LL3o4NFNiaDRXcFFCYVpJS3Jsall5dmh0ZWtBTkd
$arraySystemConfiguration = System::getSystemConfiguration('', '', config("system.workspace"));
$oHeadPublisher = & headPublisher::getSingleton();
$oHeadPublisher->addExtJsScript( 'users/users', true ); //adding a javascript file .js
$oHeadPublisher = headPublisher::getSingleton();
$oHeadPublisher->addExtJsScript('users/users', true); //adding a javascript file .js
// $oHeadPublisher->addContent('users/users'); //adding a html file .html.
$oHeadPublisher->assign( 'USR_UID', $aFields['USR_UID'] );
$oHeadPublisher->assign( 'infoMode', true );
$oHeadPublisher->assign( 'EDITPROFILE', 1);
$oHeadPublisher->assign( 'canEdit', $canEdit );
$oHeadPublisher->assign('USR_UID', $aFields['USR_UID']);
$oHeadPublisher->assign('infoMode', true);
$oHeadPublisher->assign('EDITPROFILE', 1);
$oHeadPublisher->assign('canEdit', $canEdit);
$oHeadPublisher->assign('canEditCalendar', $canEditCalendar);
$oHeadPublisher->assign( 'MAX_FILES_SIZE', ' (' . $UPLOAD_MAX_SIZE . ') ' );
$oHeadPublisher->assign( 'MODE', '' );
$oHeadPublisher->assign('MAX_FILES_SIZE', ' (' . $UPLOAD_MAX_SIZE . ') ');
$oHeadPublisher->assign('MODE', '');
$oHeadPublisher->assign('SYSTEM_TIME_ZONE', $arraySystemConfiguration['time_zone']);
$oHeadPublisher->assign('TIME_ZONE_DATA', array_map(function ($value) { return [$value, $value]; }, DateTimeZone::listIdentifiers()));
$oHeadPublisher->assign('TIME_ZONE_DATA', array_map(function ($value) {
return [$value, $value];
}, DateTimeZone::listIdentifiers()));
$oHeadPublisher->assign('__SYSTEM_UTC_TIME_ZONE__', (isset($_SESSION['__SYSTEM_UTC_TIME_ZONE__']) && $_SESSION['__SYSTEM_UTC_TIME_ZONE__'])? 1 : 0);
$oHeadPublisher->assign('EXPIRATION_DATE', $expirationDate);
$oHeadPublisher->assign('LANGUAGE_MANAGEMENT', $languageManagement);
$oHeadPublisher->assign('__ACTION__', 'savePersonalInfo');
G::RenderPage( 'publish', 'extJs' );
G::RenderPage('publish', 'extJs');

View File

@@ -3,16 +3,16 @@ global $RBAC;
use ProcessMaker\Core\System;
$RBAC->requirePermissions( 'PM_USERS' );
$RBAC->requirePermissions('PM_USERS');
//calculating the max upload file size;
$POST_MAX_SIZE = ini_get( 'post_max_size' );
$mul = substr( $POST_MAX_SIZE, - 1 );
$POST_MAX_SIZE = ini_get('post_max_size');
$mul = substr($POST_MAX_SIZE, - 1);
$mul = ($mul == 'M' ? 1048576 : ($mul == 'K' ? 1024 : ($mul == 'G' ? 1073741824 : 1)));
$postMaxSize = (int) $POST_MAX_SIZE * $mul;
$UPLOAD_MAX_SIZE = ini_get( 'upload_max_filesize' );
$mul = substr( $UPLOAD_MAX_SIZE, - 1 );
$UPLOAD_MAX_SIZE = ini_get('upload_max_filesize');
$mul = substr($UPLOAD_MAX_SIZE, - 1);
$mul = ($mul == 'M' ? 1048576 : ($mul == 'K' ? 1024 : ($mul == 'G' ? 1073741824 : 1)));
$uploadMaxSize = (int) $UPLOAD_MAX_SIZE * $mul;
@@ -22,17 +22,17 @@ if ($postMaxSize < $uploadMaxSize) {
//Add year by expiration date
$expirationDate = 1;
$envFile = PATH_CONFIG . 'env.ini';
if (file_exists($envFile) ) {
if (file_exists($envFile)) {
$sysConf = System::getSystemConfiguration($envFile);
if(isset($sysConf['expiration_year']) && $sysConf['expiration_year']>0){
$expirationDate = abs($sysConf['expiration_year']);
if (isset($sysConf['expiration_year']) && $sysConf['expiration_year']>0) {
$expirationDate = abs($sysConf['expiration_year']);
}
}
$languageManagement = 0;
/*----------------------------------********---------------------------------*/
$licensedFeatures = & PMLicensedFeatures::getSingleton();
$licensedFeatures = PMLicensedFeatures::getSingleton();
if ($licensedFeatures->verifyfeature('w2LL3o4NFNiaDRXcFFCYVpJS3Jsall5dmh0ZWtBTkdKR3ROS0VzWGdoLzNQYz0=')) {
$languageManagement = 1;
}
@@ -40,17 +40,18 @@ if ($licensedFeatures->verifyfeature('w2LL3o4NFNiaDRXcFFCYVpJS3Jsall5dmh0ZWtBTkd
$arraySystemConfiguration = System::getSystemConfiguration('', '', config("system.workspace"));
$oHeadPublisher = & headPublisher::getSingleton();
$oHeadPublisher->addExtJsScript( 'users/users', true ); //adding a javascript file .js
$oHeadPublisher = headPublisher::getSingleton();
$oHeadPublisher->addExtJsScript('users/users', true); //adding a javascript file .js
$oHeadPublisher->assign('USR_UID', '');
$oHeadPublisher->assign('MODE', $_GET['MODE']);
$oHeadPublisher->assign('MAX_FILES_SIZE', ' (' . $UPLOAD_MAX_SIZE . ') ');
$oHeadPublisher->assign('SYSTEM_TIME_ZONE', $arraySystemConfiguration['time_zone']);
$oHeadPublisher->assign('TIME_ZONE_DATA', array_map(function ($value) { return [$value, $value]; }, DateTimeZone::listIdentifiers()));
$oHeadPublisher->assign('TIME_ZONE_DATA', array_map(function ($value) {
return [$value, $value];
}, DateTimeZone::listIdentifiers()));
$oHeadPublisher->assign('__SYSTEM_UTC_TIME_ZONE__', (isset($_SESSION['__SYSTEM_UTC_TIME_ZONE__']) && $_SESSION['__SYSTEM_UTC_TIME_ZONE__'])? 1 : 0);
$oHeadPublisher->assign('EXPIRATION_DATE', $expirationDate);
$oHeadPublisher->assign('LANGUAGE_MANAGEMENT', $languageManagement);
$oHeadPublisher->assign('__ACTION__', 'saveUser');
G::RenderPage( 'publish', 'extJs' );
G::RenderPage('publish', 'extJs');

View File

@@ -1,68 +1,68 @@
<?php
/**
* users_List.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
$RBAC_Response = $RBAC->requirePermissions('PM_USERS');
if (!$RBAC_Response)
return $RBAC_Response;
global $RBAC;
$access = $RBAC->userCanAccess('PM_USERS');
if ($access != 1) {
switch ($access) {
case -1:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
G::header('location: ../login/login');
die();
break;
case -2:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels');
G::header('location: ../login/login');
die();
break;
default:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
G::header('location: ../login/login');
die();
break;
}
}
$G_MAIN_MENU = 'processmaker';
$G_SUB_MENU = 'users';
$G_ID_MENU_SELECTED = 'USERS';
$G_ID_SUB_MENU_SELECTED = 'USERS';
$G_PUBLISH = new Publisher();
$c = new Configurations();
$configPage = $c->getConfiguration('usersList', 'pageSize', '', $_SESSION['USER_LOGGED']);
$Config['pageSize'] = isset($configPage['pageSize']) ? $configPage['pageSize'] : 20;
$oHeadPublisher = &headPublisher::getSingleton();
$oHeadPublisher->addExtJsScript('users/usersList', false); //adding a javascript file .js
$oHeadPublisher->addContent('users/usersList'); //adding a html file .html.
$oHeadPublisher->assign('CONFIG', $Config);
$oHeadPublisher->assign('FORMATS', $c->getFormats());
G::RenderPage( 'publish', 'extJs' );
<?php
/**
* users_List.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
$RBAC_Response = $RBAC->requirePermissions('PM_USERS');
if (!$RBAC_Response) {
return $RBAC_Response;
}
global $RBAC;
$access = $RBAC->userCanAccess('PM_USERS');
if ($access != 1) {
switch ($access) {
case -1:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
G::header('location: ../login/login');
die();
break;
case -2:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels');
G::header('location: ../login/login');
die();
break;
default:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
G::header('location: ../login/login');
die();
break;
}
}
$G_MAIN_MENU = 'processmaker';
$G_SUB_MENU = 'users';
$G_ID_MENU_SELECTED = 'USERS';
$G_ID_SUB_MENU_SELECTED = 'USERS';
$G_PUBLISH = new Publisher();
$c = new Configurations();
$configPage = $c->getConfiguration('usersList', 'pageSize', '', $_SESSION['USER_LOGGED']);
$Config['pageSize'] = isset($configPage['pageSize']) ? $configPage['pageSize'] : 20;
$oHeadPublisher = headPublisher::getSingleton();
$oHeadPublisher->addExtJsScript('users/usersList', false); //adding a javascript file .js
$oHeadPublisher->addContent('users/usersList'); //adding a html file .html.
$oHeadPublisher->assign('CONFIG', $Config);
$oHeadPublisher->assign('FORMATS', $c->getFormats());
G::RenderPage('publish', 'extJs');