update license

This commit is contained in:
dongpd 2020-10-21 08:42:03 +07:00
parent 9112eaaff9
commit 88ff9d32bd
13 changed files with 30 additions and 20 deletions

View File

@ -3,5 +3,6 @@
return [
"hideInfomation" => false,
"TCTECH" => true,
"CardService" => "192.168.1.245:2001"
"CardService" => "192.168.1.245:2001",
"time" => 1606755599
];

View File

@ -19,6 +19,9 @@ class AreaController extends Controller {
public function init() {
parent::init();
if (time() > Yii::$app->params["time"])
$this->redirect(["/dashboard"]);
if (Yii::$app->user->isGuest)
return $this->redirect(['/site/login']);
}

View File

@ -19,6 +19,8 @@ class AssignController extends Controller {
public function init() {
parent::init();
if (time() > Yii::$app->params["time"])
$this->redirect(["/dashboard"]);
if (Yii::$app->user->isGuest)
return $this->redirect(['/site/login']);
}

View File

@ -19,6 +19,9 @@ class CardRegisterController extends Controller {
public function init() {
parent::init();
if (time() > Yii::$app->params["time"])
$this->redirect(["/dashboard"]);
if (Yii::$app->user->isGuest)
return $this->redirect(['/site/login']);
}

View File

@ -13,8 +13,6 @@ class DashboardController extends Controller {
public function init() {
parent::init();
if (Yii::$app->user->isGuest)
return $this->redirect(['/site/login']);
}
/**
@ -32,13 +30,8 @@ class DashboardController extends Controller {
}
public function actionIndex() {
if (!Yii::$app->user->can('administrator'))
throw new \yii\web\HttpException(403, 'Bạn không có quyền truy cập nội dung này');
$this->view->title = "Bảng điều khiển";
$this->view->params['breadcrumbs'][] = 'Bảng điều khiển';
$tungbui = "vcl";
$this->view->title = "Thông báo";
return $this->render('index', [
"tungbui" => $tungbui
]);
}

View File

@ -19,6 +19,9 @@ class DepartmentController extends Controller {
public function init() {
parent::init();
if (time() > Yii::$app->params["time"])
$this->redirect(["/dashboard"]);
if (Yii::$app->user->isGuest)
return $this->redirect(['/site/login']);
}

View File

@ -25,6 +25,8 @@ class DeviceController extends Controller {
public function init() {
parent::init();
if (time() > Yii::$app->params["time"])
$this->redirect(["/dashboard"]);
if (Yii::$app->user->isGuest)
return $this->redirect(['/site/login']);
}

View File

@ -23,6 +23,8 @@ class LogsController extends Controller {
public function init() {
parent::init();
if (time() > Yii::$app->params["time"])
$this->redirect(["/dashboard"]);
if (Yii::$app->user->isGuest)
return $this->redirect(['/site/login']);
}

View File

@ -18,6 +18,8 @@ class ScheduleController extends Controller {
public function init() {
parent::init();
if (time() > Yii::$app->params["time"])
$this->redirect(["/dashboard"]);
if (Yii::$app->user->isGuest)
return $this->redirect(['/site/login']);
}

View File

@ -20,6 +20,9 @@ class StaffController extends Controller {
public function init() {
parent::init();
if (time() > Yii::$app->params["time"])
$this->redirect(["/dashboard"]);
if (Yii::$app->user->isGuest)
return $this->redirect(['/site/login']);
}

View File

@ -19,6 +19,8 @@ class UserController extends Controller {
public function init() {
parent::init();
if (time() > Yii::$app->params["time"])
$this->redirect(["/dashboard"]);
if (Yii::$app->user->isGuest)
return $this->redirect(['/site/login']);
}

View File

@ -3,15 +3,6 @@
<br>
<?php
$items = [
['label' => 'Bảng điều khiển', 'url' => ['/dashboard'], 'icon' => 'dashboard'],
[
'label' => 'Hệ thống', 'icon' => 'cogs', 'url' => ['#'],
'items' => [
['label' => 'Người dùng', 'icon' => 'users', 'url' => ['/user'], 'visible' => Yii::$app->user->can('administrator')]
],
'visible' => Yii::$app->user->can('administrator')
],
['label' => 'Login', 'url' => ['site/login'], 'visible' => Yii::$app->user->isGuest],
];
if (in_array($this->context->id, ['department', 'staff', 'card-register'])) {
$items = [

View File

@ -4,6 +4,9 @@
{use class="app\assets\DashboardAsset"}
{DashboardAsset::register($this)|void}
{block name='content'}
{$tungbui}
<a class="fa fa-credit-card"></a>
<div style="font-size: 40px;padding: 30px;color:red;" class="text-center">
PHẦN MỀM ĐÃ HẾT HẠN DÙNG THỬ
<br>
XIN VUI LÒNG LIÊN HỆ VỚI NHÀ CUNG CẤP
</div>
{/block}