Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
ITD-Kemahasiswaan
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Gomgom
ITD-Kemahasiswaan
Commits
bad4e51a
Commit
bad4e51a
authored
Jan 20, 2017
by
NAGAITAN\Adi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
-- Final Project
-- Bug From Tester is Fixed.
parent
cec2ee01
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
37 additions
and
218 deletions
+37
-218
DimxDimController.php
backend/modules/sikk/controllers/DimxDimController.php
+3
-40
SikkIzinKeluarController.php
...end/modules/sikk/controllers/SikkIzinKeluarController.php
+0
-0
SikkLogController.php
backend/modules/sikk/controllers/SikkLogController.php
+2
-3
SikkIzinKeluarController.php
...modules/sikk/controllers/ari/SikkIzinKeluarController.php
+0
-0
view.php
backend/modules/sikk/views/dimx-dim/view.php
+1
-11
index_1.php
backend/modules/sikk/views/sikk-izin-keluar/index_1.php
+1
-2
update.php
backend/modules/sikk/views/sikk-izin-keluar/update.php
+3
-9
view.php
backend/modules/sikk/views/sikk-izin-keluar/view.php
+2
-3
viewPdf.php
backend/modules/sikk/views/sikk-izin-keluar/viewPdf.php
+0
-132
view.php
backend/modules/sikk/views/sikk-log/view.php
+7
-7
header.php
backend/views/layouts/header.php
+1
-3
index.php
backend/views/site/index.php
+17
-8
No files found.
backend/modules/sikk/controllers/DimxDimController.php
View file @
bad4e51a
...
@@ -51,46 +51,9 @@ class DimxDimController extends Controller
...
@@ -51,46 +51,9 @@ class DimxDimController extends Controller
*/
*/
public
function
actionView
(
$id
)
public
function
actionView
(
$id
)
{
{
$model
=
new
\common\models\DimxDim
();
return
$this
->
render
(
'view'
,
[
$modelsikkLog
=
new
\common\models\SikkLog
();
'model'
=>
$this
->
findModel
(
$id
),
if
(
$model
->
load
(
Yii
::
$app
->
request
->
post
()))
{
]);
$cari
=
\common\models\DimxDim
::
findOne
([
'nim'
=>
$model
->
nim
]);
$modelsikkLog
->
mhs_id
=
$cari
->
dim_id
;
$sql
=
'SELECT log_id FROM sikk_log WHERE mhs_id='
.
$cari
->
dim_id
.
' AND time_out IS NULL'
;
$hasilQuery
=
Yii
::
$app
->
db
->
createCommand
(
$sql
)
->
queryAll
();
if
(
$hasilQuery
==
NULL
){
Yii
::
$app
->
session
->
setFlash
(
'success'
,
'<b>Anda diizinkan untuk masuk!<b>'
);
date_default_timezone_set
(
'Asia/Jakarta'
);
$date
=
date_create
(
date
(
'Y-m-d H:i:s'
));
$modelsikkLog
->
time_in
=
date
(
'Y-m-d H:i:s'
);
$modelsikkLog
->
created_at
=
date
(
'Y-m-d H:i:s'
);
if
(
$modelsikkLog
->
save
()){
return
$this
->
redirect
([
'dimx-dim/view'
,
'id'
=>
$cari
->
dim_id
]);
}
}
if
(
$hasilQuery
!=
NULL
){
date_default_timezone_set
(
'Asia/Jakarta'
);
$date
=
date_create
(
date
(
'Y-m-d H:i:s'
));
$date1
=
date
(
'Y-m-d H:i:s'
);
$tanggal
=
"'"
.
$date1
.
"'"
;
Yii
::
$app
->
session
->
setFlash
(
'success'
,
'<b>Anda diizinkan untuk keluar!<b>'
);
$sql1
=
'UPDATE sikk_log SET time_out='
.
$tanggal
.
' WHERE mhs_id='
.
$cari
->
dim_id
.
''
;
Yii
::
$app
->
db
->
createCommand
(
$sql1
)
->
execute
();
return
$this
->
redirect
([
'dimx-dim/view'
,
'id'
=>
$cari
->
dim_id
]);
}
else
{
return
$this
->
render
(
'view'
,
[
'model'
=>
$this
->
findModel
(
$id
),
]);
}
}
return
$this
->
render
(
'view'
,
[
'model'
=>
$this
->
findModel
(
$id
),
]);
}
}
/**
/**
...
...
backend/modules/sikk/controllers/SikkIzinKeluarController.php
View file @
bad4e51a
This diff is collapsed.
Click to expand it.
backend/modules/sikk/controllers/SikkLogController.php
View file @
bad4e51a
...
@@ -52,7 +52,6 @@ class SikkLogController extends Controller
...
@@ -52,7 +52,6 @@ class SikkLogController extends Controller
*/
*/
public
function
actionView
(
$id
)
public
function
actionView
(
$id
)
{
{
return
$this
->
render
(
'view'
,
[
return
$this
->
render
(
'view'
,
[
'model'
=>
$this
->
findModel
(
$id
),
'model'
=>
$this
->
findModel
(
$id
),
]);
]);
...
@@ -76,8 +75,8 @@ class SikkLogController extends Controller
...
@@ -76,8 +75,8 @@ class SikkLogController extends Controller
if
(
$hasilQuery
==
NULL
){
if
(
$hasilQuery
==
NULL
){
Yii
::
$app
->
session
->
setFlash
(
'success'
,
'<b>Anda diizinkan untuk masuk!<b>'
);
Yii
::
$app
->
session
->
setFlash
(
'success'
,
'<b>Anda diizinkan untuk masuk!<b>'
);
date_default_timezone_set
(
'Asia/Jakarta'
);
date_default_timezone_set
(
'Asia/Jakarta'
);
$date
=
date
_create
(
date
(
'Y-m-d H:i:s'
)
);
$date
=
date
(
'Y-m-d H:i:s'
);
$modelsikkLog
->
time_in
=
date
(
'Y-m-d
H:i:s'
);
$modelsikkLog
->
time_in
=
date
_format
(
$date
,
'd-m-Y
H:i:s'
);
$modelsikkLog
->
created_at
=
date
(
'Y-m-d H:i:s'
);
$modelsikkLog
->
created_at
=
date
(
'Y-m-d H:i:s'
);
if
(
$modelsikkLog
->
save
()){
if
(
$modelsikkLog
->
save
()){
return
$this
->
redirect
([
'dimx-dim/view'
,
'id'
=>
$cari
->
dim_id
]);
return
$this
->
redirect
([
'dimx-dim/view'
,
'id'
=>
$cari
->
dim_id
]);
...
...
backend/modules/sikk/controllers/ari/SikkIzinKeluarController.php
0 → 100644
View file @
bad4e51a
This diff is collapsed.
Click to expand it.
backend/modules/sikk/views/dimx-dim/view.php
View file @
bad4e51a
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
use
yii\helpers\Html
;
use
yii\helpers\Html
;
use
yii\widgets\DetailView
;
use
yii\widgets\DetailView
;
use
yii\widgets\ActiveForm
;
/* @var $this yii\web\View */
/* @var $this yii\web\View */
/* @var $model common\models\DimxDim */
/* @var $model common\models\DimxDim */
...
@@ -14,16 +14,6 @@ $this->params['breadcrumbs'][] = $this->title;
...
@@ -14,16 +14,6 @@ $this->params['breadcrumbs'][] = $this->title;
<!--<h1>
<?=
Html
::
encode
(
$this
->
title
)
?>
</h1>-->
<!--<h1>
<?=
Html
::
encode
(
$this
->
title
)
?>
</h1>-->
<h2>
Keluar Masuk Mahasiswa
</h2>
<h2>
Keluar Masuk Mahasiswa
</h2>
<?php
$form
=
ActiveForm
::
begin
();
?>
<?=
$form
->
field
(
$model
,
'nim'
)
->
textInput
()
?>
<div
class=
"form-group"
>
<?=
Html
::
submitButton
(
$model
->
isNewRecord
?
'Create'
:
'Submit'
,
[
'class'
=>
$model
->
isNewRecord
?
'btn btn-success'
:
'btn btn-primary'
])
?>
</div>
<?php
ActiveForm
::
end
();
?>
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-md-12"
>
<div
class=
"col-md-12"
>
...
...
backend/modules/sikk/views/sikk-izin-keluar/index_1.php
View file @
bad4e51a
...
@@ -30,12 +30,11 @@ $roleID = $akunID->role_id;
...
@@ -30,12 +30,11 @@ $roleID = $akunID->role_id;
'dataProvider'
=>
$dataProvider
,
'dataProvider'
=>
$dataProvider
,
'filterModel'
=>
$searchModel
,
'filterModel'
=>
$searchModel
,
'columns'
=>
[
'columns'
=>
[
//
['class' => 'yii\grid\SerialColumn'],
[
'class'
=>
'yii\grid\SerialColumn'
],
'izin_keluar_id'
,
'izin_keluar_id'
,
'mhs.nama'
,
'mhs.nama'
,
'date_start'
,
'date_start'
,
'date_end'
,
'date_end'
,
'alasan'
,
[
'class'
=>
'yii\grid\ActionColumn'
],
[
'class'
=>
'yii\grid\ActionColumn'
],
],
],
]);
]);
...
...
backend/modules/sikk/views/sikk-izin-keluar/update.php
View file @
bad4e51a
...
@@ -5,7 +5,7 @@ use yii\helpers\Html;
...
@@ -5,7 +5,7 @@ use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $this yii\web\View */
/* @var $model common\models\SikkIzinKeluar */
/* @var $model common\models\SikkIzinKeluar */
$this
->
title
=
'Update
Izin Keluar'
;
$this
->
title
=
'Update
Sikk Izin Keluar: '
.
$model
->
izin_keluar_id
;
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
'Sikk Izin Keluars'
,
'url'
=>
[
'index'
]];
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
'Sikk Izin Keluars'
,
'url'
=>
[
'index'
]];
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
$model
->
izin_keluar_id
,
'url'
=>
[
'view'
,
'id'
=>
$model
->
izin_keluar_id
]];
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
$model
->
izin_keluar_id
,
'url'
=>
[
'view'
,
'id'
=>
$model
->
izin_keluar_id
]];
$this
->
params
[
'breadcrumbs'
][]
=
'Update'
;
$this
->
params
[
'breadcrumbs'
][]
=
'Update'
;
...
@@ -14,14 +14,8 @@ $this->params['breadcrumbs'][] = 'Update';
...
@@ -14,14 +14,8 @@ $this->params['breadcrumbs'][] = 'Update';
<h1>
<?=
Html
::
encode
(
$this
->
title
)
?>
</h1>
<h1>
<?=
Html
::
encode
(
$this
->
title
)
?>
</h1>
<?=
<?=
$this
->
render
(
'_form'
,
[
$this
->
render
(
'_form'
,
[
'model'
=>
$model
,
'model'
=>
$model
,
'modelchk'
=>
$modelchk
,
])
?>
'id_wali'
=>
$id_wali
,
'nama_wali'
=>
$nama_wali
,
'arrayNamaDosen'
=>
$arrayNamaDosen
,
])
?>
</div>
</div>
backend/modules/sikk/views/sikk-izin-keluar/view.php
View file @
bad4e51a
...
@@ -115,13 +115,12 @@ $roleID = $akunID->role_id;
...
@@ -115,13 +115,12 @@ $roleID = $akunID->role_id;
?>
?>
<div
class=
"sikk-approval-view"
>
<div
class=
"sikk-approval-view"
>
<?php
<?php
if
(
$roleID
==
1
&&
$status
==
3
)
{
if
(
$roleID
==
2
)
{
echo
Html
::
a
(
'Print'
,
[
'/sikk/sikk-izin-keluar/show'
,
'id'
=>
$model
->
izin_keluar_id
],
[
'class'
=>
'btn btn-primary'
]);
echo
Html
::
a
(
'Print'
,
[
'/sikk/sikk-izin-keluar/show'
],
[
'class'
=>
'btn btn-primary'
]);
}
else
{
}
else
{
}
}
?>
?>
</div>
</div>
</div>
</div>
backend/modules/sikk/views/sikk-izin-keluar/viewPdf.php
deleted
100644 → 0
View file @
cec2ee01
<?php
use
yii\helpers\Html
;
use
yii\widgets\DetailView
;
/* @var $this yii\web\View */
/* @var $model common\models\SikkIzinKeluar */
$this
->
title
=
"Request Anda"
;
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
'Sikk Izin Keluars'
,
'url'
=>
[
'index'
]];
$this
->
params
[
'breadcrumbs'
][]
=
$this
->
title
;
$mus
=
Yii
::
$app
->
user
->
identity
->
id
;
$akunID
=
\common\models\SikkAkun
::
findOne
(
array
(
'akun_id'
=>
$mus
));
$roleID
=
$akunID
->
role_id
;
//var_dump($roleID);
//die();
?>
<div
class=
"sikk-izin-keluar-view"
>
<table>
<tr>
<td>
SURAT IZIN KELUAR
</td>
</tr>
>
</table>
<h1>
<?=
Html
::
encode
(
$this
->
title
)
?>
</h1>
<p>
<?php
if
(
$roleID
==
4
)
{
?>
<?=
Html
::
a
(
'Accept'
,
[
'acceptwali'
,
'id'
=>
$model
->
izin_keluar_id
],
[
'class'
=>
'btn btn-primary'
])
?>
<?=
Html
::
a
(
'Reject'
,
[
'rejectwali'
,
'id'
=>
$model
->
izin_keluar_id
],
[
'class'
=>
'btn btn-primary'
])
?>
<?=
Html
::
a
(
'Delete'
,
[
'delete'
,
'id'
=>
$model
->
izin_keluar_id
],
[
'class'
=>
'btn btn-danger'
,
'data'
=>
[
'confirm'
=>
'Are you sure you want to delete this item?'
,
'method'
=>
'post'
,
],
])
?>
<?php
}
else
if
(
$roleID
==
3
)
{
?>
<?=
Html
::
a
(
'Accept'
,
[
'acceptkeasramaan'
,
'id'
=>
$model
->
izin_keluar_id
],
[
'class'
=>
'btn btn-primary'
])
?>
<?=
Html
::
a
(
'Reject'
,
[
'rejectkeasramaan'
,
'id'
=>
$model
->
izin_keluar_id
],
[
'class'
=>
'btn btn-primary'
])
?>
<?=
Html
::
a
(
'Delete'
,
[
'delete'
,
'id'
=>
$model
->
izin_keluar_id
],
[
'class'
=>
'btn btn-danger'
,
'data'
=>
[
'confirm'
=>
'Are you sure you want to delete this item?'
,
'method'
=>
'post'
,
],
])
?>
<?php
}
else
if
(
$roleID
==
2
)
{
?>
<?=
Html
::
a
(
'Accept'
,
[
'acceptdp'
,
'id'
=>
$model
->
izin_keluar_id
],
[
'class'
=>
'btn btn-primary'
])
?>
<?=
Html
::
a
(
'Reject'
,
[
'rejectdp'
,
'id'
=>
$model
->
izin_keluar_id
],
[
'class'
=>
'btn btn-primary'
])
?>
<?=
Html
::
a
(
'Delete'
,
[
'delete'
,
'id'
=>
$model
->
izin_keluar_id
],
[
'class'
=>
'btn btn-danger'
,
'data'
=>
[
'confirm'
=>
'Are you sure you want to delete this item?'
,
'method'
=>
'post'
,
],
])
?>
<?php
}
else
if
(
$roleID
==
2
)
{
?>
<?=
Html
::
a
(
'Accept'
,
[
'acceptdp'
,
'id'
=>
$model
->
izin_keluar_id
],
[
'class'
=>
'btn btn-primary'
])
?>
<?=
Html
::
a
(
'Reject'
,
[
'rejectdp'
,
'id'
=>
$model
->
izin_keluar_id
],
[
'class'
=>
'btn btn-primary'
])
?>
<?=
Html
::
a
(
'Delete'
,
[
'delete'
,
'id'
=>
$model
->
izin_keluar_id
],
[
'class'
=>
'btn btn-danger'
,
'data'
=>
[
'confirm'
=>
'Are you sure you want to delete this item?'
,
'method'
=>
'post'
,
],
])
?>
<?php
}
?>
</p>
<?=
DetailView
::
widget
([
'model'
=>
$model
,
'attributes'
=>
[
// 'izin_keluar_id',
// 'mhs_id',
/* [
'label' => 'Nama',
'value' => $nama_request,
], */
'alasan'
,
'date_start'
,
'date_end'
,
'time_start'
,
'time_end'
,
// 'deleted',
// 'created_at',
// 'created_by',
// 'updated_at',
// 'updated_by',
// 'status',
],
])
?>
<div
class=
"sikk-approval-view"
>
<?php
if
(
$roleID
==
1
&&
$status
==
3
)
{
echo
Html
::
a
(
'Print'
,
[
'/sikk/sikk-izin-keluar/show'
,
'id'
=>
$model
->
izin_keluar_id
],
[
'class'
=>
'btn btn-primary'
]);
}
else
{
}
?>
</div>
</div>
backend/modules/sikk/views/sikk-log/view.php
View file @
bad4e51a
...
@@ -28,15 +28,15 @@ $this->params['breadcrumbs'][] = $this->title;
...
@@ -28,15 +28,15 @@ $this->params['breadcrumbs'][] = $this->title;
<?=
DetailView
::
widget
([
<?=
DetailView
::
widget
([
'model'
=>
$model
,
'model'
=>
$model
,
'attributes'
=>
[
'attributes'
=>
[
//
'log_id',
'log_id'
,
//
'mhs_id',
'mhs_id'
,
'time_in'
,
'time_in'
,
'time_out'
,
'time_out'
,
//
'deleted',
'deleted'
,
//
'created_at',
'created_at'
,
//
'created_by',
'created_by'
,
//
'updated_at',
'updated_at'
,
//
'updated_by',
'updated_by'
,
],
],
])
?>
])
?>
...
...
backend/views/layouts/header.php
View file @
bad4e51a
...
@@ -8,9 +8,7 @@ use yii\helpers\Html;
...
@@ -8,9 +8,7 @@ use yii\helpers\Html;
<header
class=
"main-header"
>
<header
class=
"main-header"
>
<?=
<?=
Html
::
a
(
'<span class="logo-mini">SIKK</span><span class="logo-lg">'
.
Yii
::
$app
->
name
.
'</span>'
,
Yii
::
$app
->
homeUrl
,
[
'class'
=>
'logo'
])
?>
// $nama ="test";
Html
::
a
(
'<span class="logo-mini">SIKK</span><span class="logo-lg"> SIKK D4b </span>'
,
Yii
::
$app
->
homeUrl
,
[
'class'
=>
'logo'
])
?>
<nav
class=
"navbar navbar-static-top"
role=
"navigation"
>
<nav
class=
"navbar navbar-static-top"
role=
"navigation"
>
...
...
backend/views/site/index.php
View file @
bad4e51a
...
@@ -2,24 +2,22 @@
...
@@ -2,24 +2,22 @@
/* @var $this yii\web\View */
/* @var $this yii\web\View */
$this
->
title
=
'
SIKK
'
;
$this
->
title
=
'
My Yii Application
'
;
?>
?>
<div
class=
"site-index"
>
<div
class=
"site-index"
>
<div
class=
"jumbotron"
>
<div
class=
"jumbotron"
>
<h
2>
Sistem Izin Keluar Masuk Kampus
</h2
>
<h
1>
Congratulations!
</h1
>
<p
class=
"lead"
></p>
<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>
<div
class=
"body-content"
>
<div
class=
"body-content"
>
<div
class=
"row"
>
<div
class=
"row"
>
<img
src=
"http://localhost/ITD-KEMAHASISWAAN3/backend/web/images/home.jpg"
>
<div
class=
"col-lg-4"
>
<!-- <div class="col-lg-4">
<h2>
Heading
</h2>
<h2>
Heading
</h2>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
...
@@ -38,7 +36,18 @@ $this->title = 'SIKK';
...
@@ -38,7 +36,18 @@ $this->title = 'SIKK';
fugiat nulla pariatur.
</p>
fugiat nulla pariatur.
</p>
<p><a
class=
"btn btn-default"
href=
"http://www.yiiframework.com/forum/"
>
Yii Forum
»
</a></p>
<p><a
class=
"btn btn-default"
href=
"http://www.yiiframework.com/forum/"
>
Yii Forum
»
</a></p>
-->
</div>
</div>
<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>
<p><a
class=
"btn btn-default"
href=
"http://www.yiiframework.com/extensions/"
>
Yii Extensions
»
</a></p>
</div>
</div>
</div>
</div>
</div>
</div>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment