CODE STYLE
files modified: eventList.php eventsAjax.php eventsCompleted.php eventsDelete.php eventsEdit.php eventsEditAction.php eventsNew.php eventsNewAction.php eventsPending.php eventsSave.php eventsSetupGraph.php triggersSave.php
This commit is contained in:
@@ -12,84 +12,85 @@
|
|||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* 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.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* 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.,
|
* 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.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
global $RBAC;
|
global $RBAC;
|
||||||
if ($RBAC->userCanAccess('PM_SETUP_ADVANCE') != 1) {
|
if ($RBAC->userCanAccess( 'PM_SETUP_ADVANCE' ) != 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();
|
||||||
}
|
}
|
||||||
|
|
||||||
G::LoadClass('configuration');
|
G::LoadClass( 'configuration' );
|
||||||
$c = new Configurations();
|
$c = new Configurations();
|
||||||
$configPage = $c->getConfiguration('eventList', 'pageSize','',$_SESSION['USER_LOGGED']);
|
$configPage = $c->getConfiguration( 'eventList', 'pageSize', '', $_SESSION['USER_LOGGED'] );
|
||||||
$Config['pageSize'] = isset($configPage['pageSize']) ? $configPage['pageSize'] : 20;
|
$Config['pageSize'] = isset( $configPage['pageSize'] ) ? $configPage['pageSize'] : 20;
|
||||||
|
|
||||||
$G_MAIN_MENU = 'processmaker';
|
$G_MAIN_MENU = 'processmaker';
|
||||||
$G_SUB_MENU = 'logs';
|
$G_SUB_MENU = 'logs';
|
||||||
$G_ID_MENU_SELECTED = 'logs';
|
$G_ID_MENU_SELECTED = 'logs';
|
||||||
$G_ID_SUB_MENU_SELECTED = 'EVENT';
|
$G_ID_SUB_MENU_SELECTED = 'EVENT';
|
||||||
|
|
||||||
//get values for the comboBoxes
|
//get values for the comboBoxes
|
||||||
$userUid = ( isset($_SESSION['USER_LOGGED'] ) && $_SESSION['USER_LOGGED'] != '' ) ?
|
$userUid = (isset( $_SESSION['USER_LOGGED'] ) && $_SESSION['USER_LOGGED'] != '') ? $_SESSION['USER_LOGGED'] : null;
|
||||||
$_SESSION['USER_LOGGED'] : null;
|
$status = array (array ('',G::LoadTranslation( 'ID_ALL' )
|
||||||
$status = array(
|
),array ("PENDING",G::LoadTranslation( 'ID_OPEN' )
|
||||||
array('', G::LoadTranslation('ID_ALL')),
|
),array ("COMPLETED",G::LoadTranslation( 'ID_CLOSE' )
|
||||||
array("PENDING",G::LoadTranslation('ID_OPEN')),
|
)
|
||||||
array("COMPLETED",G::LoadTranslation('ID_CLOSE')));
|
);
|
||||||
$type = array(
|
$type = array (array ('',G::LoadTranslation( 'ID_ALL' )
|
||||||
array('', G::LoadTranslation('ID_ALL')),
|
),array ('SEND_MESSAGE',G::LoadTranslation( 'ID_EVENT_MESSAGE' )
|
||||||
array('SEND_MESSAGE',G::LoadTranslation('ID_EVENT_MESSAGE')),
|
),array ('EXECUTE_TRIGGER',G::LoadTranslation( 'ID_EVENT_TIMER' )
|
||||||
array('EXECUTE_TRIGGER',G::LoadTranslation('ID_EVENT_TIMER')),
|
),array ('EXECUTE_CONDITIONAL_TRIGGER',G::LoadTranslation( 'ID_EVENT_CONDITIONAL' )
|
||||||
array('EXECUTE_CONDITIONAL_TRIGGER',G::LoadTranslation('ID_EVENT_CONDITIONAL')));
|
)
|
||||||
$processes = getProcessArray($userUid );
|
);
|
||||||
|
$processes = getProcessArray( $userUid );
|
||||||
|
|
||||||
$G_PUBLISH = new Publisher;
|
$G_PUBLISH = new Publisher();
|
||||||
|
|
||||||
$oHeadPublisher =& headPublisher::getSingleton();
|
$oHeadPublisher = & headPublisher::getSingleton();
|
||||||
$oHeadPublisher->addExtJsScript('events/eventList', false); //adding a javascript file .js
|
$oHeadPublisher->addExtJsScript( 'events/eventList', false ); //adding a javascript file .js
|
||||||
$oHeadPublisher->addContent('events/eventList'); //adding a html file .html.
|
$oHeadPublisher->addContent( 'events/eventList' ); //adding a html file .html.
|
||||||
//sending the columns to display in grid
|
//sending the columns to display in grid
|
||||||
$oHeadPublisher->assign( 'typeValues', $type );
|
$oHeadPublisher->assign( 'typeValues', $type );
|
||||||
$oHeadPublisher->assign( 'statusValues', $status );
|
$oHeadPublisher->assign( 'statusValues', $status );
|
||||||
$oHeadPublisher->assign( 'processValues', $processes);
|
$oHeadPublisher->assign( 'processValues', $processes );
|
||||||
|
|
||||||
function getProcessArray ( $userUid ) {
|
function getProcessArray ($userUid)
|
||||||
|
{
|
||||||
global $oAppCache;
|
global $oAppCache;
|
||||||
require_once ( "classes/model/AppCacheView.php" );
|
require_once ("classes/model/AppCacheView.php");
|
||||||
|
|
||||||
$processes = Array();
|
$processes = Array ();
|
||||||
$processes[] = array ( '', G::LoadTranslation('ID_ALL_PROCESS') );
|
$processes[] = array ('',G::LoadTranslation( 'ID_ALL_PROCESS' ));
|
||||||
|
|
||||||
$cProcess = new Criteria('workflow');
|
$cProcess = new Criteria( 'workflow' );
|
||||||
$cProcess->clearSelectColumns();
|
$cProcess->clearSelectColumns();
|
||||||
$cProcess->addSelectColumn(AppCacheViewPeer::PRO_UID);
|
$cProcess->addSelectColumn( AppCacheViewPeer::PRO_UID );
|
||||||
$cProcess->addSelectColumn(AppCacheViewPeer::APP_PRO_TITLE);
|
$cProcess->addSelectColumn( AppCacheViewPeer::APP_PRO_TITLE );
|
||||||
$cProcess->setDistinct(AppCacheViewPeer::PRO_UID);
|
$cProcess->setDistinct( AppCacheViewPeer::PRO_UID );
|
||||||
|
|
||||||
$cProcess->addAscendingOrderByColumn(AppCacheViewPeer::APP_PRO_TITLE);
|
|
||||||
|
|
||||||
$oDataset = AppCacheViewPeer::doSelectRS($cProcess);
|
$cProcess->addAscendingOrderByColumn( AppCacheViewPeer::APP_PRO_TITLE );
|
||||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
|
||||||
|
$oDataset = AppCacheViewPeer::doSelectRS( $cProcess );
|
||||||
|
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||||
$oDataset->next();
|
$oDataset->next();
|
||||||
|
|
||||||
while($aRow = $oDataset->getRow()){
|
while ($aRow = $oDataset->getRow()) {
|
||||||
$processes[] = array ( $aRow['PRO_UID'], $aRow['APP_PRO_TITLE'] );
|
$processes[] = array ($aRow['PRO_UID'],$aRow['APP_PRO_TITLE']);
|
||||||
$oDataset->next();
|
$oDataset->next();
|
||||||
}
|
}
|
||||||
|
|
||||||
return $processes;
|
return $processes;
|
||||||
}
|
}
|
||||||
|
|
||||||
G::RenderPage('publish', 'extJs');
|
G::RenderPage( 'publish', 'extJs' );
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ require_once 'classes/model/Content.php';
|
|||||||
|
|
||||||
switch($req){
|
switch($req){
|
||||||
case 'showUsers':
|
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 <> ''";
|
$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();
|
$rs = $stmt->executeQuery();
|
||||||
|
|
||||||
$aRows[] = array('USR_UID'=>'char', 'USR_EMAIL'=>'char', 'USR_FULLNAME'=>'char');
|
$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'));
|
$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);
|
//echo '<pre>'; print_r($aRows);
|
||||||
@@ -40,11 +39,10 @@ switch($req){
|
|||||||
G::LoadClass('ArrayPeer');
|
G::LoadClass('ArrayPeer');
|
||||||
$oCriteria = new Criteria('dbarray');
|
$oCriteria = new Criteria('dbarray');
|
||||||
$oCriteria->setDBArrayTable('virtualtable');
|
$oCriteria->setDBArrayTable('virtualtable');
|
||||||
|
|
||||||
$G_PUBLISH = new Publisher();
|
$G_PUBLISH = new Publisher();
|
||||||
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'events/usermailList', $oCriteria);
|
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'events/usermailList', $oCriteria);
|
||||||
G::RenderPage('publish', 'raw');
|
G::RenderPage('publish', 'raw');
|
||||||
break;
|
break;
|
||||||
case 'showGroups':
|
case 'showGroups':
|
||||||
G::LoadClass('groups');
|
G::LoadClass('groups');
|
||||||
$groups = new Groups();
|
$groups = new Groups();
|
||||||
@@ -56,41 +54,35 @@ switch($req){
|
|||||||
$GROUP_TITLE = strip_tags($group->getGrpTitle());
|
$GROUP_TITLE = strip_tags($group->getGrpTitle());
|
||||||
$aRows[] = array('GRP_UID'=>$UID, 'GROUP_TITLE'=>$GROUP_TITLE);
|
$aRows[] = array('GRP_UID'=>$UID, 'GROUP_TITLE'=>$GROUP_TITLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
global $_DBArray;
|
global $_DBArray;
|
||||||
$_DBArray['virtualtable'] = $aRows;
|
$_DBArray['virtualtable'] = $aRows;
|
||||||
$_SESSION['_DBArray'] = $_DBArray;
|
$_SESSION['_DBArray'] = $_DBArray;
|
||||||
G::LoadClass('ArrayPeer');
|
G::LoadClass('ArrayPeer');
|
||||||
$oCriteria = new Criteria('dbarray');
|
$oCriteria = new Criteria('dbarray');
|
||||||
$oCriteria->setDBArrayTable('virtualtable');
|
$oCriteria->setDBArrayTable('virtualtable');
|
||||||
|
|
||||||
$G_PUBLISH = new Publisher();
|
$G_PUBLISH = new Publisher();
|
||||||
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'events/groupmailList', $oCriteria);
|
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'events/groupmailList', $oCriteria);
|
||||||
G::RenderPage('publish', 'raw');
|
G::RenderPage('publish', 'raw');
|
||||||
break;
|
break;
|
||||||
case 'showDynavars':
|
case 'showDynavars':
|
||||||
G::LoadClass('xmlfield_InputPM');
|
G::LoadClass('xmlfield_InputPM');
|
||||||
$dynaformFields = getDynaformsVars($_SESSION['PROCESS'], false, false);
|
$dynaformFields = getDynaformsVars($_SESSION['PROCESS'], false, false);
|
||||||
$fields = array(array('id' => 'char', 'dynaform' => 'char', 'name' => 'char'));
|
$fields = array(array('id' => 'char', 'dynaform' => 'char', 'name' => 'char'));
|
||||||
|
|
||||||
foreach ($dynaformFields as $dynaformField) {
|
foreach ($dynaformFields as $dynaformField) {
|
||||||
$fields[] = array('id' => $dynaformField['sName'],
|
$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']);
|
'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;
|
global $_DBArray;
|
||||||
$_DBArray['virtualtable'] = $fields;
|
$_DBArray['virtualtable'] = $fields;
|
||||||
$_SESSION['_DBArray'] = $_DBArray;
|
$_SESSION['_DBArray'] = $_DBArray;
|
||||||
G::LoadClass('ArrayPeer');
|
G::LoadClass('ArrayPeer');
|
||||||
$oCriteria = new Criteria('dbarray');
|
$oCriteria = new Criteria('dbarray');
|
||||||
$oCriteria->setDBArrayTable('virtualtable');
|
$oCriteria->setDBArrayTable('virtualtable');
|
||||||
|
|
||||||
$G_PUBLISH = new Publisher();
|
$G_PUBLISH = new Publisher();
|
||||||
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'events/dynavarsList', $oCriteria);
|
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'events/dynavarsList', $oCriteria);
|
||||||
G::RenderPage('publish', 'raw');
|
G::RenderPage('publish', 'raw');
|
||||||
break;
|
break;
|
||||||
case 'eventList':
|
case 'eventList':
|
||||||
|
|
||||||
$start = (isset($_REQUEST['start']))? $_REQUEST['start'] : '0';
|
$start = (isset($_REQUEST['start']))? $_REQUEST['start'] : '0';
|
||||||
$limit = (isset($_REQUEST['limit']))? $_REQUEST['limit'] : '25';
|
$limit = (isset($_REQUEST['limit']))? $_REQUEST['limit'] : '25';
|
||||||
$proUid = (isset($_REQUEST['process']))? $_REQUEST['process'] : '';
|
$proUid = (isset($_REQUEST['process']))? $_REQUEST['process'] : '';
|
||||||
@@ -110,7 +102,7 @@ switch($req){
|
|||||||
$result = AppEventPeer::doSelectRS($criteria);
|
$result = AppEventPeer::doSelectRS($criteria);
|
||||||
$result->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
$result->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||||
$data = Array();
|
$data = Array();
|
||||||
while( $result->next() ) {
|
while ( $result->next() ) {
|
||||||
$data[] = $result->getRow();
|
$data[] = $result->getRow();
|
||||||
}
|
}
|
||||||
$totalCount = count($data);
|
$totalCount = count($data);
|
||||||
@@ -120,8 +112,7 @@ switch($req){
|
|||||||
if ($sort != '') {
|
if ($sort != '') {
|
||||||
if ($dir == 'ASC') {
|
if ($dir == 'ASC') {
|
||||||
$criteria->addAscendingOrderByColumn($sort);
|
$criteria->addAscendingOrderByColumn($sort);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
$criteria->addDescendingOrderByColumn($sort);
|
$criteria->addDescendingOrderByColumn($sort);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -136,12 +127,13 @@ switch($req){
|
|||||||
$data = Array();
|
$data = Array();
|
||||||
$dataPro = array();
|
$dataPro = array();
|
||||||
$index = 0;
|
$index = 0;
|
||||||
while( $result->next() ) {
|
while ( $result->next() ) {
|
||||||
$data[] = $result->getRow();
|
$data[] = $result->getRow();
|
||||||
}
|
}
|
||||||
$response = array();
|
$response = array();
|
||||||
$response['totalCount'] = $totalCount;
|
$response['totalCount'] = $totalCount;
|
||||||
$response['data'] = $data;
|
$response['data'] = $data;
|
||||||
die(G::json_encode($response));
|
die(G::json_encode($response));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,27 +12,27 @@
|
|||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* 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.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* 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.,
|
* 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.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
global $RBAC;
|
global $RBAC;
|
||||||
if ($RBAC->userCanAccess('PM_SETUP') != 1) {
|
if ($RBAC->userCanAccess( 'PM_SETUP' ) != 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();
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once 'classes/model/AppEvent.php';
|
require_once 'classes/model/AppEvent.php';
|
||||||
$oAppEvent = new AppEvent();
|
$oAppEvent = new AppEvent();
|
||||||
|
|
||||||
global $G_PUBLISH;
|
global $G_PUBLISH;
|
||||||
$G_PUBLISH = new Publisher;
|
$G_PUBLISH = new Publisher();
|
||||||
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'events/appEventsListCompleted', $oAppEvent->getAppEventsCriteria($_GET['PRO_UID'], 'COMPLETED', $_GET['EVN_TYPE']));
|
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'events/appEventsListCompleted', $oAppEvent->getAppEventsCriteria( $_GET['PRO_UID'], 'COMPLETED', $_GET['EVN_TYPE'] ) );
|
||||||
G::RenderPage('publish', 'raw');
|
G::RenderPage( 'publish', 'raw' );
|
||||||
|
|
||||||
|
|||||||
@@ -12,24 +12,24 @@
|
|||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* 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.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* 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.,
|
* 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.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
global $RBAC;
|
global $RBAC;
|
||||||
if ($RBAC->userCanAccess('PM_SETUP') != 1) {
|
if ($RBAC->userCanAccess( 'PM_SETUP' ) != 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();
|
||||||
}
|
}
|
||||||
|
|
||||||
$evnUid = $_POST['EVN_UID'];
|
$evnUid = $_POST['EVN_UID'];
|
||||||
require_once 'classes/model/Event.php';
|
require_once 'classes/model/Event.php';
|
||||||
$oEvent = new Event();
|
$oEvent = new Event();
|
||||||
$oEvent->remove( $evnUid );
|
$oEvent->remove( $evnUid );
|
||||||
|
|
||||||
|
|||||||
@@ -12,74 +12,68 @@
|
|||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* 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.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* 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.,
|
* 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.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
global $RBAC;
|
global $RBAC;
|
||||||
if ($RBAC->userCanAccess('PM_SETUP') != 1) {
|
if ($RBAC->userCanAccess( 'PM_SETUP' ) != 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();
|
||||||
}
|
}
|
||||||
|
|
||||||
G::LoadClass('tasks');
|
G::LoadClass( 'tasks' );
|
||||||
G::LoadClass('processMap');
|
G::LoadClass( 'processMap' );
|
||||||
global $_DBArray;
|
global $_DBArray;
|
||||||
|
|
||||||
if (isset($_GET['EVN_UID'])) {
|
if (isset( $_GET['EVN_UID'] )) {
|
||||||
require_once 'classes/model/Event.php';
|
require_once 'classes/model/Event.php';
|
||||||
$oEvent = new Event();
|
$oEvent = new Event();
|
||||||
$aFields = $oEvent->load($_GET['EVN_UID']);
|
$aFields = $oEvent->load( $_GET['EVN_UID'] );
|
||||||
}
|
} else {
|
||||||
else {
|
$aFields = array ('PRO_UID' => $_GET['PRO_UID'] );
|
||||||
$aFields = array('PRO_UID' => $_GET['PRO_UID']);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (! isset( $_SESSION['PROCESS'] )) {
|
||||||
if (!isset($_SESSION['PROCESS'])){
|
if (isset( $aFields['PRO_UID'] )) {
|
||||||
if (isset($aFields['PRO_UID'])){
|
$_SESSION['PROCESS'] = $aFields['PRO_UID'];
|
||||||
$_SESSION['PROCESS'] = $aFields['PRO_UID'];
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$oTasks = new Tasks();
|
$oTasks = new Tasks();
|
||||||
$aAux1 = $oTasks->getAllTasks($aFields['PRO_UID']);
|
$aAux1 = $oTasks->getAllTasks( $aFields['PRO_UID'] );
|
||||||
$aTasks = array();
|
$aTasks = array ();
|
||||||
$aTasks[] = array('TAS_UID' => 'char',
|
$aTasks[] = array ('TAS_UID' => 'char','TAS_TITLE' => 'char');
|
||||||
'TAS_TITLE' => 'char');
|
|
||||||
foreach ($aAux1 as $aAux2) {
|
foreach ($aAux1 as $aAux2) {
|
||||||
if ($aAux2['TAS_TYPE'] != 'SUBPROCESS') {
|
if ($aAux2['TAS_TYPE'] != 'SUBPROCESS') {
|
||||||
$aTasks[] = array('TAS_UID' => $aAux2['TAS_UID'], 'TAS_TITLE' => $aAux2['TAS_TITLE']);
|
$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);
|
foreach ($aTriggersList as $i => $v) {
|
||||||
$aTriggersList = $oProcessMap->getTriggers($_SESSION['PROCESS']);
|
unset( $aTriggersList[$i]['PRO_UID'] );
|
||||||
$aTriggersFileds = Array('TRI_UID'=>'char', 'TRI_TITLE'=>'char');
|
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['tasks'] = $aTasks;
|
||||||
$_DBArray['TMP_TRIGGERS'] = $aTriggersList;
|
$_DBArray['TMP_TRIGGERS'] = $aTriggersList;
|
||||||
|
|
||||||
|
|
||||||
$_SESSION['_DBArray'] = $_DBArray;
|
$_SESSION['_DBArray'] = $_DBArray;
|
||||||
|
|
||||||
$G_PUBLISH = new Publisher();
|
$G_PUBLISH = new Publisher();
|
||||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'events/eventsEdit', '', $aFields, '../events/eventsSave');
|
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'events/eventsEdit', '', $aFields, '../events/eventsSave' );
|
||||||
G::RenderPage('publish', 'raw');
|
G::RenderPage( 'publish', 'raw' );
|
||||||
?>
|
|
||||||
|
|||||||
@@ -12,238 +12,224 @@
|
|||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* 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.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* 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.,
|
* 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.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
global $RBAC;
|
global $RBAC;
|
||||||
global $_DBArray;
|
global $_DBArray;
|
||||||
|
|
||||||
if ($RBAC->userCanAccess('PM_SETUP') != 1) {
|
if ($RBAC->userCanAccess( 'PM_SETUP' ) != 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();
|
||||||
}
|
}
|
||||||
if ( isset ($_SESSION['EVN_UID']) ) {
|
if (isset( $_SESSION['EVN_UID'] )) {
|
||||||
$evnUid = $_SESSION['EVN_UID'];
|
$evnUid = $_SESSION['EVN_UID'];
|
||||||
unset ( $_SESSION['EVN_UID'] );
|
unset( $_SESSION['EVN_UID'] );
|
||||||
|
} else {
|
||||||
|
$evnUid = $_GET['EVN_UID'];
|
||||||
}
|
}
|
||||||
else
|
|
||||||
$evnUid = $_GET['EVN_UID'];
|
|
||||||
|
|
||||||
require_once 'classes/model/Event.php';
|
require_once 'classes/model/Event.php';
|
||||||
require_once 'classes/model/Triggers.php';
|
require_once 'classes/model/Triggers.php';
|
||||||
$oEvent = new Event();
|
$oEvent = new Event();
|
||||||
$oTrigger = new Triggers();
|
$oTrigger = new Triggers();
|
||||||
$aFields = $oEvent->load( $evnUid );
|
$aFields = $oEvent->load( $evnUid );
|
||||||
$parameters = unserialize ( $oEvent->getEvnActionParameters() );
|
$parameters = unserialize( $oEvent->getEvnActionParameters() );
|
||||||
//g::pr($parameters); die;
|
//g::pr($parameters); die;
|
||||||
$aTrigger = $oTrigger->load($aFields['TRI_UID']);
|
$aTrigger = $oTrigger->load( $aFields['TRI_UID'] );
|
||||||
|
|
||||||
$hash = md5 ( $oTrigger->getTriWebbot() );
|
$hash = md5( $oTrigger->getTriWebbot() );
|
||||||
//var_dump($hash,$parameters->hash);die;
|
//var_dump($hash,$parameters->hash);die;
|
||||||
//if the hash is different, the script was edited , so we will show the trigger editor.
|
//if the hash is different, the script was edited , so we will show the trigger editor.
|
||||||
if ( ( isset($parameters->hash) && $hash <> $parameters->hash ) || $aFields['EVN_ACTION'] == 'EXECUTE_TRIGGER' || $aFields['EVN_ACTION'] == 'EXECUTE_CONDITIONAL_TRIGGER' ) {
|
if ((isset( $parameters->hash ) && $hash != $parameters->hash) || $aFields['EVN_ACTION'] == 'EXECUTE_TRIGGER' || $aFields['EVN_ACTION'] == 'EXECUTE_CONDITIONAL_TRIGGER') {
|
||||||
$oTriggerParams = unserialize($aTrigger['TRI_PARAM']);
|
$oTriggerParams = unserialize( $aTrigger['TRI_PARAM'] );
|
||||||
// check again a hash, this time to check the trigger itself integrity
|
// check again a hash, this time to check the trigger itself integrity
|
||||||
if ($oTriggerParams['hash']!=$hash){
|
if ($oTriggerParams['hash'] != $hash) {
|
||||||
// if has changed edit manually
|
// if has changed edit manually
|
||||||
G::LoadClass('xmlfield_InputPM');
|
G::LoadClass( 'xmlfield_InputPM' );
|
||||||
$G_PUBLISH = new Publisher();
|
$G_PUBLISH = new Publisher();
|
||||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'triggers/triggersNarrowEdit', '', $aTrigger, '../events/triggersSave');
|
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'triggers/triggersNarrowEdit', '', $aTrigger, '../events/triggersSave' );
|
||||||
G::RenderPage('publish', 'raw');
|
G::RenderPage( 'publish', 'raw' );
|
||||||
die;
|
die();
|
||||||
} else {
|
} else {
|
||||||
// if not launch the wizard view.
|
// if not launch the wizard view.
|
||||||
$triUid = $aFields['TRI_UID'];
|
$triUid = $aFields['TRI_UID'];
|
||||||
$_GET = $oTriggerParams['params'];
|
$_GET = $oTriggerParams['params'];
|
||||||
$_GET['TRI_UID'] = $triUid;
|
$_GET['TRI_UID'] = $triUid;
|
||||||
require_once(PATH_METHODS.'triggers/triggers_EditWizard.php');
|
require_once (PATH_METHODS . 'triggers/triggers_EditWizard.php');
|
||||||
die;
|
die();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$aFields['EVN_MESSAGE_SUBJECT'] = (isset($parameters->SUBJECT) ? $parameters->SUBJECT : '');
|
$aFields['EVN_MESSAGE_SUBJECT'] = (isset( $parameters->SUBJECT ) ? $parameters->SUBJECT : '');
|
||||||
|
|
||||||
if(isset($parameters->TO)){
|
if (isset( $parameters->TO )) {
|
||||||
$paramTO[] = Array('id'=>'char', 'name'=>'char');
|
$paramTO[] = Array ('id' => 'char','name' => 'char' );
|
||||||
|
|
||||||
//echo '<pre>';print_r($parameters->TO);
|
//echo '<pre>';print_r($parameters->TO);
|
||||||
foreach($parameters->TO as $item){
|
foreach ($parameters->TO as $item) {
|
||||||
$row = explode('|', $item);
|
$row = explode( '|', $item );
|
||||||
switch($row[0]){
|
switch ($row[0]) {
|
||||||
case 'usr':
|
case 'usr':
|
||||||
require_once('classes/model/Users.php');
|
require_once ('classes/model/Users.php');
|
||||||
$user = new Users();
|
$user = new Users();
|
||||||
|
if ($row[1] == '-1') {
|
||||||
if($row[1] == '-1'){
|
$value = '(Current Task User)';
|
||||||
$value = '(Current Task User)';
|
} else {
|
||||||
} else {
|
$rec = $user->load( $row[1] );
|
||||||
$rec = $user->load($row[1]);
|
$value = $rec['USR_FIRSTNAME'] . ' ' . $rec['USR_LASTNAME'];
|
||||||
$value = $rec['USR_FIRSTNAME'].' '.$rec['USR_LASTNAME'];
|
}
|
||||||
}
|
break;
|
||||||
break;
|
case 'grp':
|
||||||
|
G::LoadClass( 'groups' );
|
||||||
case 'grp':
|
$group = new Groups();
|
||||||
G::LoadClass('groups');
|
$rec = $group->load( $row[1] );
|
||||||
$group = new Groups();
|
$value = strip_tags( $rec->getGrpTitle() );
|
||||||
$rec = $group->load($row[1]);
|
break;
|
||||||
|
case 'ext':
|
||||||
$value = strip_tags($rec->getGrpTitle());
|
$value = htmlentities( $row[1] );
|
||||||
break;
|
break;
|
||||||
|
case 'dyn':
|
||||||
case 'ext':
|
$value = htmlentities( '@#' . $row[1] );
|
||||||
$value = htmlentities($row[1]);
|
break;
|
||||||
break;
|
default:
|
||||||
|
echo '->' . $row[0];
|
||||||
case 'dyn':
|
}
|
||||||
$value = htmlentities('@#'.$row[1]);
|
$paramTO[] = Array ('id' => replaceQuotes( $item ),'name' => $value
|
||||||
break;
|
);
|
||||||
|
}
|
||||||
default:
|
|
||||||
echo '->'.$row[0];
|
|
||||||
}
|
|
||||||
$paramTO[] = Array('id'=>replaceQuotes($item), 'name'=>$value);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
$paramTO[] = Array('id'=>'char', 'name'=>'char');
|
$paramTO[] = Array ('id' => 'char','name' => 'char'
|
||||||
$paramTO[] = Array('id'=>'usr|-1', 'name'=>'(Current Task User)');
|
);
|
||||||
|
$paramTO[] = Array ('id' => 'usr|-1','name' => '(Current Task User)'
|
||||||
|
);
|
||||||
}
|
}
|
||||||
$_DBArray['eventomsgto'] = $paramTO;
|
$_DBArray['eventomsgto'] = $paramTO;
|
||||||
|
|
||||||
if(isset($parameters->CC)){
|
if (isset( $parameters->CC )) {
|
||||||
$paramCC[] = Array('id'=>'char', 'name'=>'char');
|
$paramCC[] = Array ('id' => 'char','name' => 'char' );
|
||||||
foreach($parameters->CC as $item){
|
foreach ($parameters->CC as $item) {
|
||||||
$row = explode('|', $item);
|
$row = explode( '|', $item );
|
||||||
switch($row[0]){
|
switch ($row[0]) {
|
||||||
case 'usr':
|
case 'usr':
|
||||||
require_once('classes/model/Users.php');
|
require_once ('classes/model/Users.php');
|
||||||
$user = new Users();
|
$user = new Users();
|
||||||
|
|
||||||
if($row[1] == '-1'){
|
if ($row[1] == '-1') {
|
||||||
$value = '(Current Task User)';
|
$value = '(Current Task User)';
|
||||||
} else {
|
} else {
|
||||||
$rec = $user->load($row[1]);
|
$rec = $user->load( $row[1] );
|
||||||
$value = $rec['USR_FIRSTNAME'].' '.$rec['USR_LASTNAME'];
|
$value = $rec['USR_FIRSTNAME'] . ' ' . $rec['USR_LASTNAME'];
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 'grp':
|
||||||
case 'grp':
|
G::LoadClass( 'groups' );
|
||||||
G::LoadClass('groups');
|
$group = new Groups();
|
||||||
$group = new Groups();
|
$rec = $group->load( $row[1] );
|
||||||
$rec = $group->load($row[1]);
|
$value = strip_tags( $rec->getGrpTitle() );
|
||||||
|
break;
|
||||||
$value = strip_tags($rec->getGrpTitle());
|
case 'ext':
|
||||||
break;
|
$value = htmlentities( $row[1] );
|
||||||
|
break;
|
||||||
case 'ext':
|
case 'dyn':
|
||||||
$value = htmlentities($row[1]);
|
$value = htmlentities( '@#' . $row[1] );
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case 'dyn':
|
$paramCC[] = Array ('id' => replaceQuotes( $item ),'name' => $value
|
||||||
$value = htmlentities('@#'.$row[1]);
|
);
|
||||||
break;
|
}
|
||||||
}
|
|
||||||
$paramCC[] = Array('id'=>replaceQuotes($item), 'name'=>$value);
|
$_DBArray['eventomsgcc'] = $paramCC;
|
||||||
}
|
|
||||||
|
|
||||||
$_DBArray['eventomsgcc'] = $paramCC;
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$_DBArray['eventomsgcc'] = Array();
|
$_DBArray['eventomsgcc'] = Array ();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($parameters->BCC)){
|
if (isset( $parameters->BCC )) {
|
||||||
$paramBCC[] = Array('id'=>'char', 'name'=>'char');
|
$paramBCC[] = Array ('id' => 'char','name' => 'char' );
|
||||||
foreach($parameters->BCC as $item){
|
foreach ($parameters->BCC as $item) {
|
||||||
$row = explode('|', $item);
|
$row = explode( '|', $item );
|
||||||
switch($row[0]){
|
switch ($row[0]) {
|
||||||
case 'usr':
|
case 'usr':
|
||||||
require_once('classes/model/Users.php');
|
require_once ('classes/model/Users.php');
|
||||||
$user = new Users();
|
$user = new Users();
|
||||||
|
|
||||||
if($row[1] == '-1'){
|
if ($row[1] == '-1') {
|
||||||
$value = '(Current Task User)';
|
$value = '(Current Task User)';
|
||||||
} else {
|
} else {
|
||||||
$rec = $user->load($row[1]);
|
$rec = $user->load( $row[1] );
|
||||||
$value = $rec['USR_FIRSTNAME'].' '.$rec['USR_LASTNAME'];
|
$value = $rec['USR_FIRSTNAME'] . ' ' . $rec['USR_LASTNAME'];
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 'grp':
|
||||||
case 'grp':
|
G::LoadClass( 'groups' );
|
||||||
G::LoadClass('groups');
|
$group = new Groups();
|
||||||
$group = new Groups();
|
$rec = $group->load( $row[1] );
|
||||||
$rec = $group->load($row[1]);
|
$value = strip_tags( $rec->getGrpTitle() );
|
||||||
|
break;
|
||||||
$value = strip_tags($rec->getGrpTitle());
|
case 'ext':
|
||||||
break;
|
$value = htmlentities( $row[1] );
|
||||||
|
break;
|
||||||
case 'ext':
|
case 'dyn':
|
||||||
$value = htmlentities($row[1]);
|
$value = htmlentities( '@#' . $row[1] );
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case 'dyn':
|
$paramBCC[] = Array ('id' => replaceQuotes( $item ),'name' => $value);
|
||||||
$value = htmlentities('@#'.$row[1]);
|
}
|
||||||
break;
|
|
||||||
}
|
$_DBArray['eventomsgbcc'] = $paramBCC;
|
||||||
$paramBCC[] = Array('id'=>replaceQuotes($item), 'name'=>$value);
|
|
||||||
}
|
|
||||||
|
|
||||||
$_DBArray['eventomsgbcc'] = $paramBCC;
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$_DBArray['eventomsgbcc'] = Array();
|
$_DBArray['eventomsgbcc'] = Array ();
|
||||||
}
|
}
|
||||||
$aFields['EVN_MESSAGE_TO_TO'] = $paramTO;
|
$aFields['EVN_MESSAGE_TO_TO'] = $paramTO;
|
||||||
$aFields['EVN_MESSAGE_TO_CC'] = (isset($parameters->CC) ? $paramCC : '');
|
$aFields['EVN_MESSAGE_TO_CC'] = (isset( $parameters->CC ) ? $paramCC : '');
|
||||||
$aFields['EVN_MESSAGE_TO_BCC'] = (isset($parameters->BCC) ? $paramBCC : '');
|
$aFields['EVN_MESSAGE_TO_BCC'] = (isset( $parameters->BCC ) ? $paramBCC : '');
|
||||||
$aFields['EVN_MESSAGE_TEMPLATE'] = (isset($parameters->TEMPLATE) ? $parameters->TEMPLATE : '');
|
$aFields['EVN_MESSAGE_TEMPLATE'] = (isset( $parameters->TEMPLATE ) ? $parameters->TEMPLATE : '');
|
||||||
|
|
||||||
|
$aTemplates = array ();
|
||||||
$aTemplates = array();
|
$aTemplates[] = array ('TEMPLATE1' => 'char','TEMPLATE2' => 'char');
|
||||||
$aTemplates[] = array('TEMPLATE1' => 'char',
|
|
||||||
'TEMPLATE2' => 'char');
|
|
||||||
$sDirectory = PATH_DATA_MAILTEMPLATES . $aFields['PRO_UID'] . PATH_SEP;
|
$sDirectory = PATH_DATA_MAILTEMPLATES . $aFields['PRO_UID'] . PATH_SEP;
|
||||||
G::verifyPath($sDirectory, true);
|
G::verifyPath( $sDirectory, true );
|
||||||
if (!file_exists($sDirectory . 'alert_message.html')) {
|
if (! file_exists( $sDirectory . 'alert_message.html' )) {
|
||||||
@copy(PATH_TPL . 'mails' . PATH_SEP . 'alert_message.html', $sDirectory . 'alert_message.html');
|
@copy( PATH_TPL . 'mails' . PATH_SEP . 'alert_message.html', $sDirectory . 'alert_message.html' );
|
||||||
}
|
}
|
||||||
$oDirectory = dir($sDirectory);
|
$oDirectory = dir( $sDirectory );
|
||||||
while ($sObject = $oDirectory->read()) {
|
while ($sObject = $oDirectory->read()) {
|
||||||
if (($sObject !== '.') && ($sObject !== '..') && ($sObject !== 'alert_message.html')) {
|
if (($sObject !== '.') && ($sObject !== '..') && ($sObject !== 'alert_message.html')) {
|
||||||
$aTemplates[] = array('TEMPLATE1' => $sObject,
|
$aTemplates[] = array ('TEMPLATE1' => $sObject,'TEMPLATE2' => $sObject);
|
||||||
'TEMPLATE2' => $sObject);
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
$_DBArray['templates'] = $aTemplates;
|
$_DBArray['templates'] = $aTemplates;
|
||||||
|
|
||||||
$aTriggers[] = array('TRI_UID' => 'char',
|
$aTriggers[] = array ('TRI_UID' => 'char','TRI_TITLE' => 'char');
|
||||||
'TRI_TITLE' => 'char');
|
G::LoadClass( 'processMap' );
|
||||||
G::LoadClass('processMap');
|
|
||||||
$oProcessMap = new ProcessMap();
|
$oProcessMap = new ProcessMap();
|
||||||
$oDataset = TriggersPeer::doSelectRS($oProcessMap->getTriggersCriteria($aFields['PRO_UID']));
|
$oDataset = TriggersPeer::doSelectRS( $oProcessMap->getTriggersCriteria( $aFields['PRO_UID'] ) );
|
||||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||||
$oDataset->next();
|
$oDataset->next();
|
||||||
while ($aRow = $oDataset->getRow()) {
|
while ($aRow = $oDataset->getRow()) {
|
||||||
$aTriggers[] = array('TRI_UID' => $aRow['TRI_UID'],
|
$aTriggers[] = array ('TRI_UID' => $aRow['TRI_UID'],'TRI_TITLE' => $aRow['TRI_TITLE'] );
|
||||||
'TRI_TITLE' => $aRow['TRI_TITLE']);
|
$oDataset->next();
|
||||||
$oDataset->next();
|
|
||||||
}
|
}
|
||||||
$_DBArray['triggers'] = $aTriggers;
|
$_DBArray['triggers'] = $aTriggers;
|
||||||
|
|
||||||
$_SESSION['_DBArray'] = $_DBArray;
|
$_SESSION['_DBArray'] = $_DBArray;
|
||||||
|
|
||||||
$G_PUBLISH = new Publisher();
|
$G_PUBLISH = new Publisher();
|
||||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'events/eventsEditAction', '', $aFields, '../events/eventsSave');
|
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'events/eventsEditAction', '', $aFields, '../events/eventsSave' );
|
||||||
//$G_PUBLISH->AddContent('xmlform', 'xmlform', 'events/eventsEditAction', '', $aFields, '../events/eventsSave');
|
//$G_PUBLISH->AddContent('xmlform', 'xmlform', 'events/eventsEditAction', '', $aFields, '../events/eventsSave');
|
||||||
G::RenderPage('publish', 'raw');
|
G::RenderPage( 'publish', 'raw' );
|
||||||
|
|
||||||
function replaceQuotes($aData){
|
function replaceQuotes ($aData)
|
||||||
return str_replace('"', '"e;', $aData);
|
{
|
||||||
|
return str_replace( '"', '"e;', $aData );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,50 +12,49 @@
|
|||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* 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.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* 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.,
|
* 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.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
global $RBAC;
|
global $RBAC;
|
||||||
if ($RBAC->userCanAccess('PM_SETUP') != 1) {
|
if ($RBAC->userCanAccess( 'PM_SETUP' ) != 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();
|
||||||
}
|
}
|
||||||
|
|
||||||
global $_DBArray;
|
global $_DBArray;
|
||||||
G::LoadClass('tasks');
|
G::LoadClass( 'tasks' );
|
||||||
G::LoadClass('processMap');
|
G::LoadClass( 'processMap' );
|
||||||
|
|
||||||
$oTasks = new Tasks();
|
$oTasks = new Tasks();
|
||||||
$aAux1 = $oTasks->getAllTasks($_GET['PRO_UID']);
|
$aAux1 = $oTasks->getAllTasks( $_GET['PRO_UID'] );
|
||||||
$aTasks = array();
|
$aTasks = array ();
|
||||||
$aTasks[] = array('TAS_UID' => 'char', 'TAS_TITLE' => 'char');
|
$aTasks[] = array ('TAS_UID' => 'char','TAS_TITLE' => 'char');
|
||||||
|
|
||||||
//g::pr($aAux1);die;
|
//g::pr($aAux1);die;
|
||||||
foreach ($aAux1 as $aAux2) {
|
foreach ($aAux1 as $aAux2) {
|
||||||
if ($aAux2['TAS_TYPE'] != 'SUBPROCESS') {
|
if ($aAux2['TAS_TYPE'] != 'SUBPROCESS') {
|
||||||
$aTasks[] = array('TAS_UID' => $aAux2['TAS_UID'], 'TAS_TITLE' => $aAux2['TAS_TITLE']);
|
$aTasks[] = array ('TAS_UID' => $aAux2['TAS_UID'],'TAS_TITLE' => $aAux2['TAS_TITLE']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$oProcessMap = new processMap(new DBConnection);
|
$oProcessMap = new processMap( new DBConnection() );
|
||||||
$aTriggersList = $oProcessMap->getTriggers($_SESSION['PROCESS']);
|
$aTriggersList = $oProcessMap->getTriggers( $_SESSION['PROCESS'] );
|
||||||
$aTriggersFileds = Array('TRI_UID'=>'char', 'TRI_TITLE'=>'char');
|
$aTriggersFileds = Array ('TRI_UID' => 'char','TRI_TITLE' => 'char');
|
||||||
|
|
||||||
foreach($aTriggersList as $i=>$v){
|
foreach ($aTriggersList as $i => $v) {
|
||||||
unset($aTriggersList[$i]['PRO_UID']);
|
unset( $aTriggersList[$i]['PRO_UID'] );
|
||||||
unset($aTriggersList[$i]['TRI_DESCRIPTION']);
|
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[$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['tasks'] = $aTasks;
|
||||||
$_DBArray['TMP_TRIGGERS'] = $aTriggersList;
|
$_DBArray['TMP_TRIGGERS'] = $aTriggersList;
|
||||||
@@ -63,6 +62,6 @@ $_DBArray['TMP_TRIGGERS'] = $aTriggersList;
|
|||||||
$_SESSION['_DBArray'] = $_DBArray;
|
$_SESSION['_DBArray'] = $_DBArray;
|
||||||
|
|
||||||
$G_PUBLISH = new Publisher();
|
$G_PUBLISH = new Publisher();
|
||||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'events/eventsNew', '', array('PRO_UID' => $_GET['PRO_UID'], 'EVN_ACTION' => $_GET['EVN_TYPE']), '');
|
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'events/eventsNew', '', array ('PRO_UID' => $_GET['PRO_UID'],'EVN_ACTION' => $_GET['EVN_TYPE']), '' );
|
||||||
G::RenderPage('publish', 'raw');
|
G::RenderPage( 'publish', 'raw' );
|
||||||
|
|
||||||
|
|||||||
@@ -12,37 +12,36 @@
|
|||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* 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.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* 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.,
|
* 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.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
global $RBAC;
|
global $RBAC;
|
||||||
if ($RBAC->userCanAccess('PM_SETUP') != 1) {
|
if ($RBAC->userCanAccess( 'PM_SETUP' ) != 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();
|
||||||
}
|
}
|
||||||
|
|
||||||
global $_DBArray;
|
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';
|
require_once 'classes/model/Event.php';
|
||||||
|
|
||||||
$oEvent = new Event();
|
$oEvent = new Event();
|
||||||
$envUId = $oEvent->create($_POST);
|
$envUId = $oEvent->create( $_POST );
|
||||||
|
|
||||||
$_SESSION['EVN_UID'] = $envUId;
|
$_SESSION['EVN_UID'] = $envUId;
|
||||||
require_once ( 'eventsEditAction.php' );
|
require_once ('eventsEditAction.php');
|
||||||
die;
|
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.
|
//probably this will be changed soon.
|
||||||
|
|
||||||
$aTemplates = array();
|
$aTemplates = array();
|
||||||
@@ -80,4 +79,5 @@ $G_PUBLISH = new Publisher();
|
|||||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'events/events_EditAction', '', $_POST, '../events/eventsSave');
|
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'events/events_EditAction', '', $_POST, '../events/eventsSave');
|
||||||
G::RenderPage('publish', 'raw');
|
G::RenderPage('publish', 'raw');
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -12,27 +12,27 @@
|
|||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* 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.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* 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.,
|
* 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.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
global $RBAC;
|
global $RBAC;
|
||||||
if ($RBAC->userCanAccess('PM_SETUP') != 1) {
|
if ($RBAC->userCanAccess( 'PM_SETUP' ) != 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();
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once 'classes/model/AppEvent.php';
|
require_once 'classes/model/AppEvent.php';
|
||||||
$oAppEvent = new AppEvent();
|
$oAppEvent = new AppEvent();
|
||||||
|
|
||||||
global $G_PUBLISH;
|
global $G_PUBLISH;
|
||||||
$G_PUBLISH = new Publisher;
|
$G_PUBLISH = new Publisher();
|
||||||
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'events/appEventsList', $oAppEvent->getAppEventsCriteria($_GET['PRO_UID'], 'PENDING', $_GET['EVN_TYPE']));
|
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'events/appEventsList', $oAppEvent->getAppEventsCriteria( $_GET['PRO_UID'], 'PENDING', $_GET['EVN_TYPE'] ) );
|
||||||
G::RenderPage('publish', 'raw');
|
G::RenderPage( 'publish', 'raw' );
|
||||||
|
|
||||||
|
|||||||
@@ -12,66 +12,59 @@
|
|||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* 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.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* 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.,
|
* 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.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
global $RBAC;
|
global $RBAC;
|
||||||
if ($RBAC->userCanAccess('PM_SETUP') != 1) {
|
if ($RBAC->userCanAccess( 'PM_SETUP' ) != 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();
|
||||||
}
|
}
|
||||||
$EVN_MESSAGE_TO_TO = isset($_POST['form']['EVN_MESSAGE_TO_TO'])? replaceQuotes($_POST['form']['EVN_MESSAGE_TO_TO']): 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_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_BCC = isset( $_POST['form']['EVN_MESSAGE_TO_BCC'] ) ? replaceQuotes( $_POST['form']['EVN_MESSAGE_TO_BCC'] ) : Array ();
|
||||||
|
|
||||||
if (isset($_POST['form']['EVN_MESSAGE_SUBJECT'])) {
|
if (isset( $_POST['form']['EVN_MESSAGE_SUBJECT'] )) {
|
||||||
$_POST['form']['EVN_ACTION_PARAMETERS'] = array(
|
$_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']);
|
||||||
'SUBJECT' => $_POST['form']['EVN_MESSAGE_SUBJECT'],
|
|
||||||
'TO' => $EVN_MESSAGE_TO_TO,
|
unset( $_POST['form']['EVN_MESSAGE_SUBJECT'] );
|
||||||
'CC' => $EVN_MESSAGE_TO_CC,
|
unset( $_POST['form']['EVN_MESSAGE_TO_TO'] );
|
||||||
'BCC' => $EVN_MESSAGE_TO_BCC,
|
unset( $_POST['form']['EVN_MESSAGE_TO_CC'] );
|
||||||
'TEMPLATE' => $_POST['form']['EVN_MESSAGE_TEMPLATE']
|
unset( $_POST['form']['EVN_MESSAGE_TO_BCC'] );
|
||||||
);
|
unset( $_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';
|
require_once 'classes/model/Event.php';
|
||||||
$oEvent = new Event();
|
$oEvent = new Event();
|
||||||
if ($_POST['form']['EVN_UID'] == '') {
|
if ($_POST['form']['EVN_UID'] == '') {
|
||||||
//this is probably not used, because the creation of one Event is done directly in EventsNewAction
|
//this is probably not used, because the creation of one Event is done directly in EventsNewAction
|
||||||
$oEvent->create($_POST['form']);
|
$oEvent->create( $_POST['form'] );
|
||||||
}
|
} else {
|
||||||
else {
|
/*
|
||||||
/*
|
*if($_POST['form']['EVN_ACTION'] == 'SEND_MESSAGE' && $ev->getTriUid() != trim($_POST['form']['TRI_UID']) ){
|
||||||
*if($_POST['form']['EVN_ACTION'] == 'SEND_MESSAGE' && $ev->getTriUid() != trim($_POST['form']['TRI_UID']) ){
|
|
||||||
$oEvnActionParameters = unserialize($ev->getEvnActionParameters());
|
$oEvnActionParameters = unserialize($ev->getEvnActionParameters());
|
||||||
prit_r($oEvnActionParameters);
|
prit_r($oEvnActionParameters);
|
||||||
if( isset($oEvnActionParameters->TRI_UID) ){
|
if( isset($oEvnActionParameters->TRI_UID) ){
|
||||||
$_POST['form']['TRI_UID'] = $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( ""e;", '"', $aData[$i] );
|
||||||
|
}
|
||||||
|
return $aData;
|
||||||
}
|
}
|
||||||
|
|
||||||
function replaceQuotes($aData){
|
|
||||||
for($i=0; $i<sizeof($aData); $i++){
|
|
||||||
$aData[$i] = str_replace(""e;", '"', $aData[$i]);
|
|
||||||
}
|
|
||||||
return $aData;
|
|
||||||
}
|
|
||||||
@@ -1,217 +1,239 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
$w = 350;
|
$w = 350;
|
||||||
$h = 90;
|
$h = 90;
|
||||||
|
|
||||||
//how many task, single task or multiple
|
//how many task, single task or multiple
|
||||||
$t = isset( $_GET['t'] ) ? $_GET['t'] : 's';
|
$t = isset( $_GET['t'] ) ? $_GET['t'] : 's';
|
||||||
if ( $t != 's' ) $t = 'm';
|
if ($t != 's') {
|
||||||
|
$t = 'm';
|
||||||
|
}
|
||||||
|
|
||||||
//when occurs, after time elapses or when starting
|
//when occurs, after time elapses or when starting
|
||||||
$o = isset( $_GET['o'] ) ? $_GET['o'] : 's';
|
$o = isset( $_GET['o'] ) ? $_GET['o'] : 's';
|
||||||
if ( $t != 's' ) $t = 'a';
|
if ($t != 's') {
|
||||||
|
$t = 'a';
|
||||||
|
}
|
||||||
|
|
||||||
//status
|
//status
|
||||||
$s = isset( $_GET['s'] ) ? $_GET['s'] : 'a';
|
$s = isset( $_GET['s'] ) ? $_GET['s'] : 'a';
|
||||||
if ( $s != 'a' ) $s = 'i';
|
if ($s != 'a') {
|
||||||
|
$s = 'i';
|
||||||
|
}
|
||||||
|
|
||||||
//timeUnit
|
//timeUnit
|
||||||
$timeunit = isset( $_GET['t'] ) ? $_GET['t'] : 'Days';
|
$timeunit = isset( $_GET['t'] ) ? $_GET['t'] : 'Days';
|
||||||
$timeunit = ucfirst(strtolower($timeunit));
|
$timeunit = ucfirst( strtolower( $timeunit ) );
|
||||||
|
|
||||||
//estimated
|
|
||||||
$estimated = abs( isset( $_GET['e'] ) ? (($timeunit == 'Hours')? round($_GET['e']/24,2):$_GET['e']) : '1' );
|
|
||||||
|
|
||||||
|
|
||||||
//when
|
//estimated
|
||||||
$when = isset( $_GET['w'] ) ? $_GET['w'] : '0';
|
$estimated = abs( isset( $_GET['e'] ) ? (($timeunit == 'Hours') ? round( $_GET['e'] / 24, 2 ) : $_GET['e']) : '1' );
|
||||||
|
|
||||||
|
|
||||||
$im = imagecreate($w,$h);
|
|
||||||
$bg = imagecolorallocate ($im, 0xFF, 0xFF, 0xFF);
|
|
||||||
$fg = imagecolorallocate ($im, 0x00, 200, 0x00);
|
|
||||||
$sc = imagecolorallocate ($im, 200, 0, 0);
|
|
||||||
$gray = imagecolorallocate ($im, 180,180,180);
|
|
||||||
$red = imagecolorallocate ($im, 200, 0, 0);
|
|
||||||
$green = imagecolorallocate ($im, 0, 200, 0);
|
|
||||||
$blue = imagecolorallocate ($im, 0, 0, 200);
|
|
||||||
$black = imagecolorallocate ($im, 0, 0, 0);
|
|
||||||
|
|
||||||
imagerectangle($im, 0, 0, $w-1, $h-1, $gray);
|
//when
|
||||||
|
$when = isset( $_GET['w'] ) ? $_GET['w'] : '0';
|
||||||
|
|
||||||
|
$im = imagecreate( $w, $h );
|
||||||
|
$bg = imagecolorallocate( $im, 0xFF, 0xFF, 0xFF );
|
||||||
|
$fg = imagecolorallocate( $im, 0x00, 200, 0x00 );
|
||||||
|
$sc = imagecolorallocate( $im, 200, 0, 0 );
|
||||||
|
$gray = imagecolorallocate( $im, 180, 180, 180 );
|
||||||
|
$red = imagecolorallocate( $im, 200, 0, 0 );
|
||||||
|
$green = imagecolorallocate( $im, 0, 200, 0 );
|
||||||
|
$blue = imagecolorallocate( $im, 0, 0, 200 );
|
||||||
|
$black = imagecolorallocate( $im, 0, 0, 0 );
|
||||||
|
|
||||||
|
imagerectangle( $im, 0, 0, $w - 1, $h - 1, $gray );
|
||||||
|
|
||||||
// $incM = $media/60;
|
// $incM = $media/60;
|
||||||
|
|
||||||
|
|
||||||
// $mean = 60*$incM;
|
// $mean = 60*$incM;
|
||||||
// $d = $varianza;
|
// $d = $varianza;
|
||||||
// if ( $d == 0 ) $d = 0.0001;
|
// if ( $d == 0 ) $d = 0.0001;
|
||||||
|
|
||||||
// $val1 = 1 / ( sqrt( 2*pi() *$d*$d ));
|
|
||||||
|
// $val1 = 1 / ( sqrt( 2*pi() *$d*$d ));
|
||||||
// $val2 = -( pow($mean-$mean,2) )/ (pow($d,2));
|
// $val2 = -( pow($mean-$mean,2) )/ (pow($d,2));
|
||||||
// $y = $val1 * exp ( $val2 );
|
// $y = $val1 * exp ( $val2 );
|
||||||
// $incY = 80/$y;
|
// $incY = 80/$y;
|
||||||
|
|
||||||
|
|
||||||
// $range = 90/ $d;
|
// $range = 90/ $d;
|
||||||
// $offsetX = 100 - $mean;
|
// $offsetX = 100 - $mean;
|
||||||
// $antY = null;
|
// $antY = null;
|
||||||
// for ( $x = $mean -$range*$d ; $x <= $mean +$range*$d; $x++ ) {
|
// for ( $x = $mean -$range*$d ; $x <= $mean +$range*$d; $x++ ) {
|
||||||
// $val1 = 1 / ( sqrt( 2*pi() *$d*$d ));
|
// $val1 = 1 / ( sqrt( 2*pi() *$d*$d ));
|
||||||
// $val2 = -( pow($x-$mean,2) )/ (pow($d,2));
|
// $val2 = -( pow($x-$mean,2) )/ (pow($d,2));
|
||||||
// $y = $val1 * exp ( $val2 )*$incY;
|
// $y = $val1 * exp ( $val2 )*$incY;
|
||||||
// if ( $antY != null )
|
// if ( $antY != null )
|
||||||
// imageline($im, $x-1+$offsetX, $h - $antY-15, $x+$offsetX, $h-$y-15, $blue);
|
// imageline($im, $x-1+$offsetX, $h - $antY-15, $x+$offsetX, $h-$y-15, $blue);
|
||||||
// $antY = $y;
|
// $antY = $y;
|
||||||
// imageline($im, $x +$mean, $h , $x + $mean, $h-1, $red);
|
// imageline($im, $x +$mean, $h , $x + $mean, $h-1, $red);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
function drawTask ( $im, $x1, $x2, $y, $h ) {
|
|
||||||
global $w;
|
|
||||||
$blue = imagecolorallocate ($im, 160, 160, 180);
|
|
||||||
$gray = imagecolorallocate ($im, 100, 100, 100);
|
|
||||||
$black = imagecolorallocate ($im, 0, 0, 0);
|
|
||||||
|
|
||||||
for ( $i = $y; $i < $h ; $i+= 2 ) {
|
function drawTask ($im, $x1, $x2, $y, $h)
|
||||||
imageline($im, $x1, $i, $x1 , $i, $gray);
|
{
|
||||||
imageline($im, $x2, $i, $x2 , $i, $gray);
|
global $w;
|
||||||
|
$blue = imagecolorallocate( $im, 160, 160, 180 );
|
||||||
|
$gray = imagecolorallocate( $im, 100, 100, 100 );
|
||||||
|
$black = imagecolorallocate( $im, 0, 0, 0 );
|
||||||
|
|
||||||
|
for ($i = $y; $i < $h; $i += 2) {
|
||||||
|
imageline( $im, $x1, $i, $x1, $i, $gray );
|
||||||
|
imageline( $im, $x2, $i, $x2, $i, $gray );
|
||||||
}
|
}
|
||||||
|
|
||||||
for ( $i = $x1; $i < $x2; $i+= 2 ) {
|
for ($i = $x1; $i < $x2; $i += 2) {
|
||||||
imageline($im, $i, $y-10 , $i, $y, $blue);
|
imageline( $im, $i, $y - 10, $i, $y, $blue );
|
||||||
}
|
}
|
||||||
imagerectangle($im, $x1, $y - 10, $x2, $y, $black);
|
imagerectangle( $im, $x1, $y - 10, $x2, $y, $black );
|
||||||
};
|
}
|
||||||
|
;
|
||||||
|
|
||||||
function smallTask ($im, $x1, $x2, $y ) {
|
function smallTask ($im, $x1, $x2, $y)
|
||||||
$blue = imagecolorallocate ($im, 160, 160, 180);
|
{
|
||||||
$black = imagecolorallocate ($im, 0, 0, 0);
|
$blue = imagecolorallocate( $im, 160, 160, 180 );
|
||||||
|
$black = imagecolorallocate( $im, 0, 0, 0 );
|
||||||
|
|
||||||
for ( $i = $x1; $i < $x2; $i+= 2 ) {
|
for ($i = $x1; $i < $x2; $i += 2) {
|
||||||
imageline($im, $i, $y-8 , $i, $y, $blue);
|
imageline( $im, $i, $y - 8, $i, $y, $blue );
|
||||||
}
|
}
|
||||||
imagerectangle($im, $x1, $y - 9, $x2 - 1, $y, $black);
|
imagerectangle( $im, $x1, $y - 9, $x2 - 1, $y, $black );
|
||||||
}
|
}
|
||||||
|
|
||||||
function drawMultipleTask ( $im, $x1, $x2, $y, $h ) {
|
|
||||||
global $w;
|
|
||||||
$terca = ($x2 - $x1 ) / 3;
|
|
||||||
$blue = imagecolorallocate ($im, 160, 160, 180);
|
|
||||||
$gray = imagecolorallocate ($im, 100, 100, 100);
|
|
||||||
$black = imagecolorallocate ($im, 0, 0, 0);
|
|
||||||
|
|
||||||
for ( $i = $y; $i < $h ; $i+= 2 ) {
|
function drawMultipleTask ($im, $x1, $x2, $y, $h)
|
||||||
imageline($im, $x2, $i, $x2 , $i, $gray);
|
{
|
||||||
|
global $w;
|
||||||
|
$terca = ($x2 - $x1) / 3;
|
||||||
|
$blue = imagecolorallocate( $im, 160, 160, 180 );
|
||||||
|
$gray = imagecolorallocate( $im, 100, 100, 100 );
|
||||||
|
$black = imagecolorallocate( $im, 0, 0, 0 );
|
||||||
|
|
||||||
|
for ($i = $y; $i < $h; $i += 2) {
|
||||||
|
imageline( $im, $x2, $i, $x2, $i, $gray );
|
||||||
}
|
}
|
||||||
for ( $i = $y-10; $i < $h ; $i+= 2 ) {
|
for ($i = $y - 10; $i < $h; $i += 2) {
|
||||||
imageline($im, $x1, $i, $x1 , $i, $gray);
|
imageline( $im, $x1, $i, $x1, $i, $gray );
|
||||||
}
|
}
|
||||||
|
|
||||||
smallTask ( $im, $x1 + 0*$terca, $x1 + 1*$terca, $y -12 );
|
smallTask( $im, $x1 + 0 * $terca, $x1 + 1 * $terca, $y - 12 );
|
||||||
smallTask ( $im, $x1 + 1*$terca, $x1 + 2*$terca, $y -6 );
|
smallTask( $im, $x1 + 1 * $terca, $x1 + 2 * $terca, $y - 6 );
|
||||||
smallTask ( $im, $x1 + 2*$terca, $x1 + 3*$terca, $y );
|
smallTask( $im, $x1 + 2 * $terca, $x1 + 3 * $terca, $y );
|
||||||
};
|
}
|
||||||
|
;
|
||||||
|
|
||||||
function drawTimerEvent ( $im, $x1, $y1, $h ) {
|
function drawTimerEvent ($im, $x1, $y1, $h)
|
||||||
$blue = imagecolorallocate ($im, 160, 160, 180);
|
{
|
||||||
$red = imagecolorallocate ($im, 200, 100, 0);
|
$blue = imagecolorallocate( $im, 160, 160, 180 );
|
||||||
$gray = imagecolorallocate ($im, 100, 100, 100);
|
$red = imagecolorallocate( $im, 200, 100, 0 );
|
||||||
$black = imagecolorallocate ($im, 0, 0, 0);
|
$gray = imagecolorallocate( $im, 100, 100, 100 );
|
||||||
$yellow = imagecolorallocate ($im, 240, 240, 220);
|
$black = imagecolorallocate( $im, 0, 0, 0 );
|
||||||
|
$yellow = imagecolorallocate( $im, 240, 240, 220 );
|
||||||
|
|
||||||
for ( $i = $y1 + 15; $i < $h ; $i+= 2 ) {
|
for ($i = $y1 + 15; $i < $h; $i += 2) {
|
||||||
imageline($im, $x1, $i, $x1 , $i, $gray);
|
imageline( $im, $x1, $i, $x1, $i, $gray );
|
||||||
}
|
}
|
||||||
|
|
||||||
ImageEllipse($im, $x1, $y1, 26, 26, $black);
|
ImageEllipse( $im, $x1, $y1, 26, 26, $black );
|
||||||
ImageEllipse($im, $x1, $y1, 22, 22, $black);
|
ImageEllipse( $im, $x1, $y1, 22, 22, $black );
|
||||||
ImageFilledEllipse($im, $x1, $y1, 16, 16, $yellow );
|
ImageFilledEllipse( $im, $x1, $y1, 16, 16, $yellow );
|
||||||
ImageEllipse($im, $x1, $y1, 16, 16, $red);
|
ImageEllipse( $im, $x1, $y1, 16, 16, $red );
|
||||||
imageline($im, $x1 , $y1-8 , $x1, $y1+8, $red);
|
imageline( $im, $x1, $y1 - 8, $x1, $y1 + 8, $red );
|
||||||
//imageline($im, $x1 , $y1+8 , $x1, $y1+6, $red);
|
//imageline($im, $x1 , $y1+8 , $x1, $y1+6, $red);
|
||||||
imageline($im, $x1-8 , $y1 , $x1+8 , $y1, $red);
|
imageline( $im, $x1 - 8, $y1, $x1 + 8, $y1, $red );
|
||||||
imageline($im, $x1-7 , $y1-4 , $x1+7 , $y1+4, $red);
|
imageline( $im, $x1 - 7, $y1 - 4, $x1 + 7, $y1 + 4, $red );
|
||||||
imageline($im, $x1-4 , $y1-7 , $x1+4 , $y1+7, $red);
|
imageline( $im, $x1 - 4, $y1 - 7, $x1 + 4, $y1 + 7, $red );
|
||||||
imageline($im, $x1+7 , $y1-4 , $x1-7 , $y1+4, $red);
|
imageline( $im, $x1 + 7, $y1 - 4, $x1 - 7, $y1 + 4, $red );
|
||||||
imageline($im, $x1+4 , $y1-7 , $x1-4 , $y1+7, $red);
|
imageline( $im, $x1 + 4, $y1 - 7, $x1 - 4, $y1 + 7, $red );
|
||||||
ImageFilledEllipse($im, $x1, $y1, 10, 10, $yellow );
|
ImageFilledEllipse( $im, $x1, $y1, 10, 10, $yellow );
|
||||||
imageline($im, $x1-1 , $y1+1 , $x1+1, $y1 - 5, $red);
|
imageline( $im, $x1 - 1, $y1 + 1, $x1 + 1, $y1 - 5, $red );
|
||||||
imageline($im, $x1-1 , $y1+1 , $x1+3, $y1+1 , $red);
|
imageline( $im, $x1 - 1, $y1 + 1, $x1 + 3, $y1 + 1, $red );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
imageline( $im, 15, $h - 19, $w - 15, $h - 19, $red );
|
||||||
|
imageline( $im, $w - 23, $h - 23, $w - 15, $h - 19, $red );
|
||||||
imageline($im, 15, $h-19 , $w -15, $h-19, $red);
|
imageline( $im, $w - 23, $h - 15, $w - 15, $h - 19, $red );
|
||||||
imageline($im, $w - 23, $h-23 , $w -15, $h-19, $red);
|
imagestring( $im, 2, $w - 30, $h - 37, 'Days', $red );
|
||||||
imageline($im, $w - 23, $h-15 , $w -15, $h-19, $red);
|
|
||||||
imagestring ($im, 2, $w -30 , $h -37, 'Days', $red);
|
|
||||||
|
|
||||||
if ( $estimated == 0 ) {
|
if ($estimated == 0) {
|
||||||
$s = 'i';
|
$s = 'i';
|
||||||
header("Content-Type: image/png");
|
header( "Content-Type: image/png" );
|
||||||
imagepng($im);
|
imagepng( $im );
|
||||||
die;
|
die();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $t == 's' )
|
if ($t == 's') {
|
||||||
drawTask ( $im, 80, 220, $h - 30 , $h -15);
|
drawTask( $im, 80, 220, $h - 30, $h - 15 );
|
||||||
else
|
} else {
|
||||||
drawMultipleTask( $im, 80, 220, $h - 30 , $h -15);
|
drawMultipleTask( $im, 80, 220, $h - 30, $h - 15 );
|
||||||
|
}
|
||||||
|
|
||||||
//the zero
|
//the zero
|
||||||
imagestring ($im, 3, 80 -4 , $h -16, '0', $black);
|
imagestring( $im, 3, 80 - 4, $h - 16, '0', $black );
|
||||||
//the estimated
|
//the estimated
|
||||||
imagestring ($im, 2, 220 -4 , $h -16, $estimated, $black);
|
imagestring( $im, 2, 220 - 4, $h - 16, $estimated, $black );
|
||||||
|
|
||||||
|
//when is negative and the event occurs at starting, then this event never will occurs
|
||||||
//when is negative and the event occurs at starting, then this event never will occurs
|
if ($when < 0 && $o == 's') {
|
||||||
if ( $when < 0 && $o == 's' ) {
|
|
||||||
$xTimer = 30;
|
$xTimer = 30;
|
||||||
imagestring ($im, 2, $xTimer -8 , $h -16, $when, $black);
|
imagestring( $im, 2, $xTimer - 8, $h - 16, $when, $black );
|
||||||
$s = 'i';
|
$s = 'i';
|
||||||
}
|
}
|
||||||
|
|
||||||
//when is negative and the event occurs after, then this event will occurs
|
//when is negative and the event occurs after, then this event will occurs
|
||||||
if ( $when < 0 && $o == 'a' ) {
|
if ($when < 0 && $o == 'a') {
|
||||||
if ( abs($when) > abs($estimated) ) { //this event is before the start of the task, so will never occurs
|
if (abs( $when ) > abs( $estimated )) {
|
||||||
$xTimer = 30;
|
//this event is before the start of the task, so will never occurs
|
||||||
$sWhen = abs($when) - abs($estimated);
|
$xTimer = 30;
|
||||||
imagestring ($im, 2, $xTimer -8 , $h -16, $sWhen, $black);
|
$sWhen = abs( $when ) - abs( $estimated );
|
||||||
$s = 'i';
|
imagestring( $im, 2, $xTimer - 8, $h - 16, $sWhen, $black );
|
||||||
|
$s = 'i';
|
||||||
}
|
}
|
||||||
if ( abs($when) < abs($estimated) ) { //this event is after the start of the task, drawing
|
if (abs( $when ) < abs( $estimated )) {
|
||||||
$xTimer = 170;
|
//this event is after the start of the task, drawing
|
||||||
$sWhen = $estimated + $when;
|
$xTimer = 170;
|
||||||
imagestring ($im, 2, $xTimer -4 , $h -16, $sWhen, $black);
|
$sWhen = $estimated + $when;
|
||||||
|
imagestring( $im, 2, $xTimer - 4, $h - 16, $sWhen, $black );
|
||||||
}
|
}
|
||||||
if ( abs($when) == abs($estimated) ) { //this event is exactly at starting
|
if (abs( $when ) == abs( $estimated )) {
|
||||||
$xTimer = 80;
|
//this event is exactly at starting
|
||||||
$sWhen = $estimated + $when;
|
$xTimer = 80;
|
||||||
imagestring ($im, 2, $xTimer -4 , $h -16, $sWhen, $black);
|
$sWhen = $estimated + $when;
|
||||||
|
imagestring( $im, 2, $xTimer - 4, $h - 16, $sWhen, $black );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//when is positive and the event occurs after, then this event will occurs
|
//when is positive and the event occurs after, then this event will occurs
|
||||||
if ( $when > 0 && $o == 'a' ) {
|
if ($when > 0 && $o == 'a') {
|
||||||
$xTimer = 270;
|
$xTimer = 270;
|
||||||
$sWhen = $estimated + $when;
|
$sWhen = $estimated + $when;
|
||||||
imagestring ($im, 2, $xTimer -4 , $h -16, $sWhen, $black);
|
imagestring( $im, 2, $xTimer - 4, $h - 16, $sWhen, $black );
|
||||||
}
|
}
|
||||||
|
|
||||||
//when is positive and the event occurs starting, then this event will occurs
|
//when is positive and the event occurs starting, then this event will occurs
|
||||||
if ( $when > 0 && $o == 's' ) {
|
if ($when > 0 && $o == 's') {
|
||||||
if ( abs($when) < abs($estimated) ) $xTimer = 140;
|
if (abs( $when ) < abs( $estimated )) {
|
||||||
if ( abs($when) > abs($estimated) ) $xTimer = 270;
|
$xTimer = 140;
|
||||||
if ( abs($when) == abs($estimated) ) $xTimer = 220;
|
}
|
||||||
|
if (abs( $when ) > abs( $estimated )) {
|
||||||
imagestring ($im, 2, $xTimer -4 , $h -16, $when, $black);
|
$xTimer = 270;
|
||||||
}
|
}
|
||||||
|
if (abs( $when ) == abs( $estimated )) {
|
||||||
|
$xTimer = 220;
|
||||||
|
}
|
||||||
|
imagestring( $im, 2, $xTimer - 4, $h - 16, $when, $black );
|
||||||
|
}
|
||||||
|
|
||||||
if ( $when == 0 ) {
|
if ($when == 0) {
|
||||||
$xTimer = ( $o == 's' ) ? 80: 220 ;
|
$xTimer = ($o == 's') ? 80 : 220;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $s == 'a' ) {
|
if ($s == 'a') {
|
||||||
drawTimerEvent ( $im, $xTimer, $h -70 , $h -15);
|
drawTimerEvent( $im, $xTimer, $h - 70, $h - 15 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
header( "Content-Type: image/png" );
|
||||||
|
imagepng( $im );
|
||||||
|
die();
|
||||||
|
|
||||||
header("Content-Type: image/png");
|
|
||||||
imagepng($im);
|
|
||||||
die;
|
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* triggers_Save.php
|
* triggers_Save.php
|
||||||
*
|
*
|
||||||
* ProcessMaker Open Source Edition
|
* ProcessMaker Open Source Edition
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as
|
* it under the terms of the GNU Affero General Public License as
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
* 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,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* 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.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* 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.,
|
* 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_FACTORY"))!=1) return $RBAC_Response;
|
if (($RBAC_Response = $RBAC->userCanAccess( "PM_FACTORY" )) != 1) {
|
||||||
require_once('classes/model/Triggers.php');
|
return $RBAC_Response;
|
||||||
$oTrigger = new Triggers();
|
|
||||||
if ($_POST['form']['TRI_UID'] != '')
|
|
||||||
{
|
|
||||||
$oTrigger->load($_POST['form']['TRI_UID']);
|
|
||||||
}
|
}
|
||||||
else
|
require_once ('classes/model/Triggers.php');
|
||||||
{
|
$oTrigger = new Triggers();
|
||||||
$oTrigger->create($_POST['form']);
|
if ($_POST['form']['TRI_UID'] != '') {
|
||||||
$_POST['form']['TRI_UID']=$oTrigger->getTriUid();
|
$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'] );
|
||||||
?>
|
|
||||||
|
|||||||
Reference in New Issue
Block a user