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

68 lines
2.6 KiB
PHTML

<?php
$this->headTitle($this->config->title->site);
$this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/admin.css');
$this->headLink()->appendStylesheet('/js/swfupload/swfupload.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/admin">后台首页</a>');
$this->breadcrumb('数据管理');
$this->breadcrumb()->setSeparator(' > ');
$this->headScript()->appendFile('/js/swfupload/swfupload.js');
$this->headScript()->appendFile('/js/swfupload/handlers.js');
$this->headScript()->appendFile('/js/swfupload/fileprogress.js');
?>
<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">
<form action="#" method="POST" enctype='multipart/form-data'>
<input type="hidden" name="add" value="1" />
<input type="hidden" name="submit" value="1" />
<input type="hidden" name="edit" value="<?php echo $this->info['id'];?>" />
<table>
<tr>
<td width="100">文件描述</td>
<td><textarea name="filedesc" style="width:300px;"><?php echo $this->info['filedesc'];?></textarea></td>
</tr>
<tr>
<td>文件类型</td>
<td>
<select name="dir" style="width:100px;" <?php if(!empty($this->info['filename'])) echo 'disabled="disabled"';?>>
<option value="image" <?php if($this->info['filetype']=='image') echo 'selected="selected"'; ?>>图片</option>
<option value="file" <?php if($this->info['filetype']=='file') echo 'selected="selected"'; ?>>文件</option>
<option value="media" <?php if($this->info['filetype']=='media') echo 'selected="selected"'; ?>>媒体</option>
</select>
</td>
</tr>
<tr>
<td>文件</td>
<td>
<?php if(empty($this->info['filename']))
echo '<input type="file" name="Filedata" id="file" />';
else
echo '<input style="width:300px;" type="text" readonly="readonly" value="'.$this->info['filename'].'" />';
?>
</td>
</tr>
</table>
<input type="submit" name="submit" value="<?php if(empty($this->info['filename'])) echo "上传";else echo "修改";?>" />
</form>
</div>
</div>