I'm a real newb to this, but I'm a quick learner. This is from a site I bought as a whole.
I own a site and in the statistics its always 3 weeks and some hours behind.
in the statistics.php it points me to the stats.php and in that file the script is such:
Code:
<?
$totalsize=0;
function show_dir($dir, $pos=2){
global $totalsize;
if($pos == 2)
$handle = @opendir($dir);
while ($file = @readdir ($handle)){
if (eregi("^\.{1,2}$",$file))
continue;
if (is_dir($dir.$file)) {
show_dir("$dir.$file/", $pos+3);
} else {
if ((substr($file,-4) != "html") && (substr($file,-3) != "php")) {
$size=filesize($dir.$file);
$totalsize=$totalsize+$size;
}
}
}
@closedir($handle);
if($pos == 2)
return($totalsize);
}
$totalsize = show_dir("{$drr}uploads/");
$filecount = 0;
$path = "{$drr}uploads/";
if ($handle = opendir($path)) {
while (false!== ($file = readdir($handle))) {
if (!is_dir($path. $file) && (substr($file,-4) != "html") && (substr($file,-3) != "php")) {
$filecount++;
}
}
closedir($handle);
}
function LoadFiles($dir)
{
$Files = array();
$It = opendir($dir);
if (! $It)
die('Cannot list files for ' . $dir);
while ($Filename = readdir($It))
{
if ($Filename == '.' || $Filename == '..')
continue;
$LastModified = filemtime($dir . $Filename);
$Files[] = array($dir .$Filename, $LastModified);
}
return $Files;
}
function DateCmp($a, $b)
{
return ($a[1] < $b[1]) ? -1 : 0;
}
function SortByDate(&$Files)
{
usort($Files, 'DateCmp');
}
$Files = LoadFiles("{$drr}uploads/");
SortByDate($Files);
$lastfile = date("F j, Y, g:i a", $Files[0][1]);
$totalsize = round($totalsize/1024); $totalsize .= "KB";
?>
Am I looking in the right place ? And if so does anyone see something I'm missing ?
Thanks in advance for anyones time in this.