1<?php 2# --------------------------------------------------------------------- 3# truc is a tool for requirement and use case tracking 4# Copyright (C) 2006 ASDIS - http://sf.net/projects/truc 5# 6# (rth) Initial truc version based on rth 7# Copyright (C) 2005 George Holbrook - rth@lists.sourceforge.net 8# 9# This program is distributed under the terms and conditions of the GPL 10# See the README and LICENSE files for details 11#---------------------------------------------------------------------- 12# ---------------------------------------------------------------------- 13# Log Activity to Log Table 14# ---------------------------------------------------------------------- 15function log_activity_log($page_name, $deletion, $creation, $upload, $action) { 16 17 global $db; 18 19 $s_project_name = session_get_project_name(); 20 $s_user_properties = session_get_user_properties(); 21 $s_username = $s_user_properties['username']; 22 $s_session = session_get_ID(); 23 24 $current_date = date("Y-m-d H:i:s"); 25 $page_name = $page_name." - ".$s_project_name; 26 $logs_tbl = LOGS_TBL; 27 $query = " INSERT INTO $logs_tbl ( User, 28 Page, 29 TimeStamp, 30 SessionID, 31 Deletion, 32 Creation, 33 Upload, 34 Action ) 35 36 VALUES ( '$s_username', 37 '$page_name', 38 '$current_date', 39 '$s_session', 40 '$deletion', 41 '$creation', 42 '$upload', 43 '$action' )"; 44 45 db_query( $db, $query ); 46} 47?>