================================================================ Initialization Files ================================================================ The two initialization files (constants.ini and IDEA.ini) are needed for the IDEAController to work properly. Constants.ini ------------- In constants.ini, add the new IDEA event for the IDEAController to handle, after line 30. It should follow the given format of : $IDEA_EVENT_ = ; An example is : $IDEA_EVENT_USER_LOGOUT = 12; IDEA.ini -------- IDEA.ini consists of two parts - a list of IDEA event entries and a list of Function entries. The IDEA event added should follow this format : $IDEA['Events'][$IDEA_EVENT_]['ID'] = $; $IDEA['Events'][$IDEA_EVENT_]['Name'] = ''; $IDEA['Events'][$IDEA_EVENT_]['Functions'] = ''; $IDEA['Events'][$IDEA_EVENT_]['GUI'] = ''; # The IDEA Event Name must be one of the constants in SYSTEM EVENTS CONSTANTS in constants.ini . # If there are multiple Function entries to be called in the IDEA event entry, then a space must separate each function entry on the right hand side of the equals (=) sign. $IDEA['Events'][$IDEA_EVENT_]['Functions'] = ''; # In this line of the IDEA event entry, the GUI function name must exactly correspond to that in GUI.php . $IDEA['Events'][$IDEA_EVENT_]['GUI'] = ''; An example of an IDEA event entry is : /*********IDEA_EVENT_USER_ENTER*********/ $IDEA['Events'][$IDEA_EVENT_USER_ENTER]['ID'] = $IDEA_EVENT_USER_ENTER; $IDEA['Events'][$IDEA_EVENT_USER_ENTER]['Name'] = 'IDEA_EVENT_USER_ENTER'; $IDEA['Events'][$IDEA_EVENT_USER_ENTER]['Functions'] = 'IDEA_Welcome IDEA_Daily_Schedule IDEA_Show_Msg_From_Others IDEA_Check_Lighting'; $IDEA['Events'][$IDEA_EVENT_USER_ENTER]['GUI'] = 'IDEA_GUI_User_Enter'; The Function entry added should follow this format : $IDEA['Functions'][''] = ''; $IDEA['']['Command'] = 'java -classpath '.$IDEA_JAVA_CLASSPATH.' '; $IDEA['']['Params'] = ''; $IDEA['']['Returns'] = ''; *Explanation on FUNCTIONS entries * *Function's Name *$IDEA['Functions']['IDEA_Welcome'] = 'IDEA_Welcome'; * *FI's program to call to process this function *$IDEA['IDEA_Welcome']['Command'] = 'java -classpath '.$IDEA_JAVA_CLASSPATH.' IDEA_Welcome.Welcome'; * *The input parameters for this function, (GUI passes these parameters to this function) *and the input parameters for the FI's program *use space to separate different parameters (if more than one) *$IDEA['IDEA_Welcome']['Params'] = 'IDEA_LoginName IDEA_Password'; * *Returned values from FI's program, by default there should be only one. *use space to separate different kind of returned values (if more than one) *$IDEA['IDEA_Welcome']['Returns'] = 'IDEA_LOGIN_VALID IDEA_LOGIN_INVALID'; An example of an Function entry is : $IDEA['Functions']['IDEA_Leave_Msg_To_Others'] = 'IDEA_Leave_Msg_To_Others'; $IDEA['IDEA_Leave_Msg_To_Others']['Command'] = 'java -classpath '.$IDEA_JAVA_CLASSPATH.' IDEA_Message.Leave_Message'; $IDEA['IDEA_Leave_Msg_To_Others']['Params'] = 'IDEA_Login_Name IDEA_Leave_Msg_To_Others_ID IDEA_Leave_Msg_To_Others_Msg';//this corresponds to pers_id in Database $IDEA['IDEA_Leave_Msg_To_Others']['Returns'] = 'IDEA_Leave_Msg_To_Others_Status';