Handling Parent-Child Table Relationship Using Generated Code

You can create database application with parent-child table relationship using code generator. You can do for unlimited relationship with cascading update and delete.

Here are steps to do:

  • Generate the code for each table both for list and maintenance using process type of gencode_dblist1 and gencode_dbmaint1.

  • You need to modify the configuration file (xml) of maintenance application of the parent. You need to add callback to the action function, and child table processing. To do this, you just copy the code from the child configuration.

  • You need to modify template file (html) by add new holder for child.

  • You need to modify child template file (html) to show only what you need.

  • You need to modify the configuration file (xml) of maintenance application of the child. You need to configure control to return action to manitenance application of the parent.


Now all is ready. No code changes. You can do all of above in no more than 10 minutes.

Add New Capability To Ant

You can add new capability to Queen, Worker, and Kannel. You need to have queenProcess application (engine) for new Queen capability. You need to have workerProcess application (engine) for new Worker capability. You need to have kannelHandler application (engine) for new Kannel capability.

Mention above is the minimum requirement for adding new capability. Using this you will be provided a text editor to create related manifest to instantiate process/ handler.

If you want to have customized manifest maintenance you need to create a template and an engine for this task and languages as needed.

Below are web interface to add new capability for Queen, Worker, and Kannel.

Queen capability:


Worker capability:


Kannel capability:

Process Capabilities Transfer Between Ants

You can transfer Process Capabilities between Queens using web interface. You can push Process Capabilities of a Queen to another Queen to be owned by another Queen.

You can transfer Process Capabilities between Workers using web interface. You can push Process Capabilities of a Worker to another Worker to be owned by another Worker.

You can transfer Kannel Capabilities between Kannels using web interface. You can push Kannel Capabilities of a Kannel to another Kannel to be owned by another Kannel.

Queen Capability:


Worker Capability:


Kannel Capability:


Write to which owner capabilities will be transferred and then click Go. Capabilities are now owned by to which push owner.

Extending System User Preferences

You can extend default user preferences to add additional preferences. You even not need to change the php code, you just create a class that extend user preferences class and included that file in configuration file.

Here is default preferences:


You can extend to like below:




<?php
/**
*
* Copyright (c) 2009, Stevanus DH
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of
* conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
* Neither the name of the CIISONLINE. nor the names of its contributors may
* be used to endorse or promote products derived from this software without specific
* prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*
*/

