Index: trunk/core/kernel/utility/http_query.php =================================================================== diff -u -r4614 -r4636 --- trunk/core/kernel/utility/http_query.php (.../http_query.php) (revision 4614) +++ trunk/core/kernel/utility/http_query.php (.../http_query.php) (revision 4636) @@ -89,7 +89,7 @@ function Init($prefix, $special) { $this->AddAllVars(); - + $this->specialsToRemove = $this->Get('remove_specials'); if($this->specialsToRemove) { @@ -775,6 +775,32 @@ } return $ret; } + + function writeRequestLog($filename) + { + $folder_path = dirname(FULL_PATH.'/'.$filename); + if (is_writable($folder_path)) { + $fp = fopen(FULL_PATH.'/'.$filename, 'a'); + if ($fp) { + $session =& $this->Application->recallObject('Session'); + $user_id = $session->GetField('PortalUserId'); + $admin_mark = $this->Application->IsAdmin() ? 'ADMIN' : 'FRONT'; + + $data = '['.date('D M d H:i:s Y').'] '.$admin_mark.'; ip: '.$_SERVER['REMOTE_ADDR'].'; user_id: '.$user_id.'; sid: '.$this->Application->GetSID().'; request: '."\n"; + $data .= "_GET:\n".print_r($this->Get, true)."_POST:\n".print_r($this->Post, true)."_COOKIE:\n".print_r($this->Cookie, true)."\n".str_repeat('=', 100)."\n"; + + fwrite($fp, $data); + fclose($fp); + } + else { + trigger_error('Requrest Log directory not writable', E_USER_WARNING); + } + } + else { + trigger_error('Requrest Log directory not writable', E_USER_WARNING); + } + } + } ?> \ No newline at end of file