2 $monLibrary= dirname(__FILE__) .
"/../library";
3 require_once(
"$monLibrary/cu_top.i");
4 require_once(
"$monLibrary/ck_hticket.i");
6 # share permissions of 'stmnt_reports' instead of 'basename($_SERVER['SCRIPT_NAME'])' 7 if (!CheckPerm($link, $Hu,
'stmnt_reports', $_SERVER[
'REMOTE_ADDR'])) {
10 header(
"Location: /hcuadm/hcu_noperm.prg");
14 $dms_ok=array(
'rowid'=>
'string');
17 cu_header(
"$rowid Statement Load History");
18 $filepath =
"/home/" . $rowid .
"/stmnt";
19 if(is_readable(
"$filepath/summary.log")) {
21 <table border=1 cellpadding=1 cellspacing=1> 23 <td class='bar' align=center colspan='8'> 24 $rowid Statement Load History 27 <tr><th>Load Date</th> 33 <th colspan='2'>Details</th></tr>\n";
35 $drop=array(
" ",
"-",
":");
36 # one year maximum displayed 37 $showmax = date(
'Y-m-d H:i:s',time() - (366 * 24 * 60 * 60));
40 $fp = file(
"$filepath/summary.log");
41 if(is_array($fp)) rsort($fp);
42 foreach($fp as $buffer) {
43 $buffer = rtrim($buffer);
45 list($lddate,$procid,$perdate,$pertype,$fin,$loadcount,$overcount,$dropcount,$perdesc) = explode(
"\t",$buffer);
47 if ($lddate < $showmax)
break;
49 $procid = preg_replace(
'/^0*/',
'',$procid);
50 $fin = preg_replace(
'/Norm\/0$/',
' ',$fin);
51 $fin = preg_replace(
'/\/0$/',
'',$fin);
52 $outlinkname=(str_replace($drop,
"",$lddate) .
"." . $procid .
".out");
53 $errlinkname=(str_replace($drop,
"",$lddate) .
"." . $procid .
".err");
54 $maelinkname=(str_replace($drop,
"",$lddate) .
"." . $procid .
".mae");
56 if (is_readable(
"/home/$rowid/stmnt/logs/$errlinkname")) {
57 $log=
"<a href='tfiles.prg/$rowid/stmnt/logs/$errlinkname' target='CONTENT'>$lddate</a>";
61 if (is_readable(
"/home/$rowid/stmnt/logs/$outlinkname")) {
62 $outlog=
"<a href='tfiles.prg/$rowid/stmnt/logs/$outlinkname' target='CONTENT'>Show</a>";
66 if (is_readable(
"/home/$rowid/stmnt/logs/$maelinkname")) {
67 $maelog=
"<a href='tfiles.prg/$rowid/stmnt/logs/$maelinkname' target='CONTENT'>MAE</a>";
71 print
"<tr><td class='dtl'>$log</td> 72 <td class='dtl'>$perdesc</td> 73 <td class='dtl'>$fin</td> 74 <td class='dtl'>$loadcount</td> 75 <td class='dtl'>$overcount</td> 76 <td class='dtl'>$dropcount</td> 77 <td class='dtl'>$outlog</td> 78 <td class='dtl'>$maelog</td> 83 print
"</table></form>";
85 print
"<H1>Not Found</H1> 86 E-Statement log (summary.log) not found for $rowid. 89 print
"</body></html>";