CODE STYLE, workflow/engine/methods/users/
FILES: data_usersList.php index.php myInfo.php myInfo_Ajax.php myInfo_Edit.php myInfo_Save.php usersAjax.php usersEdit.php usersGroups.php usersInit.php usersNew.php users_Ajax.php users_AuthSource.php users_AuthSourceSave.php users_Delete.php users_DeleteAssign.php users_DeleteReassign.php users_DeleteReassignEnd.php users_Edit.php users_Groups.php users_List.php users_New.php users_Reassign.php users_ReassignCases.php users_Save.php users_View.php users_ViewPhoto.php users_ViewPhotoGrid.php users_ViewResume.php
This commit is contained in:
@@ -13,78 +13,75 @@
|
||||
*
|
||||
* 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
|
||||
* 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/>.
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
try {
|
||||
global $RBAC;
|
||||
switch ($RBAC->userCanAccess('PM_REASSIGNCASE')) {
|
||||
case -2:
|
||||
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels');
|
||||
G::header('location: ../login/login');
|
||||
die;
|
||||
break;
|
||||
case -1:
|
||||
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
|
||||
G::header('location: ../login/login');
|
||||
die;
|
||||
break;
|
||||
}
|
||||
G::LoadClass('case');
|
||||
$oCase = new Cases();
|
||||
$aCases = array();
|
||||
$aUsers = array();
|
||||
$c=0;
|
||||
if(isset($_POST['USERS']))
|
||||
{ if (is_array($_POST['USERS'])) {
|
||||
foreach ($_POST['USERS'] as $sKey => $sUser) {
|
||||
if ($sUser != '') {
|
||||
$c++;
|
||||
$oCase->reassignCase($_POST['APPLICATIONS'][$sKey], $_POST['INDEXES'][$sKey], $_POST['USR_UID'], $sUser);
|
||||
$aCases[] = $_POST['APPLICATIONS'][$sKey];
|
||||
$aUsers[] = $sUser;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
G::LoadClass('case');
|
||||
$oCase = new Cases();
|
||||
require_once 'classes/model/Users.php';
|
||||
$oUser = new Users();
|
||||
$sText = '';
|
||||
foreach ($aCases as $sKey => $sCase) {
|
||||
$aCase = $oCase->loadCase($sCase);
|
||||
$aUser = $oUser->load($aUsers[$sKey]);
|
||||
$sText .= $aCase['TITLE'] . ' => ' . $aUser['USR_FIRSTNAME'] . ' ' . $aUser['USR_LASTNAME'] . ' (' . $aUser['USR_USERNAME'] . ')' . '<br />';
|
||||
}
|
||||
|
||||
|
||||
$G_MAIN_MENU = 'processmaker';
|
||||
$G_SUB_MENU = 'users';
|
||||
$G_ID_MENU_SELECTED = 'USERS';
|
||||
$G_ID_SUB_MENU_SELECTED = 'USERS';
|
||||
$G_PUBLISH = new Publisher;
|
||||
|
||||
$aMessage['USR_UID'] = $_POST['USR_UID'];
|
||||
|
||||
$aMessage['MESSAGE'] = $sText;
|
||||
if($_POST['CONT']!=$c)
|
||||
$aMessage['EVA']=G::LoadTranslation('ID_CASESREASSIGN');//
|
||||
else
|
||||
$aMessage['EVA']='';
|
||||
|
||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'users/users_ReassignShowInfo', '', $aMessage);
|
||||
G::RenderPage('publish');
|
||||
global $RBAC;
|
||||
switch ($RBAC->userCanAccess( 'PM_REASSIGNCASE' )) {
|
||||
case - 2:
|
||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
|
||||
G::header( 'location: ../login/login' );
|
||||
die();
|
||||
break;
|
||||
case - 1:
|
||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
||||
G::header( 'location: ../login/login' );
|
||||
die();
|
||||
break;
|
||||
}
|
||||
G::LoadClass( 'case' );
|
||||
$oCase = new Cases();
|
||||
$aCases = array ();
|
||||
$aUsers = array ();
|
||||
$c = 0;
|
||||
if (isset( $_POST['USERS'] )) {
|
||||
if (is_array( $_POST['USERS'] )) {
|
||||
foreach ($_POST['USERS'] as $sKey => $sUser) {
|
||||
if ($sUser != '') {
|
||||
$c ++;
|
||||
$oCase->reassignCase( $_POST['APPLICATIONS'][$sKey], $_POST['INDEXES'][$sKey], $_POST['USR_UID'], $sUser );
|
||||
$aCases[] = $_POST['APPLICATIONS'][$sKey];
|
||||
$aUsers[] = $sUser;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
G::LoadClass( 'case' );
|
||||
$oCase = new Cases();
|
||||
require_once 'classes/model/Users.php';
|
||||
$oUser = new Users();
|
||||
$sText = '';
|
||||
foreach ($aCases as $sKey => $sCase) {
|
||||
$aCase = $oCase->loadCase( $sCase );
|
||||
$aUser = $oUser->load( $aUsers[$sKey] );
|
||||
$sText .= $aCase['TITLE'] . ' => ' . $aUser['USR_FIRSTNAME'] . ' ' . $aUser['USR_LASTNAME'] . ' (' . $aUser['USR_USERNAME'] . ')' . '<br />';
|
||||
}
|
||||
|
||||
$G_MAIN_MENU = 'processmaker';
|
||||
$G_SUB_MENU = 'users';
|
||||
$G_ID_MENU_SELECTED = 'USERS';
|
||||
$G_ID_SUB_MENU_SELECTED = 'USERS';
|
||||
$G_PUBLISH = new Publisher();
|
||||
|
||||
$aMessage['USR_UID'] = $_POST['USR_UID'];
|
||||
|
||||
$aMessage['MESSAGE'] = $sText;
|
||||
if ($_POST['CONT'] != $c)
|
||||
$aMessage['EVA'] = G::LoadTranslation( 'ID_CASESREASSIGN' ); //
|
||||
else
|
||||
$aMessage['EVA'] = '';
|
||||
|
||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'users/users_ReassignShowInfo', '', $aMessage );
|
||||
G::RenderPage( 'publish' );
|
||||
} catch (Exception $oException) {
|
||||
die( $oException->getMessage() );
|
||||
}
|
||||
catch (Exception $oException) {
|
||||
die($oException->getMessage());
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user