class Extension_Preferences extends CIISONLINE_Preferences_Extension{

static function ValidateChange() {
return '';
}

static function DoChange() {
/*-------------------------------
* Load all form fields into variables
*------------------------------- */
$pPKuser_id = GetParam('PK_user_id');
$pPKaccount_id = GetParam('PK_account_id');
/* the value should be: user, users group, or role */
$flduser_type = GetParam('user_typeid');

/* the value should be: any registered approval path */
$fldreqapprovalpath1 = GetParam('reqapprovalpath1');
$fldaccptapprovalpath1 = GetParam('accptapprovalpath1');
$fldreqapprovalpath2 = GetParam('reqapprovalpath2');
$fldaccptapprovalpath2 = GetParam('accptapprovalpath2');
$fldreqapprovalpath3 = GetParam('reqapprovalpath3');
$fldaccptapprovalpath3 = GetParam('accptapprovalpath3');
$fldreqapprovalpath4 = GetParam('reqapprovalpath4');
$fldaccptapprovalpath4 = GetParam('accptapprovalpath4');
$fldreqapprovalpath5 = GetParam('reqapprovalpath5');
$fldaccptapprovalpath5 = GetParam('accptapprovalpath5');

/* if email notification is sent to the sender. the value should be: true or false*/
$fldownemailnotif = getCheckBoxValue(GetParam('OwnEm'), '1', '0', 'Number');
/* if email notification is sent on changing user form. the value should be: true or false*/
$fldnotifyformchange = getCheckBoxValue(GetParam('NotifMyFormChEm'), '1', '0', 'Number');
/* number of items display on a page*/
$fldnum_items_perpage = GetParam('num_items_perpage');

/* escalation information */
$fldescalate_approval_toid = '';
$fldescalate_approval_to = GetParam('escalate_approval_to');
$fldescalate_approval_info = GetParam('escalate_approval_info');

if ($fldescalate_approval_to!='') {
$fldescalate_approval_toid = AccountIDFromUserSelectionMode($fldescalate_approval_to);
if ((string)$fldescalate_approval_toid==(string)$pPKuser_id) $fldescalate_approval_toid = '';
}

$sUserID = GetCurrentUserConfig('UserID');

if ((string)GetCurrentPageConfig('sPageErrorMessage') == '') {
/*numbers forms */
SetUserConfigBy ($sUserID, $pPKaccount_id, GetUserConfigPreferenceConst('iUserConfigNumFormsPerPageDefPage'), $fldnum_items_perpage);
SetUserConfigBy ($sUserID, $pPKaccount_id, GetUserConfigPreferenceConst('iUserConfigNumFormsPerPageSharedPage'), $fldnum_items_perpage);
SetUserConfigBy ($sUserID, $pPKaccount_id, GetUserConfigPreferenceConst('iUserConfigNumFormsPerPageCtrPage'), $fldnum_items_perpage);
SetUserConfigBy ($sUserID, $pPKaccount_id, GetUserConfigPreferenceConst('iUserConfigNumFormsPerPageApprPage'), $fldnum_items_perpage);
SetUserConfigBy ($sUserID, $pPKaccount_id, GetUserConfigPreferenceConst('iUserConfigNumFormsPerPageListPage'), $fldnum_items_perpage);
/*own email */
SetUserConfigBy ($sUserID, $pPKaccount_id, GetUserConfigPreferenceConst('iUserConfigSendOwnSubmittedForm'), $fldownemailnotif);
/*notify form change */
SetUserConfigBy ($sUserID, $pPKaccount_id, GetUserConfigPreferenceConst('iUserConfigEmailMyFormChange'), $fldnotifyformchange);
/*fldreqapprovalpath1 */
SetUserConfigBy ($sUserID, $pPKaccount_id, GetUserConfigPreferenceConst('iUserConfigRequestApprovalPath1'), $fldreqapprovalpath1);
/*fldaccptapprovalpath1 */
SetUserConfigBy ($sUserID, $pPKaccount_id, GetUserConfigPreferenceConst('iUserConfigAcceptanceApprovalPath1'), $fldaccptapprovalpath1);
/*fldreqapprovalpath2*/
SetUserConfigBy ($sUserID, $pPKaccount_id, GetUserConfigPreferenceConst('iUserConfigRequestApprovalPath2'), $fldreqapprovalpath2);
/*fldaccptapprovalpath2 */
SetUserConfigBy ($sUserID, $pPKaccount_id, GetUserConfigPreferenceConst('iUserConfigAcceptanceApprovalPath2'), $fldaccptapprovalpath2);
/*fldreqapprovalpath3 */
SetUserConfigBy ($sUserID, $pPKaccount_id, GetUserConfigPreferenceConst('iUserConfigRequestApprovalPath3'), $fldreqapprovalpath3);
/*fldaccptapprovalpath3*/
SetUserConfigBy ($sUserID, $pPKaccount_id, GetUserConfigPreferenceConst('iUserConfigAcceptanceApprovalPath3'), $fldaccptapprovalpath3);
/*fldreqapprovalpath4 */
SetUserConfigBy ($sUserID, $pPKaccount_id, GetUserConfigPreferenceConst('iUserConfigRequestApprovalPath4'), $fldreqapprovalpath4);
/*fldaccptapprovalpath4 */
SetUserConfigBy ($sUserID, $pPKaccount_id, GetUserConfigPreferenceConst('iUserConfigAcceptanceApprovalPath4'), $fldaccptapprovalpath4);
/*fldreqapprovalpath5 */
SetUserConfigBy ($sUserID, $pPKaccount_id, GetUserConfigPreferenceConst('iUserConfigRequestApprovalPath5'), $fldreqapprovalpath5);
/*fldaccptapprovalpath5 */
SetUserConfigBy ($sUserID, $pPKaccount_id, GetUserConfigPreferenceConst('iUserConfigAcceptanceApprovalPath5'), $fldaccptapprovalpath5);

$sFormApplEscalTbColPrefix = GetTableConfig('sFormApplEscalTbColPrefix');
$sFormApplEscalTbNm = GetTableConfig('sFormApplEscalTbNm');

/* check if this assigned people delegate to other, if any you asiggned to this delegated people*/
if ((int)DLookup($sFormApplEscalTbNm,
' count(*) as n ',
$sFormApplEscalTbColPrefix.'02='.ToSQL($pPKuser_id,'Text')
.' and '.$sFormApplEscalTbColPrefix.'04<='.ToSQL(GetSystemDateTimeValue(),'Date')
.' and ('.$sFormApplEscalTbColPrefix.'05>='.ToSQL(GetSystemDateTimeValue(),'Date')
.' or '.$sFormApplEscalTbColPrefix.'05 is null)')>0) {

$sSQL = 'update '.$sFormApplEscalTbNm.' set '
.$sFormApplEscalTbColPrefix.'0B='.ToSQL(GetTimestamp(), 'Number').','
.$sFormApplEscalTbColPrefix.'05='.ToSQL(GetSystemDateTimeValue(), 'Date').','
.$sFormApplEscalTbColPrefix.'08='.ToSQL(GetSystemDateTimeValue(), 'Date').','
.$sFormApplEscalTbColPrefix.'10='.ToSQL($sUserID,'Text')
.' where '.$sFormApplEscalTbColPrefix.'02='.ToSQL($pPKuser_id,'Text')
.' and '.$sFormApplEscalTbColPrefix.'04<='.ToSQL(GetSystemDateTimeValue(),'Date')
.' and ('.$sFormApplEscalTbColPrefix.'05>='.ToSQL(GetSystemDateTimeValue(),'Date')
.' or '.$sFormApplEscalTbColPrefix.'05 is null)';

ExecuteSQL2 ($sSQL);
}

if ($fldescalate_approval_toid!='') {
$sSQL = 'insert into '.$sFormApplEscalTbNm.' ('
.$sFormApplEscalTbColPrefix.'0A,'
.$sFormApplEscalTbColPrefix.'01,'
.$sFormApplEscalTbColPrefix.'02,'
.$sFormApplEscalTbColPrefix.'03,'
.$sFormApplEscalTbColPrefix.'04,'
.$sFormApplEscalTbColPrefix.'05,'
.$sFormApplEscalTbColPrefix.'06,'
.$sFormApplEscalTbColPrefix.'07,'
.$sFormApplEscalTbColPrefix.'09) '
.'values ('
.ToSQL(GetTimestamp(),'Number').','
.ToSQL(GUID(),'Text').','
.ToSQL($pPKuser_id, 'Text').','
.ToSQL($fldescalate_approval_toid, 'Text').','
.ToSQL(GetSystemDateTimeValue(), 'Date').','
.'NULL,'
.ToSQL($fldescalate_approval_info,'Text').','
.ToSQL(GetSystemDateTimeValue(), 'Date').','
.ToSQL($sUserID,'Text').')';

ExecuteSQL2 ($sSQL);
}
}
}

static function Preferences_Show() {
/*-------------------------------
* Preferences Show begin
*------------------------------- */

$sAction = GetCurrentPageConfig('sAction');
$sForm = GetCurrentPageConfig('sForm');

$pPKaccount_id = '';
$flduser_localusercode = '';
/* the value should be: user, users group, or role */
$flduser_type = '';

/* number of items display on a page*/
$fldnum_items_perpage = '';

/* the value should be: any registered approval path */
$fldreqapprovalpath1 = '';
$fldaccptapprovalpath1 = '';
$fldreqapprovalpath2 = '';
$fldaccptapprovalpath2 = '';
$fldreqapprovalpath3 = '';
$fldaccptapprovalpath3 = '';
$fldreqapprovalpath4 = '';
$fldaccptapprovalpath4 = '';
$fldreqapprovalpath5 = '';
$fldaccptapprovalpath5 = '';

/* if email notification is sent to the sender. the value should be: true or false*/
$fldownemailnotif = '';
/* if email notification is sent on changing user form. the value should be: true or false*/
$fldnotifyformchange = '';

/* escalation information */
$fldescalate_approval_to = '';
$fldescalate_approval_info = '';

$bUpdateMode = false;

$pPKuser_id = GetParam('PK_user_id');

if ((string)$pPKuser_id!='') {
$bUpdateMode = UserExists($pPKuser_id);
}

$sPageErrorMessage = GetCurrentPageConfig('sPageErrorMessage');

if ($bUpdateMode) {
if ($sPageErrorMessage=='') {
$sUserTbNm = GetTableConfig('sUserTbNm');
$sUserTbColPrefix = GetTableConfig('sUserTbColPrefix');

$sSQL = 'select a.'.$sUserTbColPrefix.'01 as a_userid, '
.'a.'.$sUserTbColPrefix.'02 as a_login, '
.'a.'.$sUserTbColPrefix.'13 as a_usertype'
.' from '.$sUserTbNm.' a '
.' where a.'.$sUserTbColPrefix.'20='.ToSQL(GetSystemConfig('sLocalUserCode'),GetLocalUserCodeSqlValueType())
.' and a.'.$sUserTbColPrefix.'01='.ToSQL($pPKuser_id,'Text');

OpenRS ($rs, $sSQL);

$flduser_type = GetValue($rs, 'a_usertype');
$pPKaccount_id = GetValue($rs, 'a_login');
$fldlogin = GetLogin($pPKaccount_id);

$rs->Close();
unset ($rs);

/*own email notification */
$fldownemailnotif = GetUserConfigWithDefault($pPKaccount_id, GetUserConfigPreferenceConst('iUserConfigSendOwnSubmittedForm'),0);
/*notify form change */
$fldnotifyformchange = GetUserConfigWithDefault($pPKaccount_id, GetUserConfigPreferenceConst('iUserConfigEmailMyFormChange'),0);
/*forms per page */
$fldnum_items_perpage = GetUserConfigWithDefault($pPKaccount_id, GetUserConfigPreferenceConst('iUserConfigNumItemsPerPageListPage'),0);

$fldreqapprovalpath1 = GetUserConfig($pPKaccount_id, GetUserConfigPreferenceConst('iUserConfigRequestApprovalPath1'));
$fldaccptapprovalpath1 = GetUserConfig($pPKaccount_id, GetUserConfigPreferenceConst('iUserConfigAcceptanceApprovalPath1'));
$fldreqapprovalpath2 = GetUserConfig($pPKaccount_id, GetUserConfigPreferenceConst('iUserConfigRequestApprovalPath2'));
$fldaccptapprovalpath2 = GetUserConfig($pPKaccount_id, GetUserConfigPreferenceConst('iUserConfigAcceptanceApprovalPath2'));
$fldreqapprovalpath3 = GetUserConfig($pPKaccount_id, GetUserConfigPreferenceConst('iUserConfigRequestApprovalPath3'));
$fldaccptapprovalpath3 = GetUserConfig($pPKaccount_id, GetUserConfigPreferenceConst('iUserConfigAcceptanceApprovalPath3'));
$fldreqapprovalpath4 = GetUserConfig($pPKaccount_id, GetUserConfigPreferenceConst('iUserConfigRequestApprovalPath4'));
$fldaccptapprovalpath4 = GetUserConfig($pPKaccount_id, GetUserConfigPreferenceConst('iUserConfigAcceptanceApprovalPath4'));
$fldreqapprovalpath5 = GetUserConfig($pPKaccount_id, GetUserConfigPreferenceConst('iUserConfigRequestApprovalPath5'));
$fldaccptapprovalpath5 = GetUserConfig($pPKaccount_id, GetUserConfigPreferenceConst('iUserConfigAcceptanceApprovalPath5'));

$fldescalate_approval_toid = $pPKuser_id;

$sFormApplEscalTbColPrefix = GetTableConfig('sFormApplEscalTbColPrefix');
$sFormApplEscalTbNm = GetTableConfig('sFormApplEscalTbNm');
/* check if this assigned people delegate to other, if any you asiggned to this escalated people */
while ((int)DLookup($sFormApplEscalTbNm,' count(*) as n ',$sFormApplEscalTbColPrefix.'02='.ToSQL($fldescalate_approval_toid,'Text').' and '.$sFormApplEscalTbColPrefix.'04<='.ToSQL(GetSystemDateTimeValue(),'Date').' and ('.$sFormApplEscalTbColPrefix.'05>='.ToSQL(GetSystemDateTimeValue(),'Date').' or '.$sFormApplEscalTbColPrefix.'05 is null)')>0) {
$fldescalate_approval_info = DLookup($sFormApplEscalTbNm,$sFormApplEscalTbColPrefix.'06',$sFormApplEscalTbColPrefix.'02='.ToSQL($fldescalate_approval_toid,'Text').' and '.$sFormApplEscalTbColPrefix.'04<='.ToSQL(GetSystemDateTimeValue(),'Date').' and ('.$sFormApplEscalTbColPrefix.'05>='.ToSQL(GetSystemDateTimeValue(),'Date').' or '.$sFormApplEscalTbColPrefix.'05 is null)');
$fldescalate_approval_toid = DLookup($sFormApplEscalTbNm,$sFormApplEscalTbColPrefix.'03',$sFormApplEscalTbColPrefix.'02='.ToSQL($fldescalate_approval_toid,'Text').' and '.$sFormApplEscalTbColPrefix.'04<='.ToSQL(GetSystemDateTimeValue(),'Date').' and ('.$sFormApplEscalTbColPrefix.'05>='.ToSQL(GetSystemDateTimeValue(),'Date').' or '.$sFormApplEscalTbColPrefix.'05 is null)');
break;
}

$fldescalate_approval_to = '';
if (strtolower((string)$fldescalate_approval_toid)!=strtolower((string)$pPKaccount_id)) {
if ((string)$fldescalate_approval_toid!='') {
$fldescalate_approval_to = UserFromUserSelectionMode($fldescalate_approval_toid);
}
}
}
}

/*-------------------------------
* Load primary key and form parameters
*------------------------------- */
$sPageErrorMessage = GetCurrentPageConfig('sPageErrorMessage');

if ($sPageErrorMessage == '') {
} else {
$pPKaccount_id = GetParam('PK_account_id');
$flduser_localusercode = GetParam('user_localusercode');
$flduser_type = GetParam('user_typeid');

$fldnum_items_perpage = GetParam('num_items_perpage');

$fldreqapprovalpath1 = GetParam('reqapprovalpath1');
$fldaccptapprovalpath1 = GetParam('accptapprovalpath1');
$fldreqapprovalpath2 = GetParam('reqapprovalpath2');
$fldaccptapprovalpath2 = GetParam('accptapprovalpath2');
$fldreqapprovalpath3 = GetParam('reqapprovalpath3');
$fldaccptapprovalpath3 = GetParam('accptapprovalpath3');
$fldreqapprovalpath4 = GetParam('reqapprovalpath4');
$fldaccptapprovalpath4 = GetParam('accptapprovalpath4');
$fldreqapprovalpath5 = GetParam('reqapprovalpath5');
$fldaccptapprovalpath5 = GetParam('accptapprovalpath5');

$fldownemailnotif = getCheckBoxValue(GetParam('OwnEm'), '1', '0', 'Number');
$fldnotifyformchange = getCheckBoxValue(GetParam('NotifMyFormChEm'), '1', '0', 'Number');

$fldescalate_approval_to = GetParam('escalate_approval_to');
$fldescalate_approval_info = GetParam('escalate_approval_info');
}

/*-------------------------------
* Load all form fields
*------------------------------- */

/*-------------------------------
* Preferences Open Event begin
* Preferences Open Event end
*------------------------------- */

SetVar ('SendOwnSubmittedFormCaption', ToHTML(GetTextLanguage('sPreferencesSendOwnSubmittedFormCaptionTitle')));
SetVar ('NotifyMyFormChangeEmail', ToHTML(GetTextLanguage('sPreferencesNotifyMyFormChangeEmailTitle')));

SetVar ('RequestApprovalPath1Caption', ToHTML(GetTextLanguage('sPreferencesRequestApprovalPath1CaptionTitle')));
SetVar ('AcceptanceApprovalPath1Caption', ToHTML(GetTextLanguage('sPreferencesAcceptanceApprovalPath1CaptionTitle')));
SetVar ('RequestApprovalPath2Caption', ToHTML(GetTextLanguage('sPreferencesRequestApprovalPath2CaptionTitle')));
SetVar ('AcceptanceApprovalPath2Caption', ToHTML(GetTextLanguage('sPreferencesAcceptanceApprovalPath2CaptionTitle')));
SetVar ('RequestApprovalPath3Caption', ToHTML(GetTextLanguage('sPreferencesRequestApprovalPath3CaptionTitle')));
SetVar ('AcceptanceApprovalPath3Caption', ToHTML(GetTextLanguage('sPreferencesAcceptanceApprovalPath3CaptionTitle')));
SetVar ('RequestApprovalPath4Caption', ToHTML(GetTextLanguage('sPreferencesRequestApprovalPath4CaptionTitle')));
SetVar ('AcceptanceApprovalPath4Caption', ToHTML(GetTextLanguage('sPreferencesAcceptanceApprovalPath4CaptionTitle')));
SetVar ('RequestApprovalPath5Caption', ToHTML(GetTextLanguage('sPreferencesRequestApprovalPath5CaptionTitle')));
SetVar ('AcceptanceApprovalPath5Caption', ToHTML(GetTextLanguage('sPreferencesAcceptanceApprovalPath5CaptionTitle')));

SetVar ('ApprovalTitle', GetTextLanguage('sPreferencesApprovalTitle'));
SetVar ('EscalateApprovalToColumn', GetTextLanguage('sPreferencesEscalateApprovalToColumnTitle'));
SetVar ('EscalateApprovalInfoColumn', GetTextLanguage('sPreferencesEscalateApprovalInfoColumnTitle'));

SetVar ('AddNewMembersOfidButton', ToHTML(GetTextLanguage('sPreferencesAddNewMembersOfidButtonTitle')));
SetVar ('ClearMembersOfidButton', ToHTML(GetTextLanguage('sPreferencesClearMembersOfidButtonTitle')));
SetVar ('AddNewMembersidButton', ToHTML(GetTextLanguage('sPreferencesAddNewMembersidButtonTitle')));
SetVar ('ClearMembersidButton', ToHTML(GetTextLanguage('sPreferencesClearMembersidButtonTitle')));
SetVar ('PermissionButton', ToHTML(GetTextLanguage('sPreferencesPermissionButtonTitle')));
SetVar ('UpdateButton', ToHTML(GetTextLanguage('sPreferencesUpdateButtonTitle')));
SetVar ('CancelButton', ToHTML(GetTextLanguage('sPreferencesCancelButtonTitle')));
SetVar ('BrowseUsersButton', ToHTML(GetTextLanguage('sPreferencesBrowseUsersButtonTitle')));

/*-------------------------------
* Load all fields into variables from recordset or input parameters
*------------------------------- */

/*-------------------------------
* Preferences Show Event begin
* Preferences Show Event end
*------------------------------- */

/*-------------------------------
* Show form field
*------------------------------- */

SetVarIf ('OwnEmChecked', 'checked',((string)$fldownemailnotif == '1'));
SetVarIf ('NotifMyFormChEmhecked', 'checked',((string)$fldnotifyformchange == '1'));

SetVar ('reqapprovalpath1', ToHTML($fldreqapprovalpath1));
SetVar ('accptapprovalpath1', ToHTML($fldaccptapprovalpath1));
SetVar ('reqapprovalpath2', ToHTML($fldreqapprovalpath2));
SetVar ('accptapprovalpath2', ToHTML($fldaccptapprovalpath2));
SetVar ('reqapprovalpath3', ToHTML($fldreqapprovalpath3));
SetVar ('accptapprovalpath3', ToHTML($fldaccptapprovalpath3));
SetVar ('reqapprovalpath4', ToHTML($fldreqapprovalpath4));
SetVar ('accptapprovalpath4', ToHTML($fldaccptapprovalpath4));
SetVar ('reqapprovalpath5', ToHTML($fldreqapprovalpath5));
SetVar ('accptapprovalpath5', ToHTML($fldaccptapprovalpath5));

SetVar ('escalate_approval_to',$fldescalate_approval_to);
SetVar ('escalate_approval_info',$fldescalate_approval_info);

/*-------------------------------
* Preferences Close Event begin
* Preferences Close Event end
*------------------------------- */

/*-------------------------------
* Preferences Show end
*------------------------------- */
}
}
?>

