public function actionDeletePrestasi()
 {
     if ($this->isDeleteAllowed()) {
         $this->layout = 'hrd';
         if (Yii::$app->request->get()) {
             HrdPrestasi::deleteAll('id_Prestasi = ' . Yii::$app->request->get()['id']);
             return $this->render('index_Prestasi');
         }
         return $this->render('index_Prestasi');
     } else {
         echo "You don't have access here";
         die;
     }
 }
Exemple #2
0
<?php

use yii\helpers\Html;
use yii\grid\GridView;
use yii\bootstrap\Nav;
use yii\bootstrap\NavBar;
use yii\bootstrap\ActiveForm;
use app\models\HrdPegawai;
use app\models\HrdPrestasi;
$HrdPegawai = new HrdPegawai();
$myData = HrdPrestasi::find()->where(['id_prestasi' => Yii::$app->request->get()['id']])->asArray()->one();
$this->title = 'Edit Data Prestasi Pegawai';
$this->params['breadcrumbs'][] = $this->title;
?>
					
<?php 
$form = ActiveForm::begin(['id' => 'create-prestasi', 'options' => ['class' => 'form-horizontal', 'data-toggle' => 'validator'], 'fieldConfig' => ['template' => "{label}\n<div class=\"col-lg-3\">{input}</div>\n<div class=\"col-lg-8\">{error}</div>", 'labelOptions' => ['class' => 'col-lg-1 control-label']]]);
?>
<div class="side">
	<div class="sub-sidebar-wrapper">
	  <ul class="nav">
		<?php 
echo Nav::widget(['items' => [['label' => 'Data Pribadi Pegawai', 'url' => [Yii::$app->urlManager->createUrl(['../../human-resource/profil'])]], ['label' => 'Data Penempatan Pegawai', 'url' => [Yii::$app->urlManager->createUrl(['../../human-resource/posisi'])]], ['label' => 'Data Departemen Perusahaan', 'url' => [Yii::$app->urlManager->createUrl(['../../human-resource/departement'])]], ['label' => 'Data Prestasi Pegawai', 'url' => [Yii::$app->urlManager->createUrl(['../../human-resource/prestasi'])]]]]);
?>
	  </ul>
	</div>
</div>
<div class="col-md-12">
    <div class="widget widget-green">
        <div class="widget-title">
            <div class="widget-controls">
Exemple #3
0
function DateToIndo($date)
{
    $BulanIndo = array("Januari", "Februari", "Maret", "April", "Mei", "Juni", "Juli", "Agustus", "September", "Oktober", "November", "Desember");
    $tahun = substr($date, 0, 4);
    $bulan = substr($date, 5, 2);
    $tgl = substr($date, 8, 2);
    $result = $tgl . " " . $BulanIndo[(int) $bulan - 1] . " " . $tahun;
    return $result;
}
use yii\helpers\Html;
use yii\grid\GridView;
use yii\bootstrap\Nav;
use yii\bootstrap\NavBar;
use app\models\HrdPrestasi;
$HrdPrestasi = new HrdPrestasi();
$this->title = 'Data Prestasi Pegawai';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="side">
	<div class="sub-sidebar-wrapper">
	  <ul class="nav">
		<?php 
echo Nav::widget(['items' => [['label' => 'Data Pribadi Pegawai', 'url' => [Yii::$app->urlManager->createUrl(['../../human-resource/profil'])]], ['label' => 'Data Penempatan Pegawai', 'url' => [Yii::$app->urlManager->createUrl(['../../human-resource/posisi'])]], ['label' => 'Data Departemen Perusahaan', 'url' => [Yii::$app->urlManager->createUrl(['../../human-resource/departement'])]], ['label' => 'Data Manager ', 'url' => [Yii::$app->urlManager->createUrl(['../../human-resource/manager'])]], ['label' => 'Data Prestasi Pegawai', 'url' => [Yii::$app->urlManager->createUrl(['../../human-resource/prestasi'])]]]]);
?>
	  </ul>
	</div>
</div>
<div class="col-md-12">
    <div class="widget widget-green">
        <div class="widget-title">