371 |
$log=fopen($logname,"r"); |
$log=fopen($logname,"r"); |
372 |
$cl1=" class=LST"; $cl2=""; |
$cl1=" class=LST"; $cl2=""; |
373 |
$logarr = array(); |
$logarr = array(); |
374 |
while($line = fgetcsv($log,255,"\t")) { |
while($line = fgetcsv($log,512,"\t")) { |
375 |
$cl=$cl1; $cl1=$cl2; $cl2=$cl; |
$cl=$cl1; $cl1=$cl2; $cl2=$cl; |
376 |
array_unshift($logarr,array($cl,$line[0],$line[1],$line[2],$line[3])); |
array_unshift($logarr,array($cl,$line[0],$line[1],$line[2],$line[3])); |
377 |
} |
} |
1145 |
$log=fopen("$gblFsRoot/.changelog","a+"); |
$log=fopen("$gblFsRoot/.changelog","a+"); |
1146 |
if (substr($target,0,strlen($gblFsRoot)) == $gblFsRoot) |
if (substr($target,0,strlen($gblFsRoot)) == $gblFsRoot) |
1147 |
$target=substr($target,strlen($gblFsRoot),strlen($target)-strlen($gblFsRoot)); |
$target=substr($target,strlen($gblFsRoot),strlen($target)-strlen($gblFsRoot)); |
1148 |
|
$msg=str_replace("\t"," ",$msg); |
1149 |
fputs($log,time()."\t$target\t$GLOBALS[gblUserName]\t$msg\n"); |
fputs($log,time()."\t$target\t$GLOBALS[gblUserName]\t$msg\n"); |
1150 |
fclose($log); |
fclose($log); |
1151 |
|
|
1157 |
if (!file_exists("$gblFsRoot/.changelog")) return; |
if (!file_exists("$gblFsRoot/.changelog")) return; |
1158 |
$log=fopen("$gblFsRoot/.changelog","r"); |
$log=fopen("$gblFsRoot/.changelog","r"); |
1159 |
$logarr = array(); |
$logarr = array(); |
1160 |
while($line = fgetcsv($log,255,"\t")) { |
while($line = fgetcsv($log,512,"\t")) { |
1161 |
|
$line[0] .= sizeof($line); |
1162 |
|
while (sizeof($line) > 4) { |
1163 |
|
$tmp = array_pop($line); |
1164 |
|
$line.=" $tmp"; |
1165 |
|
} |
1166 |
if ($day!=1 || ($day==1 && (time()-$line[0] < 24*60*60))) { |
if ($day!=1 || ($day==1 && (time()-$line[0] < 24*60*60))) { |
1167 |
array_unshift($logarr,array($line[0],$line[1],$line[2],$line[3])); |
array_unshift($logarr,array($line[0],$line[1],$line[2],$line[3])); |
1168 |
} |
} |