CODE STYLE

files modified:   departmentUsers.php
                  departments.php
                  departments_AddManager.php
                  departments_AddUser.php
                  departments_Ajax.php
                  departments_Delete.php
                  departments_Edit.php
                  departments_List.php
                  departments_New.php
                  subdep_Delete.php
                  subdep_Edit.php
                  subdep_Save.php
This commit is contained in:
Ralph Asendeteufrer
2012-10-18 10:10:36 -04:00
parent f2d1e09350
commit 136cd2fe7d
12 changed files with 895 additions and 915 deletions

View File

@@ -1,77 +1,78 @@
<?php
/**
* departments.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.
*
*/
require_once 'classes/model/Department.php';
$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;
}
}
if (($RBAC_Response=$RBAC->userCanAccess("PM_USERS"))!=1) return $RBAC_Response;
$G_MAIN_MENU = 'processmaker';
$G_SUB_MENU = 'users';
$G_ID_MENU_SELECTED = 'USERS';
$G_ID_SUB_MENU_SELECTED = 'DEPARTMENTS';
$G_PUBLISH = new Publisher;
$oHeadPublisher =& headPublisher::getSingleton();
$oHeadPublisher->addExtJsScript('departments/departmentUsers', false); //adding a javascript file .js
$oHeadPublisher->addContent('departments/departmentUsers'); //adding a html file .html.
G::LoadClass('configuration');
$c = new Configurations();
$dep = new Department();
$dep->Load($_GET['dUID']);
$depart = Array();
$depart['DEP_UID'] = $dep->getDepUid();
$depart['DEP_TITLE'] = $dep->getDepTitle();
$depart['DEP_MANAGER'] = $dep->getDepManager();
$oHeadPublisher->assign('DEPARTMENT', $depart);
$oHeadPublisher->assign('FORMATS',$c->getFormats());
G::RenderPage('publish', 'extJs');
?>
<?php
/**
* departments.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.
*/
require_once 'classes/model/Department.php';
$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;
}
}
if (($RBAC_Response = $RBAC->userCanAccess( "PM_USERS" )) != 1) {
return $RBAC_Response;
}
$G_MAIN_MENU = 'processmaker';
$G_SUB_MENU = 'users';
$G_ID_MENU_SELECTED = 'USERS';
$G_ID_SUB_MENU_SELECTED = 'DEPARTMENTS';
$G_PUBLISH = new Publisher();
$oHeadPublisher = & headPublisher::getSingleton();
$oHeadPublisher->addExtJsScript( 'departments/departmentUsers', false ); //adding a javascript file .js
$oHeadPublisher->addContent( 'departments/departmentUsers' ); //adding a html file .html.
G::LoadClass( 'configuration' );
$c = new Configurations();
$dep = new Department();
$dep->Load( $_GET['dUID'] );
$depart = Array ();
$depart['DEP_UID'] = $dep->getDepUid();
$depart['DEP_TITLE'] = $dep->getDepTitle();
$depart['DEP_MANAGER'] = $dep->getDepManager();
$oHeadPublisher->assign( 'DEPARTMENT', $depart );
$oHeadPublisher->assign( 'FORMATS', $c->getFormats() );
G::RenderPage( 'publish', 'extJs' );

View File

@@ -1,69 +1,71 @@
<?php
/**
* departments.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.
*
*/
G::LoadClass('configuration');
$c = new Configurations();
$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;
}
}
if (($RBAC_Response=$RBAC->userCanAccess("PM_USERS"))!=1) return $RBAC_Response;
$G_MAIN_MENU = 'processmaker';
$G_SUB_MENU = 'users';
$G_ID_MENU_SELECTED = 'USERS';
$G_ID_SUB_MENU_SELECTED = 'DEPARTMENTS';
$G_PUBLISH = new Publisher;
$oHeadPublisher =& headPublisher::getSingleton();
$oHeadPublisher->addExtJsScript('departments/departmentList', false); //adding a javascript file .js
$oHeadPublisher->addContent('departments/departmentList'); //adding a html file .html.
//$labels = G::getTranslations(Array('ID_DEPARTMENTS','ID_DELETE','ID_EDIT','ID_USERS','ID_ACTIVE','ID_INACTIVE','ID_SELECT_STATUS',
// 'ID_CLOSE','ID_SAVE','ID_DEPARTMENT_NAME','ID_STATUS'));
//
//$oHeadPublisher->assign('TRANSLATIONS', $labels);
$oHeadPublisher->assign('FORMATS',$c->getFormats());
G::RenderPage('publish', 'extJs');
?>
<?php
/**
* departments.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.
*/
G::LoadClass( 'configuration' );
$c = new Configurations();
$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;
}
}
if (($RBAC_Response = $RBAC->userCanAccess( "PM_USERS" )) != 1) {
return $RBAC_Response;
}
$G_MAIN_MENU = 'processmaker';
$G_SUB_MENU = 'users';
$G_ID_MENU_SELECTED = 'USERS';
$G_ID_SUB_MENU_SELECTED = 'DEPARTMENTS';
$G_PUBLISH = new Publisher();
$oHeadPublisher = & headPublisher::getSingleton();
$oHeadPublisher->addExtJsScript( 'departments/departmentList', false ); //adding a javascript file .js
$oHeadPublisher->addContent( 'departments/departmentList' ); //adding a html file .html.
//$labels = G::getTranslations(Array('ID_DEPARTMENTS','ID_DELETE','ID_EDIT','ID_USERS','ID_ACTIVE','ID_INACTIVE','ID_SELECT_STATUS',
// 'ID_CLOSE','ID_SAVE','ID_DEPARTMENT_NAME','ID_STATUS'));
//
//$oHeadPublisher->assign('TRANSLATIONS', $labels);
$oHeadPublisher->assign( 'FORMATS', $c->getFormats() );
G::RenderPage( 'publish', 'extJs' );

