Authored by wuxiao

Merge branch 'master' of http://git.yoho.cn/web/yoho-live

... ... @@ -132,7 +132,7 @@ class ForbiddenController extends BaseController
$room_id = $gets['room_id'];
if($room_id) {
//$sqlwhere = ['cmd' => 5];
$sqlwhere = [];
$sqlwhere = ['room_id'=>$room_id];
$count = (new \yii\db\Query())
->from($this->getTableName($room_id))
->where($sqlwhere)
... ...
... ... @@ -14,7 +14,7 @@ class SystemController extends BaseController
{
$key = 'servers';
if (Yii::$app->request->isPost && trim(Yii::$app->request->post('content'))) {
$content = Yii::$app->request->post('content');
/*$content = Yii::$app->request->post('content');
$ip_arr = explode(",",trim($content));
$ip_arr = array_map(function($v){return trim($v);},$ip_arr);
... ... @@ -26,10 +26,12 @@ class SystemController extends BaseController
}else{
Yii::$app->session->setFlash('error', '保存失败。');
}
$this->redirect('/system/servers');
$this->redirect('/system/servers');*/
}else{
$model = SysConfig::find()->where(['conf_key' => $key])->one();
$ips = json_decode($model->conf_value, true);
/*$model = SysConfig::find()->where(['conf_key' => $key])->one();
$ips = json_decode($model->conf_value, true);*/
$cache_prefix = Yii::$app->params['cache_prefix'];
$ips = Yii::$app->redisIm->smembers($cache_prefix . ":server_list");
return $this->render('servers', ['ips' => $ips]);
}
}
... ...
... ... @@ -3,7 +3,7 @@ use yii\helpers\Html;
use backend\widgets\LinkPager;
?>
<div class="col-md-6">
<div class="col-md-12">
<div class="row">
<div class="col-md-12">
<div class="table-responsive">
... ... @@ -29,7 +29,7 @@ use backend\widgets\LinkPager;
}
?>
</td>
<td><?php echo date('Y-m-i H:i:s',$v['create_time'])?></td>
<td><?php echo date('Y-m-d H:i:s',$v['create_time'])?></td>
<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>
</tr>
<?php endforeach;?>
... ... @@ -48,7 +48,7 @@ use backend\widgets\LinkPager;
//5s自动刷新页面
setInterval(function(){
window.location.reload();
},5000);//1000为1秒钟
},10000);//1000为1秒钟
//禁言按钮
$('.jinyan').click(function(){
... ...
... ... @@ -9,7 +9,7 @@ use backend\widgets\LinkPager;
<span>直播状态:<?php echo Yii::$app->params['config']['room_living'][$room['living']]?></span>
</p>
</div>
<div class="col-md-6">
<div class="col-md-5">
<div class="panel panel-default">
<div class="panel-body">
<form class="form-inline" method="post" action="/forbidden/create">
... ... @@ -87,7 +87,7 @@ use backend\widgets\LinkPager;
<!-- col-md-12 -->
</div>
</div>
<div class="col-md-6">
<div class="col-md-7">
<iframe height="600px" width="100%" src="/forbidden/getcomments?room_id=<?php echo $filter['room_id']?>">
</iframe>
... ...
... ... @@ -9,7 +9,7 @@ $this->title = '管理后台首页';
<div class="panel-heading">
<h5 class="panel-title">弹幕服务器列表</h5>
</div>
<form class="form-inline" method="post" action="/system/servers">
<!--<form class="form-inline" method="post" action="/system/servers">
<div class="panel-body">
<div>
<div class="form-group">
... ... @@ -28,7 +28,16 @@ $this->title = '管理后台首页';
</div>
</div>
</div>
</form>
</form>-->
<div class="panel-body">
<?php
if($ips){
foreach($ips as $ip){
echo $ip."<br>";
}
}
?>
</div>
</div>
</div>
<div class="col-md-6">
... ...