index.php
3.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<?php $this->_extends('layout/admin_layout');?>
<?php $this->_block('main');?>
<table class="table">
<caption style="text-align:left; padding-bottom:5px;">
<button class="btn" style="float:left;" id="add_partner" href="javascript:void(0)">添加合作伙伴</button>
</caption>
<thead>
<td>编号</td>
<td>名字</td>
<td>类型</td>
<td>链接</td>
<td>图片</td>
<td width="15%">描述</td>
<td>时间</td>
<td>操作</td>
</thead>
<?php foreach($this->view->partners as $partner):?>
<tr>
<td><?php echo $partner['id'];?></td>
<td><?php echo $partner['name'];?></td>
<td type="<?php echo $partner['type'];?>"><?php echo isset($this->view->types[$partner['type']]) ? $this->view->types[$partner['type']] : ''; ?></td>
<td><?php echo $partner['url'];?></td>
<td>
<img src="<?php echo Lib_Images::getImageUrl($partner['pic'], 'source','fragmentimg');?>" width="100" height="100" pic="<?php echo $partner['pic'];?>"/>
</td>
<td><?php echo $partner['description'];?></td>
<td><?php echo date('Y-m-d H:i:s', $partner['create_time']);?></td>
<td>
<button partner_id="<?php echo $partner['id'];?>" class="btn edit_partner">编辑</button>
<button partner_id="<?php echo $partner['id'];?>" class="btn del_partner">删除</button>
</td>
</tr>
<?php endforeach;?>
</table>
<div id="form_pan"style="display:block;">
<table class="table table-bordered">
<tbody>
<tr>
<td>名称 <span class="text-error"> * </span></td>
<td><input type="text" id="name" name="name"/>
<input type="hidden" id="id" name="id"/>
</td>
<td>图片(70x70)<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>
<input type="hidden" id="pic" name="pic"/>
<img src="" id="img" style="height: 37px;width:100px;"/>
</td>
</tr>
<tr>
<td>类型</td>
<td>
<select name="type" id="type">
<?php foreach($this->view->types as $key => $val): ?>
<option value="<?php echo $key; ?>"><?php echo $val; ?></option>
<?php endforeach;?>
</select>
</td>
</tr>
<tr>
<td>描述</td>
<td>
<textarea rows="3" style="margin-left: 0px; margin-right: 0px; width: 320px;" id="description" name="description"></textarea>
</td>
<td>链接</td>
<td>
<input type="text" name="url" id="url" value=""/>
</td>
</tr>
</table>
</div>
<?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/partner',function(partner){
partner.info();
});
</script>
<?php $this->_endblock();?>