download.php 4.8 KB
<?php $this->_extends('layout/admin_layout');?>
<?php $this->_block('main');?>
<?php if($this->view->type == 0):?>
<h4>参展商手册</h4>
<table class="table" type="<?php echo $this->view->type;?>">
<caption style="text-align:left; padding-bottom:5px;">
    <button  class="btn" id="create_download_info" style="float:left;">
    	添加参展商手册
    </button>
    </caption>
   <thead>
      <td width="10%">编号</td>
      <td width="10%">参展商名称</td>
	  <td width="20%">图片</td>
	  <td width="20%">日期</td>
      <td>操作</td>
   </thead>
   <?php foreach ($this->view->list as $download):?>
     <tr>
    	<td><?php echo $download['id']?></td>
    	<td><?php echo $download['title']?></td>
    	<td><img alt="" src="<?php echo $download['cover']?>" width="200" height="200"></td>
    	<td><?php echo date('Y-m-d H:i:s', $download['create_time']);?></td>
    	<td>
    		<button  class="btn btn-success modify" download_id="<?php echo $download['id']?>">修改</button>
    		<button  class="btn btn-danger del" download_id="<?php echo $download['id']?>">删除</button>
    	</td>
     </tr>
   <?php endforeach;?>
</table>
 <div id="form_pan" admin="" style="display:none;">
       <table class="table table-bordered">
          <tbody>
            <tr>
	              <td>名称<span class="text-error"> * </span></td>
	              <td colspan="3">
	              		<input type="text" id="title" name="title"/>
	              		<input type="hidden" name="download_id" id="download_id" value="0"/>
	              </td>
            </tr>
            <tr>
              <td>封面图(279x396)<span class="text-error"> * </span></td>
              <td>
                <span id="upload_pic" key="<?php echo $this->view->key?>"></span>
                <button class="btn btn-info" type="button">上传</button>
                <div id="picdiv"></div>
              </td>
            </tr>
            <tr>
              <td>文件上传<span class="text-error"> * </span></td>
              <td>
              		<span id="upload_file" key="<?php echo $this->view->key?>"></span>
    				<button class="btn btn-info" type="button">上传</button>
    				<div id="filediv"></div>
              </td>
            </tr>
          </tbody>
    </table>
</div>

<?php else:?>

<table class="table" type="<?php echo $this->view->type;?>">
<caption style="text-align:left; padding-bottom:5px;">
    <button  class="btn" id="create_download_info" style="float:left;">
    	添加新闻稿
    </button>
    </caption>
   <thead>
      <td width="10%">编号</td>
      <td width="10%">媒体稿</td>
	  <td width="20%">来源</td>
	  <td width="20%">日期</td>
      <td>操作</td>
   </thead>
      <?php foreach ($this->view->list as $download):?>
     <tr>
    	<td><?php echo $download['id']?></td>
    	<td><?php echo $download['title']?></td>
    	<td><?php echo $download['source']?></td>
    	<td><?php echo date('Y-m-d H:i:s', $download['create_time']);?></td>
    	<td>
    		<button  class="btn btn-success modify" download_id="<?php echo $download['id']?>">修改</button>
    		<button  class="btn btn-danger del" download_id="<?php echo $download['id']?>">删除</button>
    	</td>
     </tr>
   <?php endforeach;?>
</table>
 <div id="form_pan" admin="" style="display:none;">
       <table class="table table-bordered">
          <tbody>
            <tr>
              <td>名称<span class="text-error"> * </span></td>
              <td colspan="3">
              		<input type="text" id="title" name="title"/>
              		<input type="hidden" id="download_id" name="download_id" value="0"/>
              </td>
            </tr>
            <tr>
              <td>来源<span class="text-error"> * </span></td>
              <td colspan="3">
              		<input type="text" id="source" name="source"/>
              </td>
            </tr>
             <tr>
              <td>来源链接:<span class="text-error"> * </span></td>
              <td colspan="3">
              		<input type="text" id="source_link" name="source_link"/>
              </td>
            </tr>
            <tr>
              <td>文件上传<span class="text-error"> * </span></td>
             <td>
              		<span id="upload_file" key="<?php echo $this->view->key?>"></span>
    				<button class="btn btn-info" type="button">上传</button>
    				<div id="filediv"></div>
              </td>
            </tr>
          </tbody>
    </table>
</div>   
<?php endif;?>   

<?php $this->_component('Common_Pagination',array(
    'pagination' => $this->view->pagination,'show_count' =>true,
 ));?>
<?php $this->_endblock();?> 
<?php $this->_block('js');?>

<?php $this->_js('feedback.js', array(
    SITE_JS . '/lib/seajs.js',
));?>
<script type="text/javascript">
seajs.use('admin/onlinereg',function(onlinereg){
	onlinereg.download();
});
</script>
<?php $this->_endblock();?>