How to extend user session variable?

You can extend user session variable (=preference) of application by creating class that extend 'CIISONLINE_UserSession' class. Prefix your class name with '0' (zero) and must has suffix with '.class.php' Place your new class under /System/Session/User.

You must register this session variable to the system as shown in the first statement of the example below.

Here is '0BackgroundImage.class.php' user session file for your example:


<?php

CIISONLINE_System::RegisterUserSession("BackgroundImage");

class BackgroundImage extends CIISONLINE_UserSession {

static function GetCode() {
}

static function GetDefault() {
return GetSystemConfig("sBackgroundPageFileName");
}

static function SetToDefault($valid=false) {
self::SetValue(self::GetDefault(),$valid);
}

static function SetValue($Value,$valid=false) {
SetSessionValue ("BackgroundImage_CurrentUser", $Value);
if ($valid) {
self::MakeValid();
}
}

static function GetValue() {
if (!GetSessionValue("Is__BackgroundImage_CurrentUser__Valid")) {
SetSessionValue ("BackgroundImage_CurrentUser",
(string)(GetUserConfigWithDefault(GetSessionValue("AccessAsUserID_CurrentUser"),
GetUserConfigPreferenceConst("iUserConfigBackgroundFile"), self::GetDefault())));
SetSessionValue ("Is__BackgroundImage_CurrentUser__Valid", true);
}
return GetSessionValue("BackgroundImage_CurrentUser");
}

static function Invalidate() {
SetSessionValue ("Is__BackgroundImage_CurrentUser__Valid", false);
}

static function MakeValid() {
SetSessionValue ("Is__BackgroundImage_CurrentUser__Valid", true);
}

static function IsValid() {
return GetSessionValue("Is__BackgroundImage_CurrentUser__Valid");
}
}


