forward global type n_pics_cst_appmanager from n_cst_appmanager end type end forward global type n_pics_cst_appmanager from n_cst_appmanager end type global n_pics_cst_appmanager n_pics_cst_appmanager type prototypes end prototypes type variables Boolean ib_jaws n_cst_dwsrv_property snv_property end variables forward prototypes public function integer of_splash (integer ai_secondsvisible) public function boolean of_getjaws () public function boolean of_isjawsrunning () public function integer of_logondlg () public function integer of_setjaws (integer ab_jaws) public subroutine wf_disconnect_all () public function integer of_about () public function integer of_checkversion (string as_userid, string as_password, string as_version) public function datetime of_getsystemdatetime () public function integer of_validateuser (string as_userid, string as_password) public function boolean of_checkfifteenminuteelapsedtime (string as_userid) public function integer of_getsessioninfo () public function integer of_deriveuserid (ref string as_userid) public function string of_getcorrectuserid (ref string as_userid) end prototypes public function integer of_splash (integer ai_secondsvisible);////////////////////////////////////////////////////////////////////////////// // // Function: of_Splash // // Access: public // // Arguments: // ai_secondsvisible the length of time to display the splash window. // // Returns:integer // 1 = success // -1 = error // // Description: Display the splash window for a specified length of time. // ////////////////////////////////////////////////////////////////////////////// // // Revision History // // Version // 5.0 Initial version // ////////////////////////////////////////////////////////////////////////////// // // Copyright © 1996-1997 Sybase, Inc. and its subsidiaries. All rights reserved. // Any distribution of the PowerBuilder Foundation Classes (PFC) // source code by other than Sybase, Inc. and its subsidiaries is prohibited. // ////////////////////////////////////////////////////////////////////////////// n_cst_splashattrib lnv_splashattrib // Check arguments If IsNull(ai_secondsvisible) Then ai_secondsvisible = 0 End If // Number of seconds for splash window to be visible lnv_splashattrib.ii_secondsvisible = ai_secondsvisible // Populate information passed to the Splash window. this.Event pfc_presplash (lnv_splashattrib) Return OpenWithParm (w_pics_splash, lnv_splashattrib) end function public function boolean of_getjaws ();////////////////////////////////////////////////////////////////////////////// // // Function: of_GetJaws // // Access: public // // Arguments: none // // Returns: Boolean // True - Application has turn jaws functionality on // False - Application does not turn Jaws functionality on // // Description: Returns the current application's Jaws behavior. // ////////////////////////////////////////////////////////////////////////////// // Author: Mike Chamanara // // Date: 3/1/02 // //============================================================================= // // Revision History // // Date Initials Description of Change // ---- -------- -------------------- // 3/28/02 MC Initial creation //============================================================================= return ib_Jaws end function public function boolean of_isjawsrunning ();Boolean lb_return String ls_windowName lb_return = FALSE //Check if Window Eyes is Running ls_windowName = 'Window-Eyes' IF FindWindowW (0, ls_windowName) <> 0 THEN lb_return = TRUE END IF RETURN lb_return end function public function integer of_logondlg ();////////////////////////////////////////////////////////////////////////////// // // Function: of_LogonDlg // // Access: public // // Arguments: none // // Returns: integer // 1 = successful logon // 0 = User cancelled from the logon dialog // -1 = an error occurred opening the logon window // // Description: Obtain a User ID and password from the user // ////////////////////////////////////////////////////////////////////////////// // // Revision History // // Version // 5.0 Initial version // ////////////////////////////////////////////////////////////////////////////// // // Copyright © 1996-1997 Sybase, Inc. and its subsidiaries. All rights reserved. // Any distribution of the PowerBuilder Foundation Classes (PFC) // source code by other than Sybase, Inc. and its subsidiaries is prohibited. // ////////////////////////////////////////////////////////////////////////////// n_cst_logonattrib lnv_logonattrib ////////////////////////////////////////////////////////////////////////////// // Load logon object values ////////////////////////////////////////////////////////////////////////////// this.event pfc_prelogondlg (lnv_logonattrib) ////////////////////////////////////////////////////////////////////////////// // Open logon window ////////////////////////////////////////////////////////////////////////////// if OpenWithParm (w_pics_logon, lnv_logonattrib) < 0 then return -1 end if ////////////////////////////////////////////////////////////////////////////// // Get return logon object ////////////////////////////////////////////////////////////////////////////// lnv_logonattrib = message.powerobjectparm ////////////////////////////////////////////////////////////////////////////// // Store user id ////////////////////////////////////////////////////////////////////////////// string ls_user if Len (lnv_logonattrib.is_userid) > 0 then ls_user = of_getcorrectuserid(lnv_logonattrib.is_userid) // AR 3264 05/16/2016 lnv_logonattrib.is_userid = ls_user if of_IsRegistryAvailable() then RegistrySet (is_userkey + "\logon", "userid", lnv_logonattrib.is_userid) else SetProfileString (is_userinifile, "logon", "userid", lnv_logonattrib.is_userid) end if of_SetUserID (lnv_logonattrib.is_userid) end if return lnv_logonattrib.ii_rc end function public function integer of_setjaws (integer ab_jaws);////////////////////////////////////////////////////////////////////////////// // // Function: of_SetJaws // // Access: public // // Arguments: // ab_jaws enable/disable jaws function // // Returns: integer // 1 = success // -1 = error // // Description: // Enables/disables microhelp for the application // ////////////////////////////////////////////////////////////////////////////// // Author: Mike Chamanara // // Date: 3/1/02 // //============================================================================= // // Revision History // // Date Initials Description of Change // ---- -------- -------------------- // 3/12/02 MC Initial creation //============================================================================= // Check arguments if IsNull (ab_jaws) then return -1 end if if ab_jaws = 1 then ib_jaws = TRUE elseif ab_jaws = -1 then ib_jaws = FALSE else ib_jaws = FALSE end if return 1 end function public subroutine wf_disconnect_all ();// Disconnect all transactions SQLServerTrans.of_disconnect() SQLServerOracleTrans.of_disconnect() //SQLServerTrackerTrans.of_disconnect() end subroutine public function integer of_about ();////////////////////////////////////////////////////////////////////////////// // // Function: of_About // // Access: public // // Arguments: none // // Returns: integer // 1 = success // -1 = error // // Description: Display the about window. // ////////////////////////////////////////////////////////////////////////////// // // Revision History // // Version // 5.0 Initial version // ////////////////////////////////////////////////////////////////////////////// // // Copyright © 1996-1997 Sybase, Inc. and its subsidiaries. All rights reserved. // Any distribution of the PowerBuilder Foundation Classes (PFC) // source code by other than Sybase, Inc. and its subsidiaries is prohibited. // ////////////////////////////////////////////////////////////////////////////// n_cst_aboutattrib lnv_aboutattrib // Populate information passed to the About window. this.Event pfc_preabout (lnv_aboutattrib) Return OpenWithParm (w_pics_about, lnv_aboutattrib) end function public function integer of_checkversion (string as_userid, string as_password, string as_version);////////////////////////////////////////////////////////////////////////////////////////////////////////// // // Function: of_checkversion // Args: String user id // String as_password // String as_version ( Version from the client code) e.g. 'Version 3.7', Version 4.0' // Description: // Call db function f_auth_picsuser to validate version, user id and password ////////////////////////////////////////////////////////////////////////////////////////////////////////// // // Revision History // // Developed by Date Version Tracking# // // Murali K. 11/25/2008 Phase -2 Ver 4.0 Tracker Item 2120 ////////////////////////////////////////////////////////////////////////////////////////////////////////// // string dbname string ls_cur_version, v_cur_version_no, vs_ver string ls_message, ls_msg // 11/25/2008 introduction of DB function pics_security.f_auth_picsuser int li_cnt SELECT lower(cur_version_no), cur_version_no INTO :v_cur_version_no , :vs_ver FROM pics_software WHERE active_yn = 'Y' using sqlservertrans; // declare rpcfunc in pfemain.pbl n_tr transaction object //li_cnt = sqlservertrans.F_AUTH_PICSUSER(as_userid,as_password, as_version) // #2214 changes validate only version li_cnt = sqlservertrans.F_AUTH_PICSUSER( as_version) //messagebox('sqlcode', sqlservertrans.sqlcode) //messagebox('sqldbcode', sqlservertrans.sqldbcode) //messagebox('sqlerrtext', sqlservertrans.sqlerrtext) IF sqlservertrans.sqlcode <> 0 THEN IF sqlservertrans.sqldbcode <> 0 THEN CHOOSE CASE sqlservertrans.sqldbcode CASE 20001 ls_msg = 'Invalid Input! You must provide userid and password.' CASE 20002 messagebox('invalid software', '1') ls_msg = 'Invalid Software Version! You must upgrade your machine to '+ vs_ver Messagebox('Error', ls_msg) RETURN -1 CASE 20003 messagebox('invalid user', '2') ls_msg ='Invalid Username/Password!' Messagebox('Error', ls_msg) gi_attempts++ RETURN 2 CASE 20004 ls_msg = 'Uknown PICS software Version in Database!' END CHOOSE Messagebox('Error', ls_msg) RETURN -1 END IF END IF RETURN 1 end function public function datetime of_getsystemdatetime ();////////////////////////////////////////////////////////////////////////////// // // Function: of_getsystemdatetime // // Access: public // // Arguments: none // // Returns: datetime from the server // // Description: Returns the server's date time // // Developed by : Mural iK. // // Date : 01/08/2009 ////////////////////////////////////////////////////////////////////////////// datetime ldt_time select sysdate into :ldt_time from dual using sqlservertrans ; RETURN ldt_time end function public function integer of_validateuser (string as_userid, string as_password);////////////////////////////////////////////////////////////////////////////////////////////////////////// // // Function: of_validateuser // Args: String user id // String as_password // Description: // Validate new SHA-1 or Old Hash password ////////////////////////////////////////////////////////////////////////////////////////////////////////// // // Revision History // // Developed by Date Version Tracking# // // Murali K. 06/24/2009 4.2 2214 ////////////////////////////////////////////////////////////////////////////////////////////////////////// // string ls_message, ls_msg,ls_en_pwd, ls_sha1_yn, ls_plain_pwd, ls_server_pwd, ls_hash Long ll_return // FETCH NEW SHA1 OR OLD PASSWORD, PLUS THE SHA1 SWITCH SELECT NEW_PASSWRD , SHA1_YN, F_HASH_YN INTO :ls_en_pwd , :ls_sha1_yn, :ls_hash FROM PICSUSER WHERE USERID = :as_userid using sqlservertrans ; IF Isnull( ls_en_pwd) THEN // user not found ll_return = 20003 ELSE IF ls_sha1_yn = 'N' OR Isnull(ls_sha1_yn) OR Len(Trim(ls_sha1_yn)) = 0 THEN // old hash password comparison SELECT F_HASH(:as_password) INTO :ls_server_pwd FROM PICSUSER WHERE USERID = :as_userid using sqlservertrans ; IF Isnull(ls_server_pwd) THEN ll_return = 20003 ELSE IF Trim(ls_en_pwd) = Trim(ls_server_pwd) THEN RETURN 1 ELSE ll_return = 20003 END IF END IF ELSE IF ls_hash = 'R' THEN // FORCE TO RESET TO UID+PASSWORD ls_plain_pwd = f_encrypt(as_password, as_password) // new sha-1 password comparison IF Trim(ls_plain_pwd) = Trim(ls_en_pwd) THEN // if matched decrypt with uid + password AR 3264 05/16/2016 ls_plain_pwd = f_encrypt_uidpwd(as_userid, as_password) // new sha-1 password comparison update picsuser set new_passwrd = :ls_plain_pwd, f_hash_yn=null where userid = :as_userid using sqlservertrans; commit using sqlservertrans; // AR 3264 above RETURN 1 ELSE ll_return = 20003 END IF ELSE ls_plain_pwd = f_encrypt_uidpwd(as_userid, as_password) // new sha-1 password comparison IF Trim(ls_plain_pwd) = Trim(ls_en_pwd) THEN RETURN 1 ELSE ll_return = 20003 END IF END IF END IF END IF CHOOSE CASE ll_return CASE 20001 ls_msg = 'Invalid Input! You must provide userid and password.' CASE 20003 ls_msg ='Invalid Username/Password!' Messagebox('Error', ls_msg) gi_attempts++ //12/09/2014 poam ITEM LS.0009.2010.11.08 IF gi_attempts = 0 or gi_attempts = 1 then insert into nls_logon_hist (userid,passwrd,date_logon,date_locked,status) values(:as_userid,'FAILED',sysdate,sysdate,'F') using sqlservertrans ; COMMIT USING SQLSERVERTRANS ; END IF /// 12/09/2014 RETURN 2 END CHOOSE RETURN 1 end function public function boolean of_checkfifteenminuteelapsedtime (string as_userid); // check if the time logged in attempts elapsed within 15 minutes for locking purpose int li_min date ld_locked select date_locked, round(1440 * (sysdate - date_locked),0) into :ld_locked, :li_min from nls_logon_hist where date_locked = (select max(date_locked) from nls_logon_hist where userid=:as_userid and date_locked is not null and status ='F') using sqlservertrans; //messagebox('date locked', string(ld_locked)) //messagebox('min', li_min) IF isnull(ld_locked) THEN // NO RECORDS EXIST RETURN TRUE END IF //IF Date(today()) = ld_locked THEN IF li_min <=15 OR li_min =0 THEN RETURN TRUE ELSEIF li_min > 15 then RETURN FALSE END IF //END IF RETURN TRUE end function public function integer of_getsessioninfo ();// 01/22/2015 string ls_session, ls_ip, ls_userid, ls_browser ls_session = appeongetclientid() ls_ip = string(appeongetclientip()) ls_userid = sqlservertrans.userid ls_browser = appeongetbrowserversion() insert into appeon_session ( session_id, timestamp,userid, ip_address,browser_type,created_date) values (:ls_session, systimestamp,:ls_userid, :ls_ip,:ls_browser,sysdate) using sqlservertrans ; gs_sessionid = ls_session gs_ip_address = ls_ip gs_browser = ls_browser f_set_appeon_screen_activity(gs_sessionid, gs_ip_address, gs_browser, 'PICS','LOGIN') // 02/26/2015 POAM TASK ITEM to set the client id to identify app user during delete transactions string ls_loginuser ls_loginuser = sqlservertrans.userid DECLARE clientididentifier PROCEDURE FOR dbms_session.set_identifier (:ls_loginuser) USING sqlservertrans; execute clientididentifier; DECLARE clientididentifier2 PROCEDURE FOR dbms_session.set_identifier (:ls_loginuser) USING sqlserveroracletrans; execute clientididentifier2; /// RETURN 1 end function public function integer of_deriveuserid (ref string as_userid);//3264 05/16/2016 sprint 7 string ls_userid If as_userid <> "" then if match(as_userid,'^[a-zA-Z0-9][a-zA-Z\0-9\-_\.]*[^. ]\@[^. ][a-zA-Z\0-9\-_\.]+\.[a-zA-Z\0-9\-_\.]*[a-zA-Z\0-9]+$') then // user entered an email so retrieve user id as_userid = trim(as_userid) select userid into :ls_userid from picsuser where login_id = :as_userid using sqlservertrans ; if isnull(ls_userid) or len(trim(ls_userid)) = 0 then Messagebox('Error', as_userid +' is not a valid email address associated with an user in the system. Please enter a user id or a valid email address.') return -1 else as_userid = ls_userid gnv_app.of_setuserid(as_userid) end if else // messagebox('error',' not a valid email') user entered user id end if end if return 1 end function public function string of_getcorrectuserid (ref string as_userid);//3264 05/16/2016 sprint 7 string ls_userid If as_userid <> "" then if match(as_userid,'^[a-zA-Z0-9][a-zA-Z\0-9\-_\.]*[^. ]\@[^. ][a-zA-Z\0-9\-_\.]+\.[a-zA-Z\0-9\-_\.]*[a-zA-Z\0-9]+$') then // user entered an email so retrieve user id as_userid = trim(as_userid) select userid into :ls_userid from picsuser where login_id = :as_userid using sqlservertrans ; if isnull(ls_userid) or len(trim(ls_userid)) = 0 then return " " else gnv_app.of_setuserid(ls_userid) end if else return as_userid end if end if return ls_userid end function on n_pics_cst_appmanager.create call super::create end on on n_pics_cst_appmanager.destroy call super::destroy end on event constructor;SQLserverTrans = CREATE n_tr SqlServerOracleTrans = CREATE n_tr //SqlServerTrackerTrans = CREATE n_tr SqlDisplayMessage = CREATE n_tr ////////////////////////////////////////////////////////////////////////////// // Get a handle to the application object ////////////////////////////////////////////////////////////////////////////// iapp_object = GetApplication() ////////////////////////////////////////////////////////////////////////////// // Populate the environment object ////////////////////////////////////////////////////////////////////////////// GetEnvironment (ienv_object) ////////////////////////////////////////////////////////////////////////////// // The following code can be implemented in descendants ////////////////////////////////////////////////////////////////////////////// //// Name of the application iapp_object.DisplayName="NLS-PICS Application" // //// Microhelp functionality of_SetMicroHelp (true) // //// The file name of the application INI file // //// The file name of the user INI file //of_SetUserIniFile ("") // //// Application registry key //of_SetAppKey ("") // //// User registry key //of_SetUserKey ("") // //// The file name of the application's online help file //of_SetHelpFile ("") // //// The application version //of_SetVersion ("Version 7.1") //of_SetVersion ("Version 7.1.1") of_SetVersion ("Ver 2017 R7 Sprint 19") //// The application logo (bitmap file name) of_SetLogo ("nlsbphh.bmp") // //// Application copyright message of_SetCopyright ("") // POAM LS-0009.2010-11.10: session timeout 3 hours - 02/06/2015 should be 2 hours 50 mts - (10200 seconds) idle time for a 3 hour session (10800 seconds) duration - warn 10 minutes before timeout Idle(10200) //idle(10200) //idle(60) end event event pfc_logon;////////////////////////////////////////////////////////////////////////////// // // Event: pfc_logon // // Arguments: // as_userid User ID attempting to logon // as_password Password of user attempting to logon // // Returns: integer // 1 = successful logon // -1 = failure // // Description: Specific logon functionality for the application. // Perform logon processing based on User ID and password given. // // Note: this event will be responsible for displaying any error messages // if the logon fails for any reason. // 05/30/2008 Version Validation for regular users and sync and update PICS version // Murali K. 11/25/2008 call version/user id/password validation method Tracker item 2120 // Murali K. 06/24/2009 #2214 4.2 Password encryption and user id validation ////////////////////////////////////////////////////////////////////////////// String ls_uid,ls_username,ls_picsenv,ls_latest_version,ls_cur_version string ls_user_version,ls_pics_msg,ls_message,lpics_type,ls_trk_ext_env string ls_oracle_ext_env,ltoday,ls_guid,synccmd string ls_user_response, ls_locked int rtn,lcnt, li_attempts date lpics_rel_date, ld_admin_date ltoday = string(today(),"mm/dd/yyyy") // appeon SQLServerTrans.DBMS = "O10 Oracle10g (10.1.0)" SQLServerTrans.LogPass = "pass" SQLServerTrans.LogId = "pasadmin" SQLserverTrans.userid = as_userid SQLserverTrans.dbpass = as_password SQLServerTrans.AutoCommit = False SQLServerTrans.DBParm = "Cachename='pas',StaticBind=0,DisableBind=1" ////appeon // appeon SQLserverOracleTrans.DBMS = "O10 Oracle10g (10.1.0)" SQLserverOracleTrans.LogPass = "pass" SQLserverOracleTrans.LogId = "pbcadmin" SQLserverOracleTrans.AutoCommit = False SQLserverOracleTrans.DBParm = "Cachename='pbc',StaticBind=0,DisableBind=1" // give a common name to cache //// appeon // Connect to PB native SQLserverTrans.of_connect() IF SQLserverTrans.sqlcode <> 0 THEN IF SQLserverTrans.SqlDbcode = -951 THEN //check for invalid userid MessageBox("Login Error","Invalid User ID/Password. Please re-enter."+"~r~n"+ & "Or your password has expired, Please check with your system administrator.",StopSign!) Return -1 ELSEIF SQLserverTrans.SqlDBcode = -952 THEN //check for invalid password MessageBox("Login Error","Invalid User ID/Password. Please re-enter."+"~r~n"+ & "Or your password has expired, Please check with your system administrator.",StopSign!) Return -1 Else //check for other error messages ls_message = "Unable to Connect to PICS Internal Database. " MessageBox("Database Connection Error",ls_message+string(SQLserverTrans.sqldbcode) + " " +& SQLserverTrans.SQLErrText, & StopSign!) Return -1 END IF ELSE // DB login is successful //3264 05/16/2016 - sprint 7 IF of_deriveuserid(as_userid) <>1 THEN wf_disconnect_all() w_pics_main.ib_close = false gnv_app.event pfc_exit() else sqlservertrans.userid= as_userid // messagebox('pfc_logon', as_userid) END IF /// 3264 05/16/2016 gnv_app.of_SetUserId(as_userid) // Get the current version from the user application ls_cur_version = gnv_app.of_GetVersion() // 05/30/2008 get it for the user who logged in //11/25/2008 call version/user id/password validation method Tracker Item 2120 int li_ret // 02/09/09 SELECT LOCKED, ADMIN_PASSWRDCHG INTO :ls_locked, :ld_admin_date FROM PICSUSER WHERE USERID = :as_userid using sqlservertrans; IF ls_locked = 'Y' THEN // sqlservertrans.sqlcode = 0 THEN //poam 03/10/2015 if locked for more than 15 minutes unlock and validate user again IF of_checkfifteenminuteelapsedtime(as_userid) = FALSE THEN UPDATE PICSUSER SET LOCKED = NULL, last_fail =sysdate WHERE USERID = :as_userid using sqlservertrans; commit using sqlservertrans ; ELSE Messagebox('Error', 'Your account is locked, Please contact system administrator') wf_disconnect_all() w_pics_main.ib_close = false gnv_app.event pfc_exit() END IF END IF //12/17/2008 Tracker 2119 3 login attempt failure // #2214 06/25/09 use this function only to validate version //05/03/2012 for appeon no need to validate client version // li_ret = of_checkversion(as_userid,as_password, ls_cur_version) // IF li_ret <> 1 THEN // wf_disconnect_all() // halt close // END IF //////////////// // 06/24/2009 #2214 Version 4.2 user id and password validation li_ret = of_validateuser(as_userid,as_password) IF li_ret = 2 THEN select parameter_value into :li_attempts from ref_system_control_parameters where parameter_name='login_attempts' using sqlservertrans ; IF of_checkfifteenminuteelapsedtime(as_userid) = TRUE THEN IF gi_attempts = li_attempts THEN UPDATE PICSUSER SET LOCKED = 'Y', last_fail =sysdate WHERE USERID = :as_userid using sqlservertrans; IF sqlservertrans.sqlcode = 0 THEN Messagebox('Error', 'Your account is locked, Please contact system administrator') wf_disconnect_all() // halt close w_pics_main.ib_close = false gnv_app.event pfc_exit() END IF END IF END IF wf_disconnect_all() RETURN -1 ELSEIF li_ret <> 1 THEN wf_disconnect_all() // halt close w_pics_main.ib_close = false gnv_app.event pfc_exit() END IF ////////////////// // 06/24/2009 #2114 // Successful logon to pasadmin, load the messages for db error // 6/28/2010 commnted gnv_app.inv_error.of_SetPredefinedSource (SQLServerTrans) gnv_app.inv_error.of_SetLogFile("picserrlog.txt") gnv_app.inv_error.of_SetNotifySeverity(5) rtn = gnv_app.inv_error.of_LoadPredefinedMsg() // messagebox('loadpredefinedmsg',rtn) gnv_app.inv_error.of_SetStyle(gnv_app.inv_error.PFCWINDOW) ///// 6/28/2010 // Connect to other oracle databases (PICS Web) SqlServerOracleTrans.of_connect() IF SqlServerOracleTrans.sqlcode <> 0 THEN IF SqlServerOracleTrans.SqlDbcode = -951 THEN //check for invalid userid MessageBox("Login Error","Invalid User ID/Password for Oracle PICS Web Database.",StopSign!) Return -1 ELSEIF SqlServerOracleTrans.SqlDBcode = -952 THEN //check for invalid password MessageBox("Login Error","Invalid User ID/Password for Oracle PICS Web Database.",StopSign!) Return -1 Else //check for other error messages MessageBox("Database Connection Error","Unable to Connect to Oracle using PICS Web Database." +& string(SqlServerOracleTrans.sqldbcode) + " " +& SqlServerOracleTrans.SQLErrText, & StopSign!) // Return -1 END IF END IF // Get a guid from system table for later usage SELECT SYS_GUID() INTO :ls_guid FROM DUAL using SQLServertrans; // Check to see if this user is a Beta tester. select pics_type //, pics_version into :lpics_type //, :ls_cur_version from picsuser where userid = :as_userid using SQLServertrans; IF NOT(IsNull(lpics_type)) AND TRIM(lpics_type)<>"" THEN ELSE MessageBox("Warning","This userid = "+as_userid+" does not have any type associated with it. "+"~r~nPlease ask the system administrator to assign you a type.",Information!) END IF // messagebox('session', appeongetsessionbyid()) of_getsessioninfo() // Update the pics_version 11/25/2008 after succesfull login //05/03/2012 no need to update version for appeon /* Update picsuser set pics_version = :ls_cur_version, pics_guid = :ls_guid where userid = :as_userid using SQLServertrans; If f_check_dberror(sqlservertrans,"PASSUSER") THEN commit using sqlservertrans; else rollback using sqlservertrans; messagebox("ERROR","Could not set the guid string: "+ls_guid+" for the user: "+as_userid+".") end if */ // If pics_type in not NULL RETURN 1 END IF end event event pfc_open;call super::pfc_open;INT rtn , ijaws boolean bjaws string ls_filename, ls_message gnv_app.of_SetError(True) //Enable the debug service //gnv_app.of_SetDebug(TRUE) //Enable the SQL Spy service //gnv_app.inv_debug.of_SetSQLSpy(TRUE) //Specify a log file for the SQL Spy service //gnv_app.inv_debug.inv_SQLSpy.of_SetLogFile(ls_filename) rtn = gnv_app.of_LogonDlg() IF rtn = 0 THEN this.Event pfc_exit( ) ELSEIF rtn = -1 THEN this.Event pfc_open(as_commandline) ELSE bjaws = of_isjawsrunning() if bjaws = TRUE then ijaws = 1 else ijaws = 0 end if of_setjaws(ijaws) Open (w_pics_main) END IF end event event pfc_idle;call super::pfc_idle;// POAM LS-0009.2010-11.10: 02/06/2015 should be 2 hours 50 hrs idle time for a 3 hour session duration //Messagebox('Warning - Session Timeout', 'The Application will timeout within 10 minutes. Please click the OK button and save any data to prevent data loss. If the session times out, unsaved data will be lost and you have to login into the application again') string lsurl //AR 3244 02/12/2016 lsurl += "iexplore " + appeongetieurl() + "alert.htm" run(lsurl) end event event pfc_close;call super::pfc_close;f_set_appeon_screen_activity(gs_sessionid, gs_ip_address, gs_browser, 'PICS','LOGOUT') end event