Merge pull request #813 from ralpheav/master

change to set the fix of $sizeof()
This commit is contained in:
ferOnti
2012-10-18 10:02:11 -07:00
13 changed files with 560 additions and 577 deletions

View File

@@ -12,84 +12,85 @@
*
* 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.
*
*/
global $RBAC;
if ($RBAC->userCanAccess('PM_SETUP_ADVANCE') != 1) {
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
G::header('location: ../login/login');
die;
if ($RBAC->userCanAccess( 'PM_SETUP_ADVANCE' ) != 1) {
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die();
}
G::LoadClass('configuration');
G::LoadClass( 'configuration' );
$c = new Configurations();
$configPage = $c->getConfiguration('eventList', 'pageSize','',$_SESSION['USER_LOGGED']);
$Config['pageSize'] = isset($configPage['pageSize']) ? $configPage['pageSize'] : 20;
$configPage = $c->getConfiguration( 'eventList', 'pageSize', '', $_SESSION['USER_LOGGED'] );
$Config['pageSize'] = isset( $configPage['pageSize'] ) ? $configPage['pageSize'] : 20;
$G_MAIN_MENU = 'processmaker';
$G_SUB_MENU = 'logs';
$G_ID_MENU_SELECTED = 'logs';
$G_MAIN_MENU = 'processmaker';
$G_SUB_MENU = 'logs';
$G_ID_MENU_SELECTED = 'logs';
$G_ID_SUB_MENU_SELECTED = 'EVENT';
//get values for the comboBoxes
$userUid = ( isset($_SESSION['USER_LOGGED'] ) && $_SESSION['USER_LOGGED'] != '' ) ?
$_SESSION['USER_LOGGED'] : null;
$status = array(
array('', G::LoadTranslation('ID_ALL')),
array("PENDING",G::LoadTranslation('ID_OPEN')),
array("COMPLETED",G::LoadTranslation('ID_CLOSE')));
$type = array(
array('', G::LoadTranslation('ID_ALL')),
array('SEND_MESSAGE',G::LoadTranslation('ID_EVENT_MESSAGE')),
array('EXECUTE_TRIGGER',G::LoadTranslation('ID_EVENT_TIMER')),
array('EXECUTE_CONDITIONAL_TRIGGER',G::LoadTranslation('ID_EVENT_CONDITIONAL')));
$processes = getProcessArray($userUid );
$userUid = (isset( $_SESSION['USER_LOGGED'] ) && $_SESSION['USER_LOGGED'] != '') ? $_SESSION['USER_LOGGED'] : null;
$status = array (array ('',G::LoadTranslation( 'ID_ALL' )
),array ("PENDING",G::LoadTranslation( 'ID_OPEN' )
),array ("COMPLETED",G::LoadTranslation( 'ID_CLOSE' )
)
);
$type = array (array ('',G::LoadTranslation( 'ID_ALL' )
),array ('SEND_MESSAGE',G::LoadTranslation( 'ID_EVENT_MESSAGE' )
),array ('EXECUTE_TRIGGER',G::LoadTranslation( 'ID_EVENT_TIMER' )
),array ('EXECUTE_CONDITIONAL_TRIGGER',G::LoadTranslation( 'ID_EVENT_CONDITIONAL' )
)
);
$processes = getProcessArray( $userUid );
$G_PUBLISH = new Publisher;
$G_PUBLISH = new Publisher();
$oHeadPublisher =& headPublisher::getSingleton();
$oHeadPublisher->addExtJsScript('events/eventList', false); //adding a javascript file .js
$oHeadPublisher->addContent('events/eventList'); //adding a html file .html.
$oHeadPublisher = & headPublisher::getSingleton();
$oHeadPublisher->addExtJsScript( 'events/eventList', false ); //adding a javascript file .js
$oHeadPublisher->addContent( 'events/eventList' ); //adding a html file .html.
//sending the columns to display in grid
$oHeadPublisher->assign( 'typeValues', $type );
$oHeadPublisher->assign( 'statusValues', $status );
$oHeadPublisher->assign( 'processValues', $processes);
$oHeadPublisher->assign( 'typeValues', $type );
$oHeadPublisher->assign( 'statusValues', $status );
$oHeadPublisher->assign( 'processValues', $processes );
function getProcessArray ( $userUid ) {
function getProcessArray ($userUid)
{
global $oAppCache;
require_once ( "classes/model/AppCacheView.php" );
require_once ("classes/model/AppCacheView.php");
$processes = Array();
$processes[] = array ( '', G::LoadTranslation('ID_ALL_PROCESS') );
$processes = Array ();
$processes[] = array ('',G::LoadTranslation( 'ID_ALL_PROCESS' ));
$cProcess = new Criteria('workflow');
$cProcess = new Criteria( 'workflow' );
$cProcess->clearSelectColumns();
$cProcess->addSelectColumn(AppCacheViewPeer::PRO_UID);
$cProcess->addSelectColumn(AppCacheViewPeer::APP_PRO_TITLE);
$cProcess->setDistinct(AppCacheViewPeer::PRO_UID);
$cProcess->addAscendingOrderByColumn(AppCacheViewPeer::APP_PRO_TITLE);
$cProcess->addSelectColumn( AppCacheViewPeer::PRO_UID );
$cProcess->addSelectColumn( AppCacheViewPeer::APP_PRO_TITLE );
$cProcess->setDistinct( AppCacheViewPeer::PRO_UID );
$oDataset = AppCacheViewPeer::doSelectRS($cProcess);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$cProcess->addAscendingOrderByColumn( AppCacheViewPeer::APP_PRO_TITLE );
$oDataset = AppCacheViewPeer::doSelectRS( $cProcess );
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
$oDataset->next();
while($aRow = $oDataset->getRow()){
$processes[] = array ( $aRow['PRO_UID'], $aRow['APP_PRO_TITLE'] );
$oDataset->next();
while ($aRow = $oDataset->getRow()) {
$processes[] = array ($aRow['PRO_UID'],$aRow['APP_PRO_TITLE']);
$oDataset->next();
}
return $processes;
}
G::RenderPage('publish', 'extJs');
G::RenderPage( 'publish', 'extJs' );

View File

@@ -6,7 +6,6 @@ require_once 'classes/model/Content.php';
switch($req){
case 'showUsers':
/*
$sql = "SELECT USR_UID, USR_EMAIL, CONCAT(USR_FIRSTNAME, ' ' , USR_LASTNAME) AS USR_FULLNAME FROM USERS WHERE USR_STATUS = 'ACTIVE' AND USR_EMAIL <> ''";
*/
@@ -29,7 +28,7 @@ switch($req){
$rs = $stmt->executeQuery();
$aRows[] = array('USR_UID'=>'char', 'USR_EMAIL'=>'char', 'USR_FULLNAME'=>'char');
while($rs->next()){
while ($rs->next()) {
$aRows[] = array('USR_UID'=>$rs->getString('USR_UID'), 'USR_EMAIL'=>$rs->getString('USR_EMAIL'), 'USR_FULLNAME'=>$rs->getString('USR_FULLNAME'));
}
//echo '<pre>'; print_r($aRows);
@@ -40,11 +39,10 @@ switch($req){
G::LoadClass('ArrayPeer');
$oCriteria = new Criteria('dbarray');
$oCriteria->setDBArrayTable('virtualtable');
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'events/usermailList', $oCriteria);
G::RenderPage('publish', 'raw');
break;
break;
case 'showGroups':
G::LoadClass('groups');
$groups = new Groups();
@@ -56,41 +54,35 @@ switch($req){
$GROUP_TITLE = strip_tags($group->getGrpTitle());
$aRows[] = array('GRP_UID'=>$UID, 'GROUP_TITLE'=>$GROUP_TITLE);
}
global $_DBArray;
$_DBArray['virtualtable'] = $aRows;
$_SESSION['_DBArray'] = $_DBArray;
G::LoadClass('ArrayPeer');
$oCriteria = new Criteria('dbarray');
$oCriteria->setDBArrayTable('virtualtable');
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'events/groupmailList', $oCriteria);
G::RenderPage('publish', 'raw');
break;
break;
case 'showDynavars':
G::LoadClass('xmlfield_InputPM');
$dynaformFields = getDynaformsVars($_SESSION['PROCESS'], false, false);
$fields = array(array('id' => 'char', 'dynaform' => 'char', 'name' => 'char'));
foreach ($dynaformFields as $dynaformField) {
$fields[] = array('id' => $dynaformField['sName'],
'name' => '<a href="#" style="color: black;" onclick="e.toAdd(\'' . $dynaformField['sName'] . '\', \'' . $dynaformField['sName'] . '\', \'dyn\');oPanel.remove();return false;">@#' . $dynaformField['sName'] . '</a>', 'label' => $dynaformField['sLabel']);
}
global $_DBArray;
$_DBArray['virtualtable'] = $fields;
$_SESSION['_DBArray'] = $_DBArray;
G::LoadClass('ArrayPeer');
$oCriteria = new Criteria('dbarray');
$oCriteria->setDBArrayTable('virtualtable');
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'events/dynavarsList', $oCriteria);
G::RenderPage('publish', 'raw');
break;
break;
case 'eventList':
$start = (isset($_REQUEST['start']))? $_REQUEST['start'] : '0';
$limit = (isset($_REQUEST['limit']))? $_REQUEST['limit'] : '25';
$proUid = (isset($_REQUEST['process']))? $_REQUEST['process'] : '';
@@ -110,7 +102,7 @@ switch($req){
$result = AppEventPeer::doSelectRS($criteria);
$result->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$data = Array();
while( $result->next() ) {
while ( $result->next() ) {
$data[] = $result->getRow();
}
$totalCount = count($data);
@@ -120,8 +112,7 @@ switch($req){
if ($sort != '') {
if ($dir == 'ASC') {
$criteria->addAscendingOrderByColumn($sort);
}
else {
} else {
$criteria->addDescendingOrderByColumn($sort);
}
} else {
@@ -136,12 +127,13 @@ switch($req){
$data = Array();
$dataPro = array();
$index = 0;
while( $result->next() ) {
while ( $result->next() ) {
$data[] = $result->getRow();
}
$response = array();
$response['totalCount'] = $totalCount;
$response['data'] = $data;
die(G::json_encode($response));
break;
break;
}

View File

@@ -12,27 +12,27 @@
*
* 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.
*
*/
global $RBAC;
if ($RBAC->userCanAccess('PM_SETUP') != 1) {
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
G::header('location: ../login/login');
die;
if ($RBAC->userCanAccess( 'PM_SETUP' ) != 1) {
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die();
}
require_once 'classes/model/AppEvent.php';
$oAppEvent = new AppEvent();
global $G_PUBLISH;
$G_PUBLISH = new Publisher;
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'events/appEventsListCompleted', $oAppEvent->getAppEventsCriteria($_GET['PRO_UID'], 'COMPLETED', $_GET['EVN_TYPE']));
G::RenderPage('publish', 'raw');
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'events/appEventsListCompleted', $oAppEvent->getAppEventsCriteria( $_GET['PRO_UID'], 'COMPLETED', $_GET['EVN_TYPE'] ) );
G::RenderPage( 'publish', 'raw' );

View File

@@ -12,24 +12,24 @@
*
* 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.
*
*/
global $RBAC;
if ($RBAC->userCanAccess('PM_SETUP') != 1) {
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
G::header('location: ../login/login');
die;
if ($RBAC->userCanAccess( 'PM_SETUP' ) != 1) {
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die();
}
$evnUid = $_POST['EVN_UID'];
require_once 'classes/model/Event.php';
$oEvent = new Event();
$oEvent->remove( $evnUid );
$oEvent->remove( $evnUid );

View File

@@ -12,74 +12,68 @@
*
* 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.
*
*/
global $RBAC;
if ($RBAC->userCanAccess('PM_SETUP') != 1) {
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
G::header('location: ../login/login');
die;
if ($RBAC->userCanAccess( 'PM_SETUP' ) != 1) {
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die();
}
G::LoadClass('tasks');
G::LoadClass('processMap');
G::LoadClass( 'tasks' );
G::LoadClass( 'processMap' );
global $_DBArray;
if (isset($_GET['EVN_UID'])) {
require_once 'classes/model/Event.php';
$oEvent = new Event();
$aFields = $oEvent->load($_GET['EVN_UID']);
}
else {
$aFields = array('PRO_UID' => $_GET['PRO_UID']);
if (isset( $_GET['EVN_UID'] )) {
require_once 'classes/model/Event.php';
$oEvent = new Event();
$aFields = $oEvent->load( $_GET['EVN_UID'] );
} else {
$aFields = array ('PRO_UID' => $_GET['PRO_UID'] );
}
if (!isset($_SESSION['PROCESS'])){
if (isset($aFields['PRO_UID'])){
$_SESSION['PROCESS'] = $aFields['PRO_UID'];
}
if (! isset( $_SESSION['PROCESS'] )) {
if (isset( $aFields['PRO_UID'] )) {
$_SESSION['PROCESS'] = $aFields['PRO_UID'];
}
}
$oTasks = new Tasks();
$aAux1 = $oTasks->getAllTasks($aFields['PRO_UID']);
$aTasks = array();
$aTasks[] = array('TAS_UID' => 'char',
'TAS_TITLE' => 'char');
$oTasks = new Tasks();
$aAux1 = $oTasks->getAllTasks( $aFields['PRO_UID'] );
$aTasks = array ();
$aTasks[] = array ('TAS_UID' => 'char','TAS_TITLE' => 'char');
foreach ($aAux1 as $aAux2) {
if ($aAux2['TAS_TYPE'] != 'SUBPROCESS') {
$aTasks[] = array('TAS_UID' => $aAux2['TAS_UID'], 'TAS_TITLE' => $aAux2['TAS_TITLE']);
}
if ($aAux2['TAS_TYPE'] != 'SUBPROCESS') {
$aTasks[] = array ('TAS_UID' => $aAux2['TAS_UID'],'TAS_TITLE' => $aAux2['TAS_TITLE'] );
}
}
$oProcessMap = new processMap( new DBConnection() );
$aTriggersList = $oProcessMap->getTriggers( $_SESSION['PROCESS'] );
$aTriggersFileds = Array ('TRI_UID' => 'char','TRI_TITLE' => 'char');
$oProcessMap = new processMap(new DBConnection);
$aTriggersList = $oProcessMap->getTriggers($_SESSION['PROCESS']);
$aTriggersFileds = Array('TRI_UID'=>'char', 'TRI_TITLE'=>'char');
foreach($aTriggersList as $i=>$v){
unset($aTriggersList[$i]['PRO_UID']);
unset($aTriggersList[$i]['TRI_DESCRIPTION']);
$aTriggersList[$i]['TRI_TITLE'] = (strlen($aTriggersList[$i]['TRI_TITLE'])>32)? substr($aTriggersList[$i]['TRI_TITLE'], 0, 32).'...': $aTriggersList[$i]['TRI_TITLE'];
foreach ($aTriggersList as $i => $v) {
unset( $aTriggersList[$i]['PRO_UID'] );
unset( $aTriggersList[$i]['TRI_DESCRIPTION'] );
$aTriggersList[$i]['TRI_TITLE'] = (strlen( $aTriggersList[$i]['TRI_TITLE'] ) > 32) ? substr( $aTriggersList[$i]['TRI_TITLE'], 0, 32 ) . '...' : $aTriggersList[$i]['TRI_TITLE'];
}
$aTriggersList = array_merge(Array($aTriggersFileds), $aTriggersList);
$aTriggersList = array_merge( Array ($aTriggersFileds, $aTriggersList ));
$_DBArray['tasks'] = $aTasks;
$_DBArray['TMP_TRIGGERS'] = $aTriggersList;
$_SESSION['_DBArray'] = $_DBArray;
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'events/eventsEdit', '', $aFields, '../events/eventsSave');
G::RenderPage('publish', 'raw');
?>
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'events/eventsEdit', '', $aFields, '../events/eventsSave' );
G::RenderPage( 'publish', 'raw' );

File diff suppressed because it is too large Load Diff

View File

@@ -12,50 +12,49 @@
*
* 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.
*
*/
global $RBAC;
if ($RBAC->userCanAccess('PM_SETUP') != 1) {
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
G::header('location: ../login/login');
die;
if ($RBAC->userCanAccess( 'PM_SETUP' ) != 1) {
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die();
}
global $_DBArray;
G::LoadClass('tasks');
G::LoadClass('processMap');
G::LoadClass( 'tasks' );
G::LoadClass( 'processMap' );
$oTasks = new Tasks();
$aAux1 = $oTasks->getAllTasks($_GET['PRO_UID']);
$aTasks = array();
$aTasks[] = array('TAS_UID' => 'char', 'TAS_TITLE' => 'char');
$oTasks = new Tasks();
$aAux1 = $oTasks->getAllTasks( $_GET['PRO_UID'] );
$aTasks = array ();
$aTasks[] = array ('TAS_UID' => 'char','TAS_TITLE' => 'char');
//g::pr($aAux1);die;
foreach ($aAux1 as $aAux2) {
if ($aAux2['TAS_TYPE'] != 'SUBPROCESS') {
$aTasks[] = array('TAS_UID' => $aAux2['TAS_UID'], 'TAS_TITLE' => $aAux2['TAS_TITLE']);
}
if ($aAux2['TAS_TYPE'] != 'SUBPROCESS') {
$aTasks[] = array ('TAS_UID' => $aAux2['TAS_UID'],'TAS_TITLE' => $aAux2['TAS_TITLE']);
}
}
$oProcessMap = new processMap(new DBConnection);
$aTriggersList = $oProcessMap->getTriggers($_SESSION['PROCESS']);
$aTriggersFileds = Array('TRI_UID'=>'char', 'TRI_TITLE'=>'char');
$oProcessMap = new processMap( new DBConnection() );
$aTriggersList = $oProcessMap->getTriggers( $_SESSION['PROCESS'] );
$aTriggersFileds = Array ('TRI_UID' => 'char','TRI_TITLE' => 'char');
foreach($aTriggersList as $i=>$v){
unset($aTriggersList[$i]['PRO_UID']);
unset($aTriggersList[$i]['TRI_DESCRIPTION']);
$aTriggersList[$i]['TRI_TITLE'] = (strlen($aTriggersList[$i]['TRI_TITLE'])>32)? substr($aTriggersList[$i]['TRI_TITLE'], 0, 32).'...': $aTriggersList[$i]['TRI_TITLE'];
foreach ($aTriggersList as $i => $v) {
unset( $aTriggersList[$i]['PRO_UID'] );
unset( $aTriggersList[$i]['TRI_DESCRIPTION'] );
$aTriggersList[$i]['TRI_TITLE'] = (strlen( $aTriggersList[$i]['TRI_TITLE'] ) > 32) ? substr( $aTriggersList[$i]['TRI_TITLE'], 0, 32 ) . '...' : $aTriggersList[$i]['TRI_TITLE'];
}
$aTriggersList = array_merge(Array($aTriggersFileds), $aTriggersList);
$aTriggersList = array_merge( Array ($aTriggersFileds), $aTriggersList );
$_DBArray['tasks'] = $aTasks;
$_DBArray['TMP_TRIGGERS'] = $aTriggersList;
@@ -63,6 +62,6 @@ $_DBArray['TMP_TRIGGERS'] = $aTriggersList;
$_SESSION['_DBArray'] = $_DBArray;
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'events/eventsNew', '', array('PRO_UID' => $_GET['PRO_UID'], 'EVN_ACTION' => $_GET['EVN_TYPE']), '');
G::RenderPage('publish', 'raw');
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'events/eventsNew', '', array ('PRO_UID' => $_GET['PRO_UID'],'EVN_ACTION' => $_GET['EVN_TYPE']), '' );
G::RenderPage( 'publish', 'raw' );

View File

@@ -12,37 +12,36 @@
*
* 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.
*
*/
global $RBAC;
if ($RBAC->userCanAccess('PM_SETUP') != 1) {
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
G::header('location: ../login/login');
die;
if ($RBAC->userCanAccess( 'PM_SETUP' ) != 1) {
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die();
}
global $_DBArray;
//get the posted fields of new Event and create a new record of that
//get the posted fields of new Event and create a new record of that
require_once 'classes/model/Event.php';
$oEvent = new Event();
$envUId = $oEvent->create($_POST);
$envUId = $oEvent->create( $_POST );
$_SESSION['EVN_UID'] = $envUId;
require_once ( 'eventsEditAction.php' );
die;
require_once ('eventsEditAction.php');
die();
/*
//this page is showing the parameters for setup email messages and triggers,
//this page is showing the parameters for setup email messages and triggers,
//probably this will be changed soon.
$aTemplates = array();
@@ -80,4 +79,5 @@ $G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'events/events_EditAction', '', $_POST, '../events/eventsSave');
G::RenderPage('publish', 'raw');
*/
*/

View File

@@ -12,27 +12,27 @@
*
* 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.
*
*/
global $RBAC;
if ($RBAC->userCanAccess('PM_SETUP') != 1) {
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
G::header('location: ../login/login');
die;
if ($RBAC->userCanAccess( 'PM_SETUP' ) != 1) {
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die();
}
require_once 'classes/model/AppEvent.php';
$oAppEvent = new AppEvent();
global $G_PUBLISH;
$G_PUBLISH = new Publisher;
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'events/appEventsList', $oAppEvent->getAppEventsCriteria($_GET['PRO_UID'], 'PENDING', $_GET['EVN_TYPE']));
G::RenderPage('publish', 'raw');
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'events/appEventsList', $oAppEvent->getAppEventsCriteria( $_GET['PRO_UID'], 'PENDING', $_GET['EVN_TYPE'] ) );
G::RenderPage( 'publish', 'raw' );

View File

@@ -12,66 +12,59 @@
*
* 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.
*
*/
global $RBAC;
if ($RBAC->userCanAccess('PM_SETUP') != 1) {
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
G::header('location: ../login/login');
die;
if ($RBAC->userCanAccess( 'PM_SETUP' ) != 1) {
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die();
}
$EVN_MESSAGE_TO_TO = isset($_POST['form']['EVN_MESSAGE_TO_TO'])? replaceQuotes($_POST['form']['EVN_MESSAGE_TO_TO']): Array();
$EVN_MESSAGE_TO_CC = isset($_POST['form']['EVN_MESSAGE_TO_CC'])? replaceQuotes($_POST['form']['EVN_MESSAGE_TO_CC']): Array();
$EVN_MESSAGE_TO_BCC = isset($_POST['form']['EVN_MESSAGE_TO_BCC'])? replaceQuotes($_POST['form']['EVN_MESSAGE_TO_BCC']): Array();
$EVN_MESSAGE_TO_TO = isset( $_POST['form']['EVN_MESSAGE_TO_TO'] ) ? replaceQuotes( $_POST['form']['EVN_MESSAGE_TO_TO'] ) : Array ();
$EVN_MESSAGE_TO_CC = isset( $_POST['form']['EVN_MESSAGE_TO_CC'] ) ? replaceQuotes( $_POST['form']['EVN_MESSAGE_TO_CC'] ) : Array ();
$EVN_MESSAGE_TO_BCC = isset( $_POST['form']['EVN_MESSAGE_TO_BCC'] ) ? replaceQuotes( $_POST['form']['EVN_MESSAGE_TO_BCC'] ) : Array ();
if (isset($_POST['form']['EVN_MESSAGE_SUBJECT'])) {
$_POST['form']['EVN_ACTION_PARAMETERS'] = array(
'SUBJECT' => $_POST['form']['EVN_MESSAGE_SUBJECT'],
'TO' => $EVN_MESSAGE_TO_TO,
'CC' => $EVN_MESSAGE_TO_CC,
'BCC' => $EVN_MESSAGE_TO_BCC,
'TEMPLATE' => $_POST['form']['EVN_MESSAGE_TEMPLATE']
);
unset($_POST['form']['EVN_MESSAGE_SUBJECT']);
unset($_POST['form']['EVN_MESSAGE_TO_TO']);
unset($_POST['form']['EVN_MESSAGE_TO_CC']);
unset($_POST['form']['EVN_MESSAGE_TO_BCC']);
unset($_POST['form']['EVN_MESSAGE_TEMPLATE']);
if (isset( $_POST['form']['EVN_MESSAGE_SUBJECT'] )) {
$_POST['form']['EVN_ACTION_PARAMETERS'] = array ('SUBJECT' => $_POST['form']['EVN_MESSAGE_SUBJECT'],'TO' => $EVN_MESSAGE_TO_TO,'CC' => $EVN_MESSAGE_TO_CC,'BCC' => $EVN_MESSAGE_TO_BCC,'TEMPLATE' => $_POST['form']['EVN_MESSAGE_TEMPLATE']);
unset( $_POST['form']['EVN_MESSAGE_SUBJECT'] );
unset( $_POST['form']['EVN_MESSAGE_TO_TO'] );
unset( $_POST['form']['EVN_MESSAGE_TO_CC'] );
unset( $_POST['form']['EVN_MESSAGE_TO_BCC'] );
unset( $_POST['form']['EVN_MESSAGE_TEMPLATE'] );
}
unset($_POST['form']['SAVE']);
unset( $_POST['form']['SAVE'] );
require_once 'classes/model/Event.php';
$oEvent = new Event();
if ($_POST['form']['EVN_UID'] == '') {
//this is probably not used, because the creation of one Event is done directly in EventsNewAction
$oEvent->create($_POST['form']);
}
else {
/*
*if($_POST['form']['EVN_ACTION'] == 'SEND_MESSAGE' && $ev->getTriUid() != trim($_POST['form']['TRI_UID']) ){
//this is probably not used, because the creation of one Event is done directly in EventsNewAction
$oEvent->create( $_POST['form'] );
} else {
/*
*if($_POST['form']['EVN_ACTION'] == 'SEND_MESSAGE' && $ev->getTriUid() != trim($_POST['form']['TRI_UID']) ){
$oEvnActionParameters = unserialize($ev->getEvnActionParameters());
prit_r($oEvnActionParameters);
if( isset($oEvnActionParameters->TRI_UID) ){
$_POST['form']['TRI_UID'] = $oEvnActionParameters->TRI_UID;
}
}
*/
$oEvent->update($_POST['form']);
}
*/
$oEvent->update( $_POST['form'] );
}
function replaceQuotes ($aData)
{
for ($i = 0; $i < sizeof( $aData ); $i ++) {
$aData[$i] = str_replace( "&quote;", '"', $aData[$i] );
}
return $aData;
}
function replaceQuotes($aData){
for($i=0; $i<sizeof($aData); $i++){
$aData[$i] = str_replace("&quote;", '"', $aData[$i]);
}
return $aData;
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,10 +1,10 @@
<?php
/**
* triggers_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,29 +12,27 @@
*
* 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_FACTORY"))!=1) return $RBAC_Response;
require_once('classes/model/Triggers.php');
$oTrigger = new Triggers();
if ($_POST['form']['TRI_UID'] != '')
{
$oTrigger->load($_POST['form']['TRI_UID']);
if (($RBAC_Response = $RBAC->userCanAccess( "PM_FACTORY" )) != 1) {
return $RBAC_Response;
}
else
{
$oTrigger->create($_POST['form']);
$_POST['form']['TRI_UID']=$oTrigger->getTriUid();
require_once ('classes/model/Triggers.php');
$oTrigger = new Triggers();
if ($_POST['form']['TRI_UID'] != '') {
$oTrigger->load( $_POST['form']['TRI_UID'] );
} else {
$oTrigger->create( $_POST['form'] );
$_POST['form']['TRI_UID'] = $oTrigger->getTriUid();
}
$oTrigger->update($_POST['form']);
?>
$oTrigger->update( $_POST['form'] );