} else { $lang = 'en'; } } /**log in table Login**/ require_once 'classes/model/LoginLog.php'; $weblog = new LoginLog(); $aLog['LOG_UID'] = G::generateUniqueID(); $aLog['LOG_STATUS'] = 'ACTIVE'; $aLog['LOG_IP'] = G::getIpAddress(); $aLog['LOG_SID'] = session_id(); $aLog['LOG_INIT_DATE'] = date('Y-m-d H:i:s'); //$aLog['LOG_END_DATE'] = '0000-00-00 00:00:00'; $aLog['LOG_CLIENT_HOSTNAME'] = $_SERVER['HTTP_HOST']; $aLog['USR_UID'] = $_SESSION['USER_LOGGED']; $weblog->create($aLog); /**end log**/ //************** background processes, here we are putting some back office routines ********** $heartBeatNWIDate = $oServerConf->getHeartbeatProperty('HB_NEXT_GWI_DATE', 'HEART_BEAT_CONF'); if (is_null($heartBeatNWIDate)) { $heartBeatNWIDate = time(); } if (time() >= $heartBeatNWIDate) { $oServerConf->setWsInfo(SYS_SYS, $oServerConf->getWorkspaceInfo(SYS_SYS)); $oServerConf->setHeartbeatProperty('HB_NEXT_GWI_DATE', strtotime('+1 day'), 'HEART_BEAT_CONF'); } //**** defining and saving server info, this file has the values of the global array $_SERVER **** //this file is useful for command line environment (no Browser), I mean for triggers, crons and other executed over command line $_CSERVER = $_SERVER; unset($_CSERVER['REQUEST_TIME']); unset($_CSERVER['REMOTE_PORT']);