93 lines
3.1 KiB
PHTML
93 lines
3.1 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="divContent">
|
|
<div id="leftPanel">
|
|
<?= $this->partial('data/left.phtml'); ?>
|
|
</div>
|
|
|
|
|
|
<?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 id="rightPanel">
|
|
<div><a href="/admin/data/attachments/add/1">上传新附件</a> | <a href="attachments/search/my">查看我的附件</a></div>
|
|
|
|
<div class="search">
|
|
<form action="" method="get">
|
|
<input type="hidden" name="search" value='1' />
|
|
<ul>
|
|
<li><label>搜索关键字</label><input type="text" name="keyword" value="<?php echo $this->keyword; ?>" /></li>
|
|
<li><input type="submit" class="searchbtn" value="搜索" /></li>
|
|
</ul>
|
|
</form>
|
|
</div><!-- search DIV -->
|
|
|
|
<?php if (count($this->paginator)): ?>
|
|
<form method="get" action="/admin/data/md/att/1/addatts/1">
|
|
<table>
|
|
<thead><tr>
|
|
<?php
|
|
if(!empty($this->uuid))
|
|
echo '<th width="40">选择</th>';
|
|
?>
|
|
<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 $autoindex=0;?>
|
|
<?php foreach ($this->paginator as $item): ?>
|
|
<?php $autoindex++;?>
|
|
<tr <?php if($autoindex%2 == 0) echo 'bgcolor="#CCCCCC"'; else echo 'bgcolor="#FFFFFF"'; ?>>
|
|
<?php
|
|
if(!empty($this->uuid))
|
|
echo '<td><input type="checkbox" value="'.$item['id'].'" name="ids[]" /></td>';
|
|
?>
|
|
<td><?php echo $item['filedesc'] ;?></td>
|
|
<td><?php
|
|
if($item['filetype']=='image') echo '图片' ;
|
|
if($item['filetype']=='file') echo '文件' ;
|
|
if($item['filetype']=='media') echo '多媒体' ;
|
|
?></td>
|
|
<td><?php if($item['filesize']<1048576) echo round(($item['filesize']/1024),2).'KB'; else echo round(($item['filesize']/1024/1024),2).'MB'; ?></td>
|
|
<td><?= $item['downtimes']; ?></td>
|
|
<td><?= date('Y-m-d H:i:s',strtotime($item['ts_created'])); ?></td>
|
|
<td>
|
|
<a href="/admin/data/attachments/edit/<?= $item['id']; ?>">编辑</a> |
|
|
<a href="/admin/data/attachments/delete/<?= $item['id']; ?>" onclick="return confirm('是否确定删除该附件?')">删除</a> |
|
|
<a href="/admin/data/attachments/down/<?= $item['id']; ?>">下载</a>
|
|
</td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
</table>
|
|
<?php
|
|
if(!empty($this->uuid))
|
|
echo '<input type="hidden" name="uuid" value="'.$this->uuid.'" /><input type="hidden" name="submit" value="1" /><input type="submit" value="将已选择的附件添加到《'.$this->mdtitle.'》" />';
|
|
?>
|
|
</form>
|
|
<?php endif; ?>
|
|
<div style="width:50%;text-align:left;">
|
|
<?= $this->paginator; ?>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|