Index Sebelum Login

parent 075a70bd
......@@ -22,10 +22,24 @@ class SiteController extends Controller
'class' => AccessControl::className(),
'rules' => [
[
'actions' => ['index', 'index'],
'allow' => true,
],
[
'actions' => ['login', 'error'],
'allow' => true,
],
[
'actions' => ['about', 'index'],
'allow' => true,
'roles' => ['@'],
],
[
'actions' => ['daftar_SMP', 'index'],
'allow' => true,
'roles' => ['@'],
],
[
'actions' => ['logout', 'index'],
'allow' => true,
'roles' => ['@'],
......@@ -50,6 +64,10 @@ class SiteController extends Controller
'error' => [
'class' => 'yii\web\ErrorAction',
],
'captcha' => [
'class' => 'yii\captcha\CaptchaAction',
'fixedVerifyCode' => YII_ENV_TEST ? 'testme' : null,
],
];
}
......@@ -60,7 +78,11 @@ class SiteController extends Controller
*/
public function actionIndex()
{
return $this->render('index');
return $this->render('index',
[
]
);
}
/**
......@@ -77,11 +99,11 @@ class SiteController extends Controller
$model = new LoginForm();
if ($model->load(Yii::$app->request->post()) && $model->login()) {
return $this->goBack();
} else {
return $this->render('login', [
'model' => $model,
]);
}
return $this->render('login', [
'model' => $model,
]);
}
/**
......@@ -96,6 +118,24 @@ class SiteController extends Controller
return $this->goHome();
}
public function actionAbout() {
return $this->render('about',
[
]
);
}
public function actionDaftar_SMP() {
return $this->render('daftar_SMP',
[
]
);
}
public function actionTest()
{
return $this->render('test');
......
......@@ -32,7 +32,7 @@
'items' => [
['label' => 'Menu Yii2', 'options' => ['class' => 'header']],
['label' => 'Gii', 'icon' => 'file-code-o', 'url' => ['/gii']],
['label' => 'Home', 'icon' => 'dashboard', 'url' =>['/'] ],
['label' => 'Home', 'icon' => 'dashboard', 'url' =>['/site/about'] ],
['label' => 'User', 'icon' => 'fa fa-user', 'url' => ['/users/index']],
['label' => 'Sekolah', 'icon' => 'fa fa-book', 'url' => ['/sekolah/index']],
['label' => 'Login', 'url' => ['site/login'], 'visible' => Yii::$app->user->isGuest],
......
......@@ -4,26 +4,22 @@ use yii\helpers\Html;
/* @var $this \yii\web\View */
/* @var $content string */
if (Yii::$app->controller->action->id === 'login') {
if (Yii::$app->controller->action->id === 'login') {
/**
* Do not use this code in your template. Remove it.
* Do not use this code in your template. Remove it.
* Instead, use the code $this->layout = '//main-login'; in your controller.
*/
echo $this->render(
'main-login',
['content' => $content]
);
} else {
}else{
if (class_exists('backend\assets\AppAsset')) {
backend\assets\AppAsset::register($this);
} else {
app\assets\AppAsset::register($this);
}
dmstr\web\AdminLteAsset::register($this);
$directoryAsset = Yii::$app->assetManager->getPublishedUrl('@vendor/almasaeed2010/adminlte/dist');
?>
<?php $this->beginPage() ?>
......@@ -33,9 +29,37 @@ if (Yii::$app->controller->action->id === 'login') {
<meta charset="<?= Yii::$app->charset ?>"/>
<meta name="viewport" content="width=device-width, initial-scale=1">
<?= Html::csrfMetaTags() ?>
<title><?= Html::encode($this->title) ?></title>
<title>SI Pendidikan</title>
<?php $this->head() ?>
</head>
<?php
if (
Yii::$app->controller->id === 'site' && Yii::$app->controller->action->id === 'index' ||
Yii::$app->controller->id === 'site' && Yii::$app->controller->action->id === 'daftar_TK' ||
Yii::$app->controller->id === 'site' && Yii::$app->controller->action->id === 'daftar_SD' ||
Yii::$app->controller->id === 'site' && Yii::$app->controller->action->id === 'daftar_SMP')
{
?>
<body class="hold-transition skin-blue layout-top-nav">
<?php $this->beginBody() ?>
<div class="wrapper">
<?= $this->render(
'header.php',
['directoryAsset' => $directoryAsset]
) ?>
<?= $this->render(
'content.php',
['content' => $content, 'directoryAsset' => $directoryAsset]
) ?>
</div>
<?php $this->endBody() ?>
</body>
<?php
}else {
?>
<body class="hold-transition skin-blue sidebar-mini">
<?php $this->beginBody() ?>
<div class="wrapper">
......@@ -60,6 +84,9 @@ if (Yii::$app->controller->action->id === 'login') {
<?php $this->endBody() ?>
</body>
<?php
}
?>
</html>
<?php $this->endPage() ?>
<?php } ?>
<?php
/* @var $this yii\web\View */
use yii\helpers\Html;
use yii\bootstrap\Carousel;
use app\models\DefaultBlog;
//use miloschuman\highcharts\Highcharts;
//use pollext\poll\Poll;
//use kartik\widgets\StarRating;
use yii\web\JsExpression;
use yii\widgets\ActiveForm;
use app\models\IboMasterSurveyKepuasan;
use app\models\IboMasterBerita;
use app\models\IboMasterSlider;
use app\models\IboMasterKategoriBerita;
$this->title = '';
?>
<?php
$script = <<< JS
$(document).ready(function(){
setTimeout(function() {
$('#w0-warning').fadeOut('fast');
}, 3000); // <-- time in milliseconds
});
JS;
$this->registerJs($script, \yii\web\View::POS_END);
?>
<div class="site-index">
<div class="container">
<div class="row">
<div class="col-lg-8">
<?php
$items = [
[
'title' => 'Sintel',
'href' => 'images/slider02.jpg',
'type' => 'image/jpg',
'poster' => 'images/slider02.jpg'
],
[
'url' => 'images/slider02.jpg',
'src' => 'images/slider02.jpg',
'options' => array('title' => 'Camposanto monumentale (inside)')
],
[
'url' => 'images/slider03.jpg',
'src' => 'images/slider03.jpg',
'options' => array('title' => 'Hafsten - Sunset')
],
[
'url' => 'images/slider04.jpg',
'src' => 'images/slider04.jpg',
'options' => array('title' => 'Hafsten - Sunset')
],
]
?>
</div>
</div>
<hr>
<hr>
<div class="col-lg-4 col-xs-6">
<!-- small box -->
<div class="small-box bg-red">
<div class="inner">
<h3>&nbsp;</h3>
<p><b><h4>Data</h4></b></p>
</div>
<div class="icon">
<i class="fa fa-tasks"></i>
</div>
<!-- <a href="#" class="small-box-footer">View Detail <i class="fa fa-arrow-circle-right"></i></a> -->
<?= Html::a('<p style="font-size:15px;color:white"><b>'.'Data'.'</b></p>'.'<i class="fa fa-arrow-circle-right"></i>', ['site/list-izin'], ['class' => 'small-box-footer']) ?>
</div>
</div>
<div class="col-lg-4 col-xs-6">
<!-- small box -->
<div class="small-box bg-green">
<div class="inner">
<h3>&nbsp;</h3>
<p><b><h4></h4>Data</h4></b></p>
</div>
<div class="icon">
<i class="fa fa-credit-card"></i>
</div>
<!-- <a href="#" class="small-box-footer">View Detail <i class="fa fa-arrow-circle-right"></i></a> -->
<?= Html::a('<p style="font-size:15px;color:white"><b>'.'Data'.'</b></p>'.'<i class="fa fa-arrow-circle-right"></i>', ['site/monitoring'], ['class' => 'small-box-footer']) ?>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-lg-12">
<div class="col-lg-12 text-center">
<h2></h2>
<hr class="star-primary">
</div>
</div>
<div class="col-md-4">
<div class="panel panel-info">
<div class="panel-heading">
<h4><i class="fa fa-fw fa-check"></i>Data 1</h4>
</div>
<div class="panel-body"></div>
</div>
</div>
<div class="col-md-4">
<div class="panel panel-success">
<div class="panel-heading">
<h4><i class="fa fa-fw fa-gift"></i>Data 2</h4>
</div>
<div class="panel-body"></div>
</div>
</div>
<div class="col-md-4">
<div class="panel panel-danger">
<div class="panel-heading">
<h4><i class="fa fa-fw fa-compass"></i>Data 3</h4>
</div>
<div class="panel-body"></div>
</div>
</div>
</div>
</div>
<hr>
</div>
</div>
<?php
/* @var $this yii\web\View */
use yii\helpers\Html;
use yii\bootstrap\Carousel;
use app\models\DefaultBlog;
//use miloschuman\highcharts\Highcharts;
//use pollext\poll\Poll;
//use kartik\widgets\StarRating;
use yii\web\JsExpression;
use yii\widgets\ActiveForm;
use app\models\IboMasterSurveyKepuasan;
use app\models\IboMasterBerita;
use app\models\IboMasterSlider;
use app\models\IboMasterKategoriBerita;
$this->title = '';
?>
<?php
$script = <<< JS
$(document).ready(function(){
setTimeout(function() {
$('#w0-warning').fadeOut('fast');
}, 3000); // <-- time in milliseconds
});
JS;
$this->registerJs($script, \yii\web\View::POS_END);
?>
<div class="site-index">
<div class="container">
<div class="row">
<div class="col-lg-8">
<?php
$items = [
[
'title' => 'Sintel',
'href' => 'images/slider02.jpg',
'type' => 'image/jpg',
'poster' => 'images/slider02.jpg'
],
[
'url' => 'images/slider02.jpg',
'src' => 'images/slider02.jpg',
'options' => array('title' => 'Camposanto monumentale (inside)')
],
[
'url' => 'images/slider03.jpg',
'src' => 'images/slider03.jpg',
'options' => array('title' => 'Hafsten - Sunset')
],
[
'url' => 'images/slider04.jpg',
'src' => 'images/slider04.jpg',
'options' => array('title' => 'Hafsten - Sunset')
],
]
?>
</div>
</div>
<hr>
<hr>
<div class="col-lg-4 col-xs-6">
<!-- small box -->
<div class="small-box bg-red">
<div class="inner">
<h3>&nbsp;</h3>
<p><b><h4>Data SMP</h4></b></p>
</div>
<div class="icon">
<i class="fa fa-tasks"></i>
</div>
<!-- <a href="#" class="small-box-footer">View Detail <i class="fa fa-arrow-circle-right"></i></a> -->
<?= Html::a('<p style="font-size:15px;color:white"><b>'.'Data SMP'.'</b></p>'.'<i class="fa fa-arrow-circle-right"></i>', ['site/list-izin'], ['class' => 'small-box-footer']) ?>
</div>
</div>
<div class="col-lg-4 col-xs-6">
<!-- small box -->
<div class="small-box bg-green">
<div class="inner">
<h3>&nbsp;</h3>
<p><b><h4></h4>Data SMP</h4></b></p>
</div>
<div class="icon">
<i class="fa fa-credit-card"></i>
</div>
<!-- <a href="#" class="small-box-footer">View Detail <i class="fa fa-arrow-circle-right"></i></a> -->
<?= Html::a('<p style="font-size:15px;color:white"><b>'.'DataSMP'.'</b></p>'.'<i class="fa fa-arrow-circle-right"></i>', ['site/monitoring'], ['class' => 'small-box-footer']) ?>
</div>
</div>
<div class="col-lg-4 col-xs-6">
<!-- small box -->
<div class="small-box bg-yellow">
<div class="inner">
<h3>&nbsp;</h3>
<p><b><h4></h4>Data SMP</h4></b></p>
</div>
<div class="icon">
<i class="fa fa-credit-card"></i>
</div>
<!-- <a href="#" class="small-box-footer">View Detail <i class="fa fa-arrow-circle-right"></i></a> -->
<?= Html::a('<p style="font-size:15px;color:white"><b>'.'Data SMP'.'</b></p>'.'<i class="fa fa-arrow-circle-right"></i>', ['site/monitoring'], ['class' => 'small-box-footer']) ?>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-lg-12">
<div class="col-lg-12 text-center">
<h2></h2>
<hr class="star-primary">
</div>
</div>
<div class="col-md-4">
<div class="panel panel-info">
<div class="panel-heading">
<h4><i class="fa fa-fw fa-check"></i>Data 1</h4>
</div>
<div class="panel-body"></div>
</div>
</div>
<div class="col-md-4">
<div class="panel panel-success">
<div class="panel-heading">
<h4><i class="fa fa-fw fa-gift"></i>Data 2</h4>
</div>
<div class="panel-body"></div>
</div>
</div>
<div class="col-md-4">
<div class="panel panel-danger">
<div class="panel-heading">
<h4><i class="fa fa-fw fa-compass"></i>Data 3</h4>
</div>
<div class="panel-body"></div>
</div>
</div>
</div>
</div>
<hr>
</div>
</div>
<?php
/* @var $this yii\web\View */
use yii\helpers\Html;
use yii\bootstrap\Carousel;
use app\models\DefaultBlog;
//use miloschuman\highcharts\Highcharts;
//use pollext\poll\Poll;
//use kartik\widgets\StarRating;
use yii\web\JsExpression;
use yii\widgets\ActiveForm;
use app\models\IboMasterSurveyKepuasan;
use app\models\IboMasterBerita;
use app\models\IboMasterSlider;
use app\models\IboMasterKategoriBerita;
$this->title = '';
$this->title = 'My Yii Application';
?>
<div class="site-index">
<?php
$script = <<< JS
$(document).ready(function(){
setTimeout(function() {
$('#w0-warning').fadeOut('fast');
}, 3000); // <-- time in milliseconds
});
JS;
$this->registerJs($script, \yii\web\View::POS_END);
<div class="jumbotron">
<h1>Congratulations!</h1>
?>
<p class="lead">You have successfully created your Yii-powered application.</p>
<p><a class="btn btn-lg btn-success" href="http://www.yiiframework.com">Get started with Yii</a></p>
</div>
<div class="body-content">
<div class="site-index">
<div class="container">
<div class="row">
<div class="col-lg-4">
<h2>Heading</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
fugiat nulla pariatur.</p>
<div class="col-lg-8">
<?php
$items = [
[
'title' => 'Sintel',
'href' => 'images/slider02.jpg',
'type' => 'image/jpg',
'poster' => 'images/slider02.jpg'
],
[
'url' => 'images/slider02.jpg',
'src' => 'images/slider02.jpg',
'options' => array('title' => 'Camposanto monumentale (inside)')
],
[
'url' => 'images/slider03.jpg',
'src' => 'images/slider03.jpg',
'options' => array('title' => 'Hafsten - Sunset')
],
[
'url' => 'images/slider04.jpg',
'src' => 'images/slider04.jpg',
'options' => array('title' => 'Hafsten - Sunset')
],
]
?>
</div>
</div>
<hr>
<hr>
<div class="col-lg-4 col-xs-6">
<!-- small box -->
<div class="small-box bg-red">
<div class="inner">
<h3>&nbsp;</h3>
<p><a class="btn btn-default" href="http://www.yiiframework.com/doc/">Yii Documentation &raquo;</a></p>
<p><b><h4>Data</h4></b></p>
</div>
<div class="icon">
<i class="fa fa-tasks"></i>
</div>
<!-- <a href="#" class="small-box-footer">View Detail <i class="fa fa-arrow-circle-right"></i></a> -->
<?= Html::a('<p style="font-size:15px;color:white"><b>'.'Data'.'</b></p>'.'<i class="fa fa-arrow-circle-right"></i>', ['site/list-izin'], ['class' => 'small-box-footer']) ?>
</div>
<div class="col-lg-4">
<h2>Heading</h2>
</div>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
fugiat nulla pariatur.</p>
<div class="col-lg-4 col-xs-6">
<!-- small box -->
<div class="small-box bg-green">
<div class="inner">
<h3>&nbsp;</h3>
<p><a class="btn btn-default" href="http://www.yiiframework.com/forum/">Yii Forum &raquo;</a></p>
<p><b><h4></h4>Data</h4></b></p>
</div>
<div class="icon">
<i class="fa fa-credit-card"></i>
</div>
<!-- <a href="#" class="small-box-footer">View Detail <i class="fa fa-arrow-circle-right"></i></a> -->
<?= Html::a('<p style="font-size:15px;color:white"><b>'.'Data'.'</b></p>'.'<i class="fa fa-arrow-circle-right"></i>', ['site/monitoring'], ['class' => 'small-box-footer']) ?>
</div>
<div class="col-lg-4">
<h2>Heading</h2>
</div>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
fugiat nulla pariatur.</p>
<div class="col-lg-4 col-xs-6">
<!-- small box -->
<div class="small-box bg-yellow">
<div class="inner">
<h3>&nbsp;</h3>
<p><a class="btn btn-default" href="http://www.yiiframework.com/extensions/">Yii Extensions &raquo;</a></p>
<p><b><h4></h4>Data</h4></b></p>
</div>
<div class="icon">
<i class="fa fa-credit-card"></i>
</div>
<!-- <a href="#" class="small-box-footer">View Detail <i class="fa fa-arrow-circle-right"></i></a> -->
<?= Html::a('<p style="font-size:15px;color:white"><b>'.'Data'.'</b></p>'.'<i class="fa fa-arrow-circle-right"></i>', ['site/monitoring'], ['class' => 'small-box-footer']) ?>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-lg-12">
<div class="col-lg-12 text-center">
<h2></h2>
<hr class="star-primary">
</div>
</div>
<div class="col-md-4">
<div class="panel panel-info">
<div class="panel-heading">
<h4><i class="fa fa-fw fa-check"></i>Data 1</h4>
</div>
<div class="panel-body"></div>
</div>
</div>
<div class="col-md-4">
<div class="panel panel-success">
<div class="panel-heading">
<h4><i class="fa fa-fw fa-gift"></i>Data 2</h4>
</div>
<div class="panel-body"></div>
</div>
</div>
<div class="col-md-4">
<div class="panel panel-danger">
<div class="panel-heading">
<h4><i class="fa fa-fw fa-compass"></i>Data 3</h4>
</div>
<div class="panel-body"></div>
</div>
</div>
</div>
</div>
<hr>
</div>
</div>
<html>
<h1> Hello World </h1>
<h1>
Lappet
</h1>
</html>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment