\n"?>

User name

"."Log entry time " . date("H:i:s ") . "on " .date("F d, Y") ."\n"; $uname = posix_uname(); echo "\n"; echo "

" ."Entry number ".$logentrynumber."

\n"; if ($log_refer != NULL){ // echo "This log has reference to log number(s): " .$log_refer ."
\n"; echo "\n"; } preg_match("/^(.*),(.*)$/",$topic,$matches); if($matches[2]) { $full_title = $matches[2].": ".$log_title; } else { $full_title = $log_title; } if($full_title && $full_title!="nessus") $notblankentry++; echo "keyword=".$full_title ."
\n"; //echo .hclogrootdir."/tmp_html/".$today .".html"."
\n"; // Use a+ just in case a file of same name already exists $filenamenopostfix = "".$hclogrootdir."/log/tmp_html/".$today; if($log_text) $notblankentry++; //echo "Log Title is: " .$full_title ."
\n"; echo "
\n"; if($htmlstyle == "pre") { echo str_replace("\n","
\n",htmlentities($log_text))."
\n"; } elseif ($htmlstyle == "pure") { echo $log_text."
\n"; } else { echo preg_replace("/(^|\n)\s*(\n|$)/s","\\1

\\2",$log_text)."
\n"; } echo "
\n"; if ($notify != NULL){ echo "A copy of this log entry has been emailed to: " .$notify ."
\n"; } echo "
\n"; echo "
\n"; echo "
\n"; $i=0; while ($HTTP_POST_FILES['att_file'.$i]['size'] !=0) { $filetype=$HTTP_POST_FILES['att_file'.$i]['type']; $pieces=explode("/",$filetype); $extension=fileExtension($HTTP_POST_FILES['att_file'.$i]['name']); // echo "Filetypes: $filetype $extension |\n"; // echo "Original filename is: " .$HTTP_POST_FILES['att_file'.$i]['name'] ."
\n"; if(!strpos(".x-php.cgi.shtml.phtml.php.exe",$pieces[1]) && !strpos(".php.PHP.cgi.CGI.shtml.SHTML.phtml.PHTML.exe.EXE",$extension)) { $notblankentry++; $varname="att_title$i"; echo "

" .${$varname} ."

\n"; //echo "image size is: " .$HTTP_POST_FILES['att_file'.$i]['size'] ."
\n"; //echo "type of image is: " .$pieces[0]." ".$pieces[1] ."
\n"; $attatchmentfilename = $filenamenopostfix.".".($i+1)."." .$pieces[1]; move_uploaded_file($HTTP_POST_FILES['att_file'.$i]['tmp_name'], $attatchmentfilename); chmod($attatchmentfilename,0666); if ($pieces[1] == "gif" || $pieces[1] == "jpeg" || $pieces[1] == "pjpeg" || $pieces[1] == "x-portable-anymap" || $pieces[0] == "image") { echo "
\n"; } else { echo "".$HTTP_POST_FILES['att_file'.$i]['name']."
\n"; } echo "
\n"; } else { unlink($HTTP_POST_FILES['att_file'.$i]['tmp_name']); } $i++; } ?> =2) { $handle=fopen($filenamenopostfix.".html", "a+"); fwrite($handle,$contents); fclose($handle); chmod($filenamenopostfix.".html", 0666); } else { echo "BLANK ENTRY, NOT ENTERED INTO LOGBOOK
\n"; $notify=NULL; } $handlelog=fopen($hclogrootdir."/src/zphp.log","a"); fwrite($handlelog,$contents); fclose($handlelog); // Mail the logbook entry to those that requested it if ($notify != NULL){ // Hack up the image pointers to point to final locations $finalpath = "$webroot/".substr($today,0,4)."_archive"; $newcontents=ereg_replace("(\r\n"); fputs($fd, "Subject: $full_title\r\n"); fputs($fd, "Content-Type: text/html; charset=utf-8\r\n"); fputs($fd, "X-Mailer: Elog/(PHP)\r\n\r\n"); fputs($fd, "$log_title\r\n $newcontents\r\n"); pclose($fd); } ?>