Files
luos/workflow/engine/methods/setup/environmentSettingsAjax.php
jennylee 6ee79318c4 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
2012-10-17 15:40:37 -04:00

52 lines
1.6 KiB
PHP
Executable File

<?php
/**
*
* @author Erik A.O. <erik@colosa.com>
* @date Sept 13th, 2010
*
*/
G::LoadClass( "configuration" );
$request = isset( $_POST["request"] ) ? $_POST["request"] : (isset( $_GET["request"] ) ? $_GET["request"] : null);
switch ($request) {
case "getUserMaskList":
$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();
;
print (G::json_encode( $result )) ;
break;
case "getCasesListRowNumber":
for ($i = 10; $i <= 50; $i += 5) {
$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->saveConfig( "ENVIRONMENT_SETTINGS", "" );
$response = new stdclass();
$response->success = true;
$response->msg = G::LoadTranslation( "ID_SAVED_SUCCESSFULLY" );
echo G::json_encode( $response );
break;
}