CODE STYLE, workflow/engine/methods/setup/ PART 1
FILES: appCacheViewAjax.php appCacheViewConf.php appearance.php calendarDelete.php calendarEdit.php calendarList.php calendarSave.php calendarValidate.php calendar_Ajax.php clearCompiled.php clearCompiledAjax.php connectionDB.php connectionWS.php cron.php cronAjax.php customFunctions.php debug.php deleteSessions.php emailSystemCron.php emailSystemSpool.php emailSystemTest.php emails.php emails_Ajax.php emails_Save.php environmentSettings.php environmentSettingsAjax.php
This commit is contained in:
@@ -11,18 +11,15 @@
|
||||
|
||||
//check the language, if no info in config about language, the default is 'en'
|
||||
G::loadClass( 'configuration' );
|
||||
$oConf = new Configurations;
|
||||
$oConf = new Configurations();
|
||||
$oConf->loadConfig( $x, 'APP_CACHE_VIEW_ENGINE', '', '', '', '' );
|
||||
$appCacheViewEngine = $oConf->aConfig;
|
||||
|
||||
if (isset( $appCacheViewEngine['LANG'] )) {
|
||||
$lang = $appCacheViewEngine['LANG'];
|
||||
$status = strtoupper( $appCacheViewEngine['STATUS'] );
|
||||
}
|
||||
else {
|
||||
$confParams = Array(
|
||||
'LANG' => 'en',
|
||||
'STATUS'=> ''
|
||||
} else {
|
||||
$confParams = Array ('LANG' => 'en','STATUS' => ''
|
||||
);
|
||||
$oConf->aConfig = $confParams;
|
||||
$oConf->saveConfig( 'APP_CACHE_VIEW_ENGINE', '', '', '' );
|
||||
@@ -39,20 +36,23 @@
|
||||
$appCache->setPathToAppCacheFiles( PATH_METHODS . 'setup' . PATH_SEP . 'setupSchemas' . PATH_SEP );
|
||||
|
||||
$res = $appCache->getMySQLVersion();
|
||||
$result->info[] = array ('name' => 'MySQL Version', 'value'=> $res );
|
||||
$result->info[] = array ('name' => 'MySQL Version','value' => $res
|
||||
);
|
||||
|
||||
$res = $appCache->checkGrantsForUser( false );
|
||||
$currentUser = $res['user'];
|
||||
$currentUserIsSuper = $res['super'];
|
||||
$result->info[] = array ('name' => 'Current User', 'value'=> $currentUser );
|
||||
$result->info[] = array ('name' => 'Current User has SUPER privilege', 'value'=> $currentUserIsSuper );
|
||||
$result->info[] = array ('name' => 'Current User','value' => $currentUser
|
||||
);
|
||||
$result->info[] = array ('name' => 'Current User has SUPER privilege','value' => $currentUserIsSuper
|
||||
);
|
||||
|
||||
try {
|
||||
PROPEL::Init( PATH_METHODS . 'dbConnections/rootDbConnections.php' );
|
||||
$con = Propel::getConnection( "root" );
|
||||
}
|
||||
catch ( Exception $e ) {
|
||||
$result->info[] = array ('name' => 'Checking MySql Root user', 'value'=> 'failed' );
|
||||
} catch (Exception $e) {
|
||||
$result->info[] = array ('name' => 'Checking MySql Root user','value' => 'failed'
|
||||
);
|
||||
$result->error = true;
|
||||
$result->errorMsg = $e->getMessage();
|
||||
}
|
||||
@@ -61,18 +61,20 @@
|
||||
if (! $currentUserIsSuper && ! $result->error) {
|
||||
$res = $appCache->checkGrantsForUser( true );
|
||||
if (! isset( $res['error'] )) {
|
||||
$result->info[] = array ('name' => 'Root User', 'value'=> $res['user'] );
|
||||
$result->info[] = array ('name' => 'Root User has SUPER privilege', 'value'=> $res['super'] );
|
||||
}
|
||||
else {
|
||||
$result->info[] = array ('name' => 'Error', 'value'=> $res['msg'] );
|
||||
$result->info[] = array ('name' => 'Root User','value' => $res['user']
|
||||
);
|
||||
$result->info[] = array ('name' => 'Root User has SUPER privilege','value' => $res['super']
|
||||
);
|
||||
} else {
|
||||
$result->info[] = array ('name' => 'Error','value' => $res['msg']
|
||||
);
|
||||
}
|
||||
|
||||
$res = $appCache->setSuperForUser( $currentUser );
|
||||
if (! isset( $res['error'] )) {
|
||||
$result->info[] = array ('name' => 'Setting SUPER privilege', 'value'=> 'Successfully' );
|
||||
}
|
||||
else {
|
||||
$result->info[] = array ('name' => 'Setting SUPER privilege','value' => 'Successfully'
|
||||
);
|
||||
} else {
|
||||
$result->error = true;
|
||||
$result->errorMsg = $res['msg'];
|
||||
}
|
||||
@@ -82,37 +84,44 @@
|
||||
|
||||
//now check if table APPCACHEVIEW exists, and it have correct number of fields, etc.
|
||||
$res = $appCache->checkAppCacheView();
|
||||
$result->info[] = array ('name' => 'Table APP_CACHE_VIEW', 'value'=> $res['found']);
|
||||
$result->info[] = array ('name' => 'Table APP_CACHE_VIEW','value' => $res['found']
|
||||
);
|
||||
|
||||
$result->info[] = array ('name' => 'Rows in APP_CACHE_VIEW', 'value'=> $res['count']);
|
||||
$result->info[] = array ('name' => 'Rows in APP_CACHE_VIEW','value' => $res['count']
|
||||
);
|
||||
|
||||
//now check if we have the triggers installed
|
||||
//APP_DELEGATION INSERT
|
||||
$res = $appCache->triggerAppDelegationInsert( $lang, false );
|
||||
$result->info[] = array ('name' => 'Trigger APP_DELEGATION INSERT', 'value'=> $res);
|
||||
$result->info[] = array ('name' => 'Trigger APP_DELEGATION INSERT','value' => $res
|
||||
);
|
||||
|
||||
//APP_DELEGATION Update
|
||||
$res = $appCache->triggerAppDelegationUpdate( $lang, false );
|
||||
$result->info[] = array ('name' => 'Trigger APP_DELEGATION UPDATE', 'value'=> $res);
|
||||
$result->info[] = array ('name' => 'Trigger APP_DELEGATION UPDATE','value' => $res
|
||||
);
|
||||
|
||||
//APPLICATION UPDATE
|
||||
$res = $appCache->triggerApplicationUpdate( $lang, false );
|
||||
$result->info[] = array ('name' => 'Trigger APPLICATION UPDATE', 'value'=> $res);
|
||||
$result->info[] = array ('name' => 'Trigger APPLICATION UPDATE','value' => $res
|
||||
);
|
||||
|
||||
//APPLICATION DELETE
|
||||
$res = $appCache->triggerApplicationDelete( $lang, false );
|
||||
$result->info[] = array ('name' => 'Trigger APPLICATION DELETE', 'value'=> $res);
|
||||
$result->info[] = array ('name' => 'Trigger APPLICATION DELETE','value' => $res
|
||||
);
|
||||
|
||||
//CONTENT UPDATE
|
||||
$res = $appCache->triggerContentUpdate( $lang, false );
|
||||
$result->info[] = array("name" => "Trigger CONTENT UPDATE", "value" => $res);
|
||||
$result->info[] = array ("name" => "Trigger CONTENT UPDATE","value" => $res
|
||||
);
|
||||
|
||||
//show language
|
||||
$result->info[] = array ('name' => 'Language', 'value'=> $lang );
|
||||
$result->info[] = array ('name' => 'Language','value' => $lang
|
||||
);
|
||||
|
||||
echo G::json_encode( $result );
|
||||
break;
|
||||
|
||||
case 'getLangList':
|
||||
|
||||
$Translations = G::getModel( 'Translation' );
|
||||
@@ -121,16 +130,16 @@
|
||||
|
||||
$langs = $Translations->getTranslationEnvironments();
|
||||
foreach ($langs as $lang) {
|
||||
$result->rows[] = Array('LAN_ID'=>$lang['LOCALE'], 'LAN_NAME'=>$lang['LANGUAGE']);
|
||||
$result->rows[] = Array ('LAN_ID' => $lang['LOCALE'],'LAN_NAME' => $lang['LANGUAGE']
|
||||
);
|
||||
}
|
||||
|
||||
print (G::json_encode( $result )) ;
|
||||
break;
|
||||
|
||||
case 'build':
|
||||
$sqlToExe = Array ();
|
||||
G::LoadClass( 'configuration' );
|
||||
$conf = new Configurations;
|
||||
$conf = new Configurations();
|
||||
|
||||
//DEPRECATED $lang = $_POST['lang'];
|
||||
//there is no more support for other languages that english
|
||||
@@ -145,30 +154,34 @@
|
||||
$res = $appCache->triggerAppDelegationInsert( $lang, true );
|
||||
//$result->info[] = array ('name' => 'Trigger APP_DELEGATION INSERT', 'value'=> $res);
|
||||
|
||||
|
||||
//APP_DELEGATION Update
|
||||
$res = $appCache->triggerAppDelegationUpdate( $lang, true );
|
||||
//$result->info[] = array ('name' => 'Trigger APP_DELEGATION UPDATE', 'value'=> $res);
|
||||
|
||||
|
||||
//APPLICATION UPDATE
|
||||
$res = $appCache->triggerApplicationUpdate( $lang, true );
|
||||
//$result->info[] = array ('name' => 'Trigger APPLICATION UPDATE', 'value'=> $res);
|
||||
|
||||
|
||||
//APPLICATION DELETE
|
||||
$res = $appCache->triggerApplicationDelete( $lang, true );
|
||||
//$result->info[] = array ('name' => 'Trigger APPLICATION DELETE', 'value'=> $res);
|
||||
|
||||
|
||||
//CONTENT UPDATE
|
||||
$res = $appCache->triggerContentUpdate( $lang, true );
|
||||
//$result->info[] = array("name" => "Trigger CONTENT UPDATE", "value" => $res);
|
||||
|
||||
|
||||
//build using the method in AppCacheView Class
|
||||
$res = $appCache->fillAppCacheView( $lang );
|
||||
//$result->info[] = array ('name' => 'build APP_CACHE_VIEW', 'value'=> $res);
|
||||
|
||||
|
||||
//set status in config table
|
||||
$confParams = Array(
|
||||
'LANG' => $lang,
|
||||
'STATUS'=> 'active'
|
||||
$confParams = Array ('LANG' => $lang,'STATUS' => 'active'
|
||||
);
|
||||
$conf->aConfig = $confParams;
|
||||
$conf->saveConfig( 'APP_CACHE_VIEW_ENGINE', '', '', '' );
|
||||
@@ -179,11 +192,8 @@
|
||||
|
||||
echo G::json_encode( $result );
|
||||
|
||||
}
|
||||
catch (Exception $e) {
|
||||
$confParams = Array(
|
||||
'lang'=>$lang,
|
||||
'status'=> 'failed'
|
||||
} catch (Exception $e) {
|
||||
$confParams = Array ('lang' => $lang,'status' => 'failed'
|
||||
);
|
||||
$appCacheViewEngine = $oServerConf->setProperty( 'APP_CACHE_VIEW_ENGINE', $confParams );
|
||||
|
||||
@@ -216,4 +226,3 @@
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,36 +2,38 @@
|
||||
// header('Pragma: no-cache');
|
||||
// header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||
|
||||
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
//$oHeadPublisher->setExtSkin( 'xtheme-blue');
|
||||
|
||||
|
||||
$oHeadPublisher->addExtJsScript( 'setup/appCacheViewConf', false ); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent( 'setup/appCacheViewConf' ); //adding a html file .html.
|
||||
|
||||
|
||||
require_once ('classes/model/AppCacheView.php');
|
||||
G::loadClass( 'configuration' );
|
||||
$oConf = new Configurations;
|
||||
$oConf = new Configurations();
|
||||
$oConf->loadConfig( $x, 'APP_CACHE_VIEW_ENGINE', '', '', '', '' );
|
||||
|
||||
//first check about APP_CACHE_VIEW is enabled or not,
|
||||
if (isset( $oConf->aConfig['LANG'] ) && isset( $oConf->aConfig['STATUS'] ) && $oConf->aConfig['STATUS'] == 'active') {
|
||||
$appCacheViewEnabled = true;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$appCacheViewEnabled = false;
|
||||
}
|
||||
$lang = isset( $oConf->aConfig['LANG'] ) ? $oConf->aConfig['LANG'] : 'en';
|
||||
|
||||
//$oHeadPublisher->assign('appCacheViewEnabled', $appCacheViewEnabled);
|
||||
|
||||
$labels = G::getTranslations(Array(
|
||||
'ID_PROCESSING', 'ID_CACHE_LANGUAGE', 'ID_CACHE_HOST', 'ID_CACHE_USER', 'ID_CACHE_PASSWORD',
|
||||
'ID_CACHE_TITLE_INFO', 'ID_CACHE_SUBTITLE_REBUILD', 'ID_CACHE_BTN_BUILD',
|
||||
'ID_CACHE_BUILDING', 'ID_CACHE_SUBTITLE_SETUP_DB', 'ID_CACHE_BTN_SETUP_PASSWRD', 'ID_CACHE_SUBTITLE_SETUP_SESSION', 'ID_CACHE_BTN_SETUP_SESSION'
|
||||
|
||||
$labels = G::getTranslations( Array ('ID_PROCESSING','ID_CACHE_LANGUAGE','ID_CACHE_HOST','ID_CACHE_USER','ID_CACHE_PASSWORD','ID_CACHE_TITLE_INFO','ID_CACHE_SUBTITLE_REBUILD','ID_CACHE_BTN_BUILD','ID_CACHE_BUILDING','ID_CACHE_SUBTITLE_SETUP_DB','ID_CACHE_BTN_SETUP_PASSWRD','ID_CACHE_SUBTITLE_SETUP_SESSION','ID_CACHE_BTN_SETUP_SESSION'
|
||||
) );
|
||||
// $oHeadPublisher->assign('TRANSLATIONS', $labels);
|
||||
// $TRANSLATIONS->ID_PROCESSING = G::LoadTranslation('ID_PROCESSING');
|
||||
// $oHeadPublisher->assign( 'TRANSLATIONS', $TRANSLATIONS); //translations
|
||||
$oHeadPublisher->assign( 'currentLang', $lang ); //current language
|
||||
|
||||
|
||||
G::RenderPage( 'publish', 'extJs' );
|
||||
|
||||
|
||||
@@ -20,14 +20,14 @@
|
||||
*
|
||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*
|
||||
*/
|
||||
if (($RBAC_Response=$RBAC->userCanAccess("PM_SETUP"))!=1) return $RBAC_Response;
|
||||
if (($RBAC_Response = $RBAC->userCanAccess( "PM_SETUP" )) != 1)
|
||||
return $RBAC_Response;
|
||||
$G_ENABLE_BLANK_SKIN = true;
|
||||
|
||||
$dbc = new DBConnection;
|
||||
$dbc = new DBConnection();
|
||||
|
||||
$G_PUBLISH = new Publisher;
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent( "content", "setup/company_template" );
|
||||
G::RenderPage( 'publish' );
|
||||
?>company logo
|
||||
@@ -39,7 +39,10 @@ function myOnLoad()
|
||||
{
|
||||
<?php if ($var == 'change') { ?>
|
||||
location.reload();
|
||||
<?php } ?>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
@@ -3,16 +3,14 @@
|
||||
|
||||
$CalendarUid = $_GET['id'];
|
||||
|
||||
|
||||
G::LoadClass( 'calendar' );
|
||||
$calendarObj = new calendar();
|
||||
$calendarObj->deleteCalendar( $CalendarUid );
|
||||
|
||||
G::Header( 'location: calendarList' );
|
||||
|
||||
}
|
||||
catch ( Exception $e ) {
|
||||
$G_PUBLISH = new Publisher;
|
||||
} catch (Exception $e) {
|
||||
$G_PUBLISH = new Publisher();
|
||||
$aMessage['MESSAGE'] = $e->getMessage();
|
||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'login/showMessage', '', $aMessage );
|
||||
G::RenderPage( 'publish', 'blank' );
|
||||
|
||||
@@ -20,12 +20,11 @@
|
||||
*
|
||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*
|
||||
*/
|
||||
if ($RBAC->userCanAccess( 'PM_SETUP' ) != 1 && $RBAC->userCanAccess( 'PM_SETUP_ADVANCE' ) != 1) {
|
||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
||||
//G::header('location: ../login/login');
|
||||
die;
|
||||
die();
|
||||
}
|
||||
|
||||
$G_MAIN_MENU = 'processmaker';
|
||||
@@ -57,4 +56,4 @@ if ((isset ( $_GET ['cp'] )) && ($_GET ['cp'] == 1)) { // Copy Calendar
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'setup/calendarEdit', '', $fields, 'calendarSave' );
|
||||
G::RenderPage( 'publishBlank', 'blank' );
|
||||
?>
|
||||
|
||||
|
||||
@@ -20,13 +20,12 @@
|
||||
*
|
||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*
|
||||
*/
|
||||
|
||||
if ($RBAC->userCanAccess( 'PM_SETUP' ) != 1 && $RBAC->userCanAccess( 'PM_SETUP_ADVANCE' ) != 1) {
|
||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
||||
//G::header('location: ../login/login');
|
||||
die;
|
||||
die();
|
||||
}
|
||||
|
||||
$G_MAIN_MENU = 'processmaker';
|
||||
@@ -34,7 +33,7 @@ $G_SUB_MENU = 'setup';
|
||||
$G_ID_MENU_SELECTED = 'SETUP';
|
||||
$G_ID_SUB_MENU_SELECTED = 'CALENDAR';
|
||||
|
||||
$G_PUBLISH = new Publisher;
|
||||
$G_PUBLISH = new Publisher();
|
||||
|
||||
G::LoadClass( 'configuration' );
|
||||
$c = new Configurations();
|
||||
@@ -48,4 +47,3 @@ $oHeadPublisher->assign('CONFIG', $Config);
|
||||
|
||||
G::RenderPage( 'publish', 'extJs' );
|
||||
|
||||
?>
|
||||
@@ -20,19 +20,17 @@
|
||||
*
|
||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*
|
||||
*/
|
||||
switch ($RBAC->userCanAccess('PM_SETUP_ADVANCE'))
|
||||
{
|
||||
switch ($RBAC->userCanAccess( 'PM_SETUP_ADVANCE' )) {
|
||||
case - 2:
|
||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
|
||||
G::header( 'location: ../login/login' );
|
||||
die;
|
||||
die();
|
||||
break;
|
||||
case - 1:
|
||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
||||
G::header( 'location: ../login/login' );
|
||||
die;
|
||||
die();
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -45,10 +43,10 @@ switch ($RBAC->userCanAccess('PM_SETUP_ADVANCE'))
|
||||
|
||||
G::Header( 'location: calendarList' );
|
||||
|
||||
}
|
||||
catch ( Exception $e ) {
|
||||
$G_PUBLISH = new Publisher;
|
||||
} catch (Exception $e) {
|
||||
$G_PUBLISH = new Publisher();
|
||||
$aMessage['MESSAGE'] = $e->getMessage();
|
||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'login/showMessage', '', $aMessage );
|
||||
G::RenderPage( 'publish', 'blank' );
|
||||
}
|
||||
|
||||
|
||||
@@ -20,21 +20,19 @@
|
||||
*
|
||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*
|
||||
*/
|
||||
// validating the fields of the Calendar Edit form.
|
||||
// checking permissions
|
||||
switch ($RBAC->userCanAccess('PM_SETUP_ADVANCE'))
|
||||
{
|
||||
switch ($RBAC->userCanAccess( 'PM_SETUP_ADVANCE' )) {
|
||||
case - 2:
|
||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
|
||||
G::header( 'location: ../login/login' );
|
||||
die;
|
||||
die();
|
||||
break;
|
||||
case - 1:
|
||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
||||
G::header( 'location: ../login/login' );
|
||||
die;
|
||||
die();
|
||||
break;
|
||||
}
|
||||
// validating the fields
|
||||
|
||||
@@ -20,17 +20,15 @@
|
||||
*
|
||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*
|
||||
*/
|
||||
if ($RBAC->userCanAccess( 'PM_SETUP' ) != 1 && $RBAC->userCanAccess( 'PM_SETUP_ADVANCE' ) != 1) {
|
||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
||||
//G::header('location: ../login/login');
|
||||
die;
|
||||
die();
|
||||
}
|
||||
$_POST['action'] = $_REQUEST['action'];
|
||||
|
||||
switch ($_POST['action'])
|
||||
{
|
||||
switch ($_POST['action']) {
|
||||
case 'calendarList':
|
||||
G::LoadClass( 'configuration' );
|
||||
G::LoadClass( 'calendar' );
|
||||
@@ -99,4 +97,4 @@ switch ($_POST['action'])
|
||||
echo '{success: true}';
|
||||
break;
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
@@ -20,10 +20,11 @@
|
||||
*
|
||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*
|
||||
*/
|
||||
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$oHeadPublisher->addExtJsScript( 'setup/clearCompiled', true ); //adding a javascript file .js
|
||||
|
||||
|
||||
G::RenderPage( 'publish', 'extJs' );
|
||||
|
||||
|
||||
@@ -18,13 +18,12 @@ try {
|
||||
}
|
||||
|
||||
$response->success = true;
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
$response->success = false;
|
||||
}
|
||||
}
|
||||
catch (Exception $e) {
|
||||
} catch (Exception $e) {
|
||||
$response->success = false;
|
||||
$response->message = $e->getMessage();
|
||||
}
|
||||
echo G::json_encode( $response );
|
||||
|
||||
|
||||
@@ -20,13 +20,13 @@
|
||||
*
|
||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*
|
||||
*/
|
||||
if (($RBAC_Response=$RBAC->userCanAccess("PM_SETUP"))!=1) return $RBAC_Response;
|
||||
if (($RBAC_Response = $RBAC->userCanAccess( "PM_SETUP" )) != 1)
|
||||
return $RBAC_Response;
|
||||
$G_ENABLE_BLANK_SKIN = true;
|
||||
|
||||
$dbc = new DBConnection;
|
||||
$G_PUBLISH = new Publisher;
|
||||
$dbc = new DBConnection();
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent( "xmlform", "pagedTable", "setup/connection_db", "", "", "" );
|
||||
G::RenderPage( 'publish' );
|
||||
?>
|
||||
|
||||
|
||||
@@ -20,13 +20,13 @@
|
||||
*
|
||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*
|
||||
*/
|
||||
if (($RBAC_Response=$RBAC->userCanAccess("PM_SETUP"))!=1) return $RBAC_Response;
|
||||
if (($RBAC_Response = $RBAC->userCanAccess( "PM_SETUP" )) != 1)
|
||||
return $RBAC_Response;
|
||||
$G_ENABLE_BLANK_SKIN = true;
|
||||
|
||||
$dbc = new DBConnection;
|
||||
$G_PUBLISH = new Publisher;
|
||||
$dbc = new DBConnection();
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent( "xmlform", "pagedTable", "setup/connection_ws", "", "", "" );
|
||||
G::RenderPage( 'publish' );
|
||||
?>
|
||||
|
||||
|
||||
@@ -5,10 +5,6 @@ G::LoadClass("configuration");
|
||||
|
||||
global $RBAC;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if ($RBAC->userCanAccess( "PM_SETUP_ADVANCE" ) != 1) {
|
||||
G::SendTemporalMessage( "ID_USER_HAVENT_RIGHTS_PAGE", "error", "labels" );
|
||||
exit( 0 );
|
||||
@@ -52,7 +48,6 @@ $cronInfo["fileLogName"] = "cron.log";
|
||||
$cronInfo["fileLogSize"] = $fileLogSize;
|
||||
$cronInfo["fileLogPath"] = $fileLog;
|
||||
|
||||
|
||||
//Workspaces
|
||||
$workspaces = System::listWorkspaces();
|
||||
$arrayAux = array ();
|
||||
@@ -66,16 +61,18 @@ sort($arrayAux);
|
||||
$arrayWorkspace = array ();
|
||||
|
||||
foreach ($arrayAux as $index => $value) {
|
||||
$arrayWorkspace[] = array($value, $value);
|
||||
$arrayWorkspace[] = array ($value,$value
|
||||
);
|
||||
}
|
||||
|
||||
array_unshift($arrayWorkspace, array("ALL", G::LoadTranslation("ID_ALL_WORKSPACES")));
|
||||
array_unshift( $arrayWorkspace, array ("ALL",G::LoadTranslation( "ID_ALL_WORKSPACES" )
|
||||
) );
|
||||
|
||||
//Status
|
||||
$arrayStatus = array(
|
||||
array("ALL", G::LoadTranslation("ID_ALL")),
|
||||
array("COMPLETED", G::LoadTranslation("COMPLETED")),
|
||||
array("FAILED", G::LoadTranslation("ID_FAILED"))
|
||||
$arrayStatus = array (array ("ALL",G::LoadTranslation( "ID_ALL" )
|
||||
),array ("COMPLETED",G::LoadTranslation( "COMPLETED" )
|
||||
),array ("FAILED",G::LoadTranslation( "ID_FAILED" )
|
||||
)
|
||||
);
|
||||
|
||||
$oHeadPublisher = &headPublisher::getSingleton();
|
||||
|
||||
@@ -1,16 +1,10 @@
|
||||
<?php
|
||||
|
||||
function mktimeDate ($date)
|
||||
{
|
||||
$arrayAux = getdate( strtotime( $date ) );
|
||||
|
||||
$mktDate = mktime(
|
||||
$arrayAux["hours"],
|
||||
$arrayAux["minutes"],
|
||||
$arrayAux["seconds"],
|
||||
$arrayAux["mon"],
|
||||
$arrayAux["mday"],
|
||||
$arrayAux["year"]
|
||||
);
|
||||
$mktDate = mktime( $arrayAux["hours"], $arrayAux["minutes"], $arrayAux["seconds"], $arrayAux["mon"], $arrayAux["mday"], $arrayAux["year"] );
|
||||
|
||||
return $mktDate;
|
||||
}
|
||||
@@ -72,12 +66,7 @@ function cronArraySet($str, $filter)
|
||||
$arrayData = array ();
|
||||
|
||||
if ($sw == 1) {
|
||||
$arrayData = array(
|
||||
"DATE" => $date,
|
||||
"WORKSPACE" => $workspace,
|
||||
"ACTION" => $action,
|
||||
"STATUS" => $status,
|
||||
"DESCRIPTION" => $description
|
||||
$arrayData = array ("DATE" => $date,"WORKSPACE" => $workspace,"ACTION" => $action,"STATUS" => $status,"DESCRIPTION" => $description
|
||||
);
|
||||
}
|
||||
|
||||
@@ -154,13 +143,10 @@ function cronDataGet($filter, $r, $i)
|
||||
$arrayAux = array_pop( $arrayData );
|
||||
}
|
||||
|
||||
return array($numRec, $arrayData);
|
||||
return array ($numRec,$arrayData
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$option = (isset( $_REQUEST["option"] )) ? $_REQUEST["option"] : null;
|
||||
|
||||
$response = array ();
|
||||
@@ -173,11 +159,7 @@ switch ($option) {
|
||||
$dateFrom = $_REQUEST["dateFrom"];
|
||||
$dateTo = $_REQUEST["dateTo"];
|
||||
|
||||
$arrayFilter = array(
|
||||
"workspace" => $workspace,
|
||||
"status" => $status,
|
||||
"dateFrom" => str_replace("T00:00:00", null, $dateFrom),
|
||||
"dateTo" => str_replace("T00:00:00", null, $dateTo)
|
||||
$arrayFilter = array ("workspace" => $workspace,"status" => $status,"dateFrom" => str_replace( "T00:00:00", null, $dateFrom ),"dateTo" => str_replace( "T00:00:00", null, $dateTo )
|
||||
);
|
||||
|
||||
$limit = isset( $_REQUEST["limit"] ) ? $_REQUEST["limit"] : $pageSize;
|
||||
@@ -185,9 +167,9 @@ switch ($option) {
|
||||
|
||||
list ($numRec, $data) = cronDataGet( $arrayFilter, $limit, $start );
|
||||
|
||||
$response = array("success" => true, "resultTotal" => $numRec, "resultRoot" => $data);
|
||||
$response = array ("success" => true,"resultTotal" => $numRec,"resultRoot" => $data
|
||||
);
|
||||
break;
|
||||
|
||||
case "EMPTY":
|
||||
$status = 1;
|
||||
|
||||
|
||||
@@ -20,14 +20,14 @@
|
||||
*
|
||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*
|
||||
*/
|
||||
if (($RBAC_Response=$RBAC->userCanAccess("PM_SETUP"))!=1) return $RBAC_Response;
|
||||
if (($RBAC_Response = $RBAC->userCanAccess( "PM_SETUP" )) != 1)
|
||||
return $RBAC_Response;
|
||||
$G_ENABLE_BLANK_SKIN = true;
|
||||
|
||||
$dbc = new DBConnection;
|
||||
$dbc = new DBConnection();
|
||||
|
||||
$G_PUBLISH = new Publisher;
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent( 'table', 'paged-table2', 'setup/Custom_Functions', '', '', '' );
|
||||
G::RenderPage( 'publish-treeview' );
|
||||
?>
|
||||
|
||||
|
||||
@@ -20,13 +20,13 @@
|
||||
*
|
||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*
|
||||
*/
|
||||
if (($RBAC_Response=$RBAC->userCanAccess("PM_SETUP"))!=1) return $RBAC_Response;
|
||||
if (($RBAC_Response = $RBAC->userCanAccess( "PM_SETUP" )) != 1)
|
||||
return $RBAC_Response;
|
||||
$G_ENABLE_BLANK_SKIN = true;
|
||||
|
||||
$dbc = new DBConnection;
|
||||
$G_PUBLISH = new Publisher;
|
||||
$dbc = new DBConnection();
|
||||
$G_PUBLISH = new Publisher();
|
||||
|
||||
G::LoadClass( 'lexico' );
|
||||
$lex = new Lexico( $dbc );
|
||||
@@ -37,4 +37,3 @@ if (($RBAC_Response=$RBAC->userCanAccess("PM_SETUP"))!=1) return $RBAC_Response;
|
||||
|
||||
G::RenderPage( 'publish-treeview' );
|
||||
|
||||
?>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<?php
|
||||
function getAllFiles($directory, $recursive = true ) {
|
||||
|
||||
function getAllFiles ($directory, $recursive = true)
|
||||
{
|
||||
$result = array ();
|
||||
$handle = opendir( $directory );
|
||||
while ($datei = readdir($handle))
|
||||
{
|
||||
if (($datei != '.') && ($datei != '..'))
|
||||
{
|
||||
while ($datei = readdir( $handle )) {
|
||||
if (($datei != '.') && ($datei != '..')) {
|
||||
$file = $directory . $datei;
|
||||
if (is_dir( $file )) {
|
||||
if ($recursive) {
|
||||
@@ -20,7 +20,8 @@ function getAllFiles($directory, $recursive = true ) {
|
||||
return $result;
|
||||
}
|
||||
|
||||
function getFilesTimestamp($directory, $recursive = true) {
|
||||
function getFilesTimestamp ($directory, $recursive = true)
|
||||
{
|
||||
$allFiles = getAllFiles( $directory, $recursive );
|
||||
$fileArray = array ();
|
||||
foreach ($allFiles as $val) {
|
||||
@@ -52,4 +53,4 @@ if ($count>0) {
|
||||
}
|
||||
|
||||
echo $response['message'];
|
||||
?>
|
||||
|
||||
|
||||
@@ -20,14 +20,12 @@
|
||||
*
|
||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*
|
||||
*/
|
||||
$G_MAIN_MENU = 'processmaker';
|
||||
$G_SUB_MENU = 'setup';
|
||||
$G_ID_MENU_SELECTED = 'SETUP';
|
||||
$G_ID_SUB_MENU_SELECTED = 'MAILSYSTEM';
|
||||
|
||||
|
||||
G::LoadClass( 'package' );
|
||||
G::LoadClass( 'smtp' );
|
||||
G::LoadClass( 'spool' );
|
||||
@@ -37,7 +35,7 @@ $G_ID_SUB_MENU_SELECTED = 'MAILSYSTEM';
|
||||
|
||||
$Fields['MESSAGE'] = 'Hello world, this is my first email ... ';
|
||||
|
||||
|
||||
$G_PUBLISH = new Publisher;
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'login/showMessage', '', $Fields, '' );
|
||||
G::RenderPage( 'publish' );
|
||||
|
||||
|
||||
@@ -12,14 +12,12 @@
|
||||
* @category web_mail
|
||||
* @subpackage spool
|
||||
* @filesource
|
||||
* @version
|
||||
*
|
||||
* @file tom_spool.php
|
||||
* @version @file tom_spool.php
|
||||
*
|
||||
*/
|
||||
|
||||
if( isset ( $_POST['form']) )
|
||||
{
|
||||
if (isset( $_POST['form'] )) {
|
||||
$frm = "{$_POST['form']}";
|
||||
|
||||
G::LoadClass( 'insert' );
|
||||
@@ -40,7 +38,8 @@
|
||||
$db_spool['app_msg_template'] = "/path/to/template";
|
||||
$db_spool['app_msg_status'] = "pending";
|
||||
|
||||
$db_spool['app_msg_attach'] = serialize(array('attachment_1','attachment_2'));
|
||||
$db_spool['app_msg_attach'] = serialize( array ('attachment_1','attachment_2'
|
||||
) );
|
||||
|
||||
/*
|
||||
if(isset($frm['attachments']) && count($frm['attachments']) >0 )
|
||||
@@ -48,9 +47,7 @@
|
||||
foreach($frm['attachments'] as $attchment)
|
||||
{
|
||||
$db_spool['app_msg_attach'][] = "$attchment";
|
||||
|
||||
}
|
||||
|
||||
}*/
|
||||
|
||||
$insert = new insert( $db_spool );
|
||||
@@ -60,9 +57,7 @@
|
||||
}
|
||||
|
||||
$Fields['MESSAGE'] = $status;
|
||||
$G_PUBLISH = new Publisher;
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'login/showMessage', '', $Fields, 'emailSystemSpool' );
|
||||
G::RenderPage( 'publish' );
|
||||
|
||||
|
||||
?>
|
||||
|
||||
@@ -20,20 +20,18 @@
|
||||
*
|
||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*
|
||||
*/
|
||||
global $RBAC;
|
||||
switch ($RBAC->userCanAccess('PM_FACTORY'))
|
||||
{
|
||||
switch ($RBAC->userCanAccess( 'PM_FACTORY' )) {
|
||||
case - 2:
|
||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
|
||||
G::header( 'location: ../login/login' );
|
||||
die;
|
||||
die();
|
||||
break;
|
||||
case - 1:
|
||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
||||
G::header( 'location: ../login/login' );
|
||||
die;
|
||||
die();
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -49,7 +47,7 @@ $Fields['from_email'] = 'ian@colosa.com';
|
||||
$Fields['subject'] = 'Test email';
|
||||
$Fields['body'] = 'Hello world, this is my first email ... ';
|
||||
|
||||
|
||||
$G_PUBLISH = new Publisher;
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'setup/emailSetupTest', '', $Fields, 'emailSystemSpool' );
|
||||
G::RenderPage( 'publish' );
|
||||
|
||||
|
||||
@@ -20,14 +20,13 @@
|
||||
*
|
||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*
|
||||
*/
|
||||
|
||||
global $RBAC;
|
||||
if ($RBAC->userCanAccess( 'PM_SETUP' ) != 1 && $RBAC->userCanAccess( 'PM_FACTORY' ) != 1) {
|
||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
||||
//G::header('location: ../login/login');
|
||||
die;
|
||||
die();
|
||||
}
|
||||
|
||||
$G_MAIN_MENU = 'processmaker';
|
||||
@@ -46,36 +45,40 @@ $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' => '', 'MESS_RAUTH' => ''));
|
||||
$oConfiguration->create( array ('CFG_UID' => 'Emails','OBJ_UID' => '','CFG_VALUE' => '','PRO_UID' => '','USR_UID' => '','APP_UID' => '','MESS_RAUTH' => ''
|
||||
) );
|
||||
$aFields = array ();
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$aFields = $oConfiguration->load( 'Emails', '', '', '', '' );
|
||||
if (trim( $aFields['CFG_VALUE'] ) != '') {
|
||||
$aFields = unserialize( $aFields['CFG_VALUE'] );
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$aFields = array ();
|
||||
}
|
||||
}
|
||||
|
||||
$aFields['SMTPSecure'] = (isset( $aFields['SMTPSecure'] ) && $aFields['SMTPSecure'] != '') ? $aFields['SMTPSecure'] : 'none';
|
||||
|
||||
$rows[] = array ( 'uid' => 'char', 'name' => 'char', 'age' => 'integer', 'balance' => 'float' );
|
||||
$rows[] = array ( 'uid' => 'PHPMAILER', 'name' => 'SMTP (PHPMailer)' );
|
||||
$rows[] = array ('uid' => 'char','name' => 'char','age' => 'integer','balance' => 'float'
|
||||
);
|
||||
$rows[] = array ('uid' => 'PHPMAILER','name' => 'SMTP (PHPMailer)'
|
||||
);
|
||||
// ending OpenMail support
|
||||
// $rows[] = array ( 'uid' => 'OPENMAIL', 'name' => 'SMTP (OpenMail)' );
|
||||
$rows[] = array ( 'uid' => 'MAIL', 'name' => 'Mail (PHP)' );
|
||||
$rows[] = array ('uid' => 'MAIL','name' => 'Mail (PHP)'
|
||||
);
|
||||
|
||||
$_DBArray['mails'] = $rows;
|
||||
$_SESSION['_DBArray'] = $_DBArray;
|
||||
|
||||
$trn = G::getTranslations(Array('ID_SUCESS', 'ID_FAIL', ''));
|
||||
$trn = G::getTranslations( Array ('ID_SUCESS','ID_FAIL',''
|
||||
) );
|
||||
|
||||
$G_PUBLISH = new Publisher;
|
||||
$G_PUBLISH = new Publisher();
|
||||
$oHeadPublisher = headPublisher::getSingleton();
|
||||
$oHeadPublisher->addScriptCode( 'var TRANSLATIONS=' . G::json_encode( $trn ) . ';' );
|
||||
$oHeadPublisher->addScriptFile( '/jscore/setup/emails.js' );
|
||||
|
||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'setup/emails', '', $aFields, 'emails_Save' );
|
||||
G::RenderPage( 'publishBlank', 'blank' );
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
*
|
||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*
|
||||
*/
|
||||
|
||||
global $RBAC;
|
||||
@@ -30,11 +29,10 @@ $request = (isset($_POST['action']))?$_POST['action']:$_POST['request'];
|
||||
|
||||
switch ($request) {
|
||||
case 'init':
|
||||
$G_PUBLISH = new Publisher;
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent( 'view', 'setup/mailConnectiontest' );
|
||||
G::RenderPage( 'publish', 'raw' );
|
||||
break;
|
||||
|
||||
case 'mailTestMail_Show':
|
||||
define( "SUCCESSFUL", 'SUCCESSFUL' );
|
||||
define( "FAILED", 'FAILED' );
|
||||
@@ -56,9 +54,7 @@ switch ($request) {
|
||||
print (FAILED . ',' . $resp->msg) ;
|
||||
}
|
||||
break;
|
||||
|
||||
case 'testConnection':
|
||||
|
||||
G::LoadClass( 'net' );
|
||||
G::LoadThirdParty( 'phpmailer', 'class.smtp' );
|
||||
|
||||
@@ -92,7 +88,7 @@ switch ($request) {
|
||||
$timeout = 10;
|
||||
|
||||
$Server = new NET( $srv );
|
||||
$smtp = new SMTP;
|
||||
$smtp = new SMTP();
|
||||
|
||||
switch ($step) {
|
||||
case 1:
|
||||
@@ -102,7 +98,6 @@ switch ($request) {
|
||||
print (FAILED . ',' . $Server->error) ;
|
||||
}
|
||||
break;
|
||||
|
||||
case 2:
|
||||
if ($port == 0) {
|
||||
$port = $smtp->SMTP_PORT;
|
||||
@@ -114,7 +109,6 @@ switch ($request) {
|
||||
print (FAILED . ',' . $Server->error) ;
|
||||
}
|
||||
break;
|
||||
|
||||
#try to connect to host
|
||||
case 3:
|
||||
$hostinfo = array ();
|
||||
@@ -135,11 +129,8 @@ switch ($request) {
|
||||
} else {
|
||||
print (FAILED . ',' . $smtp->error['error']) ;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
#try login to host
|
||||
|
||||
case 4:
|
||||
if ($auth_required == 'yes') {
|
||||
try {
|
||||
@@ -186,7 +177,6 @@ switch ($request) {
|
||||
print (SUCCESSFUL . ', No authentication required!') ;
|
||||
}
|
||||
break;
|
||||
|
||||
case 5:
|
||||
if ($send_test_mail == 'yes') {
|
||||
try {
|
||||
@@ -220,14 +210,14 @@ switch ($request) {
|
||||
print ('jump this step') ;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
print ('test finished!') ;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
function sendTestMail() {
|
||||
function sendTestMail ()
|
||||
{
|
||||
G::LoadClass( "system" );
|
||||
$sFrom = ($_POST['FROM_NAME'] != '' ? $_POST['FROM_NAME'] . ' ' : '') . '<' . $_POST['FROM_EMAIL'] . '>';
|
||||
$sSubject = G::LoadTranslation( 'ID_MESS_TEST_SUBJECT' );
|
||||
@@ -270,31 +260,10 @@ function sendTestMail() {
|
||||
}
|
||||
$_POST['MESS_PASSWORD'] = $passwd;
|
||||
|
||||
$oSpool->setConfig( array(
|
||||
'MESS_ENGINE' => $_POST['MESS_ENGINE'],
|
||||
'MESS_SERVER' => $_POST['MESS_SERVER'],
|
||||
'MESS_PORT' => $_POST['MESS_PORT'],
|
||||
'MESS_ACCOUNT' => $_POST['MESS_ACCOUNT'],
|
||||
'MESS_PASSWORD' => $_POST['MESS_PASSWORD'],
|
||||
'SMTPAuth' => $_POST['SMTPAuth'],
|
||||
'SMTPSecure' => isset($_POST['SMTPSecure'])?$_POST['SMTPSecure']:'none'
|
||||
$oSpool->setConfig( array ('MESS_ENGINE' => $_POST['MESS_ENGINE'],'MESS_SERVER' => $_POST['MESS_SERVER'],'MESS_PORT' => $_POST['MESS_PORT'],'MESS_ACCOUNT' => $_POST['MESS_ACCOUNT'],'MESS_PASSWORD' => $_POST['MESS_PASSWORD'],'SMTPAuth' => $_POST['SMTPAuth'],'SMTPSecure' => isset( $_POST['SMTPSecure'] ) ? $_POST['SMTPSecure'] : 'none'
|
||||
) );
|
||||
|
||||
$oSpool->create(array(
|
||||
'msg_uid' => '',
|
||||
'app_uid' => '',
|
||||
'del_index' => 0,
|
||||
'app_msg_type' => 'TEST',
|
||||
'app_msg_subject' => $sSubject,
|
||||
'app_msg_from' => $sFrom,
|
||||
'app_msg_to' => $_POST['TO'],
|
||||
'app_msg_body' => $sBody,
|
||||
'app_msg_cc' => '',
|
||||
'app_msg_bcc' => '',
|
||||
'app_msg_attach' => '',
|
||||
'app_msg_template' => '',
|
||||
'app_msg_status' => 'pending',
|
||||
'app_msg_attach'=>'' // Added By Ankit
|
||||
$oSpool->create( array ('msg_uid' => '','app_uid' => '','del_index' => 0,'app_msg_type' => 'TEST','app_msg_subject' => $sSubject,'app_msg_from' => $sFrom,'app_msg_to' => $_POST['TO'],'app_msg_body' => $sBody,'app_msg_cc' => '','app_msg_bcc' => '','app_msg_attach' => '','app_msg_template' => '','app_msg_status' => 'pending','app_msg_attach' => '' // Added By Ankit
|
||||
) );
|
||||
|
||||
$oSpool->sendMail();
|
||||
@@ -304,16 +273,15 @@ function sendTestMail() {
|
||||
if ($oSpool->status == 'sent') {
|
||||
$o->status = true;
|
||||
$o->msg = G::LoadTranslation( 'ID_MAIL_TEST_SUCCESS' );
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$o->status = false;
|
||||
$o->msg = $oSpool->error;
|
||||
}
|
||||
return $o;
|
||||
}
|
||||
|
||||
|
||||
function e_utf8_encode($input) {
|
||||
function e_utf8_encode ($input)
|
||||
{
|
||||
$utftext = null;
|
||||
|
||||
for ($n = 0; $n < strlen( $input ); $n ++) {
|
||||
@@ -334,3 +302,4 @@ function e_utf8_encode($input) {
|
||||
|
||||
return $utftext;
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
*
|
||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*
|
||||
*/
|
||||
|
||||
require_once 'classes/model/Configuration.php';
|
||||
@@ -59,13 +58,8 @@ $aFields['MESS_EXECUTE_EVERY'] = isset($_POST['form']['MESS_ENABLED']) ?$_
|
||||
$aFields['MESS_SEND_MAX'] = isset( $_POST['form']['MESS_ENABLED'] ) ? $_POST['form']['MESS_SEND_MAX'] : '';
|
||||
$aFields['SMTPSecure'] = isset( $_POST['form']['MESS_ENABLED'] ) ? $_POST['form']['SMTPSecure'] : '';
|
||||
$aFields['MESS_TRY_SEND_INMEDIATLY'] = isset( $_POST['form']['MESS_ENABLED'] ) ? isset( $_POST['form']['MESS_TRY_SEND_INMEDIATLY'] ) ? $_POST['form']['MESS_TRY_SEND_INMEDIATLY'] : '' : '';
|
||||
$oConfiguration->update(array(
|
||||
'CFG_UID' => 'Emails',
|
||||
'OBJ_UID' => '',
|
||||
'CFG_VALUE' => serialize($aFields),
|
||||
'PRO_UID' => '',
|
||||
'USR_UID' => '',
|
||||
'APP_UID' => '')
|
||||
);
|
||||
$oConfiguration->update( array ('CFG_UID' => 'Emails','OBJ_UID' => '','CFG_VALUE' => serialize( $aFields ),'PRO_UID' => '','USR_UID' => '','APP_UID' => ''
|
||||
) );
|
||||
G::SendTemporalMessage( 'ID_CHANGES_SAVED', 'TMP-INFO', 'label', 4, '100%' );
|
||||
G::header( 'location: emails' );
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
<?php
|
||||
G::loadClass( 'configuration' );
|
||||
$c = new Configurations;
|
||||
$c = new Configurations();
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$oHeadPublisher->addExtJsScript( 'setup/environmentSettings', true );
|
||||
//$conf->aConfig['startCaseHideProcessInf']
|
||||
$oHeadPublisher->assign( 'FORMATS', $c->getFormats() );
|
||||
G::RenderPage( 'publish', 'extJs' );
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* @author Erik A.O. <erik@colosa.com>
|
||||
* @date Sept 13th, 2010
|
||||
*
|
||||
@@ -7,10 +8,6 @@
|
||||
|
||||
G::LoadClass( "configuration" );
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$request = isset( $_POST["request"] ) ? $_POST["request"] : (isset( $_GET["request"] ) ? $_GET["request"] : null);
|
||||
|
||||
switch ($request) {
|
||||
@@ -18,36 +15,28 @@ switch ($request) {
|
||||
$result->rows = Configurations::getUserNameFormats();
|
||||
print (G::json_encode( $result )) ;
|
||||
break;
|
||||
|
||||
case "getDateFormats":
|
||||
$result->rows = Configurations::getDateFormats();
|
||||
print (G::json_encode( $result )) ;
|
||||
break;
|
||||
|
||||
case "getCasesListDateFormat":
|
||||
$result->rows = Configurations::getDateFormats();;
|
||||
$result->rows = Configurations::getDateFormats();
|
||||
;
|
||||
print (G::json_encode( $result )) ;
|
||||
break;
|
||||
|
||||
case "getCasesListRowNumber":
|
||||
for ($i = 10; $i <= 50; $i += 5) {
|
||||
$formats[] = array("id" => "$i", "name" => "$i");
|
||||
$formats[] = array ("id" => "$i","name" => "$i"
|
||||
);
|
||||
}
|
||||
|
||||
$result->rows = $formats;
|
||||
print (G::json_encode( $result )) ;
|
||||
break;
|
||||
|
||||
case "save":
|
||||
$conf = new Configurations();
|
||||
|
||||
$conf->aConfig = array(
|
||||
"format" => $_POST["userFormat"],
|
||||
"dateFormat" => $_POST["dateFormat"],
|
||||
"startCaseHideProcessInf" => ((isset($_POST["hideProcessInf"]))? true : false),
|
||||
"casesListDateFormat" => $_POST["casesListDateFormat"],
|
||||
"casesListRowNumber" => intval($_POST["casesListRowNumber"]),
|
||||
"casesListRefreshTime" => intval($_POST["txtCasesRefreshTime"])
|
||||
$conf->aConfig = array ("format" => $_POST["userFormat"],"dateFormat" => $_POST["dateFormat"],"startCaseHideProcessInf" => ((isset( $_POST["hideProcessInf"] )) ? true : false),"casesListDateFormat" => $_POST["casesListDateFormat"],"casesListRowNumber" => intval( $_POST["casesListRowNumber"] ),"casesListRefreshTime" => intval( $_POST["txtCasesRefreshTime"] )
|
||||
);
|
||||
|
||||
$conf->saveConfig( "ENVIRONMENT_SETTINGS", "" );
|
||||
|
||||
Reference in New Issue
Block a user