Conflictos arreglados
This commit is contained in:
@@ -373,8 +373,12 @@ class Configurations // extends Configuration
|
||||
*/
|
||||
public function getFormats()
|
||||
{
|
||||
$this->UserConfig = $this->getConfiguration("ENVIRONMENT_SETTINGS", "");
|
||||
|
||||
if (!isset($this->UserConfig)) {
|
||||
$this->UserConfig = array();
|
||||
}
|
||||
if (empty($this->UserConfig)) {
|
||||
$this->UserConfig = $this->getConfiguration("ENVIRONMENT_SETTINGS", "");
|
||||
}
|
||||
if (is_numeric($this->UserConfig)) {
|
||||
$this->UserConfig = array();
|
||||
}
|
||||
|
||||
@@ -86,8 +86,8 @@ class spoolRun
|
||||
$this->ExceptionCode['WARNING'] = 2;
|
||||
$this->ExceptionCode['NOTICE'] = 3;
|
||||
|
||||
$this->longMailEreg = '/(.*)(<([\w\-\.]+@[\w\-_\.]+\.\w{2,5})+>)/';
|
||||
$this->mailEreg = '/^([\w\-_\.]+@[\w\-_\.]+\.\w{2,5}+)$/';
|
||||
$this->longMailEreg = "/(.*)(<([\w\-\.']+@[\w\-_\.]+\.\w{2,5})+>)/";
|
||||
$this->mailEreg = "/^([\w\-_\.']+@[\w\-_\.]+\.\w{2,5}+)$/";
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -229,15 +229,17 @@ class spoolRun
|
||||
$this->fileData['envelope_to'] = array ();
|
||||
$this->fileData["contentTypeIsHtml"] = $bContentTypeIsHtml;
|
||||
|
||||
if ($this->config['MESS_ENGINE'] == 'OPENMAIL') {
|
||||
if ($this->config['MESS_SERVER'] != '') {
|
||||
if (($sAux = @gethostbyaddr( $this->config['MESS_SERVER'] ))) {
|
||||
$this->fileData['domain'] = $sAux;
|
||||
if (array_key_exists('MESS_ENGINE',$this->config)) {
|
||||
if ($this->config['MESS_ENGINE'] == 'OPENMAIL') {
|
||||
if ($this->config['MESS_SERVER'] != '') {
|
||||
if (($sAux = @gethostbyaddr( $this->config['MESS_SERVER'] ))) {
|
||||
$this->fileData['domain'] = $sAux;
|
||||
} else {
|
||||
$this->fileData['domain'] = $this->config['MESS_SERVER'];
|
||||
}
|
||||
} else {
|
||||
$this->fileData['domain'] = $this->config['MESS_SERVER'];
|
||||
$this->fileData['domain'] = gethostbyaddr( '127.0.0.1' );
|
||||
}
|
||||
} else {
|
||||
$this->fileData['domain'] = gethostbyaddr( '127.0.0.1' );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -287,7 +289,7 @@ class spoolRun
|
||||
*/
|
||||
private function handleFrom ()
|
||||
{
|
||||
$eregA = "/^.*@.*$/";
|
||||
$eregA = "/^'.*@.*$/";
|
||||
|
||||
if (strpos( $this->fileData['from'], '<' ) !== false) {
|
||||
//to validate complex email address i.e. Erik A. O <erik@colosa.com>
|
||||
@@ -416,164 +418,166 @@ class spoolRun
|
||||
private function handleMail ()
|
||||
{
|
||||
if (count( $this->fileData['envelope_to'] ) > 0) {
|
||||
switch ($this->config['MESS_ENGINE']) {
|
||||
case 'MAIL':
|
||||
case 'PHPMAILER':
|
||||
G::LoadThirdParty( 'phpmailer', 'class.phpmailer' );
|
||||
|
||||
switch ($this->config['MESS_ENGINE']) {
|
||||
case 'MAIL':
|
||||
$oPHPMailer = new PHPMailer();
|
||||
$oPHPMailer->Mailer = 'mail';
|
||||
break;
|
||||
case 'PHPMAILER':
|
||||
$oPHPMailer = new PHPMailer( true );
|
||||
$oPHPMailer->Mailer = 'smtp';
|
||||
break;
|
||||
}
|
||||
|
||||
$oPHPMailer->SMTPAuth = (isset( $this->config['SMTPAuth'] ) ? $this->config['SMTPAuth'] : '');
|
||||
|
||||
switch ($this->config['MESS_ENGINE']) {
|
||||
case 'MAIL':
|
||||
break;
|
||||
case 'PHPMAILER':
|
||||
//Posible Options for SMTPSecure are: "", "ssl" or "tls"
|
||||
if (isset( $this->config['SMTPSecure'] ) && preg_match( '/^(ssl|tls)$/', $this->config['SMTPSecure'] )) {
|
||||
$oPHPMailer->SMTPSecure = $this->config['SMTPSecure'];
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
$oPHPMailer->CharSet = "UTF-8";
|
||||
$oPHPMailer->Encoding = "8bit";
|
||||
$oPHPMailer->Host = $this->config['MESS_SERVER'];
|
||||
$oPHPMailer->Port = $this->config['MESS_PORT'];
|
||||
$oPHPMailer->Username = $this->config['MESS_ACCOUNT'];
|
||||
$oPHPMailer->Password = $this->config['MESS_PASSWORD'];
|
||||
$oPHPMailer->From = $this->fileData['from_email'];
|
||||
$oPHPMailer->FromName = utf8_decode( $this->fileData['from_name'] );
|
||||
if (isset($this->fileData['reply_to'])) {
|
||||
if ($this->fileData['reply_to'] != '') {
|
||||
$oPHPMailer->AddReplyTo($this->fileData['reply_to'], $this->fileData['reply_to_name']);
|
||||
if (array_key_exists('MESS_ENGINE',$this->config)) {
|
||||
switch ($this->config['MESS_ENGINE']) {
|
||||
case 'MAIL':
|
||||
case 'PHPMAILER':
|
||||
G::LoadThirdParty( 'phpmailer', 'class.phpmailer' );
|
||||
|
||||
switch ($this->config['MESS_ENGINE']) {
|
||||
case 'MAIL':
|
||||
$oPHPMailer = new PHPMailer();
|
||||
$oPHPMailer->Mailer = 'mail';
|
||||
break;
|
||||
case 'PHPMAILER':
|
||||
$oPHPMailer = new PHPMailer( true );
|
||||
$oPHPMailer->Mailer = 'smtp';
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$msSubject = $this->fileData['subject'];
|
||||
|
||||
if (! (mb_detect_encoding( $msSubject, "UTF-8" ) == "UTF-8")) {
|
||||
$msSubject = utf8_encode( $msSubject );
|
||||
}
|
||||
|
||||
$oPHPMailer->Subject = $msSubject;
|
||||
|
||||
$msBody = $this->fileData['body'];
|
||||
|
||||
if (! (mb_detect_encoding( $msBody, "UTF-8" ) == "UTF-8")) {
|
||||
$msBody = utf8_encode( $msBody );
|
||||
}
|
||||
|
||||
$oPHPMailer->Body = $msBody;
|
||||
|
||||
$attachment = @unserialize($this->fileData['attachments']);
|
||||
if ($attachment === false) {
|
||||
$attachment = $this->fileData['attachments'];
|
||||
}
|
||||
if (is_array($attachment)) {
|
||||
foreach ($attachment as $key => $fileAttach) {
|
||||
if (file_exists( $fileAttach )) {
|
||||
$oPHPMailer->AddAttachment( $fileAttach, is_int( $key ) ? '' : $key );
|
||||
|
||||
$oPHPMailer->SMTPAuth = (isset( $this->config['SMTPAuth'] ) ? $this->config['SMTPAuth'] : '');
|
||||
|
||||
switch ($this->config['MESS_ENGINE']) {
|
||||
case 'MAIL':
|
||||
break;
|
||||
case 'PHPMAILER':
|
||||
//Posible Options for SMTPSecure are: "", "ssl" or "tls"
|
||||
if (isset( $this->config['SMTPSecure'] ) && preg_match( '/^(ssl|tls)$/', $this->config['SMTPSecure'] )) {
|
||||
$oPHPMailer->SMTPSecure = $this->config['SMTPSecure'];
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
$oPHPMailer->CharSet = "UTF-8";
|
||||
$oPHPMailer->Encoding = "8bit";
|
||||
$oPHPMailer->Host = $this->config['MESS_SERVER'];
|
||||
$oPHPMailer->Port = $this->config['MESS_PORT'];
|
||||
$oPHPMailer->Username = $this->config['MESS_ACCOUNT'];
|
||||
$oPHPMailer->Password = $this->config['MESS_PASSWORD'];
|
||||
$oPHPMailer->From = $this->fileData['from_email'];
|
||||
$oPHPMailer->FromName = utf8_decode( $this->fileData['from_name'] );
|
||||
if (isset($this->fileData['reply_to'])) {
|
||||
if ($this->fileData['reply_to'] != '') {
|
||||
$oPHPMailer->AddReplyTo($this->fileData['reply_to'], $this->fileData['reply_to_name']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($this->fileData['envelope_to'] as $sEmail) {
|
||||
if (strpos( $sEmail, '<' ) !== false) {
|
||||
preg_match( $this->longMailEreg, $sEmail, $matches );
|
||||
$sTo = trim( $matches[3] );
|
||||
$sToName = trim( $matches[1] );
|
||||
$oPHPMailer->AddAddress( $sTo, $sToName );
|
||||
} else {
|
||||
$oPHPMailer->AddAddress( $sEmail );
|
||||
|
||||
$msSubject = $this->fileData['subject'];
|
||||
|
||||
if (! (mb_detect_encoding( $msSubject, "UTF-8" ) == "UTF-8")) {
|
||||
$msSubject = utf8_encode( $msSubject );
|
||||
}
|
||||
}
|
||||
|
||||
//CC
|
||||
foreach ($this->fileData['envelope_cc'] as $sEmail) {
|
||||
if (strpos( $sEmail, '<' ) !== false) {
|
||||
preg_match( $this->longMailEreg, $sEmail, $matches );
|
||||
$sTo = trim( $matches[3] );
|
||||
$sToName = trim( $matches[1] );
|
||||
$oPHPMailer->AddCC( $sTo, $sToName );
|
||||
} else {
|
||||
$oPHPMailer->AddCC( $sEmail );
|
||||
|
||||
$oPHPMailer->Subject = $msSubject;
|
||||
|
||||
$msBody = $this->fileData['body'];
|
||||
|
||||
if (! (mb_detect_encoding( $msBody, "UTF-8" ) == "UTF-8")) {
|
||||
$msBody = utf8_encode( $msBody );
|
||||
}
|
||||
}
|
||||
|
||||
//BCC
|
||||
foreach ($this->fileData['envelope_bcc'] as $sEmail) {
|
||||
if (strpos( $sEmail, '<' ) !== false) {
|
||||
preg_match( $this->longMailEreg, $sEmail, $matches );
|
||||
$sTo = trim( $matches[3] );
|
||||
$sToName = trim( $matches[1] );
|
||||
$oPHPMailer->AddBCC( $sTo, $sToName );
|
||||
} else {
|
||||
$oPHPMailer->AddBCC( $sEmail );
|
||||
|
||||
$oPHPMailer->Body = $msBody;
|
||||
|
||||
$attachment = @unserialize($this->fileData['attachments']);
|
||||
if ($attachment === false) {
|
||||
$attachment = $this->fileData['attachments'];
|
||||
}
|
||||
}
|
||||
|
||||
$oPHPMailer->IsHTML($this->fileData["contentTypeIsHtml"]);
|
||||
|
||||
if ( $this->config['MESS_ENGINE'] == 'MAIL') {
|
||||
$oPHPMailer->WordWrap = 300;
|
||||
}
|
||||
|
||||
if ($oPHPMailer->Send()) {
|
||||
$this->error = '';
|
||||
$this->status = 'sent';
|
||||
} else {
|
||||
$this->error = $oPHPMailer->ErrorInfo;
|
||||
$this->status = 'failed';
|
||||
}
|
||||
break;
|
||||
case 'OPENMAIL':
|
||||
G::LoadClass( 'package' );
|
||||
G::LoadClass( 'smtp' );
|
||||
$pack = new package( $this->fileData );
|
||||
$header = $pack->returnHeader();
|
||||
$body = $pack->returnBody();
|
||||
$send = new smtp();
|
||||
$send->setServer( $this->config['MESS_SERVER'] );
|
||||
$send->setPort( $this->config['MESS_PORT'] );
|
||||
$send->setUsername( $this->config['MESS_ACCOUNT'] );
|
||||
|
||||
$passwd = $this->config['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 );
|
||||
if (is_array($attachment)) {
|
||||
foreach ($attachment as $key => $fileAttach) {
|
||||
if (file_exists( $fileAttach )) {
|
||||
$oPHPMailer->AddAttachment( $fileAttach, is_int( $key ) ? '' : $key );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->config['MESS_PASSWORD'] = $passwd;
|
||||
$send->setPassword( $this->config['MESS_PASSWORD'] );
|
||||
$send->setReturnPath( $this->fileData['from_email'] );
|
||||
$send->setHeaders( $header );
|
||||
$send->setBody( $body );
|
||||
$send->setEnvelopeTo( $this->fileData['envelope_to'] );
|
||||
if ($send->sendMessage()) {
|
||||
$this->error = '';
|
||||
$this->status = 'sent';
|
||||
} else {
|
||||
$this->error = implode( ', ', $send->returnErrors() );
|
||||
$this->status = 'failed';
|
||||
}
|
||||
break;
|
||||
|
||||
foreach ($this->fileData['envelope_to'] as $sEmail) {
|
||||
if (strpos( $sEmail, '<' ) !== false) {
|
||||
preg_match( $this->longMailEreg, $sEmail, $matches );
|
||||
$sTo = trim( $matches[3] );
|
||||
$sToName = trim( $matches[1] );
|
||||
$oPHPMailer->AddAddress( $sTo, $sToName );
|
||||
} else {
|
||||
$oPHPMailer->AddAddress( $sEmail );
|
||||
}
|
||||
}
|
||||
|
||||
//CC
|
||||
foreach ($this->fileData['envelope_cc'] as $sEmail) {
|
||||
if (strpos( $sEmail, '<' ) !== false) {
|
||||
preg_match( $this->longMailEreg, $sEmail, $matches );
|
||||
$sTo = trim( $matches[3] );
|
||||
$sToName = trim( $matches[1] );
|
||||
$oPHPMailer->AddCC( $sTo, $sToName );
|
||||
} else {
|
||||
$oPHPMailer->AddCC( $sEmail );
|
||||
}
|
||||
}
|
||||
|
||||
//BCC
|
||||
foreach ($this->fileData['envelope_bcc'] as $sEmail) {
|
||||
if (strpos( $sEmail, '<' ) !== false) {
|
||||
preg_match( $this->longMailEreg, $sEmail, $matches );
|
||||
$sTo = trim( $matches[3] );
|
||||
$sToName = trim( $matches[1] );
|
||||
$oPHPMailer->AddBCC( $sTo, $sToName );
|
||||
} else {
|
||||
$oPHPMailer->AddBCC( $sEmail );
|
||||
}
|
||||
}
|
||||
|
||||
$oPHPMailer->IsHTML($this->fileData["contentTypeIsHtml"]);
|
||||
|
||||
if ( $this->config['MESS_ENGINE'] == 'MAIL') {
|
||||
$oPHPMailer->WordWrap = 300;
|
||||
}
|
||||
|
||||
if ($oPHPMailer->Send()) {
|
||||
$this->error = '';
|
||||
$this->status = 'sent';
|
||||
} else {
|
||||
$this->error = $oPHPMailer->ErrorInfo;
|
||||
$this->status = 'failed';
|
||||
}
|
||||
break;
|
||||
case 'OPENMAIL':
|
||||
G::LoadClass( 'package' );
|
||||
G::LoadClass( 'smtp' );
|
||||
$pack = new package( $this->fileData );
|
||||
$header = $pack->returnHeader();
|
||||
$body = $pack->returnBody();
|
||||
$send = new smtp();
|
||||
$send->setServer( $this->config['MESS_SERVER'] );
|
||||
$send->setPort( $this->config['MESS_PORT'] );
|
||||
$send->setUsername( $this->config['MESS_ACCOUNT'] );
|
||||
|
||||
$passwd = $this->config['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 );
|
||||
}
|
||||
}
|
||||
|
||||
$this->config['MESS_PASSWORD'] = $passwd;
|
||||
$send->setPassword( $this->config['MESS_PASSWORD'] );
|
||||
$send->setReturnPath( $this->fileData['from_email'] );
|
||||
$send->setHeaders( $header );
|
||||
$send->setBody( $body );
|
||||
$send->setEnvelopeTo( $this->fileData['envelope_to'] );
|
||||
if ($send->sendMessage()) {
|
||||
$this->error = '';
|
||||
$this->status = 'sent';
|
||||
} else {
|
||||
$this->error = implode( ', ', $send->returnErrors() );
|
||||
$this->status = 'failed';
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -576,5 +576,30 @@ class AppDelegation extends BaseAppDelegation
|
||||
$data = $oRuleSet->getRow();
|
||||
return $data['TAS_UID'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Verify if the current case is already routed.
|
||||
*
|
||||
* @param string $AppUid the uid of the application
|
||||
* @return array $Fields the fields
|
||||
*/
|
||||
|
||||
public function alreadyRouted ($appUid, $sDelIndex)
|
||||
{
|
||||
$c = new Criteria("workflow");
|
||||
$c->clearSelectColumns();
|
||||
$c->addSelectColumn(AppDelegationPeer::APP_UID);
|
||||
$c->add(AppDelegationPeer::APP_UID, $appUid);
|
||||
$c->add(AppDelegationPeer::DEL_INDEX, $sDelIndex);
|
||||
$c->add(AppDelegationPeer::DEL_FINISH_DATE, null, Criteria::ISNOTNULL);
|
||||
$result = AppDelegationPeer::doSelectRS($c);
|
||||
$result->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
if($result->next()) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -42,14 +42,26 @@ G::LoadClass( 'case' );
|
||||
|
||||
$actionAjax = isset( $_REQUEST['actionAjax'] ) ? $_REQUEST['actionAjax'] : null;
|
||||
|
||||
function filterUserListArray($users = array(), $filter = '')
|
||||
{
|
||||
$filteredUsers = array();
|
||||
foreach ($users as $user) {
|
||||
if(stripos($user['USR_FULLNAME'], $filter) || empty($filter)) {
|
||||
$filteredUsers[] = $user;
|
||||
}
|
||||
}
|
||||
return $filteredUsers;
|
||||
}
|
||||
|
||||
if ($actionAjax == "userValues") {
|
||||
//global $oAppCache;
|
||||
$oAppCache = new AppCacheView();
|
||||
$action = isset( $_REQUEST['action'] ) ? $_REQUEST['action'] : null;
|
||||
$query = isset( $_REQUEST['query'] ) ? $_REQUEST['query'] : null;
|
||||
$users = array();
|
||||
$users[] = array ("USR_UID" => "", "USR_FULLNAME" => G::LoadTranslation( "ID_ALL_USERS" ));
|
||||
$users[] = array ("USR_UID" => "CURRENT_USER", "USR_FULLNAME" => G::LoadTranslation( "ID_CURRENT_USER" ));
|
||||
|
||||
$users = filterUserListArray($users, $query);
|
||||
//now get users, just for the Search action
|
||||
switch ($action) {
|
||||
case 'search_simple':
|
||||
@@ -67,6 +79,14 @@ if ($actionAjax == "userValues") {
|
||||
$cUsers->addSelectColumn(UsersPeer::USR_FIRSTNAME);
|
||||
$cUsers->addSelectColumn(UsersPeer::USR_LASTNAME);
|
||||
$cUsers->add( UsersPeer::USR_STATUS, 'CLOSED', Criteria::NOT_EQUAL );
|
||||
|
||||
if (!is_null($query)) {
|
||||
$filters = $cUsers->getNewCriterion( UsersPeer::USR_FIRSTNAME, '%'.$query.'%', Criteria::LIKE )->addOr(
|
||||
$cUsers->getNewCriterion( UsersPeer::USR_LASTNAME, '%'.$query.'%', Criteria::LIKE )->addOr(
|
||||
$cUsers->getNewCriterion( UsersPeer::USR_USERNAME, '%'.$query.'%', Criteria::LIKE )));
|
||||
$cUsers->addOr( $filters );
|
||||
}
|
||||
$cUsers->setLimit(20);
|
||||
$cUsers->addAscendingOrderByColumn(UsersPeer::TABLE_NAME . "." . $conf->userNameFormatGetFirstFieldByUsersTable());
|
||||
$oDataset = UsersPeer::doSelectRS( $cUsers );
|
||||
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||
@@ -453,7 +473,7 @@ if ($actionAjax == 'showDynaformListHistory') {
|
||||
var showDynaformHistoryGlobal = {};
|
||||
showDynaformHistoryGlobal.dynUID = '';
|
||||
showDynaformHistoryGlobal.tablename = '';
|
||||
showDynaformHistoryGlobal.dynDate = '';casesList_Ajax.php
|
||||
showDynaformHistoryGlobal.dynDate = '';
|
||||
showDynaformHistoryGlobal.dynTitle = '';
|
||||
function showDynaformHistory(dynUID,tablename,dynDate,dynTitle){
|
||||
showDynaformHistoryGlobal.dynUID = dynUID;
|
||||
|
||||
@@ -77,7 +77,11 @@ try {
|
||||
$aFields = $oCase->loadCase( $sAppUid, $iDelIndex );
|
||||
// g::pr($aFields);
|
||||
// die;
|
||||
|
||||
if (!isset($_SESSION['CURRENT_TASK'])) {
|
||||
$_SESSION['CURRENT_TASK'] = $aFields['TAS_UID'];
|
||||
} else if ($_SESSION['CURRENT_TASK'] == '') {
|
||||
$_SESSION['CURRENT_TASK'] = $aFields['TAS_UID'];
|
||||
}
|
||||
switch ($aFields['APP_STATUS']) {
|
||||
case 'DRAFT':
|
||||
case 'TO_DO':
|
||||
|
||||
@@ -1,4 +1,11 @@
|
||||
<?php
|
||||
require_once 'classes/model/AppDelegation.php';
|
||||
$delegation = new AppDelegation();
|
||||
if( $delegation->alreadyRouted($_SESSION['APPLICATION'],$_SESSION['INDEX']) ) {
|
||||
G::header('location: ../cases/casesListExtJs');
|
||||
die();
|
||||
}
|
||||
|
||||
if (!isset($_SESSION['USER_LOGGED'])) {
|
||||
G::SendTemporalMessage( 'ID_LOGIN_AGAIN', 'warning', 'labels' );
|
||||
die( '<script type="text/javascript">
|
||||
|
||||
@@ -62,6 +62,7 @@ foreach ($DEBUG_ERRORS as $error) {
|
||||
]}';
|
||||
|
||||
*/
|
||||
$triggersRet = new StdClass();
|
||||
$triggersRet->total = count( $triggersList );
|
||||
$triggersRet->data = $triggersList;
|
||||
echo G::json_encode( $triggersRet );
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
* @date Sept 13th, 2010
|
||||
*
|
||||
*/
|
||||
|
||||
G::LoadClass( "configuration" );
|
||||
|
||||
$request = isset( $_POST["request"] ) ? $_POST["request"] : (isset( $_GET["request"] ) ? $_GET["request"] : null);
|
||||
@@ -39,17 +38,27 @@ switch ($request) {
|
||||
if (is_numeric($config)) {
|
||||
$config = array();
|
||||
}
|
||||
$config['format'] = $_POST["userFormat"];
|
||||
$config['dateFormat'] = $_POST["dateFormat"];
|
||||
if (isset($_POST["userFormat"])) {
|
||||
$config['format'] = $_POST["userFormat"];
|
||||
}
|
||||
if (isset($_POST["dateFormat"])) {
|
||||
$config['dateFormat'] = $_POST["dateFormat"];
|
||||
}
|
||||
$config['startCaseHideProcessInf'] = ((isset( $_POST["hideProcessInf"] )) ? true : false);
|
||||
$config['casesListDateFormat'] = $_POST["casesListDateFormat"];
|
||||
$config['casesListRowNumber'] = intval( $_POST["casesListRowNumber"] );
|
||||
$config['casesListRefreshTime'] = intval( $_POST["txtCasesRefreshTime"]);
|
||||
if (isset($_POST["casesListDateFormat"])) {
|
||||
$config['casesListDateFormat'] = $_POST["casesListDateFormat"];
|
||||
}
|
||||
if (isset($_POST["casesListDateFormat"])) {
|
||||
$config['casesListRowNumber'] = intval( $_POST["casesListRowNumber"] );
|
||||
}
|
||||
if (isset($_POST["txtCasesRefreshTime"])) {
|
||||
$config['casesListRefreshTime'] = intval( $_POST["txtCasesRefreshTime"]);
|
||||
}
|
||||
|
||||
$conf->aConfig = $config;
|
||||
$conf->saveConfig( "ENVIRONMENT_SETTINGS", "" );
|
||||
|
||||
G::auditLog("UpdateEnvironmentSettings", "UserNameDisplayFormat -> ".$_POST["userFormat"].", GlobalDateFormat -> ".$_POST["dateFormat"].", HideProcessInformation -> ".(string)isset($_POST["hideProcessInf"]).", DateFormat -> ".$_POST["casesListDateFormat"].", NumberOfRowsPerPage -> ".$_POST["casesListRowNumber"].", RefreshTimeSeconds -> ".$_POST["txtCasesRefreshTime"]);
|
||||
G::auditLog("UpdateEnvironmentSettings", "UserNameDisplayFormat -> ".(isset($_POST["userFormat"]) ? $_POST["userFormat"] : '').", GlobalDateFormat -> ".(isset($_POST["dateFormat"]) ? $_POST["dateFormat"] : '').", HideProcessInformation -> ".(string)isset($_POST["hideProcessInf"]).", DateFormat -> ".(isset($_POST["casesListDateFormat"]) ? $_POST["casesListDateFormat"] : '').", NumberOfRowsPerPage -> ".(isset($_POST["casesListRowNumber"]) ? $_POST["casesListRowNumber"] : '').", RefreshTimeSeconds -> ".(isset($_POST["txtCasesRefreshTime"]) ? $_POST["txtCasesRefreshTime"] : ''));
|
||||
|
||||
$response = new stdclass();
|
||||
$response->success = true;
|
||||
|
||||
@@ -22,13 +22,13 @@
|
||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*/
|
||||
/*
|
||||
* dynaforms & documents for Case Tracker
|
||||
*
|
||||
* @author Everth S. Berrios Morales <everth@colosa.com>
|
||||
*
|
||||
/*
|
||||
* dynaforms & documents for Case Tracker
|
||||
*
|
||||
* @author Everth S. Berrios Morales <everth@colosa.com>
|
||||
*
|
||||
*/
|
||||
if (! isset( $_SESSION['PROCESS'] )) {
|
||||
if (! isset( $_SESSION['PROCESS'] ) || ! isset( $_SESSION['APPLICATION'] )) {
|
||||
G::header( 'location: login' );
|
||||
}
|
||||
$G_MAIN_MENU = 'caseTracker';
|
||||
|
||||
@@ -22,13 +22,13 @@
|
||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*/
|
||||
/*
|
||||
* Hystory case for Case Tracker
|
||||
*
|
||||
* @author Everth S. Berrios Morales <everth@colosa.com>
|
||||
*
|
||||
/*
|
||||
* Hystory case for Case Tracker
|
||||
*
|
||||
* @author Everth S. Berrios Morales <everth@colosa.com>
|
||||
*
|
||||
*/
|
||||
if (! isset( $_SESSION['PROCESS'] )) {
|
||||
if (! isset( $_SESSION['PROCESS'] ) || ! isset( $_SESSION['APPLICATION'] ) ) {
|
||||
G::header( 'location: login' );
|
||||
}
|
||||
|
||||
|
||||
@@ -22,13 +22,13 @@
|
||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*/
|
||||
/*
|
||||
* History messages for Case Tracker
|
||||
*
|
||||
* @author Everth S. Berrios Morales <everth@colosa.com>
|
||||
*
|
||||
/*
|
||||
* History messages for Case Tracker
|
||||
*
|
||||
* @author Everth S. Berrios Morales <everth@colosa.com>
|
||||
*
|
||||
*/
|
||||
if (! isset( $_SESSION['PROCESS'] )) {
|
||||
if (! isset( $_SESSION['PROCESS'] ) || ! isset( $_SESSION['APPLICATION'] )) {
|
||||
G::header( 'location: login' );
|
||||
}
|
||||
$G_MAIN_MENU = 'caseTracker';
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
*
|
||||
*/
|
||||
require_once 'classes/model/Process.php';
|
||||
if (! isset( $_SESSION['PROCESS'] )) {
|
||||
if (! isset( $_SESSION['PROCESS'] ) || ! isset( $_SESSION['APPLICATION'] )) {
|
||||
G::header( 'location: login' );
|
||||
}
|
||||
$G_MAIN_MENU = 'caseTracker';
|
||||
|
||||
@@ -81,7 +81,7 @@ foreach ($aInfoFunction as $k => $v) {
|
||||
$option = floatval($aDataTriggers[$sOptionTrigger]);
|
||||
break;
|
||||
default:
|
||||
$option = (is_numeric($aDataTriggers[$sOptionTrigger]) || is_bool($aDataTriggers[$sOptionTrigger]) ) ? trim($aDataTriggers[$sOptionTrigger]) : (strstr($aDataTriggers[$sOptionTrigger], "array")) ? trim($aDataTriggers[$sOptionTrigger]) : "'" . trim($aDataTriggers[$sOptionTrigger]) . "'";
|
||||
$option = (is_numeric($aDataTriggers[$sOptionTrigger]) || is_bool($aDataTriggers[$sOptionTrigger]) ) ? trim($aDataTriggers[$sOptionTrigger]) : (strstr($aDataTriggers[$sOptionTrigger], "'.array.'")) ? trim($aDataTriggers[$sOptionTrigger]) : "'" . trim($aDataTriggers[$sOptionTrigger]) . "'";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,7 +51,6 @@ function formatAMPM(date, initVal, calendarDate) {
|
||||
return strTime;
|
||||
}
|
||||
|
||||
|
||||
Ext.Ajax.timeout = 4 * 60 * 1000;
|
||||
|
||||
var caseSummary = function() {
|
||||
@@ -264,7 +263,6 @@ function pauseCase(date){
|
||||
items: [
|
||||
{
|
||||
html: '<div align="center" style="font: 14px tahoma,arial,helvetica,sans-serif">' + _('ID_PAUSE_CASE_TO_DATE') +' '+date.format('M j, Y')+'? </div> <br/>'
|
||||
|
||||
},
|
||||
new Ext.form.TimeField({
|
||||
id: 'unpauseTime',
|
||||
@@ -1153,44 +1151,45 @@ Ext.onReady ( function() {
|
||||
});
|
||||
|
||||
// ComboBox creation processValues
|
||||
var comboUser = new Ext.form.ComboBox({
|
||||
store : new Ext.data.Store( {
|
||||
proxy : new Ext.data.HttpProxy( {
|
||||
url : 'casesList_Ajax?actionAjax=userValues&action='+action,
|
||||
method : 'POST'
|
||||
}),
|
||||
reader : new Ext.data.JsonReader( {
|
||||
fields : [ {
|
||||
name : 'USR_UID'
|
||||
}, {
|
||||
name : 'USR_FULLNAME'
|
||||
} ]
|
||||
})
|
||||
}),
|
||||
var userStore = new Ext.data.Store( {
|
||||
proxy : new Ext.data.HttpProxy( {
|
||||
url : 'casesList_Ajax?actionAjax=userValues&action='+action,
|
||||
method : 'POST'
|
||||
}),
|
||||
reader : new Ext.data.JsonReader( {
|
||||
fields : [ {
|
||||
name : 'USR_UID'
|
||||
}, {
|
||||
name : 'USR_FULLNAME'
|
||||
} ]
|
||||
})
|
||||
});
|
||||
|
||||
var suggestUser = new Ext.form.ComboBox({
|
||||
store: userStore,
|
||||
valueField : 'USR_UID',
|
||||
displayField : 'USR_FULLNAME',
|
||||
triggerAction : 'all',
|
||||
displayField:'USR_FULLNAME',
|
||||
typeAhead: true,
|
||||
triggerAction: 'all',
|
||||
emptyText : _('ID_ALL_USERS'),
|
||||
selectOnFocus : true,
|
||||
editable : false,
|
||||
editable : true,
|
||||
width: 180,
|
||||
allowBlank : true,
|
||||
autocomplete: true,
|
||||
typeAhead: true,
|
||||
//allowBlankText : _('ID_SHOULD_SELECT_LANGUAGE_FROM_LIST'),
|
||||
hideTrigger:true,
|
||||
listeners:{
|
||||
scope: this,
|
||||
'select': function() {
|
||||
storeCases.setBaseParam("user", comboUser.store.getAt(0).get(comboUser.valueField));
|
||||
filterUser = comboUser.value;
|
||||
storeCases.setBaseParam( 'user', filterUser);
|
||||
storeCases.setBaseParam( 'start', 0);
|
||||
storeCases.setBaseParam( 'limit', pageSize);
|
||||
//storeCases.load();
|
||||
//storeCases.setBaseParam( 'user', comboUser.store.getAt(0).get(comboUser.valueField));
|
||||
filterUser = suggestUser.value;
|
||||
storeCases.setBaseParam( 'user', filterUser);
|
||||
storeCases.setBaseParam( 'start', 0);
|
||||
storeCases.setBaseParam( 'limit', pageSize);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
var textSearch = new Ext.form.TextField ({
|
||||
allowBlank: true,
|
||||
@@ -1864,7 +1863,8 @@ Ext.onReady ( function() {
|
||||
comboStatus,
|
||||
"-",
|
||||
_("ID_USER"),
|
||||
comboUser,
|
||||
//comboUser,
|
||||
suggestUser,
|
||||
' '
|
||||
//'-',
|
||||
//textSearch,
|
||||
|
||||
@@ -130,7 +130,6 @@
|
||||
}
|
||||
|
||||
function dynaformDelete ( uid,proUid ){
|
||||
|
||||
isokDependent = ajax_function('@G::encryptlink(@#dynaformsDelete)','getDynaformAssign','DYN_UID='+uid+'&PRO_UID='+proUid,'POST');
|
||||
if(isokDependent){
|
||||
msgBox(G_STRINGS.ID_DYNAFORM_ASSIGN,"alert");
|
||||
|
||||
@@ -43,12 +43,21 @@
|
||||
|
||||
}
|
||||
function stepDelete( uid, stepPos ){
|
||||
PROCESSMAP_STEP_EDIT = true;
|
||||
new leimnud.module.app.confirm().make({label:'@#CONFIRM',action:function(){
|
||||
ajax_function('@G::encryptlink(@#URL_STEP_DELETE)','','STEP_UID='+uid+'&TASK=@#TASK&STEP_POSITION='+stepPos,'POST');
|
||||
@#PAGED_TABLE_ID.refresh();
|
||||
}.extend(this)
|
||||
});
|
||||
PROCESSMAP_STEP_EDIT = true;
|
||||
|
||||
if (leimnud.browser.isIE) {
|
||||
new leimnud.module.app.confirm().make({label:'@#CONFIRM',width:450, height:110, action:function(){
|
||||
ajax_function('@G::encryptlink(@#URL_STEP_DELETE)','','STEP_UID='+uid+'&TASK=@#TASK&STEP_POSITION='+stepPos,'POST');
|
||||
@#PAGED_TABLE_ID.refresh();
|
||||
}.extend(this)
|
||||
});
|
||||
}else{
|
||||
new leimnud.module.app.confirm().make({label:'@#CONFIRM',action:function(){
|
||||
ajax_function('@G::encryptlink(@#URL_STEP_DELETE)','','STEP_UID='+uid+'&TASK=@#TASK&STEP_POSITION='+stepPos,'POST');
|
||||
@#PAGED_TABLE_ID.refresh();
|
||||
}.extend(this)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function externalStepEdit(stpUid, urlExternalStepEdit ){
|
||||
|
||||
Reference in New Issue
Block a user