View File

@@ -1,10 +1,11 @@
<?php
/**
* departments_AddManager.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
@@ -12,50 +13,47 @@
*
* 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/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* 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.
*
*/
if (($RBAC_Response=$RBAC->userCanAccess("PM_USERS"))!=1) return $RBAC_Response;
if (($RBAC_Response = $RBAC->userCanAccess( "PM_USERS" )) != 1) {
return $RBAC_Response;
}
G::LoadClass('departos');
G::LoadClass( 'departos' );
$dbc = new DBConnection();
$ses = new DBSession($dbc);
$dbc = new DBConnection();
$ses = new DBSession( $dbc );
//print_r($_GET);
$oDpto = new Departos();
//$DptoUid = (isset($_GET['UID'])) ? urldecode($_GET['UID']):'';
$aUser=Array();
$aUser[]= Array ('USR_UID'=>'char', 'USR_FIRSTNAME'=>'char', 'USR_LASTNAME'=>'char');
$aUserManagers=$oDpto->getUsersManagers();
$aUser_Manager= array_merge($aUser,$aUserManagers);
//print_r($aUser_Manager);
/*
//print_r($_GET);
$oDpto = new Departos();
//$DptoUid = (isset($_GET['UID'])) ? urldecode($_GET['UID']):'';
$aUser = Array ();
$aUser[] = Array ('USR_UID' => 'char','USR_FIRSTNAME' => 'char','USR_LASTNAME' => 'char' );
$aUserManagers = $oDpto->getUsersManagers();
$aUser_Manager = array_merge( $aUser, $aUserManagers );
//print_r($aUser_Manager);
/*
global $_DBArray;
$_DBArray['aManager'] = $aUser_Manager;
$_SESSION['_DBArray'] = $_DBArray;
G::LoadClass('ArrayPeer');
$oCriteria = new Criteria('dbarray');
$oCriteria->setDBArrayTable('aManager');
*/
$aFields=array();
$aFields['DEP_UID']= $_GET['SUID'];
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'departments/departments_AddManager', '', $aFields , 'departments_SaveManager');
$aFields = array ();
$aFields['DEP_UID'] = $_GET['SUID'];
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'departments/departments_AddManager', '', $aFields, 'departments_SaveManager' );
G::RenderPage( "publish" , "raw" );
G::RenderPage( "publish", "raw" );
?>

View File

@@ -1,56 +1,58 @@
<?php
/**
* groups_AddUser.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.
*
*/
require_once ( 'classes/class.xmlfield_InputPM.php' );
require_once ( 'classes/model/Department.php' );
$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;
}
}
if (($RBAC_Response=$RBAC->userCanAccess("PM_USERS"))!=1) return $RBAC_Response;
$oDept = new Department();
$aFields = $oDept->load($_GET['UID']);
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent('propeltable', 'departments/paged-table', 'departments/departments_AvailableUsers', $oDept->getAvailableUsersCriteria($_GET['UID']));
G::RenderPage('publish', 'raw');
<?php
/**
* groups_AddUser.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.
*/
require_once ('classes/class.xmlfield_InputPM.php');
require_once ('classes/model/Department.php');
$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;
}
}
if (($RBAC_Response = $RBAC->userCanAccess( "PM_USERS" )) != 1) {
return $RBAC_Response;
}
$oDept = new Department();
$aFields = $oDept->load( $_GET['UID'] );
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'propeltable', 'departments/paged-table', 'departments/departments_AvailableUsers', $oDept->getAvailableUsersCriteria( $_GET['UID'] ) );
G::RenderPage( 'publish', 'raw' );

