$class = 'b';
if($dirok )
{
?>
if($class=='b') $class='w';
else $class = 'b';
}
$arsize = sizeof($dirs);
for($i=0;$i<$arsize;$i++) {
?>
if($class=='b') $class='w';
else $class = 'b';
}
$arsize = sizeof($files);
for($i=0;$i<$arsize;$i++) {
$icon = 'unknown.png';
$ext = strtolower(substr($files[$i], strrpos($files[$i], '.')+1));
$supportedimages = array('gif', 'png', 'jpeg', 'jpg');
$thumb = '';
if($showthumbnails && in_array($ext, $supportedimages)) {
$thumb = '
';
$thumb2 = ' onClick="o('.$i.', \''.urlencode($leadon . $files[$i]).'\');" onClick="f('.$i.');"';
}
if($filetypes[$ext]) {
$icon = $filetypes[$ext];
}
$filename = $files[$i];
if(strlen($filename)>53) {
$filename = substr($files[$i], 0, 50) . '...';
}
$fileurl = $leadon . $files[$i];
if($forcedownloads) {
$fileurl = $_SESSION['PHP_SELF'] . '?dir=' . urlencode($leadon) . '&download=' . urlencode($files[$i]);
}
?>
if($class=='b') $class='w';
else $class = 'b';
}
?>
if($allowuploads) {
$phpallowuploads = (bool) ini_get('file_uploads');
$phpmaxsize = ini_get('upload_max_filesize');
$phpmaxsize = trim($phpmaxsize);
$last = strtolower($phpmaxsize{strlen($phpmaxsize)-1});
switch($last) {
case 'g':
$phpmaxsize *= 1024;
case 'm':
$phpmaxsize *= 1024;
}
?>
File Upload (Max Filesize: KB)
if($phpallowuploads) {
?>
}
else {
?>
File uploads are disabled in your php.ini file. Please enable them.
}
?>