westdc-zf1/application/admin/views/scripts/data/attmanager.phtml

56 lines
1.7 KiB
PHTML

<?php
$this->headTitle($this->config->title->site);
$this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/admin.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/admin">后台首页</a>');
$this->breadcrumb('数据管理');
$this->breadcrumb()->setSeparator(' > ');
?>
<div id="leftPanel">
<?= $this->partial('data/left.phtml'); ?>
</div>
<div id="rightPanel">
<?php if ($this->msg or $this->messages) :?>
<div id="message">
<?php if ($this->msg) : ?>
<p><?php echo $this->msg; ?></p>
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
<p><?php echo $msg; ?></p>
<?php endforeach;endif; ?>
</div>
<?php endif; ?>
<div><a href="/admin/data/md/att/1/uuid/<?php echo $this->uuid;?>/addatts/1/mdtitle/<?php echo $this->mdtitle ;?>">为此元数据添加附件</a></div>
<table>
<thead><tr>
<th width='300'>描述</th>
<th width='80'>类型</th>
<th width='80'>大小</th>
<th width='80'>下载次数</th>
<th width='150'>上传时间</th>
<th width="150">操作</th>
</tr></thead>
<tbody>
<?php
foreach ($this->atts as $v)
{
if($v['filesize']<1048576) $v['filesize'] = round(($v['filesize']/1024),2).'KB'; else $v['filesize'] = round(($v['filesize']/1024/1024),2).'MB';
echo '
<tr>
<td>'.$v['filedesc'].'</td>
<td>'.$v['filetype'].'</td>
<td>'.$v['filesize'].'</td>
<td>'.$v['downtimes'].'</td>
<td>'.date('Y-m-d H:i:s',strtotime($v['ts_created'])).'</td>
<td>
<a href="/admin/data/attachments/" onclick="return confirm(\'是否确定删除该附件?\')">从此元数据中移除</a>
</td>
</tr>';
}
?>
</tbody></table>
</div>