File diff suppressed because it is too large Load Diff

View File

@@ -1,10 +1,11 @@
<?php
/**
* departments_Delete.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
@@ -12,47 +13,47 @@
*
* 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/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* 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.
*
*/
if (($RBAC_Response=$RBAC->userCanAccess("PM_USERS"))!=1) return $RBAC_Response;
if (($RBAC_Response = $RBAC->userCanAccess( "PM_USERS" )) != 1) {
return $RBAC_Response;
}
require_once 'classes/model/Department.php';
require_once 'classes/model/Users.php';
$oDpto = new Department();
require_once 'classes/model/Department.php';
require_once 'classes/model/Users.php';
$oDpto = new Department();
if (! isset( $_POST['DEP_UID'] )) {
return;
}
$ocriteria = new Criteria( 'workflow' );
$ocriteria->addSelectColumn( DepartmentPeer::DEP_MANAGER );
$ocriteria->add( DepartmentPeer::DEP_UID, $_POST['DEP_UID'] );
$oDataset = DepartmentPeer::doSelectRS( $ocriteria );
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
$oDataset->next();
$aRow = $oDataset->getRow();
$oCriteria1 = new Criteria( 'workflow' );
$oCriteria1->add( UsersPeer::USR_REPORTS_TO, $aRow['DEP_MANAGER'], Criteria::EQUAL );
$oCriteria2 = new Criteria( 'workflow' );
$oCriteria2->add( UsersPeer::USR_REPORTS_TO, '' );
BasePeer::doUpdate( $oCriteria1, $oCriteria2, Propel::getConnection( 'workflow' ) );
$oCriteriaA = new Criteria( 'workflow' );
$oCriteriaA->add( UsersPeer::DEP_UID, $_POST['DEP_UID'], Criteria::EQUAL );
$oCriteriaB = new Criteria( 'workflow' );
$oCriteriaB->add( UsersPeer::DEP_UID, '' );
BasePeer::doUpdate( $oCriteriaA, $oCriteriaB, Propel::getConnection( 'workflow' ) );
$oDpto->remove( urldecode( $_POST['DEP_UID'] ) );
if (!isset($_POST['DEP_UID'])) return;
$ocriteria = new Criteria('workflow');
$ocriteria->addSelectColumn(DepartmentPeer::DEP_MANAGER);
$ocriteria->add(DepartmentPeer::DEP_UID,$_POST['DEP_UID']);
$oDataset = DepartmentPeer::doSelectRS($ocriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
$aRow = $oDataset->getRow();
$oCriteria1 = new Criteria('workflow');
$oCriteria1->add(UsersPeer::USR_REPORTS_TO, $aRow['DEP_MANAGER'], Criteria::EQUAL);
$oCriteria2 = new Criteria('workflow');
$oCriteria2->add(UsersPeer::USR_REPORTS_TO, '');
BasePeer::doUpdate($oCriteria1, $oCriteria2, Propel::getConnection('workflow'));
$oCriteriaA = new Criteria('workflow');
$oCriteriaA->add(UsersPeer::DEP_UID, $_POST['DEP_UID'], Criteria::EQUAL);
$oCriteriaB = new Criteria('workflow');
$oCriteriaB->add(UsersPeer::DEP_UID, '');
BasePeer::doUpdate($oCriteriaA, $oCriteriaB, Propel::getConnection('workflow'));
$oDpto->remove(urldecode($_POST['DEP_UID']));
?>

View File

@@ -1,64 +1,63 @@
<?php
/**
* departments_Edit.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.
*
*/
$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;
}
}
if (($RBAC_Response=$RBAC->userCanAccess("PM_USERS"))!=1) return $RBAC_Response;
$dept = new Department();
$DptoUid = (isset($_GET['UID'])) ? urldecode($_GET['UID']):'';
if ($DptoUid) {
$aFields = $dept->Load( $DptoUid );
}
else {
$aFields=array();
}
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'departments/departments_Edit', '', $aFields , 'departments_Save');
G::RenderPage( "publish" , "raw" );
?>
<?php
/**
* departments_Edit.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.
*/
$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;
}
}
if (($RBAC_Response = $RBAC->userCanAccess( "PM_USERS" )) != 1) {
return $RBAC_Response;
}
$dept = new Department();
$DptoUid = (isset( $_GET['UID'] )) ? urldecode( $_GET['UID'] ) : '';
if ($DptoUid) {
$aFields = $dept->Load( $DptoUid );
} else {
$aFields = array ();
}
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'departments/departments_Edit', '', $aFields, 'departments_Save' );
G::RenderPage( "publish", "raw" );

