コード例 #1
0
ファイル: CApp.class.php プロジェクト: Rustam44/ASUPortalPHP
 /**
  * Протоколирование действий пользователя
  */
 private function logUserActivity()
 {
     $query = new CQuery($this->getDbLogConnection());
     $query->insert(LOG_TABLE_STATS, array("url" => basename($_SERVER["SCRIPT_NAME"]), "host_ip" => $_SERVER["REMOTE_ADDR"], "port" => $_SERVER["REMOTE_PORT"], "agent" => $_SERVER["HTTP_USER_AGENT"], "user_name" => is_null(CSession::getCurrentUser()) ? 0 : CSession::getCurrentUser()->getId(), "q_string" => $_SERVER['QUERY_STRING'], "referer" => array_key_exists("HTTP_REFERER", $_SERVER) ? $_SERVER["HTTP_REFERER"] : 0, "is_bot" => CUtils::isHTTPRefererIsBot() ? 1 : 0));
     $query->execute();
 }