Beispiel #1
0
    echo zotop::url("system/template/select/{$field}", array('dir' => $dir . '/' . $folder));
    ?>
"><?php 
    echo $folder;
    ?>
</a></td>
	<td></td>
	<td></td>
	<td></td>
	<td></td>
	<td></td>
</tr>
<?php 
}
foreach ($files as $file) {
    $filepath = site::template($dir . '/' . $file);
    $filedata = file::data($filepath);
    $filesize = file::size($filepath, true);
    ?>
<tr class="item file">
	<td class="w20 center"><span class="zotop-icon zotop-icon-file"></span></td>
	<td class="w120"><input type="hidden" value="<?php 
    echo empty($dir) ? $file : $dir . '/' . $file;
    ?>
"/><?php 
    echo $file;
    ?>
</td>
	<td><?php 
    echo $filedata['description'] ? $filedata['description'] : $filedata['title'];
    ?>
Beispiel #2
0
 public function actionDelete($file)
 {
     $file = empty($file) ? zotop::get('file') : $file;
     $file = trim(url::decode($file), '/');
     $filepath = site::template($file);
     if (file::delete($filepath)) {
         msg::success('删除成功', url::referer());
     }
     msg::error('删除失败');
 }