View File

@@ -1,53 +1,55 @@
<?php
/**
* groups_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.
*
*/
$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;
}
}
if (($RBAC_Response=$RBAC->userCanAccess("PM_USERS"))!=1) return $RBAC_Response;
//G::genericForceLogin( 'WF_MYINFO' , 'login/noViewPage', $urlLogin = 'login/login' );
$G_PUBLISH = new Publisher;
$G_PUBLISH->AddContent( 'view', 'departments/departments_Tree' );
G::RenderPage( "publish-raw" , "raw" );
?>
<?php
/**
* groups_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.
*/
$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;
}
}
if (($RBAC_Response = $RBAC->userCanAccess( "PM_USERS" )) != 1) {
return $RBAC_Response;
}
//G::genericForceLogin( 'WF_MYINFO' , 'login/noViewPage', $urlLogin = 'login/login' );
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'view', 'departments/departments_Tree' );
G::RenderPage( "publish-raw", "raw" );

View File

@@ -1,65 +1,65 @@
<?php
/**
* departments_Edit.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.
*
*/
$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;
}
}
if (($RBAC_Response=$RBAC->userCanAccess("PM_USERS"))!=1) return $RBAC_Response;
require_once 'classes/model/Department.php';
$oDept = new Department();
$parentUid = (isset($_GET['DEP_UID'])) ? urldecode($_GET['DEP_UID']) : '' ;
$Fields['DEP_STATUS'] = 'ACTIVE';
$G_PUBLISH = new Publisher();
if ( strlen( $parentUid) > 0 ) {
$Fields['DEP_PARENT'] = $parentUid;
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'departments/departments_SubNew', '', $Fields , 'departments_Save');
}
else {
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'departments/departments_New', '', null, '');
}
G::RenderPage( "publish" , "raw" );
<?php
/**
* departments_Edit.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.
*/
$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;
}
}
if (($RBAC_Response = $RBAC->userCanAccess( "PM_USERS" )) != 1) {
return $RBAC_Response;
}
require_once 'classes/model/Department.php';
$oDept = new Department();
$parentUid = (isset( $_GET['DEP_UID'] )) ? urldecode( $_GET['DEP_UID'] ) : '';
$Fields['DEP_STATUS'] = 'ACTIVE';
$G_PUBLISH = new Publisher();
if (strlen( $parentUid ) > 0) {
$Fields['DEP_PARENT'] = $parentUid;
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'departments/departments_SubNew', '', $Fields, 'departments_Save' );
} else {
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'departments/departments_New', '', null, '' );
}
G::RenderPage( "publish", "raw" );

View File

@@ -1,10 +1,10 @@
<?php
/**
* departments_Delete.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
@@ -12,33 +12,35 @@
*
* 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/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* 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.
*
*/
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('departos');
//$group = new Groupwf();
$oDpto = new Department();
//G::LoadClass('groups');
G::LoadClass( 'departos' );
if (!isset($_POST['DEP_UID'])) return;
$oDpto->remove(urldecode($_POST['DEP_UID']));
require_once 'classes/model/TaskUser.php';
$oProcess = new TaskUser();
//$group = new Groupwf();
$oDpto = new Department();
if (! isset( $_POST['DEP_UID'] )) {
return;
}
$oDpto->remove( urldecode( $_POST['DEP_UID'] ) );
require_once 'classes/model/TaskUser.php';
$oProcess = new TaskUser();
$oCriteria = new Criteria( 'workflow' );
$oCriteria->add( TaskUserPeer::USR_UID, $_POST['DEP_UID'] );
TaskUserPeer::doDelete( $oCriteria );
$oCriteria = new Criteria('workflow');
$oCriteria->add(TaskUserPeer::USR_UID, $_POST['DEP_UID']);
TaskUserPeer::doDelete($oCriteria);
?>

View File

