You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
65 lines
2.0 KiB
65 lines
2.0 KiB
<?php |
|
|
|
namespace App\Controllers; |
|
|
|
use App\Models\MKanwil; |
|
|
|
|
|
class Kanwil extends BaseController |
|
{ |
|
|
|
|
|
public function index() |
|
{ |
|
|
|
if (session('isLogin')) { |
|
|
|
$model = new MKanwil(); |
|
|
|
if (session('tpkantor') == "KPDJP") { |
|
$kwl = $this->request->getPost('kwl'); |
|
} else { |
|
$kwl = session('kppadm'); |
|
} |
|
$ptahun = $this->request->getPost('tahun'); |
|
$pbulan = $this->request->getPost('bulan'); |
|
if (empty($ptahun)) { |
|
$tahun = date('Y'); |
|
} else { |
|
$tahun = $ptahun; |
|
} |
|
if (empty($pbulan)) { |
|
$bulan = date('m'); |
|
} else { |
|
$bulan = $pbulan; |
|
} |
|
|
|
$param = array('kwl' => $kwl, 'tahun' => $tahun, 'bln' => $bulan); |
|
$p['kwlx'] = $kwl; |
|
$p['tahunx'] = $tahun; |
|
$p['bulanx'] = $bulan; |
|
$p['selkwl'] = $model->selKwl()->getResult(); |
|
$p['penerimaan'] = $model->getPenn($param)->getResult(); |
|
$p['updatex'] = $model->getUpd()->getFirstRow('array'); |
|
$p['perkategori'] = $model->getKat($param)->getResult(); |
|
$p['pie_penerimaan'] = $model->getPiePen($param)->getResult(); |
|
$p['paycomp'] = $model->paycompNas($param)->getResult(); |
|
$p['parsesof'] = $model->sofNas($param)->getResult(); |
|
$p['refbulan'] = $model->getBln(); |
|
$p['wp_terdaftar'] = $model->getWpsk($param)->getFirstRow('array'); |
|
$p['wp_sk'] = $model->getBreakdownPen($param)->getFirstRow('array'); |
|
$p['wpadm'] = $model->getWPterdaftar($param)->getFirstRow('array'); |
|
$p['laporThn'] = $model->laporTahunan($param)->getFirstRow('array'); |
|
|
|
|
|
|
|
echo view('inc/head'); |
|
echo view('inc/navbar'); |
|
echo view('inc/sidebar'); |
|
echo view('kanwil/dashboard', $p); |
|
echo view('inc/footer'); |
|
} else { |
|
return redirect()->to('auth'); |
|
} |
|
} |
|
}
|
|
|