"January", 2 => "February", 3 => "March", 4 => "April", 5 => "May", 6 => "June",
7 => "July", 8 => "August", 9 => "September", 10 => "October", 11 => "November", 12 => "December");
?>
";
}
?>
Screenshot statistics for {$name}"; }
?>
";
for ($y = 2000; $y <= 2012; $y++) {
for ($m = 1; $m <= 12; $m++) {
if (is_array($allgrabs[$y][$m]) == true) {
$totalcount = count($allgrabs[$y][$m]);
$avgeachday = ceil(count($allgrabs[$y][$m]) / count($bydaylist[$m]));
foreach ($bydaylist[$m] as $day => $files) {
if (count($day) > $max[$m]) {
$maxno[$m] = $day;
$max[$m] = date("F d, Y", mktime(0, 0, 0, $m, $day, date("y")));
}
}
echo "- Grabs in {$monthindex[$m]} {$y}: {$totalcount} -- average of {$avgeachday} grabs a day -- most active day is {$max[$m]} with {$maxno[$m]} grabs.
";
}
}
}
echo " ";
?>
0)
{
$dhours = ($days*24*3600);
$seconds = $seconds-$dhours;
$ret .= "$days days, ";
}
$hours = intval(intval($seconds) / 3600);
if($hours > 0)
{
$ret .= "$hours hours, ";
}
$minutes = bcmod((intval($seconds) / 60),60);
if($hours > 0 || $minutes > 0)
{
$ret .= "$minutes minutes and ";
}
$seconds = bcmod(intval($seconds),60);
$ret .= "$seconds seconds";
return "$ret";
}
?>
$base_info['0'],
"height" => $base_info['1'],
"type" => $base_info['2'],
"html" => $base_info['3'],
"bits" => filesize($filename),
"mime" => $base_info['mime'],
"mtime" => filemtime($filename),
"comment" => NULL,
);
}
function scale_maxwidth($file_info, $width) {
if ($file_info['width'] > $width) {
if ($file_info['width'] > $file_info['height']) {
$image_width = $width;
$image_height = round(($file_info['height'] * $width) / $file_info['width']);
} elseif ($file_info['width'] < $file_info['height']) {
$image_width = round(($file_info['width'] * $width) / $file_info['height']);
$image_height = $width;
} elseif ($file_info['height'] == $file_info['width']) {
$image_height = $image_height = $width;
}
return array("w" => $image_width, "h" => $image_height);
}
}
$randgrab = (mt_rand(1, count($filelist)) - 1);
$randgrab = $filelist[$randgrab];
$fileinfo = get_image_info("./{$randgrab}");
$randgrab_date = date ("l, F d, Y H:i O ", filemtime($randgrab));
$since = filemtime($randgrab);
$since = timediff($since);
$base_info = getimagesize($randgrab);
$size0 = filesize($randgrab);
$size0 = $size0 / '1024';
if ($size0 >= '1024') { $size0 = $size0 / '1024'; }
$size0 = round($size0, '2');
$size1 = $base_info['0'];
$size2 = $base_info['1'];
$randgrab_noext = preg_replace('/\.[^.]*$/', '', $randgrab);
echo "";
echo "Uploaded: {$randgrab_date}";
echo "({$since} ago.)";
echo "Size: {$size0}KB - {$size1}x{$size2}";
if ($fileinfo['width'] > 795) {
$filedems = scale_maxwidth($fileinfo, 795);
echo " ";
echo "
The above image has been resized to better fit the screen. Click it to view the true size. ";
} else {
echo " ";
}
?>
";
echo "Grabups in {$monthindex[$m]} {$y}";
echo "";
$files2show = array();
foreach ($allgrabs[$y][$m] as $file) {
$datemt = filemtime("./{$file}");
$files2show[$datemt] = array("name" => $file, "mt" => $datemt);
}
ksort($files2show);
foreach ($files2show as $file) {
if (preg_match("/\.png/i", $file['name']) == true) { $filetype = 'PNG'; }
if (preg_match("/\.jpg/i", $file['name']) == true) { $filetype = 'JPEG'; }
if (preg_match("/\.jpeg/i", $file['name']) == true) { $filetype = 'JPEG'; }
if (preg_match("/\.bmp/i", $file['name']) == true) { $filetype = 'BMP'; }
$filedate = date ("l, F d, Y H:i O ", filemtime($file['name']));
$file_noext = preg_replace('/\.[^.]*$/', '', $file['name']);
echo "- {$filetype} {$file_noext} - {$filedate}";
}
unset($files2show);
echo "
";
}
}
}
?>
|