@@ -1,71 +1,68 @@
<?php
/**
* departments_Edit.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.
*
*/
$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;
}
}
if (($RBAC_Response=$RBAC->userCanAccess("PM_USERS"))!=1) return $RBAC_Response;
G::LoadClass('departments');
$dbc = new DBConnection();
$ses = new DBSession($dbc);
$Dpto = new Department();
$DptoUid = (isset($_GET['SUID'])) ? urldecode($_GET['SUID']):'';
$DepParent = (isset($_GET['SDEPPARENT'])) ? urldecode($_GET['SDEPPARENT']):'';
if (strlen($DptoUid) > 1 && strlen($DepParent)>1)
{
$aFields=$Dpto->Load( $DptoUid );
}
else
{$infosubDto = $Dpto->Load( $DptoUid );//print_r($infosubDto);
$aFields=array('SUID'=>$DptoUid,'SDEPPARENT'=>$DepParent);//print_r($aFields);print"<hr>";
}
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'departments/subdep_Edit', '', $aFields , 'subdep_Save');
G::RenderPage( "publish" , "raw" );
?>
<?php
/**
* departments_Edit.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.
*/
$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;
}
}
if (($RBAC_Response = $RBAC->userCanAccess( "PM_USERS" )) != 1) {
return $RBAC_Response;
}
G::LoadClass( 'departments' );
$dbc = new DBConnection();
$ses = new DBSession( $dbc );
$Dpto = new Department();
$DptoUid = (isset( $_GET['SUID'] )) ? urldecode( $_GET['SUID'] ) : '';
$DepParent = (isset( $_GET['SDEPPARENT'] )) ? urldecode( $_GET['SDEPPARENT'] ) : '';
if (strlen( $DptoUid ) > 1 && strlen( $DepParent ) > 1) {
$aFields = $Dpto->Load( $DptoUid );
} else {
$infosubDto = $Dpto->Load( $DptoUid ); //print_r($infosubDto);
$aFields = array ('SUID' => $DptoUid,'SDEPPARENT' => $DepParent ); //print_r($aFields);print"<hr>";
}
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'departments/subdep_Edit', '', $aFields, 'subdep_Save' );
G::RenderPage( "publish", "raw" );

View File

@@ -1,10 +1,10 @@
<?php
/**
* groups_Save.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
@@ -12,57 +12,53 @@
*
* 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/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* 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.
*
*/
//print_r($_POST);die;
if (($RBAC_Response=$RBAC->userCanAccess("PM_USERS"))!=1) return $RBAC_Response;
//G::LoadClass('groups');
G::LoadClass('departments');
$G_MAIN_MENU = 'wf.login';
$G_MENU_SELECTED = '';
//print_r($_POST);die;
if (($RBAC_Response = $RBAC->userCanAccess( "PM_USERS" )) != 1) {
return $RBAC_Response;
}
//G::LoadClass('groups');
G::LoadClass( 'departments' );
$G_MAIN_MENU = 'wf.login';
$G_MENU_SELECTED = '';
//$oDepto = new Departos();
//$oDepto->saveNewDepto($_POST['form']);
//print_r($_GET);
$oDepto = new Department();
$depRow = $_POST['form'];
$DptoUid = (isset($_POST ['form']['SUID'])) ? urldecode($_POST['form']['SUID']):'';
$DepParent = (isset($_POST['form']['SDEPPARENT'])) ? urldecode($_POST['form']['SDEPPARENT']):'';
//if($_POST['form']['SDEP_UID']==='' && $_POST['form']['SDEP_UID'] ==='')
//if($_POST['form']['SUID']!=='' && $_POST['form']['SDEPPARENT'] ==='')
if (strlen($DptoUid) > 1 && strlen($DepParent)==1)
{
$oDepto->subcreate( $depRow );
//unset ( $depRow['DEP_UID'] );
$oDepto = new Department();
$depRow = $_POST['form'];
$DptoUid = (isset( $_POST['form']['SUID'] )) ? urldecode( $_POST['form']['SUID'] ) : '';
$DepParent = (isset( $_POST['form']['SDEPPARENT'] )) ? urldecode( $_POST['form']['SDEPPARENT'] ) : '';
//if($_POST['form']['SDEP_UID']==='' && $_POST['form']['SDEP_UID'] ==='')
//if($_POST['form']['SUID']!=='' && $_POST['form']['SDEPPARENT'] ==='')
if (strlen( $DptoUid ) > 1 && strlen( $DepParent ) == 1) {
$oDepto->subcreate( $depRow );
//unset ( $depRow['DEP_UID'] );
//$oDepto->subcreate( $depRow );
//$_POST['form']['GRP_UID']=$group->getGrpUid();
//$group->update($_POST['form']);
}
else
{// 1ro
////////$oDepto->subcreate( $depRow );
$oDepto->subupdate($depRow);
}
?>
} else {
// 1ro
////////$oDepto->subcreate( $depRow );
$oDepto->subupdate( $depRow );
}