Merge pull request #818 from ralpheav/master
Code Style change workflow/engine/methods/groups
This commit is contained in:
@@ -20,40 +20,39 @@
|
|||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$access = $RBAC->userCanAccess( 'PM_USERS' );
|
$access = $RBAC->userCanAccess( 'PM_USERS' );
|
||||||
if ($access != 1) {
|
if ($access != 1) {
|
||||||
switch ($access)
|
switch ($access) {
|
||||||
{
|
|
||||||
case - 1:
|
case - 1:
|
||||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
||||||
G::header( 'location: ../login/login' );
|
G::header( 'location: ../login/login' );
|
||||||
die;
|
die();
|
||||||
break;
|
break;
|
||||||
case - 2:
|
case - 2:
|
||||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
|
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
|
||||||
G::header( 'location: ../login/login' );
|
G::header( 'location: ../login/login' );
|
||||||
die;
|
die();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
||||||
G::header( 'location: ../login/login' );
|
G::header( 'location: ../login/login' );
|
||||||
die;
|
die();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (($RBAC_Response=$RBAC->userCanAccess("PM_USERS"))!=1) return $RBAC_Response;
|
if (($RBAC_Response = $RBAC->userCanAccess( "PM_USERS" )) != 1) {
|
||||||
|
return $RBAC_Response;
|
||||||
|
}
|
||||||
|
|
||||||
$G_MAIN_MENU = 'processmaker';
|
$G_MAIN_MENU = 'processmaker';
|
||||||
$G_SUB_MENU = 'users';
|
$G_SUB_MENU = 'users';
|
||||||
$G_ID_MENU_SELECTED = 'USERS';
|
$G_ID_MENU_SELECTED = 'USERS';
|
||||||
$G_ID_SUB_MENU_SELECTED = 'GROUPS';
|
$G_ID_SUB_MENU_SELECTED = 'GROUPS';
|
||||||
|
|
||||||
|
$G_PUBLISH = new Publisher();
|
||||||
$G_PUBLISH = new Publisher;
|
|
||||||
|
|
||||||
G::LoadClass( 'configuration' );
|
G::LoadClass( 'configuration' );
|
||||||
$c = new Configurations();
|
$c = new Configurations();
|
||||||
@@ -67,4 +66,4 @@ $oHeadPublisher->addContent('groups/groupsList'); //adding a html file .html.
|
|||||||
$oHeadPublisher->assign( 'CONFIG', $Config );
|
$oHeadPublisher->assign( 'CONFIG', $Config );
|
||||||
|
|
||||||
G::RenderPage( 'publish', 'extJs' );
|
G::RenderPage( 'publish', 'extJs' );
|
||||||
?>
|
|
||||||
|
|||||||
@@ -20,48 +20,47 @@
|
|||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$access = $RBAC->userCanAccess( 'PM_USERS' );
|
$access = $RBAC->userCanAccess( 'PM_USERS' );
|
||||||
if ($access != 1) {
|
if ($access != 1) {
|
||||||
switch ($access)
|
switch ($access) {
|
||||||
{
|
|
||||||
case - 1:
|
case - 1:
|
||||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
||||||
G::header( 'location: ../login/login' );
|
G::header( 'location: ../login/login' );
|
||||||
die;
|
die();
|
||||||
break;
|
break;
|
||||||
case - 2:
|
case - 2:
|
||||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
|
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
|
||||||
G::header( 'location: ../login/login' );
|
G::header( 'location: ../login/login' );
|
||||||
die;
|
die();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
||||||
G::header( 'location: ../login/login' );
|
G::header( 'location: ../login/login' );
|
||||||
die;
|
die();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (($RBAC_Response=$RBAC->userCanAccess("PM_USERS"))!=1) return $RBAC_Response;
|
if (($RBAC_Response = $RBAC->userCanAccess( "PM_USERS" )) != 1) {
|
||||||
|
return $RBAC_Response;
|
||||||
|
}
|
||||||
|
|
||||||
$G_MAIN_MENU = 'processmaker';
|
$G_MAIN_MENU = 'processmaker';
|
||||||
$G_SUB_MENU = 'users';
|
$G_SUB_MENU = 'users';
|
||||||
$G_ID_MENU_SELECTED = 'USERS';
|
$G_ID_MENU_SELECTED = 'USERS';
|
||||||
$G_ID_SUB_MENU_SELECTED = 'GROUPS';
|
$G_ID_SUB_MENU_SELECTED = 'GROUPS';
|
||||||
|
|
||||||
|
$G_PUBLISH = new Publisher();
|
||||||
$G_PUBLISH = new Publisher;
|
|
||||||
|
|
||||||
$oHeadPublisher = & headPublisher::getSingleton();
|
$oHeadPublisher = & headPublisher::getSingleton();
|
||||||
|
|
||||||
$oHeadPublisher->addExtJsScript( 'groups/groupsMembers', false ); //adding a javascript file .js
|
$oHeadPublisher->addExtJsScript( 'groups/groupsMembers', false ); //adding a javascript file .js
|
||||||
$oHeadPublisher->addContent( 'groups/groupsMembers' ); //adding a html file .html.
|
$oHeadPublisher->addContent( 'groups/groupsMembers' ); //adding a html file .html.
|
||||||
|
|
||||||
$labels = G::getTranslations(Array('ID_GROUPS','ID_GROUP_NAME','ID_BACK','ID_ASSIGN_ALL_MEMBERS','ID_REMOVE_ALL_MEMBERS',
|
|
||||||
'ID_MSG_AJAX_FAILURE', 'ID_PROCESSING','ID_ENTER_SEARCH_TERM','ID_FIRST_NAME','ID_LAST_NAME','ID_USER_NAME','ID_AVAILABLE_MEMBERS','ID_ASSIGNED_MEMBERS'));
|
$labels = G::getTranslations( Array ('ID_GROUPS','ID_GROUP_NAME','ID_BACK','ID_ASSIGN_ALL_MEMBERS','ID_REMOVE_ALL_MEMBERS','ID_MSG_AJAX_FAILURE','ID_PROCESSING','ID_ENTER_SEARCH_TERM','ID_FIRST_NAME','ID_LAST_NAME','ID_USER_NAME','ID_AVAILABLE_MEMBERS','ID_ASSIGNED_MEMBERS') );
|
||||||
|
|
||||||
G::LoadClass( 'groups' );
|
G::LoadClass( 'groups' );
|
||||||
$oGroup = new Groupwf();
|
$oGroup = new Groupwf();
|
||||||
@@ -73,4 +72,4 @@ $groups['GRP_TITLE'] = $oGroup->getGrpTitle();
|
|||||||
//$oHeadPublisher->assign('TRANSLATIONS', $labels);
|
//$oHeadPublisher->assign('TRANSLATIONS', $labels);
|
||||||
$oHeadPublisher->assign( 'GROUPS', $groups );
|
$oHeadPublisher->assign( 'GROUPS', $groups );
|
||||||
G::RenderPage( 'publish', 'extJs' );
|
G::RenderPage( 'publish', 'extJs' );
|
||||||
?>
|
|
||||||
|
|||||||
@@ -20,32 +20,32 @@
|
|||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
require_once ('classes/class.xmlfield_InputPM.php');
|
require_once ('classes/class.xmlfield_InputPM.php');
|
||||||
|
|
||||||
$access = $RBAC->userCanAccess( 'PM_USERS' );
|
$access = $RBAC->userCanAccess( 'PM_USERS' );
|
||||||
if ($access != 1) {
|
if ($access != 1) {
|
||||||
switch ($access)
|
switch ($access) {
|
||||||
{
|
|
||||||
case - 1:
|
case - 1:
|
||||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
||||||
G::header( 'location: ../login/login' );
|
G::header( 'location: ../login/login' );
|
||||||
die;
|
die();
|
||||||
break;
|
break;
|
||||||
case - 2:
|
case - 2:
|
||||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
|
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
|
||||||
G::header( 'location: ../login/login' );
|
G::header( 'location: ../login/login' );
|
||||||
die;
|
die();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
||||||
G::header( 'location: ../login/login' );
|
G::header( 'location: ../login/login' );
|
||||||
die;
|
die();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (($RBAC_Response=$RBAC->userCanAccess("PM_USERS"))!=1) return $RBAC_Response;
|
if (($RBAC_Response = $RBAC->userCanAccess( "PM_USERS" )) != 1) {
|
||||||
|
return $RBAC_Response;
|
||||||
|
}
|
||||||
G::LoadClass( 'groups' );
|
G::LoadClass( 'groups' );
|
||||||
$oGroups = new Groups();
|
$oGroups = new Groups();
|
||||||
$oGroup = new Groupwf();
|
$oGroup = new Groupwf();
|
||||||
@@ -55,3 +55,4 @@ if( $access != 1 ){
|
|||||||
$G_PUBLISH->AddContent( 'propeltable', 'groups/paged-table', 'groups/groups_AvailableUsers', $oGroups->getAvailableUsersCriteria( $_GET['UID'] ) );
|
$G_PUBLISH->AddContent( 'propeltable', 'groups/paged-table', 'groups/groups_AvailableUsers', $oGroups->getAvailableUsersCriteria( $_GET['UID'] ) );
|
||||||
//$G_PUBLISH->AddContent('xmlform', 'xmlform', 'groups/groups_SelectUsers','', '','save' );
|
//$G_PUBLISH->AddContent('xmlform', 'xmlform', 'groups/groups_SelectUsers','', '','save' );
|
||||||
G::RenderPage( 'publish', 'raw' );
|
G::RenderPage( 'publish', 'raw' );
|
||||||
|
|
||||||
|
|||||||
@@ -20,14 +20,14 @@
|
|||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
if (($RBAC_Response=$RBAC->userCanAccess("PM_USERS"))!=1) return $RBAC_Response;
|
if (($RBAC_Response = $RBAC->userCanAccess( "PM_USERS" )) != 1) {
|
||||||
|
return $RBAC_Response;
|
||||||
|
}
|
||||||
G::LoadInclude( 'ajax' );
|
G::LoadInclude( 'ajax' );
|
||||||
$_POST['action'] = get_ajax_value( 'action' );
|
$_POST['action'] = get_ajax_value( 'action' );
|
||||||
|
|
||||||
switch ($_POST['action'])
|
switch ($_POST['action']) {
|
||||||
{
|
|
||||||
case 'showUsers':
|
case 'showUsers':
|
||||||
G::LoadClass( 'groups' );
|
G::LoadClass( 'groups' );
|
||||||
$oGroups = new Groups();
|
$oGroups = new Groups();
|
||||||
@@ -37,45 +37,34 @@ switch ($_POST['action'])
|
|||||||
$G_PUBLISH = new Publisher();
|
$G_PUBLISH = new Publisher();
|
||||||
//$G_PUBLISH->AddContent('xmlform', 'xmlform', 'groups/groups_UsersListTitle', '', array('GRP_NAME' => $aFields['GRP_TITLE']));
|
//$G_PUBLISH->AddContent('xmlform', 'xmlform', 'groups/groups_UsersListTitle', '', array('GRP_NAME' => $aFields['GRP_TITLE']));
|
||||||
$G_PUBLISH->AddContent( 'propeltable', 'groups/paged-table2', 'groups/groups_UsersList', $oGroups->getUsersGroupCriteria( $_POST['sGroupUID'] ), array ('GRP_UID' => $_POST['sGroupUID'],'GRP_NAME' => $aFields['GRP_TITLE']) );
|
$G_PUBLISH->AddContent( 'propeltable', 'groups/paged-table2', 'groups/groups_UsersList', $oGroups->getUsersGroupCriteria( $_POST['sGroupUID'] ), array ('GRP_UID' => $_POST['sGroupUID'],'GRP_NAME' => $aFields['GRP_TITLE']) );
|
||||||
|
|
||||||
$oHeadPublisher = & headPublisher::getSingleton();
|
$oHeadPublisher = & headPublisher::getSingleton();
|
||||||
$oHeadPublisher->addScriptCode( "groupname=\"{$aFields["GRP_TITLE"]}\";" );
|
$oHeadPublisher->addScriptCode( "groupname=\"{$aFields["GRP_TITLE"]}\";" );
|
||||||
|
|
||||||
G::RenderPage( 'publish', 'raw' );
|
G::RenderPage( 'publish', 'raw' );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'assignUser':
|
case 'assignUser':
|
||||||
G::LoadClass( 'groups' );
|
G::LoadClass( 'groups' );
|
||||||
$oGroup = new Groups();
|
$oGroup = new Groups();
|
||||||
$oGroup->addUserToGroup( $_POST['GRP_UID'], $_POST['USR_UID'] );
|
$oGroup->addUserToGroup( $_POST['GRP_UID'], $_POST['USR_UID'] );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'assignAllUsers':
|
case 'assignAllUsers':
|
||||||
G::LoadClass( 'groups' );
|
G::LoadClass( 'groups' );
|
||||||
$oGroup = new Groups();
|
$oGroup = new Groups();
|
||||||
$aUsers = explode( ',', $_POST['aUsers'] );
|
$aUsers = explode( ',', $_POST['aUsers'] );
|
||||||
|
for ($i = 0; $i < count( $aUsers ); $i ++) {
|
||||||
for($i=0; $i<count($aUsers); $i++)
|
|
||||||
{
|
|
||||||
$oGroup->addUserToGroup( $_POST['GRP_UID'], $aUsers[$i] );
|
$oGroup->addUserToGroup( $_POST['GRP_UID'], $aUsers[$i] );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'ofToAssignUser':
|
case 'ofToAssignUser':
|
||||||
G::LoadClass( 'groups' );
|
G::LoadClass( 'groups' );
|
||||||
$oGroup = new Groups();
|
$oGroup = new Groups();
|
||||||
$oGroup->removeUserOfGroup( $_POST['GRP_UID'], $_POST['USR_UID'] );
|
$oGroup->removeUserOfGroup( $_POST['GRP_UID'], $_POST['USR_UID'] );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'verifyGroupname':
|
case 'verifyGroupname':
|
||||||
$_POST['sOriginalGroupname'] = get_ajax_value( 'sOriginalGroupname' );
|
$_POST['sOriginalGroupname'] = get_ajax_value( 'sOriginalGroupname' );
|
||||||
$_POST['sGroupname'] = get_ajax_value( 'sGroupname' );
|
$_POST['sGroupname'] = get_ajax_value( 'sGroupname' );
|
||||||
if ($_POST['sOriginalGroupname'] == $_POST['sGroupname'])
|
if ($_POST['sOriginalGroupname'] == $_POST['sGroupname']) {
|
||||||
{
|
|
||||||
echo '0';
|
echo '0';
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
require_once 'classes/model/Groupwf.php';
|
require_once 'classes/model/Groupwf.php';
|
||||||
G::LoadClass( 'Groupswf' );
|
G::LoadClass( 'Groupswf' );
|
||||||
$oGroup = new Groupwf();
|
$oGroup = new Groupwf();
|
||||||
@@ -84,12 +73,9 @@ switch ($_POST['action'])
|
|||||||
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||||
$oDataset->next();
|
$oDataset->next();
|
||||||
$aRow = $oDataset->getRow();
|
$aRow = $oDataset->getRow();
|
||||||
if (!$aRow)
|
if (! $aRow) {
|
||||||
{
|
|
||||||
echo '0';
|
echo '0';
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
echo '1';
|
echo '1';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -108,7 +94,9 @@ switch ($_POST['action'])
|
|||||||
$filter = isset( $_REQUEST['textFilter'] ) ? $_REQUEST['textFilter'] : '';
|
$filter = isset( $_REQUEST['textFilter'] ) ? $_REQUEST['textFilter'] : '';
|
||||||
|
|
||||||
global $RBAC;
|
global $RBAC;
|
||||||
if ($limit == $start) $limit = $limit +$limit ;
|
if ($limit == $start) {
|
||||||
|
$limit = $limit + $limit;
|
||||||
|
}
|
||||||
$tasks = new TaskUser();
|
$tasks = new TaskUser();
|
||||||
$aTask = $tasks->getCountAllTaksByGroups();
|
$aTask = $tasks->getCountAllTaksByGroups();
|
||||||
|
|
||||||
@@ -126,7 +114,9 @@ switch ($_POST['action'])
|
|||||||
$arrData = array ();
|
$arrData = array ();
|
||||||
foreach ($result as $results) {
|
foreach ($result as $results) {
|
||||||
$totalRows ++;
|
$totalRows ++;
|
||||||
$results['CON_VALUE'] = str_replace(array("<", ">"), array("<", ">"), $results['GRP_TITLE']);
|
$results['CON_VALUE'] = str_replace( array ("<",">"
|
||||||
|
), array ("<",">"
|
||||||
|
), $results['GRP_TITLE'] );
|
||||||
$results['GRP_TASKS'] = isset( $aTask[$results['GRP_UID']] ) ? $aTask[$results['GRP_UID']] : 0;
|
$results['GRP_TASKS'] = isset( $aTask[$results['GRP_UID']] ) ? $aTask[$results['GRP_UID']] : 0;
|
||||||
$results['GRP_USERS'] = isset( $aMembers[$results['GRP_UID']] ) ? $aMembers[$results['GRP_UID']] : 0;
|
$results['GRP_USERS'] = isset( $aMembers[$results['GRP_UID']] ) ? $aMembers[$results['GRP_UID']] : 0;
|
||||||
$arrData[] = $results;
|
$arrData[] = $results;
|
||||||
@@ -173,7 +163,9 @@ switch ($_POST['action'])
|
|||||||
case 'deleteGroup':
|
case 'deleteGroup':
|
||||||
G::LoadClass( 'groups' );
|
G::LoadClass( 'groups' );
|
||||||
$group = new Groupwf();
|
$group = new Groupwf();
|
||||||
if (!isset($_POST['GRP_UID'])) return;
|
if (! isset( $_POST['GRP_UID'] )) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
$group->remove( urldecode( $_POST['GRP_UID'] ) );
|
$group->remove( urldecode( $_POST['GRP_UID'] ) );
|
||||||
require_once 'classes/model/TaskUser.php';
|
require_once 'classes/model/TaskUser.php';
|
||||||
$oProcess = new TaskUser();
|
$oProcess = new TaskUser();
|
||||||
@@ -205,10 +197,7 @@ switch ($_POST['action'])
|
|||||||
$oCriteria->add( UsersPeer::USR_STATUS, 'CLOSED', Criteria::NOT_EQUAL );
|
$oCriteria->add( UsersPeer::USR_STATUS, 'CLOSED', Criteria::NOT_EQUAL );
|
||||||
$filter = (isset( $_POST['textFilter'] )) ? $_POST['textFilter'] : '';
|
$filter = (isset( $_POST['textFilter'] )) ? $_POST['textFilter'] : '';
|
||||||
if ($filter != '') {
|
if ($filter != '') {
|
||||||
$oCriteria->add(
|
$oCriteria->add( $oCriteria->getNewCriterion( UsersPeer::USR_USERNAME, '%' . $filter . '%', Criteria::LIKE )->addOr( $oCriteria->getNewCriterion( UsersPeer::USR_FIRSTNAME, '%' . $filter . '%', Criteria::LIKE )->addOr( $oCriteria->getNewCriterion( UsersPeer::USR_LASTNAME, '%' . $filter . '%', Criteria::LIKE ) ) ) );
|
||||||
$oCriteria->getNewCriterion(UsersPeer::USR_USERNAME, '%'.$filter.'%', Criteria::LIKE)->addOr(
|
|
||||||
$oCriteria->getNewCriterion(UsersPeer::USR_FIRSTNAME, '%'.$filter.'%', Criteria::LIKE)->addOr(
|
|
||||||
$oCriteria->getNewCriterion(UsersPeer::USR_LASTNAME, '%'.$filter.'%', Criteria::LIKE))));
|
|
||||||
}
|
}
|
||||||
$oDataset = UsersPeer::DoSelectRs( $oCriteria );
|
$oDataset = UsersPeer::DoSelectRs( $oCriteria );
|
||||||
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||||
@@ -229,10 +218,7 @@ switch ($_POST['action'])
|
|||||||
$oCriteria->add( UsersPeer::USR_STATUS, 'CLOSED', Criteria::NOT_EQUAL );
|
$oCriteria->add( UsersPeer::USR_STATUS, 'CLOSED', Criteria::NOT_EQUAL );
|
||||||
$filter = (isset( $_POST['textFilter'] )) ? $_POST['textFilter'] : '';
|
$filter = (isset( $_POST['textFilter'] )) ? $_POST['textFilter'] : '';
|
||||||
if ($filter != '') {
|
if ($filter != '') {
|
||||||
$oCriteria->add(
|
$oCriteria->add( $oCriteria->getNewCriterion( UsersPeer::USR_USERNAME, '%' . $filter . '%', Criteria::LIKE )->addOr( $oCriteria->getNewCriterion( UsersPeer::USR_FIRSTNAME, '%' . $filter . '%', Criteria::LIKE )->addOr( $oCriteria->getNewCriterion( UsersPeer::USR_LASTNAME, '%' . $filter . '%', Criteria::LIKE ) ) ) );
|
||||||
$oCriteria->getNewCriterion(UsersPeer::USR_USERNAME, '%'.$filter.'%', Criteria::LIKE)->addOr(
|
|
||||||
$oCriteria->getNewCriterion(UsersPeer::USR_FIRSTNAME, '%'.$filter.'%', Criteria::LIKE)->addOr(
|
|
||||||
$oCriteria->getNewCriterion(UsersPeer::USR_LASTNAME, '%'.$filter.'%', Criteria::LIKE))));
|
|
||||||
}
|
}
|
||||||
$oCriteria->setOffset( $start );
|
$oCriteria->setOffset( $start );
|
||||||
$oCriteria->setLimit( $limit );
|
$oCriteria->setLimit( $limit );
|
||||||
@@ -281,10 +267,7 @@ switch ($_POST['action'])
|
|||||||
$oCriteria->add( UsersPeer::USR_UID, $uUIDs, Criteria::NOT_IN );
|
$oCriteria->add( UsersPeer::USR_UID, $uUIDs, Criteria::NOT_IN );
|
||||||
$filter = (isset( $_POST['textFilter'] )) ? $_POST['textFilter'] : '';
|
$filter = (isset( $_POST['textFilter'] )) ? $_POST['textFilter'] : '';
|
||||||
if ($filter != '') {
|
if ($filter != '') {
|
||||||
$oCriteria->add(
|
$oCriteria->add( $oCriteria->getNewCriterion( UsersPeer::USR_USERNAME, '%' . $filter . '%', Criteria::LIKE )->addOr( $oCriteria->getNewCriterion( UsersPeer::USR_FIRSTNAME, '%' . $filter . '%', Criteria::LIKE )->addOr( $oCriteria->getNewCriterion( UsersPeer::USR_LASTNAME, '%' . $filter . '%', Criteria::LIKE ) ) ) );
|
||||||
$oCriteria->getNewCriterion(UsersPeer::USR_USERNAME, '%'.$filter.'%', Criteria::LIKE)->addOr(
|
|
||||||
$oCriteria->getNewCriterion(UsersPeer::USR_FIRSTNAME, '%'.$filter.'%', Criteria::LIKE)->addOr(
|
|
||||||
$oCriteria->getNewCriterion(UsersPeer::USR_LASTNAME, '%'.$filter.'%', Criteria::LIKE))));
|
|
||||||
}
|
}
|
||||||
$oDataset = UsersPeer::DoSelectRs( $oCriteria );
|
$oDataset = UsersPeer::DoSelectRs( $oCriteria );
|
||||||
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||||
@@ -303,10 +286,7 @@ switch ($_POST['action'])
|
|||||||
$oCriteria->add( UsersPeer::USR_UID, $uUIDs, Criteria::NOT_IN );
|
$oCriteria->add( UsersPeer::USR_UID, $uUIDs, Criteria::NOT_IN );
|
||||||
$filter = (isset( $_POST['textFilter'] )) ? $_POST['textFilter'] : '';
|
$filter = (isset( $_POST['textFilter'] )) ? $_POST['textFilter'] : '';
|
||||||
if ($filter != '') {
|
if ($filter != '') {
|
||||||
$oCriteria->add(
|
$oCriteria->add( $oCriteria->getNewCriterion( UsersPeer::USR_USERNAME, '%' . $filter . '%', Criteria::LIKE )->addOr( $oCriteria->getNewCriterion( UsersPeer::USR_FIRSTNAME, '%' . $filter . '%', Criteria::LIKE )->addOr( $oCriteria->getNewCriterion( UsersPeer::USR_LASTNAME, '%' . $filter . '%', Criteria::LIKE ) ) ) );
|
||||||
$oCriteria->getNewCriterion(UsersPeer::USR_USERNAME, '%'.$filter.'%', Criteria::LIKE)->addOr(
|
|
||||||
$oCriteria->getNewCriterion(UsersPeer::USR_FIRSTNAME, '%'.$filter.'%', Criteria::LIKE)->addOr(
|
|
||||||
$oCriteria->getNewCriterion(UsersPeer::USR_LASTNAME, '%'.$filter.'%', Criteria::LIKE))));
|
|
||||||
}
|
}
|
||||||
$oCriteria->setOffset( $start );
|
$oCriteria->setOffset( $start );
|
||||||
$oCriteria->setLimit( $limit );
|
$oCriteria->setLimit( $limit );
|
||||||
@@ -348,3 +328,4 @@ switch ($_POST['action'])
|
|||||||
echo '{success: true}';
|
echo '{success: true}';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -20,37 +20,39 @@
|
|||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$access = $RBAC->userCanAccess( 'PM_USERS' );
|
$access = $RBAC->userCanAccess( 'PM_USERS' );
|
||||||
if ($access != 1) {
|
if ($access != 1) {
|
||||||
switch ($access)
|
switch ($access) {
|
||||||
{
|
|
||||||
case - 1:
|
case - 1:
|
||||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
||||||
G::header( 'location: ../login/login' );
|
G::header( 'location: ../login/login' );
|
||||||
die;
|
die();
|
||||||
break;
|
break;
|
||||||
case - 2:
|
case - 2:
|
||||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
|
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
|
||||||
G::header( 'location: ../login/login' );
|
G::header( 'location: ../login/login' );
|
||||||
die;
|
die();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
||||||
G::header( 'location: ../login/login' );
|
G::header( 'location: ../login/login' );
|
||||||
die;
|
die();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (($RBAC_Response=$RBAC->userCanAccess("PM_USERS"))!=1) return $RBAC_Response;
|
if (($RBAC_Response = $RBAC->userCanAccess( "PM_USERS" )) != 1) {
|
||||||
|
return $RBAC_Response;
|
||||||
|
}
|
||||||
|
|
||||||
G::LoadClass( 'groups' );
|
G::LoadClass( 'groups' );
|
||||||
|
|
||||||
$group = new Groupwf();
|
$group = new Groupwf();
|
||||||
|
|
||||||
if (!isset($_POST['GRP_UID'])) return;
|
if (! isset( $_POST['GRP_UID'] )) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$group->remove( urldecode( $_POST['GRP_UID'] ) );
|
$group->remove( urldecode( $_POST['GRP_UID'] ) );
|
||||||
|
|
||||||
@@ -61,4 +63,3 @@ if (($RBAC_Response=$RBAC->userCanAccess("PM_USERS"))!=1) return $RBAC_Response;
|
|||||||
$oCriteria->add( TaskUserPeer::USR_UID, $_POST['GRP_UID'] );
|
$oCriteria->add( TaskUserPeer::USR_UID, $_POST['GRP_UID'] );
|
||||||
TaskUserPeer::doDelete( $oCriteria );
|
TaskUserPeer::doDelete( $oCriteria );
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -20,32 +20,31 @@
|
|||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
$access = $RBAC->userCanAccess( 'PM_USERS' );
|
$access = $RBAC->userCanAccess( 'PM_USERS' );
|
||||||
if ($access != 1) {
|
if ($access != 1) {
|
||||||
switch ($access)
|
switch ($access) {
|
||||||
{
|
|
||||||
case - 1:
|
case - 1:
|
||||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
||||||
G::header( 'location: ../login/login' );
|
G::header( 'location: ../login/login' );
|
||||||
die;
|
die();
|
||||||
break;
|
break;
|
||||||
case - 2:
|
case - 2:
|
||||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
|
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
|
||||||
G::header( 'location: ../login/login' );
|
G::header( 'location: ../login/login' );
|
||||||
die;
|
die();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
||||||
G::header( 'location: ../login/login' );
|
G::header( 'location: ../login/login' );
|
||||||
die;
|
die();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (($RBAC_Response=$RBAC->userCanAccess("PM_USERS"))!=1) return $RBAC_Response;
|
if (($RBAC_Response = $RBAC->userCanAccess( "PM_USERS" )) != 1) {
|
||||||
|
return $RBAC_Response;
|
||||||
|
}
|
||||||
|
|
||||||
G::LoadClass( 'groups' );
|
G::LoadClass( 'groups' );
|
||||||
|
|
||||||
@@ -54,12 +53,9 @@ if (($RBAC_Response=$RBAC->userCanAccess("PM_USERS"))!=1) return $RBAC_Response;
|
|||||||
|
|
||||||
$group = new Groupwf();
|
$group = new Groupwf();
|
||||||
$GrpUid = (isset( $_GET['UID'] )) ? urldecode( $_GET['UID'] ) : '';
|
$GrpUid = (isset( $_GET['UID'] )) ? urldecode( $_GET['UID'] ) : '';
|
||||||
if ($GrpUid)
|
if ($GrpUid) {
|
||||||
{
|
|
||||||
$aFields = $group->Load( $GrpUid );
|
$aFields = $group->Load( $GrpUid );
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
$aFields = array ();
|
$aFields = array ();
|
||||||
}
|
}
|
||||||
$G_PUBLISH = new Publisher();
|
$G_PUBLISH = new Publisher();
|
||||||
@@ -67,4 +63,3 @@ if (($RBAC_Response=$RBAC->userCanAccess("PM_USERS"))!=1) return $RBAC_Response;
|
|||||||
|
|
||||||
G::RenderPage( "publish", "raw" );
|
G::RenderPage( "publish", "raw" );
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -20,36 +20,36 @@
|
|||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
$access = $RBAC->userCanAccess( 'PM_USERS' );
|
$access = $RBAC->userCanAccess( 'PM_USERS' );
|
||||||
if ($access != 1) {
|
if ($access != 1) {
|
||||||
switch ($access)
|
switch ($access) {
|
||||||
{
|
|
||||||
case - 1:
|
case - 1:
|
||||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
||||||
G::header( 'location: ../login/login' );
|
G::header( 'location: ../login/login' );
|
||||||
die;
|
die();
|
||||||
break;
|
break;
|
||||||
case - 2:
|
case - 2:
|
||||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
|
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
|
||||||
G::header( 'location: ../login/login' );
|
G::header( 'location: ../login/login' );
|
||||||
die;
|
die();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
||||||
G::header( 'location: ../login/login' );
|
G::header( 'location: ../login/login' );
|
||||||
die;
|
die();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (($RBAC_Response=$RBAC->userCanAccess("PM_USERS"))!=1) return $RBAC_Response;
|
if (($RBAC_Response = $RBAC->userCanAccess( "PM_USERS" )) != 1) {
|
||||||
|
return $RBAC_Response;
|
||||||
|
}
|
||||||
|
|
||||||
//G::genericForceLogin( 'WF_MYINFO' , 'login/noViewPage', $urlLogin = 'login/login' );
|
//G::genericForceLogin( 'WF_MYINFO' , 'login/noViewPage', $urlLogin = 'login/login' );
|
||||||
|
|
||||||
$G_PUBLISH = new Publisher;
|
|
||||||
|
$G_PUBLISH = new Publisher();
|
||||||
$G_PUBLISH->AddContent( 'view', 'groups/groups_Tree' );
|
$G_PUBLISH->AddContent( 'view', 'groups/groups_Tree' );
|
||||||
G::RenderPage( "publish-raw", "raw" );
|
G::RenderPage( "publish-raw", "raw" );
|
||||||
?>
|
|
||||||
|
|||||||
@@ -20,31 +20,31 @@
|
|||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$access = $RBAC->userCanAccess( 'PM_USERS' );
|
$access = $RBAC->userCanAccess( 'PM_USERS' );
|
||||||
if ($access != 1) {
|
if ($access != 1) {
|
||||||
switch ($access)
|
switch ($access) {
|
||||||
{
|
|
||||||
case - 1:
|
case - 1:
|
||||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
||||||
G::header( 'location: ../login/login' );
|
G::header( 'location: ../login/login' );
|
||||||
die;
|
die();
|
||||||
break;
|
break;
|
||||||
case - 2:
|
case - 2:
|
||||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
|
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
|
||||||
G::header( 'location: ../login/login' );
|
G::header( 'location: ../login/login' );
|
||||||
die;
|
die();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
||||||
G::header( 'location: ../login/login' );
|
G::header( 'location: ../login/login' );
|
||||||
die;
|
die();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (($RBAC_Response=$RBAC->userCanAccess("PM_USERS"))!=1) return $RBAC_Response;
|
if (($RBAC_Response = $RBAC->userCanAccess( "PM_USERS" )) != 1) {
|
||||||
|
return $RBAC_Response;
|
||||||
|
}
|
||||||
|
|
||||||
G::LoadClass( 'groups' );
|
G::LoadClass( 'groups' );
|
||||||
|
|
||||||
@@ -52,18 +52,14 @@ if (($RBAC_Response=$RBAC->userCanAccess("PM_USERS"))!=1) return $RBAC_Response;
|
|||||||
$G_MENU_SELECTED = '';
|
$G_MENU_SELECTED = '';
|
||||||
|
|
||||||
$group = new Groupwf();
|
$group = new Groupwf();
|
||||||
if($_POST['form']['GRP_UID']==='')
|
if ($_POST['form']['GRP_UID'] === '') {
|
||||||
{
|
|
||||||
$grpRow = $_POST['form'];
|
$grpRow = $_POST['form'];
|
||||||
unset( $grpRow['GRP_UID'] );
|
unset( $grpRow['GRP_UID'] );
|
||||||
$group->create( $grpRow );
|
$group->create( $grpRow );
|
||||||
|
|
||||||
//$_POST['form']['GRP_UID']=$group->getGrpUid();
|
//$_POST['form']['GRP_UID']=$group->getGrpUid();
|
||||||
//$group->update($_POST['form']);
|
//$group->update($_POST['form']);
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
$group->update( $_POST['form'] );
|
$group->update( $_POST['form'] );
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -20,10 +20,12 @@
|
|||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
if (($RBAC_Response=$RBAC->userCanAccess("PM_USERS"))!=1) return $RBAC_Response;
|
if (($RBAC_Response = $RBAC->userCanAccess( "PM_USERS" )) != 1) {
|
||||||
|
return $RBAC_Response;
|
||||||
|
}
|
||||||
|
|
||||||
G::LoadClass( 'groups' );
|
G::LoadClass( 'groups' );
|
||||||
$groups = new Groups;
|
$groups = new Groups();
|
||||||
$groups->addUserToGroup( $_GET['GRP_UID'], $_POST['form']['USR_UID'] );
|
$groups->addUserToGroup( $_GET['GRP_UID'], $_POST['form']['USR_UID'] );
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user