. * * For more information, contact Colosa Inc, 2566 Le Jeune Rd., * Coral Gables, FL, 33134, USA, or email info@colosa.com. */ $actionAjax = isset( $_REQUEST['actionAjax'] ) ? $_REQUEST['actionAjax'] : null; if ($actionAjax == 'messageHistoryGridList_JXP') { G::LoadClass( 'case' ); G::LoadClass( "BasePeer" ); global $G_PUBLISH; $oCase = new Cases(); $appMessageArray = $oCase->getHistoryMessagesTrackerExt( $_SESSION['APPLICATION'] ); $result = new stdClass(); $aProcesses = Array (); $totalCount = 0; foreach ($appMessageArray as $index => $value) { if ($appMessageArray[$index]['APP_MSG_SHOW_MESSAGE'] == 1) { $appMessageArray[$index]['ID_MESSAGE'] = $appMessageArray[$index]['APP_UID'] . '_' . $appMessageArray[$index]['APP_MSG_UID']; $aProcesses[] = $appMessageArray[$index]; $totalCount ++; } } $newDir = '/tmp/test/directory'; $r = G::verifyPath( $newDir ); $r->data = $aProcesses; $r->totalCount = $totalCount; echo G::json_encode( $r ); } if ($actionAjax == 'showHistoryMessage') { ?> AddContent( 'xmlform', 'xmlform', 'cases/cases_MessagesView', '', $oCase->getHistoryMessagesTrackerView( $_POST['APP_UID'], $_POST['APP_MSG_UID'] ) ); ?> getHistoryMessagesTrackerView( $_POST['APP_UID'], $_POST['APP_MSG_UID'] ); //print_r($data); $oConfiguration = new Configuration(); $sDelimiter = DBAdapter::getStringDelimiter(); $oCriteria = new Criteria( 'workflow' ); $oCriteria->add( ConfigurationPeer::CFG_UID, 'Emails' ); $oCriteria->add( ConfigurationPeer::OBJ_UID, '' ); $oCriteria->add( ConfigurationPeer::PRO_UID, '' ); $oCriteria->add( ConfigurationPeer::USR_UID, '' ); $oCriteria->add( ConfigurationPeer::APP_UID, '' ); if (ConfigurationPeer::doCount( $oCriteria ) == 0) { $oConfiguration->create( array ('CFG_UID' => 'Emails','OBJ_UID' => '','CFG_VALUE' => '','PRO_UID' => '','USR_UID' => '','APP_UID' => '' ) ); $aConfiguration = array (); } else { $aConfiguration = $oConfiguration->load( 'Emails', '', '', '', '' ); if ($aConfiguration['CFG_VALUE'] != '') { $aConfiguration = unserialize( $aConfiguration['CFG_VALUE'] ); } else { $aConfiguration = array (); } } $passwd = $aConfiguration['MESS_PASSWORD']; $passwdDec = G::decrypt( $passwd, 'EMAILENCRYPT' ); $auxPass = explode( 'hash:', $passwdDec ); if (count( $auxPass ) > 1) { if (count( $auxPass ) == 2) { $passwd = $auxPass[1]; } else { array_shift( $auxPass ); $passwd = implode( '', $auxPass ); } } $aConfiguration['MESS_PASSWORD'] = $passwd; $oSpool = new spoolRun(); if ($aConfiguration['MESS_RAUTH'] == false || (is_string($aConfiguration['MESS_RAUTH']) && $aConfiguration['MESS_RAUTH'] == 'false')) { $aConfiguration['MESS_RAUTH'] = 0; } else { $aConfiguration['MESS_RAUTH'] = 1; } $oSpool->setConfig( array ('MESS_ENGINE' => $aConfiguration['MESS_ENGINE'],'MESS_SERVER' => $aConfiguration['MESS_SERVER'],'MESS_PORT' => $aConfiguration['MESS_PORT'],'MESS_ACCOUNT' => $aConfiguration['MESS_ACCOUNT'],'MESS_PASSWORD' => $passwd,'SMTPAuth' => $aConfiguration['MESS_RAUTH'] ) ); $oSpool->create( array ('msg_uid' => $data['MSG_UID'],'app_uid' => $data['APP_UID'],'del_index' => $data['DEL_INDEX'],'app_msg_type' => $data['APP_MSG_TYPE'],'app_msg_subject' => $data['APP_MSG_SUBJECT'],'app_msg_from' => $data['APP_MSG_FROM'],'app_msg_to' => $data['APP_MSG_TO'],'app_msg_body' => $data['APP_MSG_BODY'],'app_msg_cc' => $data['APP_MSG_CC'],'app_msg_bcc' => $data['APP_MSG_BCC'],'app_msg_attach' => $data['APP_MSG_ATTACH'],'app_msg_template' => $data['APP_MSG_TEMPLATE'],'app_msg_status' => 'pending' ) ); $oSpool->sendMail(); } catch (Exception $e) { $errorMessage = $e->getMessage(); } echo $errorMessage; }