-
Notifications
You must be signed in to change notification settings - Fork 4
/
_read_files.html
28 lines (28 loc) · 2.25 KB
/
_read_files.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<div id="files_{$oDocument->document_srl}" class="rd_fnt rd_file<!--@if(!$mi->show_files)--> hide_file<!--@end-->">
<table class="bd_tb">
<caption class="blind">Atachment</caption>
<tr>
<th scope="row" class="ui_font"><strong>{$lang->uploaded_file}</strong> <span class="fnt_count">'<b>{$oDocument->get('uploaded_count')}</b>'</span></th>
<td>
<ul cond="!$mi->files_type">
<li loop="$oDocument->getUploadedFiles()=>$key,$file"><a class="bubble" href="{getUrl('')}{$file->download_url}" title="[File Size:{FileHandler::filesize($file->file_size)}/Download:{number_format($file->download_count)}]">{$file->source_filename}</a><span class="comma">,</span></li>
</ul>
<ul cond="$mi->files_type">
<block loop="$oDocument->getUploadedFiles()=>$key,$file">
{@
$ext = substr($file->source_filename, -4);
$ext = strtolower($ext);
$ext_img = in_array($ext,array('.jpg','jpeg','.gif','.png'));
$ext_video = in_array($ext,array('.mpg','mpeg','.avi','.wmv','.mp4','.mov','.mkv','.swf','.flv','.ogv','webm'));
$ext_audio = in_array($ext,array('.mp3','.ogg','.wma','.wav','.ape','flac','.mid'));
}
<li cond="!$mi->files_img && $ext_img"><a class="bubble" href="{getUrl('')}{$file->download_url}" title="[File Size:{FileHandler::filesize($file->file_size)}/Download:{number_format($file->download_count)}]">{$file->source_filename}</a><span class="comma">,</span></li>
<li cond="!$mi->files_video && $ext_video"><a class="bubble" href="{getUrl('')}{$file->download_url}" title="[File Size:{FileHandler::filesize($file->file_size)}/Download:{number_format($file->download_count)}]">{$file->source_filename}</a><span class="comma">,</span></li>
<li cond="!$mi->files_audio && $ext_audio"><a class="bubble" href="{getUrl('')}{$file->download_url}" title="[File Size:{FileHandler::filesize($file->file_size)}/Download:{number_format($file->download_count)}]">{$file->source_filename}</a><span class="comma">,</span></li>
<li cond="!$mi->files_etc && (!$ext_img && !$ext_video && !$ext_audio)"><a class="bubble" href="{getUrl('')}{$file->download_url}" title="[File Size:{FileHandler::filesize($file->file_size)}/Download:{number_format($file->download_count)}]">{$file->source_filename}</a><span class="comma">,</span></li>
</block>
</ul>
</td>
</tr>
</table>
</div>