room.php
3.98 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
85
<?php
use yii\helpers\Html;
use backend\widgets\LinkPager;
use backend\widgets\YHGImage\Common\Images as CommonImages;
$this->title = $this->params['main_title'].'-'.$this->params['sub_title'];
?>
<div class="panel panel-default">
<div class="panel-body">
<form action="" method="GET" class="form-inline">
<div>
<?=$filter?>
</div>
</form>
</div>
</div>
<div class="form-group">
<label>
<a href="/live/roomcreate" class="btn btn-primary">+ 创建房间</a>
</label>
</div>
<div class="row">
<div class="col-md-12">
<div class="table-responsive">
<table class="table mb30">
<thead>
<tr style="white-space:nowrap">
<th><input type="checkbox" onclick="checkall(this)">选择</th>
<th>房间号</th>
<th>APP</th>
<th>直播标题</th>
<th>头图</th>
<th>主播</th>
<th>预告开始时间</th>
<th>房间密钥</th>
<th>是否精选</th>
<th>马甲状态</th>
<th>直播状态</th>
<th>操作</th>
</tr>
</thead>
<tbody>
<?php foreach ($list as $model):?>
<tr data-stock="1" data-source="1" data-status="2" data-id="5011880">
<td><input type="checkbox" value="<?=$model->id?>" name="room[]"></td>
<td><?=$model->room_id?></td>
<td><?=$model->app?></td>
<td><?=$model->title?></td>
<td><img height="70" alt="房间封面图片" src="<?=CommonImages::getImageUrl($model->pic, 70, 70, 2)?>"></td>
<td><?=$model->master ? $model->master->master_id.' '.$model->master->name : '无主播'?></td>
<td style="white-space:nowrap"><?=$model->starting_time ? date('Y-m-d H:i:s',$model->starting_time) : ''?></td>
<td><?=$model->secret?></td>
<td><?=Yii::$app->params['config']['best'][$model->best]?></td>
<td><?=Yii::$app->params['config']['vest'][$model->vest]?></td>
<td><?=Yii::$app->params['config']['room_living'][$model->living]?></td>
<td>
<a href="/live/roomedit/<?=$model->id?>" class="btn btn-default btn-white">编辑</a>
<a href="/forbidden/index?room_id=<?=$model->room_id?>" class="btn btn-default btn-white">禁言</a>
<a href="/product/list/<?=$model->room_id?>" class="btn btn-default btn-white">商品</a>
<span>
<?php if ($model->status == 0)://未开始?>
<a onclick="return confirm('启用直播间?')" href="/live/roomoperate/<?=$model->id?>?type=enable" class="btn btn-success btn-metro">启用直播</a>
<a onclick="return confirm('删除直播间?')" href="/live/roomoperate/<?=$model->id?>?type=del" class="btn btn-danger btn-metro">删除</a>
<?php else:?>
<a onclick="return confirm('禁用直播间?')" href="/live/roomoperate/<?=$model->id?>?type=disable" class="btn btn-danger btn-metro">禁用直播</a>
<?php endif;?>
</span>
</td>
</tr>
<?php endforeach;?>
</tbody>
</table>
</div>
<!-- table-responsive -->
<?php echo LinkPager::widget(['pagination' => $pagination]);?>
</div>
<!-- col-md-12 -->
</div>