?>



You will access the value of user session variable like below:

$var = GetCurrentUserConfig('BackgroundImage');

You can set current session like below:

SetCurrentUserConfig('BackgroundImage','<\<a value>');

Updating Your Database Automatically From Remote Database Even Different Database Engine Even Without Coding

You can update your database automatically from remote database using http protocol even without coding. You can update database from different database engine. As for example you can update mssql from mysql or another.

Here are steps to do:

  1. Create manifest of database_export Worker Process. Configure how exporting will be done.
  2. Create a scheduled to execute manifest periodically.
  3. Create manifest of file_synchronize Queen Process. Configure how to sync data between sites

  4. Configure IPC on your server as appropriate for file_synchronize Queen Process.
  5. Create manifest of database_update Worker Process on your server. Configure how updating will be dane.
  6. Create a scheduled on your server to execute manifest periodically.


After all of that, the only you do is executing all of that manifests.

Now, all of that working automatically to make continuous update.

Using Many Templates For Application

You can use many templates for an application. You also can orchestrate many components/ applications using this methods. You do this by adding 'TemplateSpaceHolder' xml element under 'page' root xml.

See below for your example:



<?xml version="1.0" encoding="UTF-8"?>
<page name="NestMaint" id="NestMaint" >
<processor PageSecurityCode="Page|NestMaint" HelpContext="LIGHTARMY-Applications.NestConfig" sOnlyTemplateFileName="NestMaint.html" CanPublic="false">

