CODE STYLE Formating workflow/engine/methods/cases
Change format files in workflow/engine/methods/cases
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -12,172 +12,146 @@
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
$actionAjax = isset($_REQUEST['actionAjax'])?$_REQUEST['actionAjax']: null;
|
||||
|
||||
$actionAjax = isset( $_REQUEST['actionAjax'] ) ? $_REQUEST['actionAjax'] : null;
|
||||
|
||||
if ($actionAjax == 'historyGridList_JXP') {
|
||||
|
||||
|
||||
if($actionAjax=='historyGridList_JXP'){
|
||||
|
||||
G::LoadClass('case');
|
||||
G::LoadClass("BasePeer" );
|
||||
|
||||
global $G_PUBLISH;
|
||||
$c = Cases::getTransferHistoryCriteria($_SESSION['APPLICATION']);
|
||||
|
||||
$result = new stdClass();
|
||||
$aProcesses = Array();
|
||||
|
||||
|
||||
$rs = GulliverBasePeer::doSelectRs ($c);
|
||||
$rs->setFetchmode (ResultSet::FETCHMODE_ASSOC);
|
||||
$rs->next();
|
||||
for($j=0;$j< $rs->getRecordCount() ;$j++) {
|
||||
$result = $rs->getRow();
|
||||
$result["ID_HISTORY"] = $result["PRO_UID"].'_'.$result["APP_UID"].'_'.$result["TAS_UID"];
|
||||
$aProcesses[] = $result;
|
||||
$rs->next();
|
||||
}
|
||||
|
||||
$newDir = '/tmp/test/directory';
|
||||
$r = G::verifyPath ( $newDir );
|
||||
$r->data = $aProcesses;
|
||||
$r->totalCount = 2;
|
||||
|
||||
echo G::json_encode($r);
|
||||
G::LoadClass( 'case' );
|
||||
G::LoadClass( "BasePeer" );
|
||||
|
||||
global $G_PUBLISH;
|
||||
$c = Cases::getTransferHistoryCriteria( $_SESSION['APPLICATION'] );
|
||||
|
||||
$result = new stdClass();
|
||||
$aProcesses = Array ();
|
||||
|
||||
$rs = GulliverBasePeer::doSelectRs( $c );
|
||||
$rs->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||
$rs->next();
|
||||
for ($j = 0; $j < $rs->getRecordCount(); $j ++) {
|
||||
$result = $rs->getRow();
|
||||
$result["ID_HISTORY"] = $result["PRO_UID"] . '_' . $result["APP_UID"] . '_' . $result["TAS_UID"];
|
||||
$aProcesses[] = $result;
|
||||
$rs->next();
|
||||
}
|
||||
|
||||
if($actionAjax=='historyGridListChangeLogPanelBody_JXP'){
|
||||
//!dataInput
|
||||
$idHistory = $_REQUEST["idHistory"];
|
||||
//!dataInput
|
||||
|
||||
//!dataSytem
|
||||
$idHistoryArray = explode("*",$idHistory );
|
||||
$_REQUEST["PRO_UID"]= $idHistoryArray[0];
|
||||
$_REQUEST["APP_UID"]= $idHistoryArray[1];
|
||||
$_REQUEST["TAS_UID"]= $idHistoryArray[2];
|
||||
$_REQUEST["DYN_UID"]= "";
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
$newDir = '/tmp/test/directory';
|
||||
$r = G::verifyPath( $newDir );
|
||||
$r->data = $aProcesses;
|
||||
$r->totalCount = 2;
|
||||
|
||||
echo G::json_encode( $r );
|
||||
}
|
||||
|
||||
if ($actionAjax == 'historyGridListChangeLogPanelBody_JXP') {
|
||||
//!dataInput
|
||||
$idHistory = $_REQUEST["idHistory"];
|
||||
//!dataInput
|
||||
|
||||
|
||||
//!dataSytem
|
||||
$idHistoryArray = explode( "*", $idHistory );
|
||||
$_REQUEST["PRO_UID"] = $idHistoryArray[0];
|
||||
$_REQUEST["APP_UID"] = $idHistoryArray[1];
|
||||
$_REQUEST["TAS_UID"] = $idHistoryArray[2];
|
||||
$_REQUEST["DYN_UID"] = "";
|
||||
|
||||
?>
|
||||
|
||||
<table bgcolor="white" height=100% width=100%>
|
||||
<tr>
|
||||
<td height=99% >
|
||||
<div style="width:100%; overflow-y: scroll; overflow-x: hidden; max-height: 310px;_height:310px;height:310px; visibility: inherit;" >
|
||||
<tr>
|
||||
<td height=99%>
|
||||
<div
|
||||
style="width: 100%; overflow-y: scroll; overflow-x: hidden; max-height: 310px; _height: 310px; height: 310px; visibility: inherit;">
|
||||
|
||||
<?php
|
||||
require_once 'classes/model/AppHistory.php';
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent('view', 'cases/cases_DynaformHistory');
|
||||
G::RenderPage('publish', 'raw');
|
||||
?>
|
||||
require_once 'classes/model/AppHistory.php';
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent( 'view', 'cases/cases_DynaformHistory' );
|
||||
G::RenderPage( 'publish', 'raw' );
|
||||
?>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height=30 valign=top>
|
||||
|
||||
<table align=center cellspacing="0" class="x-btn x-btn-noicon" id="ext-comp-1043" style="width: 75px;margin-top:0px;">
|
||||
<tbody class="x-btn-small x-btn-icon-small-left">
|
||||
<tr>
|
||||
<td class="x-btn-tl">
|
||||
<i> </i>
|
||||
</td>
|
||||
<td class="x-btn-tc">
|
||||
</td>
|
||||
<td class="x-btn-tr">
|
||||
<i> </i>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="x-btn-ml">
|
||||
<i> </i>
|
||||
</td>
|
||||
<td class="x-btn-mc">
|
||||
<em unselectable="on" class="">
|
||||
<button type="button" id="ext-gen105" class=" x-btn-text">
|
||||
OK
|
||||
</button>
|
||||
</em>
|
||||
</td>
|
||||
<td class="x-btn-mr">
|
||||
<i> </i>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="x-btn-bl">
|
||||
<i> </i>
|
||||
</td>
|
||||
<td class="x-btn-bc">
|
||||
</td>
|
||||
<td class="x-btn-br">
|
||||
<i> </i>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height=30 valign=top>
|
||||
|
||||
<table align=center cellspacing="0" class="x-btn x-btn-noicon"
|
||||
id="ext-comp-1043" style="width: 75px; margin-top: 0px;">
|
||||
<tbody class="x-btn-small x-btn-icon-small-left">
|
||||
<tr>
|
||||
<td class="x-btn-tl"><i> </i></td>
|
||||
<td class="x-btn-tc"></td>
|
||||
<td class="x-btn-tr"><i> </i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="x-btn-ml"><i> </i></td>
|
||||
<td class="x-btn-mc"><em unselectable="on" class="">
|
||||
<button type="button" id="ext-gen105" class=" x-btn-text">OK</button>
|
||||
</em></td>
|
||||
<td class="x-btn-mr"><i> </i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="x-btn-bl"><i> </i></td>
|
||||
<td class="x-btn-bc"></td>
|
||||
<td class="x-btn-br"><i> </i></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
if($actionAjax=="showDynaformHistoryGetNomDynaform_JXP"){
|
||||
require_once 'classes/model/ContentPeer.php';
|
||||
|
||||
//!dataInput
|
||||
$idDin = $_REQUEST['idDin'];
|
||||
$dynDate = $_REQUEST["dynDate"];
|
||||
|
||||
//!dataOuput
|
||||
$md5Hash = "";
|
||||
$dynTitle = '';
|
||||
|
||||
$c = new Criteria();
|
||||
$c0 = $c->getNewCriterion(ContentPeer::CON_ID,$idDin);
|
||||
$c1 = $c->getNewCriterion(ContentPeer::CON_CATEGORY,'DYN_TITLE');
|
||||
$c0->addAnd($c1);
|
||||
$c->add($c0);
|
||||
$contentObjeto = ContentPeer::doSelectOne($c);
|
||||
|
||||
|
||||
if(is_object($contentObjeto)){
|
||||
$dynTitle = $contentObjeto->getConValue();
|
||||
}
|
||||
|
||||
$md5Hash = md5($idDin.$dynDate);
|
||||
|
||||
}
|
||||
|
||||
//assign task
|
||||
$result = new stdClass;
|
||||
$result->dynTitle = $dynTitle;
|
||||
$result->md5Hash = $md5Hash;
|
||||
|
||||
echo G::json_encode($result);
|
||||
|
||||
if ($actionAjax == "showDynaformHistoryGetNomDynaform_JXP") {
|
||||
require_once 'classes/model/ContentPeer.php';
|
||||
|
||||
//!dataInput
|
||||
$idDin = $_REQUEST['idDin'];
|
||||
$dynDate = $_REQUEST["dynDate"];
|
||||
|
||||
//!dataOuput
|
||||
$md5Hash = "";
|
||||
$dynTitle = '';
|
||||
|
||||
$c = new Criteria();
|
||||
$c0 = $c->getNewCriterion( ContentPeer::CON_ID, $idDin );
|
||||
$c1 = $c->getNewCriterion( ContentPeer::CON_CATEGORY, 'DYN_TITLE' );
|
||||
$c0->addAnd( $c1 );
|
||||
$c->add( $c0 );
|
||||
$contentObjeto = ContentPeer::doSelectOne( $c );
|
||||
|
||||
if (is_object( $contentObjeto )) {
|
||||
$dynTitle = $contentObjeto->getConValue();
|
||||
}
|
||||
|
||||
|
||||
$md5Hash = md5( $idDin . $dynDate );
|
||||
|
||||
//assign task
|
||||
$result = new stdClass();
|
||||
$result->dynTitle = $dynTitle;
|
||||
$result->md5Hash = $md5Hash;
|
||||
|
||||
echo G::json_encode( $result );
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -12,65 +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.
|
||||
*
|
||||
*/
|
||||
|
||||
$actionAjax = isset($_REQUEST['actionAjax'])?$_REQUEST['actionAjax']: null;
|
||||
$actionAjax = isset( $_REQUEST['actionAjax'] ) ? $_REQUEST['actionAjax'] : null;
|
||||
|
||||
if ($actionAjax == 'messageHistoryGridList_JXP') {
|
||||
|
||||
G::LoadClass( 'case' );
|
||||
G::LoadClass( "BasePeer" );
|
||||
|
||||
global $G_PUBLISH;
|
||||
$oCase = new Cases();
|
||||
|
||||
if($actionAjax=='messageHistoryGridList_JXP'){
|
||||
$appMessageArray = $oCase->getHistoryMessagesTrackerExt( $_SESSION['APPLICATION'] );
|
||||
|
||||
G::LoadClass('case');
|
||||
G::LoadClass("BasePeer" );
|
||||
$result = new stdClass();
|
||||
$aProcesses = Array ();
|
||||
|
||||
global $G_PUBLISH;
|
||||
$oCase = new Cases();
|
||||
|
||||
$appMessageArray = $oCase->getHistoryMessagesTrackerExt($_SESSION['APPLICATION']);
|
||||
|
||||
$result = new stdClass();
|
||||
$aProcesses = Array();
|
||||
|
||||
$totalCount = 0;
|
||||
foreach( $appMessageArray as $index => $value){
|
||||
$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);
|
||||
$totalCount = 0;
|
||||
foreach ($appMessageArray as $index => $value) {
|
||||
$appMessageArray[$index]['ID_MESSAGE'] = $appMessageArray[$index]['APP_UID'] . '_' . $appMessageArray[$index]['APP_MSG_UID'];
|
||||
$aProcesses[] = $appMessageArray[$index];
|
||||
$totalCount ++;
|
||||
}
|
||||
if($actionAjax=='showHistoryMessage'){
|
||||
|
||||
?>
|
||||
<link rel="stylesheet" type="text/css" href="/css/classic.css" />
|
||||
<style type="text/css">
|
||||
html{
|
||||
color:black !important;
|
||||
}
|
||||
body{
|
||||
color:black !important;
|
||||
}
|
||||
</style>
|
||||
<script language="Javascript">
|
||||
$newDir = '/tmp/test/directory';
|
||||
$r = G::verifyPath( $newDir );
|
||||
$r->data = $aProcesses;
|
||||
$r->totalCount = $totalCount;
|
||||
|
||||
echo G::json_encode( $r );
|
||||
}
|
||||
if ($actionAjax == 'showHistoryMessage') {
|
||||
|
||||
?>
|
||||
<link rel="stylesheet" type="text/css" href="/css/classic.css" />
|
||||
<style type="text/css">
|
||||
html {
|
||||
color: black !important;
|
||||
}
|
||||
|
||||
body {
|
||||
color: black !important;
|
||||
}
|
||||
</style>
|
||||
<script language="Javascript">
|
||||
//!Code that simulated reload library javascript maborak
|
||||
var leimnud = {};
|
||||
leimnud.exec = "";
|
||||
@@ -86,120 +80,96 @@
|
||||
</script>
|
||||
<?php
|
||||
|
||||
G::LoadClass('case');
|
||||
$oCase = new Cases();
|
||||
G::LoadClass( 'case' );
|
||||
$oCase = new Cases();
|
||||
|
||||
$_POST["APP_UID"] = $_REQUEST["APP_UID"];
|
||||
$_POST['APP_MSG_UID'] = $_REQUEST["APP_MSG_UID"];
|
||||
$_POST["APP_UID"] = $_REQUEST["APP_UID"];
|
||||
$_POST['APP_MSG_UID'] = $_REQUEST["APP_MSG_UID"];
|
||||
|
||||
$G_PUBLISH = new Publisher();
|
||||
$oCase = new Cases();
|
||||
$G_PUBLISH = new Publisher();
|
||||
$oCase = new Cases();
|
||||
|
||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'cases/cases_MessagesView', '', $oCase->getHistoryMessagesTrackerView($_POST['APP_UID'], $_POST['APP_MSG_UID']));
|
||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_MessagesView', '', $oCase->getHistoryMessagesTrackerView( $_POST['APP_UID'], $_POST['APP_MSG_UID'] ) );
|
||||
|
||||
|
||||
?>
|
||||
<script language="javascript">
|
||||
?>
|
||||
<script language="javascript">
|
||||
<?php
|
||||
global $G_FORM;
|
||||
?>
|
||||
global $G_FORM;
|
||||
?>
|
||||
function loadForm_<?php echo $G_FORM->id;?>(parametro1){
|
||||
}
|
||||
</script>
|
||||
<?php
|
||||
|
||||
G::RenderPage('publish', 'raw');
|
||||
}
|
||||
G::RenderPage( 'publish', 'raw' );
|
||||
}
|
||||
|
||||
if($actionAjax=='sendMailMessage_JXP'){
|
||||
//!dataSystem
|
||||
$errorMessage = "";
|
||||
try{
|
||||
if ($actionAjax == 'sendMailMessage_JXP') {
|
||||
//!dataSystem
|
||||
$errorMessage = "";
|
||||
try {
|
||||
//!dataInput
|
||||
$_POST['APP_UID'] = $_REQUEST['APP_UID'];
|
||||
$_POST['APP_MSG_UID'] = $_REQUEST['APP_MSG_UID'];
|
||||
|
||||
|
||||
G::LoadClass('case');
|
||||
G::LoadClass( 'case' );
|
||||
$oCase = new Cases();
|
||||
|
||||
|
||||
require_once 'classes/model/Configuration.php';
|
||||
G::LoadClass('spool');
|
||||
G::LoadClass( 'spool' );
|
||||
|
||||
$oCase = new Cases();
|
||||
$data = $oCase->getHistoryMessagesTrackerView($_POST['APP_UID'], $_POST['APP_MSG_UID']);
|
||||
$data = $oCase->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();
|
||||
$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();
|
||||
}
|
||||
$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) {
|
||||
$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);
|
||||
array_shift( $auxPass );
|
||||
$passwd = implode( '', $auxPass );
|
||||
}
|
||||
}
|
||||
}
|
||||
$aConfiguration['MESS_PASSWORD'] = $passwd;
|
||||
|
||||
|
||||
$oSpool = new spoolRun();
|
||||
$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->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->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){
|
||||
} catch (Exception $e) {
|
||||
|
||||
$errorMessage = $e->getMessage();
|
||||
}
|
||||
|
||||
echo $errorMessage;
|
||||
|
||||
}
|
||||
|
||||
echo $errorMessage;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,72 +1,76 @@
|
||||
<?php
|
||||
if (!isset($_REQUEST ['action'])) {
|
||||
$res ['success'] = 'failure';
|
||||
$res ['message'] = 'You may request an action';
|
||||
print G::json_encode($res);
|
||||
die ();
|
||||
}
|
||||
if (!function_exists($_REQUEST ['action'])) {
|
||||
$res ['success'] = 'failure';
|
||||
$res ['message'] = 'The requested action does not exist';
|
||||
header("Content-Type: application/json");
|
||||
print G::json_encode($res);
|
||||
die ();
|
||||
}
|
||||
|
||||
$functionName = $_REQUEST ['action'];
|
||||
$functionParams = isset($_REQUEST ['params']) ? $_REQUEST ['params'] : array();
|
||||
|
||||
$functionName($functionParams);
|
||||
|
||||
function getExtJSParams() {
|
||||
$validParams = array('callback' => '', 'dir' => 'DESC', 'sort' => '', 'start' => 0, 'limit' => 25, 'filter' => '', 'search' => '', 'action' => '', 'xaction' => '', 'data' => '', 'status' => '', 'query' => '', 'fields' => "");
|
||||
$result = array();
|
||||
foreach ($validParams as $paramName => $paramDefault) {
|
||||
$result[$paramName] = isset($_REQUEST[$paramName]) ? $_REQUEST[$paramName] : isset($_REQUEST[$paramName]) ? $_REQUEST[$paramName] : $paramDefault;
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
function sendJsonResultGeneric($response, $callback) {
|
||||
header("Content-Type: application/json");
|
||||
$finalResponse = G::json_encode($response);
|
||||
if ($callback != '') {
|
||||
print $callback . "($finalResponse);";
|
||||
} else {
|
||||
print $finalResponse;
|
||||
}
|
||||
}
|
||||
|
||||
function getNotesList() {
|
||||
extract(getExtJSParams());
|
||||
require_once ( "classes/model/AppNotes.php" );
|
||||
if ((isset($_REQUEST['appUid'])) && (trim($_REQUEST['appUid']) != "")) {
|
||||
$appUid = $_REQUEST['appUid'];
|
||||
} else {
|
||||
$appUid = $_SESSION['APPLICATION'];
|
||||
}
|
||||
$usrUid = (isset($_SESSION['USER_LOGGED'])) ? $_SESSION['USER_LOGGED'] : "";
|
||||
$appNotes = new AppNotes();
|
||||
$response = $appNotes->getNotesList($appUid, '', $start, $limit);
|
||||
sendJsonResultGeneric($response['array'], $callback);
|
||||
}
|
||||
|
||||
function postNote() {
|
||||
extract(getExtJSParams());
|
||||
if ((isset($_REQUEST['appUid'])) && (trim($_REQUEST['appUid']) != "")) {
|
||||
$appUid = $_REQUEST['appUid'];
|
||||
} else {
|
||||
$appUid = $_SESSION['APPLICATION'];
|
||||
}
|
||||
$usrUid = (isset($_SESSION['USER_LOGGED'])) ? $_SESSION['USER_LOGGED'] : "";
|
||||
require_once ( "classes/model/AppNotes.php" );
|
||||
|
||||
$noteContent=addslashes($_POST['noteText']);
|
||||
|
||||
$appNotes=new AppNotes();
|
||||
$response=$appNotes->postNewNote($appUid, $usrUid, $noteContent);
|
||||
|
||||
sendJsonResultGeneric($response, $callback);
|
||||
}
|
||||
|
||||
?>
|
||||
<?php
|
||||
if (! isset( $_REQUEST['action'] )) {
|
||||
$res['success'] = 'failure';
|
||||
$res['message'] = 'You may request an action';
|
||||
print G::json_encode( $res );
|
||||
die();
|
||||
}
|
||||
if (! function_exists( $_REQUEST['action'] )) {
|
||||
$res['success'] = 'failure';
|
||||
$res['message'] = 'The requested action does not exist';
|
||||
header( "Content-Type: application/json" );
|
||||
print G::json_encode( $res );
|
||||
die();
|
||||
}
|
||||
|
||||
$functionName = $_REQUEST['action'];
|
||||
$functionParams = isset( $_REQUEST['params'] ) ? $_REQUEST['params'] : array ();
|
||||
|
||||
$functionName( $functionParams );
|
||||
|
||||
function getExtJSParams ()
|
||||
{
|
||||
$validParams = array ('callback' => '','dir' => 'DESC','sort' => '','start' => 0,'limit' => 25,'filter' => '','search' => '','action' => '','xaction' => '','data' => '','status' => '','query' => '','fields' => ""
|
||||
);
|
||||
$result = array ();
|
||||
foreach ($validParams as $paramName => $paramDefault) {
|
||||
$result[$paramName] = isset( $_REQUEST[$paramName] ) ? $_REQUEST[$paramName] : isset( $_REQUEST[$paramName] ) ? $_REQUEST[$paramName] : $paramDefault;
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
function sendJsonResultGeneric ($response, $callback)
|
||||
{
|
||||
header( "Content-Type: application/json" );
|
||||
$finalResponse = G::json_encode( $response );
|
||||
if ($callback != '') {
|
||||
print $callback . "($finalResponse);";
|
||||
} else {
|
||||
print $finalResponse;
|
||||
}
|
||||
}
|
||||
|
||||
function getNotesList ()
|
||||
{
|
||||
extract( getExtJSParams() );
|
||||
require_once ("classes/model/AppNotes.php");
|
||||
if ((isset( $_REQUEST['appUid'] )) && (trim( $_REQUEST['appUid'] ) != "")) {
|
||||
$appUid = $_REQUEST['appUid'];
|
||||
} else {
|
||||
$appUid = $_SESSION['APPLICATION'];
|
||||
}
|
||||
$usrUid = (isset( $_SESSION['USER_LOGGED'] )) ? $_SESSION['USER_LOGGED'] : "";
|
||||
$appNotes = new AppNotes();
|
||||
$response = $appNotes->getNotesList( $appUid, '', $start, $limit );
|
||||
sendJsonResultGeneric( $response['array'], $callback );
|
||||
}
|
||||
|
||||
function postNote ()
|
||||
{
|
||||
extract( getExtJSParams() );
|
||||
if ((isset( $_REQUEST['appUid'] )) && (trim( $_REQUEST['appUid'] ) != "")) {
|
||||
$appUid = $_REQUEST['appUid'];
|
||||
} else {
|
||||
$appUid = $_SESSION['APPLICATION'];
|
||||
}
|
||||
$usrUid = (isset( $_SESSION['USER_LOGGED'] )) ? $_SESSION['USER_LOGGED'] : "";
|
||||
require_once ("classes/model/AppNotes.php");
|
||||
|
||||
$noteContent = addslashes( $_POST['noteText'] );
|
||||
|
||||
$appNotes = new AppNotes();
|
||||
$response = $appNotes->postNewNote( $appUid, $usrUid, $noteContent );
|
||||
|
||||
sendJsonResultGeneric( $response, $callback );
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -12,74 +12,70 @@
|
||||
*
|
||||
* 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.
|
||||
* by The Answer
|
||||
*/
|
||||
|
||||
$G_MAIN_MENU = 'processmaker';
|
||||
$G_SUB_MENU = 'cases';
|
||||
$G_ID_MENU_SELECTED = 'CASES';
|
||||
$G_ID_SUB_MENU_SELECTED = 'CASES_ADVANCEDSEARCH';
|
||||
$G_PUBLISH = new Publisher;
|
||||
|
||||
global $RBAC;
|
||||
$permisse = $RBAC->userCanAccess('PM_ALLCASES');
|
||||
$userlogged = $_SESSION['USER_LOGGED'];
|
||||
|
||||
require_once ( "classes/model/ProcessUser.php" );
|
||||
$oCriteria = new Criteria('workflow');
|
||||
$oCriteria->addSelectColumn(ProcessUserPeer::PU_UID);
|
||||
$oCriteria->addSelectColumn(ProcessUserPeer::PRO_UID);
|
||||
$oCriteria->add(ProcessUserPeer::USR_UID, $userlogged);
|
||||
$oCriteria->add(ProcessUserPeer::PU_TYPE, "SUPERVISOR");
|
||||
|
||||
$oDataset = ProcessUserPeer::doSelectRS($oCriteria);
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$oDataset->next();
|
||||
|
||||
$aSupervisor = array();
|
||||
while ($aRow = $oDataset->getRow())
|
||||
{
|
||||
$aSupervisor[] = $aRow['PRO_UID'];
|
||||
$oDataset->next();
|
||||
}
|
||||
|
||||
|
||||
G::LoadClass('case');
|
||||
$oCases = new Cases();
|
||||
|
||||
if (isset($_POST['form']))
|
||||
{
|
||||
$fields['CASE_NUMBER'] = $_POST['form']['CASE_NUMBER'];
|
||||
$fields['PROCESS'] = $_POST['form']['PROCESS'];
|
||||
$fields['TASKS'] = $_POST['form']['TASKS'];
|
||||
$fields['CURRENT_USER'] = $_POST['form']['CURRENT_USER'];
|
||||
$fields['SENT_BY'] = $_POST['form']['SENT_BY'];
|
||||
$fields['LAST_MODIFICATION_F'] = $_POST['form']['LAST_MODIFICATION_F'];
|
||||
$fields['LAST_MODIFICATION_T'] = $_POST['form']['LAST_MODIFICATION_T'];
|
||||
$fields['APP_STATUS'] = $_POST['form']['APP_STATUS'];
|
||||
|
||||
$Criteria = $oCases->getAdvancedSearch($fields['CASE_NUMBER'], $fields['PROCESS'], $fields['TASKS'], $fields['CURRENT_USER'], $fields['SENT_BY'], $fields['LAST_MODIFICATION_F'], $fields['LAST_MODIFICATION_T'], $fields['APP_STATUS'], $permisse, $userlogged, $aSupervisor);
|
||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'cases/cases_advancedSearchFilter', '', $fields);
|
||||
}
|
||||
else
|
||||
{
|
||||
//list($Criteria,$xmlform) = $oCases->getConditionCasesList('gral');
|
||||
$Criteria = $oCases->getAdvancedSearch('', '', '', '', '', '', '', '', $permisse, $userlogged, $aSupervisor);
|
||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'cases/cases_advancedSearchFilter');
|
||||
}
|
||||
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'cases/cases_advancedSearch', $Criteria);
|
||||
|
||||
G::RenderPage('publish', 'blank');
|
||||
*/
|
||||
|
||||
$G_MAIN_MENU = 'processmaker';
|
||||
$G_SUB_MENU = 'cases';
|
||||
$G_ID_MENU_SELECTED = 'CASES';
|
||||
$G_ID_SUB_MENU_SELECTED = 'CASES_ADVANCEDSEARCH';
|
||||
$G_PUBLISH = new Publisher();
|
||||
|
||||
global $RBAC;
|
||||
$permisse = $RBAC->userCanAccess( 'PM_ALLCASES' );
|
||||
$userlogged = $_SESSION['USER_LOGGED'];
|
||||
|
||||
require_once ("classes/model/ProcessUser.php");
|
||||
$oCriteria = new Criteria( 'workflow' );
|
||||
$oCriteria->addSelectColumn( ProcessUserPeer::PU_UID );
|
||||
$oCriteria->addSelectColumn( ProcessUserPeer::PRO_UID );
|
||||
$oCriteria->add( ProcessUserPeer::USR_UID, $userlogged );
|
||||
$oCriteria->add( ProcessUserPeer::PU_TYPE, "SUPERVISOR" );
|
||||
|
||||
$oDataset = ProcessUserPeer::doSelectRS( $oCriteria );
|
||||
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||
$oDataset->next();
|
||||
|
||||
$aSupervisor = array ();
|
||||
while ($aRow = $oDataset->getRow()) {
|
||||
$aSupervisor[] = $aRow['PRO_UID'];
|
||||
$oDataset->next();
|
||||
}
|
||||
|
||||
G::LoadClass( 'case' );
|
||||
$oCases = new Cases();
|
||||
|
||||
if (isset( $_POST['form'] )) {
|
||||
$fields['CASE_NUMBER'] = $_POST['form']['CASE_NUMBER'];
|
||||
$fields['PROCESS'] = $_POST['form']['PROCESS'];
|
||||
$fields['TASKS'] = $_POST['form']['TASKS'];
|
||||
$fields['CURRENT_USER'] = $_POST['form']['CURRENT_USER'];
|
||||
$fields['SENT_BY'] = $_POST['form']['SENT_BY'];
|
||||
$fields['LAST_MODIFICATION_F'] = $_POST['form']['LAST_MODIFICATION_F'];
|
||||
$fields['LAST_MODIFICATION_T'] = $_POST['form']['LAST_MODIFICATION_T'];
|
||||
$fields['APP_STATUS'] = $_POST['form']['APP_STATUS'];
|
||||
|
||||
$Criteria = $oCases->getAdvancedSearch( $fields['CASE_NUMBER'], $fields['PROCESS'], $fields['TASKS'], $fields['CURRENT_USER'], $fields['SENT_BY'], $fields['LAST_MODIFICATION_F'], $fields['LAST_MODIFICATION_T'], $fields['APP_STATUS'], $permisse, $userlogged, $aSupervisor );
|
||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_advancedSearchFilter', '', $fields );
|
||||
} else {
|
||||
//list($Criteria,$xmlform) = $oCases->getConditionCasesList('gral');
|
||||
$Criteria = $oCases->getAdvancedSearch( '', '', '', '', '', '', '', '', $permisse, $userlogged, $aSupervisor );
|
||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_advancedSearchFilter' );
|
||||
}
|
||||
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'cases/cases_advancedSearch', $Criteria );
|
||||
|
||||
G::RenderPage( 'publish', 'blank' );
|
||||
?>
|
||||
<script>
|
||||
parent.outerLayout.hide('east');
|
||||
parent.PANEL_EAST_OPEN = false;
|
||||
</script>
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user