function nc_format_file_name($id, $digit) {
if($digit>19) echo $digit=substr($digit, -1, 1);
if($digit==1) $strend=1;
if($digit>=2 && $digit<=4) $strend=2;
if($digit==0 || ($digit>=5 && $digit<=19)) $strend=3;
if($id=="folder") {$a=array(1=>"папка", 2=>"папки", 3=>"папок"); return $a[$strend];}
if($id=="file") {$a=array(1=>"файл", 2=>"файла", 3=>"файлов"); return $a[$strend];}
return false;
}
if ($virtualMode) {
?>
}
$f_folder_size=0;
$f_file_count=0;
if ($parent) {
$parentofparent=@listQuery("SELECT Parent_Message_ID AS p FROM Message$classID WHERE Message_ID=$parent","$data[p]");
}
?>
| файл/папка |
размер |
тип |
действие |
if ($parent) { ?>
| . |
|
в корень |
|
if ($parentofparent) { ?>
| .. |
|
на уровень выше |
|
}
} ?>
$childrenofparent = listQuery("SELECT COUNT(*) AS count FROM Message$classID WHERE Parent_Message_ID=$f_RowID", "$data[count]");
?>
if (!$f_file) { ?>
= $f_folder ?>
} else { ?>
}
?>
|
if ($f_file) { ?>
= opt($counted_file_size = nc_bytes2size($f_file_size), $counted_file_size) ?> } ?>
|
= opt_case($f_folder, "папка", $f_file_type) ?>
|
if (!$childrenofparent) { ?>
'>'
}
?>
|
$f_folder_size+=$f_file_size;
$f_file_count = opt_case($f_file, ($f_file_count + 1), $f_file_count);
?>
|
В текущей папке: =opt($format_file_name=nc_format_file_name("file", $f_file_count), $f_file_count." ".$format_file_name)." (".opt($counted_file_size=nc_bytes2size($f_folder_size), $counted_file_size)."), ".opt($format_file_name=nc_format_file_name("folder", $totRows-$f_file_count), $totRows-$f_file_count." ".$format_file_name)?>
|
|
if ($virtualMode) { ?> } ?>