Merge branch 'master' of http://git.yoho.cn/web/yoho-live
Showing
5 changed files
with
23 additions
and
12 deletions
@@ -132,7 +132,7 @@ class ForbiddenController extends BaseController | @@ -132,7 +132,7 @@ class ForbiddenController extends BaseController | ||
132 | $room_id = $gets['room_id']; | 132 | $room_id = $gets['room_id']; |
133 | if($room_id) { | 133 | if($room_id) { |
134 | //$sqlwhere = ['cmd' => 5]; | 134 | //$sqlwhere = ['cmd' => 5]; |
135 | - $sqlwhere = []; | 135 | + $sqlwhere = ['room_id'=>$room_id]; |
136 | $count = (new \yii\db\Query()) | 136 | $count = (new \yii\db\Query()) |
137 | ->from($this->getTableName($room_id)) | 137 | ->from($this->getTableName($room_id)) |
138 | ->where($sqlwhere) | 138 | ->where($sqlwhere) |
@@ -14,7 +14,7 @@ class SystemController extends BaseController | @@ -14,7 +14,7 @@ class SystemController extends BaseController | ||
14 | { | 14 | { |
15 | $key = 'servers'; | 15 | $key = 'servers'; |
16 | if (Yii::$app->request->isPost && trim(Yii::$app->request->post('content'))) { | 16 | if (Yii::$app->request->isPost && trim(Yii::$app->request->post('content'))) { |
17 | - $content = Yii::$app->request->post('content'); | 17 | + /*$content = Yii::$app->request->post('content'); |
18 | $ip_arr = explode(",",trim($content)); | 18 | $ip_arr = explode(",",trim($content)); |
19 | $ip_arr = array_map(function($v){return trim($v);},$ip_arr); | 19 | $ip_arr = array_map(function($v){return trim($v);},$ip_arr); |
20 | 20 | ||
@@ -26,10 +26,12 @@ class SystemController extends BaseController | @@ -26,10 +26,12 @@ class SystemController extends BaseController | ||
26 | }else{ | 26 | }else{ |
27 | Yii::$app->session->setFlash('error', '保存失败。'); | 27 | Yii::$app->session->setFlash('error', '保存失败。'); |
28 | } | 28 | } |
29 | - $this->redirect('/system/servers'); | 29 | + $this->redirect('/system/servers');*/ |
30 | }else{ | 30 | }else{ |
31 | - $model = SysConfig::find()->where(['conf_key' => $key])->one(); | ||
32 | - $ips = json_decode($model->conf_value, true); | 31 | + /*$model = SysConfig::find()->where(['conf_key' => $key])->one(); |
32 | + $ips = json_decode($model->conf_value, true);*/ | ||
33 | + $cache_prefix = Yii::$app->params['cache_prefix']; | ||
34 | + $ips = Yii::$app->redisIm->smembers($cache_prefix . ":server_list"); | ||
33 | return $this->render('servers', ['ips' => $ips]); | 35 | return $this->render('servers', ['ips' => $ips]); |
34 | } | 36 | } |
35 | } | 37 | } |
@@ -3,7 +3,7 @@ use yii\helpers\Html; | @@ -3,7 +3,7 @@ use yii\helpers\Html; | ||
3 | use backend\widgets\LinkPager; | 3 | use backend\widgets\LinkPager; |
4 | 4 | ||
5 | ?> | 5 | ?> |
6 | -<div class="col-md-6"> | 6 | +<div class="col-md-12"> |
7 | <div class="row"> | 7 | <div class="row"> |
8 | <div class="col-md-12"> | 8 | <div class="col-md-12"> |
9 | <div class="table-responsive"> | 9 | <div class="table-responsive"> |
@@ -29,7 +29,7 @@ use backend\widgets\LinkPager; | @@ -29,7 +29,7 @@ use backend\widgets\LinkPager; | ||
29 | } | 29 | } |
30 | ?> | 30 | ?> |
31 | </td> | 31 | </td> |
32 | - <td><?php echo date('Y-m-i H:i:s',$v['create_time'])?></td> | 32 | + <td><?php echo date('Y-m-d H:i:s',$v['create_time'])?></td> |
33 | <td><button class="btn btn-danger jinyan" uid="<?php echo $v['uid']?>" name="<?php echo $v['name']?>" room_id="<?php echo $v['room_id']?>">禁言</button></td> | 33 | <td><button class="btn btn-danger jinyan" uid="<?php echo $v['uid']?>" name="<?php echo $v['name']?>" room_id="<?php echo $v['room_id']?>">禁言</button></td> |
34 | </tr> | 34 | </tr> |
35 | <?php endforeach;?> | 35 | <?php endforeach;?> |
@@ -48,7 +48,7 @@ use backend\widgets\LinkPager; | @@ -48,7 +48,7 @@ use backend\widgets\LinkPager; | ||
48 | //5s自动刷新页面 | 48 | //5s自动刷新页面 |
49 | setInterval(function(){ | 49 | setInterval(function(){ |
50 | window.location.reload(); | 50 | window.location.reload(); |
51 | - },5000);//1000为1秒钟 | 51 | + },10000);//1000为1秒钟 |
52 | 52 | ||
53 | //禁言按钮 | 53 | //禁言按钮 |
54 | $('.jinyan').click(function(){ | 54 | $('.jinyan').click(function(){ |
@@ -9,7 +9,7 @@ use backend\widgets\LinkPager; | @@ -9,7 +9,7 @@ use backend\widgets\LinkPager; | ||
9 | <span>直播状态:<?php echo Yii::$app->params['config']['room_living'][$room['living']]?></span> | 9 | <span>直播状态:<?php echo Yii::$app->params['config']['room_living'][$room['living']]?></span> |
10 | </p> | 10 | </p> |
11 | </div> | 11 | </div> |
12 | -<div class="col-md-6"> | 12 | +<div class="col-md-5"> |
13 | <div class="panel panel-default"> | 13 | <div class="panel panel-default"> |
14 | <div class="panel-body"> | 14 | <div class="panel-body"> |
15 | <form class="form-inline" method="post" action="/forbidden/create"> | 15 | <form class="form-inline" method="post" action="/forbidden/create"> |
@@ -87,7 +87,7 @@ use backend\widgets\LinkPager; | @@ -87,7 +87,7 @@ use backend\widgets\LinkPager; | ||
87 | <!-- col-md-12 --> | 87 | <!-- col-md-12 --> |
88 | </div> | 88 | </div> |
89 | </div> | 89 | </div> |
90 | -<div class="col-md-6"> | 90 | +<div class="col-md-7"> |
91 | <iframe height="600px" width="100%" src="/forbidden/getcomments?room_id=<?php echo $filter['room_id']?>"> | 91 | <iframe height="600px" width="100%" src="/forbidden/getcomments?room_id=<?php echo $filter['room_id']?>"> |
92 | 92 | ||
93 | </iframe> | 93 | </iframe> |
@@ -9,7 +9,7 @@ $this->title = '管理后台首页'; | @@ -9,7 +9,7 @@ $this->title = '管理后台首页'; | ||
9 | <div class="panel-heading"> | 9 | <div class="panel-heading"> |
10 | <h5 class="panel-title">弹幕服务器列表</h5> | 10 | <h5 class="panel-title">弹幕服务器列表</h5> |
11 | </div> | 11 | </div> |
12 | - <form class="form-inline" method="post" action="/system/servers"> | 12 | + <!--<form class="form-inline" method="post" action="/system/servers"> |
13 | <div class="panel-body"> | 13 | <div class="panel-body"> |
14 | <div> | 14 | <div> |
15 | <div class="form-group"> | 15 | <div class="form-group"> |
@@ -28,7 +28,16 @@ $this->title = '管理后台首页'; | @@ -28,7 +28,16 @@ $this->title = '管理后台首页'; | ||
28 | </div> | 28 | </div> |
29 | </div> | 29 | </div> |
30 | </div> | 30 | </div> |
31 | - </form> | 31 | + </form>--> |
32 | + <div class="panel-body"> | ||
33 | + <?php | ||
34 | + if($ips){ | ||
35 | + foreach($ips as $ip){ | ||
36 | + echo $ip."<br>"; | ||
37 | + } | ||
38 | + } | ||
39 | + ?> | ||
40 | + </div> | ||
32 | </div> | 41 | </div> |
33 | </div> | 42 | </div> |
34 | <div class="col-md-6"> | 43 | <div class="col-md-6"> |
-
Please register or login to post a comment