<PageSecurityCode>
<Name>Nest Maintenance</Name>
<Description></Description>
<HelpContext>LIGHTARMY-Applications.NestConfig</HelpContext>
</PageSecurityCode>

<PageActionSelectionScript><![CDATA[
switch ((string)GetCurrentPageConfig('sForm')) {
case 'NestMaint':
CIISONLINE_NestMaint::NestMaintAction(GetCurrentPageConfig('sAction'));
}
]]></PageActionSelectionScript>
<TemplateProcessingScript><![CDATA[
CIISONLINE_Header::Menu_Show();
CIISONLINE_Footer::FooterForm_Show();
CIISONLINE_NestMaint::MenuPath_Show();
CIISONLINE_NestMaint::NestMaint_Show();
]]></TemplateProcessingScript>
<ResponseProcessingScript><![CDATA[
ResponseWrite (PrintVar('main'));
]]></ResponseProcessingScript>
<IncludeFile>PageClass/Header.php</IncludeFile>
<IncludeFile>PageClass/Footer.php</IncludeFile>
<IncludeFile>PageClass/NestMaint.php</IncludeFile>

<TemplateSpaceHolder name="Header">Header.html</TemplateSpaceHolder>
<TemplateSpaceHolder name="Footer">Footer.html</TemplateSpaceHolder>
<TemplateSpaceHolder name="Space01">Space01.html</TemplateSpaceHolder>
<TemplateSpaceHolder name="Space02">Space02.html</TemplateSpaceHolder>
<TemplateSpaceHolder name="Space03">Space03.html</TemplateSpaceHolder>
<TemplateSpaceHolder name="Space04">Space04.html</TemplateSpaceHolder>
<TemplateSpaceHolder name="Space05">Space05.html</TemplateSpaceHolder>
<TemplateSpaceHolder name="Space06">Space06.html</TemplateSpaceHolder>
<TemplateSpaceHolder name="Space07">Space07.html</TemplateSpaceHolder>
<TemplateSpaceHolder name="Space08">Space08.html</TemplateSpaceHolder>
<TemplateSpaceHolder name="Space09">Space09.html</TemplateSpaceHolder>
<TemplateSpaceHolder name="Space10">Space10.html</TemplateSpaceHolder>

</processor>
</page>

CommentLuv Enabled

Followers