2011-07-06 23:52:26 +00:00
|
|
|
<?php foreach($_['files'] as $file):
|
|
|
|
$simple_file_size = simple_file_size($file['size']);
|
2011-07-29 01:09:30 +00:00
|
|
|
$simple_size_color = 200-intval($file['size']/(1024*1024)*5);
|
|
|
|
if($simple_size_color<0) $simple_size_color = 0;
|
2011-07-28 22:45:44 +00:00
|
|
|
$relative_modified_date = relative_modified_date($file['mtime']);
|
2011-07-29 01:04:25 +00:00
|
|
|
$relative_date_color = round((time()-$file['mtime'])/60/60/24*7); //days ago
|
2011-07-28 22:45:44 +00:00
|
|
|
if($relative_date_color>200) $relative_date_color = 200; ?>
|
2011-07-21 20:01:55 +00:00
|
|
|
<tr data-file="<?php echo $file['name'];?>" data-type="<?php echo ($file['type'] == 'dir')?'dir':'file'?>" data-mime="<?php echo $file['mime']?>" data-size='<?php echo $file['size'];?>'>
|
2011-07-07 00:41:22 +00:00
|
|
|
<td class="filename">
|
2011-07-21 20:01:55 +00:00
|
|
|
<input type="checkbox" />
|
2011-07-28 02:29:04 +00:00
|
|
|
<a class="name" style="background-image:url(<?php if($file['type'] == 'dir') echo mimetype_icon('dir'); else echo mimetype_icon($file['mime']); ?>)" href="<?php if($file['type'] == 'dir') echo link_to('files', 'index.php?dir='.$file['directory'].'/'.$file['name']); else echo link_to('files', 'download.php?file='.$file['directory'].'/'.$file['name']); ?>" title="">
|
2011-07-28 10:14:55 +00:00
|
|
|
<span class="nametext">
|
2011-07-07 00:41:22 +00:00
|
|
|
<?php if($file['type'] == 'dir'):?>
|
2011-07-29 00:47:02 +00:00
|
|
|
<?php echo htmlspecialchars($file['name']);?>
|
2011-07-07 00:41:22 +00:00
|
|
|
<?php else:?>
|
2011-07-07 02:14:24 +00:00
|
|
|
<?php echo htmlspecialchars($file['basename']);?><span class='extention'><?php echo $file['extention'];?></span>
|
2011-07-07 00:41:22 +00:00
|
|
|
<?php endif;?>
|
2011-07-28 10:14:55 +00:00
|
|
|
</span>
|
2011-07-07 00:41:22 +00:00
|
|
|
</a>
|
|
|
|
</td>
|
2011-07-06 23:52:26 +00:00
|
|
|
<td class="filesize" title="<?php echo human_file_size($file['size']); ?>" style="color:rgb(<?php echo $simple_size_color.','.$simple_size_color.','.$simple_size_color ?>)"><?php echo $simple_file_size; ?></td>
|
2011-07-28 22:45:44 +00:00
|
|
|
<td class="date"><span class="modified" title="<?php echo $file['date']; ?>" style="color:rgb(<?php echo $relative_date_color.','.$relative_date_color.','.$relative_date_color ?>)"><?php echo $relative_modified_date; ?></span></td>
|
2011-04-17 14:19:21 +00:00
|
|
|
</tr>
|
2011-07-06 22:20:40 +00:00
|
|
|
<?php endforeach; ?>
|