├── Hasil
├── hasil1.jpg
├── hasil2.jpg
└── hasil3.jpg
├── Views
├── errors
│ ├── cli
│ │ ├── error_404.php
│ │ ├── production.php
│ │ └── error_exception.php
│ └── html
│ │ ├── production.php
│ │ ├── error_404.php
│ │ ├── debug.js
│ │ ├── debug.css
│ │ └── error_exception.php
├── admin
│ ├── agen
│ │ ├── index.php
│ │ ├── login.php
│ │ └── pelanggan
│ │ │ ├── index.php
│ │ │ ├── tambah.php
│ │ │ ├── detail.php
│ │ │ ├── ubah.php
│ │ │ └── tagihan.php
│ └── petugas
│ │ ├── index.php
│ │ ├── login.php
│ │ └── pelanggan
│ │ ├── index.php
│ │ ├── tambah.php
│ │ ├── detail.php
│ │ ├── ubah.php
│ │ └── tagihan.php
├── costum
│ └── halaman.php
├── layout
│ ├── agen.php
│ └── admin.php
└── welcome_message.php
├── Controllers
├── Home.php
├── Agen
│ ├── Beranda.php
│ ├── Login.php
│ └── Pelanggan.php
├── Petugas
│ ├── Beranda.php
│ ├── Login.php
│ └── Pelanggan.php
└── BaseController.php
├── README.md
├── public
└── assets
│ └── css
│ ├── animasi.css
│ └── admin
│ ├── animasi.css
│ ├── konten.css
│ ├── tabel.css
│ ├── root.css
│ ├── form.css
│ └── navigasi.css
├── Models
├── PetugasModel.php
├── AgenModel.php
├── PelangganModel.php
└── PenggunaanModel.php
└── listrik_db.sql
/Hasil/hasil1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ahmadfaqih796/Listrik-Pasca-Bayar/HEAD/Hasil/hasil1.jpg
--------------------------------------------------------------------------------
/Hasil/hasil2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ahmadfaqih796/Listrik-Pasca-Bayar/HEAD/Hasil/hasil2.jpg
--------------------------------------------------------------------------------
/Hasil/hasil3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ahmadfaqih796/Listrik-Pasca-Bayar/HEAD/Hasil/hasil3.jpg
--------------------------------------------------------------------------------
/Views/errors/cli/error_404.php:
--------------------------------------------------------------------------------
1 | extend('layout/agen'); ?>
2 | = $this->section('konten'); ?>
3 | Beranda
4 |
5 |
6 |
7 |
8 | = $this->endSection(); ?>
--------------------------------------------------------------------------------
/Views/admin/petugas/index.php:
--------------------------------------------------------------------------------
1 | = $this->extend('layout/admin'); ?>
2 | = $this->section('konten'); ?>
3 | Beranda
4 |
5 |
6 |
7 |
8 | = $this->endSection(); ?>
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Listrik Pasca Bayar
2 |
3 | Listrik Pasca Bayar ini menggunakan framework Codeigniter 4 dengan bahasa pemograman php, css dan javascirpt. aplikasi ini dijalankan melalui private server localhost:8080/ dengan cara menjalankan pada sistem git melalui perintah "php spark serve". Buka browser dan masuk halaman localhost:8080
4 |
--------------------------------------------------------------------------------
/Controllers/Agen/Beranda.php:
--------------------------------------------------------------------------------
1 | get('username_agen') == '') {
12 | session()->setFlashdata('gagal', 'anda belum login sayang !!!');
13 | return redirect()->to(base_url('agen/login'));
14 | }
15 | $data = [
16 | "judul" => "Beranda"
17 | ];
18 | return view('admin/agen/index', $data);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Controllers/Petugas/Beranda.php:
--------------------------------------------------------------------------------
1 | get('username') == '') {
12 | session()->setFlashdata('gagal', 'anda belum login sayang !!!');
13 | return redirect()->to(base_url('petugas/login'));
14 | }
15 | $data = [
16 | "judul" => "Beranda"
17 | ];
18 | return view('admin/petugas/index', $data);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Views/errors/html/production.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Whoops!
8 |
9 |
12 |
13 |
14 |
15 |
16 |
17 |
Whoops!
18 |
19 |
We seem to have hit a snag. Please try again later...
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/public/assets/css/animasi.css:
--------------------------------------------------------------------------------
1 | @keyframes putar {
2 | 0% {
3 | transform: rotate(0deg);
4 | }
5 |
6 | 100% {
7 | transform: rotate(360deg);
8 | }
9 | }
10 |
11 | @keyframes gambar-slide {
12 | 0% {
13 | transform: translateX(0);
14 | }
15 |
16 | 25% {
17 | transform: translateX(0);
18 | }
19 |
20 | 30% {
21 | transform: translateX(-100%);
22 | }
23 |
24 | 50% {
25 | transform: translateX(-100%);
26 | }
27 |
28 | 55% {
29 | transform: translateX(-200%);
30 | }
31 |
32 | 75% {
33 | transform: translateX(-200%);
34 | }
35 |
36 | 80% {
37 | transform: translateX(-300%);
38 | }
39 |
40 | 90% {
41 | transform: translateX(-300%);
42 | }
43 |
44 | 100% {
45 | transform: translateX(0);
46 | }
47 | }
48 |
49 | @keyframes typing {
50 | from {
51 | width: 0ch;
52 | }
53 |
54 | to {
55 | width: 23.3ch;
56 | }
57 | }
58 |
59 | @keyframes crow {
60 | from {
61 | opacity: 0;
62 | }
63 |
64 | to {
65 | opacity: 1;
66 | }
67 | }
--------------------------------------------------------------------------------
/Views/costum/halaman.php:
--------------------------------------------------------------------------------
1 | setSurroundCount(2) ?>
2 |
3 |
--------------------------------------------------------------------------------
/public/assets/css/admin/animasi.css:
--------------------------------------------------------------------------------
1 | @keyframes putar {
2 | 0% {
3 | transform: rotate(0deg);
4 | }
5 |
6 | 100% {
7 | transform: rotate(360deg);
8 | }
9 | }
10 |
11 | @keyframes gambar-slide {
12 | 0% {
13 | transform: translateX(0);
14 | }
15 |
16 | 25% {
17 | transform: translateX(0);
18 | }
19 |
20 | 30% {
21 | transform: translateX(-100%);
22 | }
23 |
24 | 50% {
25 | transform: translateX(-100%);
26 | }
27 |
28 | 55% {
29 | transform: translateX(-200%);
30 | }
31 |
32 | 75% {
33 | transform: translateX(-200%);
34 | }
35 |
36 | 80% {
37 | transform: translateX(-300%);
38 | }
39 |
40 | 90% {
41 | transform: translateX(-300%);
42 | }
43 |
44 | 100% {
45 | transform: translateX(0);
46 | }
47 | }
48 |
49 | @keyframes typing {
50 | from {
51 | width: 0ch;
52 | }
53 |
54 | to {
55 | width: 23.3ch;
56 | }
57 | }
58 |
59 | @keyframes crow {
60 | from {
61 | opacity: 0;
62 | }
63 |
64 | to {
65 | opacity: 1;
66 | }
67 | }
68 |
69 | @keyframes fade {
70 | from {
71 | opacity: 0;
72 | transform: translate(-100%);
73 | }
74 | to {
75 | opacity: 1;
76 | transform: translate(0);
77 | }
78 | }
79 | @keyframes roket {
80 | 0% {
81 | transform: translateY(-100%);
82 | } 100%{
83 | transform: translateY(0);
84 | }
85 | }
--------------------------------------------------------------------------------
/Controllers/BaseController.php:
--------------------------------------------------------------------------------
1 | session = \Config\Services::session();
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/Models/PetugasModel.php:
--------------------------------------------------------------------------------
1 | db->table('petugas')
46 | ->where(array('username' => $username, 'password' => $password))
47 | ->get()->getRowArray();
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/Models/AgenModel.php:
--------------------------------------------------------------------------------
1 | db->table('agen')
46 | ->where(array('username_agen' => $username_agen, 'password_agen' => $password))
47 | ->get()->getRowArray();
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/public/assets/css/admin/konten.css:
--------------------------------------------------------------------------------
1 | article {
2 | width: 65%;
3 | height: 60vh;
4 | margin: 0 auto 0 auto;
5 | border: 5px solid black;
6 | border-radius: 20px;
7 | background-color: whitesmoke;
8 | animation: fade 1s;
9 | transition: all 1s ease-in-out;
10 | padding: 10px;
11 | overflow-y: scroll;
12 | overflow-x: auto;
13 | }
14 | /* gambar */
15 | article .banner {
16 | display: block;
17 | width: 300px;
18 | margin: -130px auto 0px auto;
19 | }
20 | article .gambar {
21 | width: 60%;
22 | display: block;
23 | margin: 10px auto 10px auto;
24 | }
25 | article .listrik {
26 | width: fit-content;
27 | height: 50vh;
28 | display: block;
29 | margin: 10px auto 0px auto;
30 | border-radius: 20px;
31 | }
32 | /* =========================== */
33 | /* Teks */
34 | article p {
35 | text-align: justify;
36 | font-size: 2.5vh;
37 | padding: 0px 0px 10px 0px;
38 | }
39 | article .post-info {
40 | color: darkslategrey;
41 | text-align: right;
42 | }
43 | article h2 {
44 | text-align: center;
45 | }
46 | article .panjang-text {
47 | text-align: justify;
48 | overflow: hidden;
49 | height: 55px;
50 | text-overflow: ellipsis;
51 | display: -webkit-box;
52 | -webkit-line-clamp: 3;
53 | /* number of lines to show */
54 | -webkit-box-orient: vertical;
55 | }
56 |
57 |
58 | @font-face {
59 | font-family: 'pacifico';
60 | src: url('../../font/Pacifico.ttf');
61 | }
62 | /* garis */
63 | article hr {
64 | margin: 10px 0px 10px 0px;
65 | }
66 |
67 | @media screen and (max-width: 800px) {
68 | article {
69 | width: 95%;
70 | }
71 | article .gambar {
72 | width: 80%;
73 | }
74 | }
75 | @media screen and (max-width: 575px) {
76 | article .gambar {
77 | width: 100%;
78 | }
79 | }
--------------------------------------------------------------------------------
/public/assets/css/admin/tabel.css:
--------------------------------------------------------------------------------
1 | table {
2 | width: 80%;
3 | margin: 0px auto 0px auto;
4 | border-collapse: collapse;
5 | }
6 | .berita {
7 | width: min-content;
8 | }
9 | article .berita tr th,
10 | article .berita tr td
11 | {
12 | text-align: left;
13 | border: 0;
14 | }
15 |
16 | article .berita tr td a {
17 | background-color: transparent;
18 | border-radius: 0;
19 | padding: 0;
20 | font-weight: 700;
21 | border: 0;
22 | text-align: center;
23 | }
24 | article .berita tr td img {
25 | width: 300px;
26 | margin: 0 auto 0 auto;
27 | display: block;
28 | }
29 | table tr th,
30 | table tr td {
31 | text-align: center;
32 | border: 2px solid black;
33 | padding: 15px 10px;
34 | }
35 | table tr td button,
36 | table tr td a {
37 | text-decoration: none;
38 | padding: 5px 10px;
39 | font-size: 15px;
40 | background-color: chartreuse;
41 | border: 3px solid black;
42 | border-radius: 20px;
43 | color: black;
44 | transition: all 0.5s ease-in-out;
45 | }
46 | table tr td a:hover {
47 | background-color: cyan;
48 | }
49 | table tr td img {
50 | width: 140px;
51 | height: 100%;
52 | }
53 | table form input[type=text],
54 | table form input[type=submit] {
55 | border: 2px solid black;
56 | border-radius: 20px;
57 | padding: 10px;
58 | }
59 | table form input[type=submit] {
60 | background-color: cyan;
61 | transition: all 0.5s ease-in-out;
62 | }
63 | table form input[type=submit]:hover {
64 | background-color: yellow;
65 | }
66 | @media screen and (max-width: 800px) {
67 | table {
68 | width: 100%;
69 | }
70 | article .berita tr td img {
71 | width: 200px;
72 | }
73 | }
74 | @media screen and (max-width: 500px) {
75 | article .berita tr td img {
76 | width: 150px;
77 | }
78 | }
--------------------------------------------------------------------------------
/Views/errors/html/error_404.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 404 Page Not Found
6 |
7 |
70 |
71 |
72 |
73 |
404 - File Not Found
74 |
75 |
76 |
77 | = nl2br(esc($message)) ?>
78 |
79 | Sorry! Cannot seem to find the page you were looking for.
80 |
81 |
82 |
83 |
84 |
85 |
--------------------------------------------------------------------------------
/Controllers/Agen/Login.php:
--------------------------------------------------------------------------------
1 | agenModel = new AgenModel();
15 | }
16 | public function index()
17 | {
18 | $data = [
19 | 'judul' => 'Login'
20 | ];
21 | if (session()->get('username_agen')) {
22 | session()->setFlashdata('gagal', 'Anda masih login, harap logout terlebih dahulu');
23 | return redirect()->to(base_url('agen/beranda'));
24 | }
25 | return view('admin/agen/login', $data);
26 | }
27 | public function cek_login()
28 | {
29 | $this->agenModel = new AgenModel();
30 | $username = $this->request->getPost('username_agen');
31 | $password = $this->request->getPost('password_agen');
32 | $cek = $this->agenModel->cek_login($username, $password);
33 | if ($cek) {
34 | session()->set('id_petugas', $cek['id_petugas']);
35 | session()->set('username_agen', $cek['username_agen']);
36 | session()->set('nama', $cek['nama']);
37 | session()->set('akses', $cek['akses']);
38 | session()->set('alamat', $cek['alamat']);
39 | session()->set('no_telepon', $cek['no_telepon']);
40 | session()->set('jk', $cek['jk']);
41 | return redirect()->to(base_url('agen/beranda'));
42 | } else {
43 | session()->setFlashdata('gagal', 'username atau password salah');
44 | return redirect()->to(base_url('agen/login'));
45 | }
46 | }
47 | public function logout()
48 | {
49 | session()->destroy();
50 | return redirect()->to(base_url('agen/login'));
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/Controllers/Petugas/Login.php:
--------------------------------------------------------------------------------
1 | petugasModel = new PetugasModel();
15 | $this->agenModel = new AgenModel();
16 | }
17 | public function index()
18 | {
19 | $data = [
20 | 'judul' => 'Login'
21 | ];
22 | if (session()->get('username')) {
23 | session()->setFlashdata('gagal', 'Anda masih login, harap logout terlebih dahulu');
24 | return redirect()->to(base_url('petugas/pelanggan'));
25 | }
26 | return view('admin/petugas/login', $data);
27 | }
28 | public function cek_login()
29 | {
30 | $this->petugasModel = new PetugasModel();
31 | $username = $this->request->getPost('username');
32 | $password = $this->request->getPost('password');
33 | $cek = $this->petugasModel->cek_login($username, $password);
34 | if ($cek) {
35 | session()->set('id_petugas', $cek['id_petugas']);
36 | session()->set('username', $cek['username']);
37 | session()->set('nama', $cek['nama']);
38 | session()->set('akses', $cek['akses']);
39 | session()->set('alamat', $cek['alamat']);
40 | session()->set('no_telepon', $cek['no_telepon']);
41 | session()->set('jk', $cek['jk']);
42 | return redirect()->to(base_url('petugas/pelanggan'));
43 | } else {
44 | session()->setFlashdata('gagal', 'username atau password salah');
45 | return redirect()->to(base_url('petugas/login'));
46 | }
47 | }
48 | public function logout()
49 | {
50 | session()->destroy();
51 | return redirect()->to(base_url('petugas/login'));
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/Models/PelangganModel.php:
--------------------------------------------------------------------------------
1 | findAll();
47 | }
48 | return $this->where(['no_pelanggan' => $no_pelanggan])->first();
49 | }
50 |
51 | public function cari($kunci)
52 | {
53 | $builder = $this->table('pelanggan');
54 | $builder->like('nama', $kunci);
55 | $builder->orlike('no_meter', $kunci);
56 | return $builder;
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/Views/admin/petugas/login.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | Login
11 |
12 |
13 |
14 |
15 |
16 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/Views/admin/agen/login.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | Login
11 |
12 |
13 |
14 |
15 |
16 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/Models/PenggunaanModel.php:
--------------------------------------------------------------------------------
1 | findAll();
47 | }
48 | return $this->where(['no_penggunaan' => $id_penggunaan])->first();
49 | }
50 |
51 | public function cari($kunci)
52 | {
53 | $builder = $this->table('penggunaan');
54 | $builder->like('nama', $kunci);
55 | $builder->orlike('no_meter', $kunci);
56 | return $builder;
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/Views/errors/cli/error_exception.php:
--------------------------------------------------------------------------------
1 | getFile()) . ':' . $exception->getLine(), 'green'));
12 | CLI::newLine();
13 |
14 | // The backtrace
15 | if (defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE) {
16 | $backtraces = $exception->getTrace();
17 |
18 | if ($backtraces) {
19 | CLI::write('Backtrace:', 'green');
20 | }
21 |
22 | foreach ($backtraces as $i => $error) {
23 | $padFile = ' '; // 4 spaces
24 | $padClass = ' '; // 7 spaces
25 | $c = str_pad($i + 1, 3, ' ', STR_PAD_LEFT);
26 |
27 | if (isset($error['file'])) {
28 | $filepath = clean_path($error['file']) . ':' . $error['line'];
29 |
30 | CLI::write($c . $padFile . CLI::color($filepath, 'yellow'));
31 | } else {
32 | CLI::write($c . $padFile . CLI::color('[internal function]', 'yellow'));
33 | }
34 |
35 | $function = '';
36 |
37 | if (isset($error['class'])) {
38 | $type = ($error['type'] === '->') ? '()' . $error['type'] : $error['type'];
39 | $function .= $padClass . $error['class'] . $type . $error['function'];
40 | } elseif (! isset($error['class']) && isset($error['function'])) {
41 | $function .= $padClass . $error['function'];
42 | }
43 |
44 | $args = implode(', ', array_map(static function ($value) {
45 | switch (true) {
46 | case is_object($value):
47 | return 'Object(' . get_class($value) . ')';
48 |
49 | case is_array($value):
50 | return count($value) ? '[...]' : '[]';
51 |
52 | case $value === null:
53 | return 'null'; // return the lowercased version
54 |
55 | default:
56 | return var_export($value, true);
57 | }
58 | }, array_values($error['args'] ?? [])));
59 |
60 | $function .= '(' . $args . ')';
61 |
62 | CLI::write($function);
63 | CLI::newLine();
64 | }
65 | }
66 |
--------------------------------------------------------------------------------
/Views/admin/agen/pelanggan/index.php:
--------------------------------------------------------------------------------
1 | = $this->extend('layout/agen'); ?>
2 | = $this->section('konten'); ?>
3 | Pelanggan
4 |
5 | getFlashdata('pesan')) : ?>
6 |
7 | ×
8 | = session()->getFlashdata('pesan'); ?>
9 |
10 |
11 |
19 |
20 |
21 | + Tambahkan Pelanggan
22 |
23 |
24 | no
25 | No Meter
26 | Nama
27 | Alamat
28 | Tenggang
29 | Tarif
30 | Aksi
31 |
32 |
35 |
36 | = $i++; ?>
37 | = $p['no_meter']; ?>
38 | = $p['nama']; ?>
39 | = $p['alamat']; ?>
40 | = $p['tenggang']; ?>
41 | = $p['id_tarif']; ?>
42 |
43 |
50 |
51 |
52 |
53 |
54 |
55 |
56 | = $pager->links('pelanggan', 'halaman') ?>
57 |
58 | = $this->endSection(); ?>
--------------------------------------------------------------------------------
/Views/admin/petugas/pelanggan/index.php:
--------------------------------------------------------------------------------
1 | = $this->extend('layout/admin'); ?>
2 | = $this->section('konten'); ?>
3 | Pelanggan
4 |
5 | getFlashdata('pesan')) : ?>
6 |
7 | ×
8 | = session()->getFlashdata('pesan'); ?>
9 |
10 |
11 |
19 |
20 |
21 | + Tambahkan Pelanggan
22 |
23 |
24 | no
25 | No Meter
26 | Nama
27 | Alamat
28 | Tenggang
29 | Tarif
30 | Aksi
31 |
32 |
35 |
36 | = $i++; ?>
37 | = $p['no_meter']; ?>
38 | = $p['nama']; ?>
39 | = $p['alamat']; ?>
40 | = $p['tenggang']; ?>
41 | = $p['id_tarif']; ?>
42 |
43 |
50 |
51 |
52 |
53 |
54 |
55 |
56 | = $pager->links('pelanggan', 'halaman') ?>
57 |
58 | = $this->endSection(); ?>
--------------------------------------------------------------------------------
/public/assets/css/admin/root.css:
--------------------------------------------------------------------------------
1 | * {
2 | margin: 0;
3 | padding: 0;
4 | outline: none;
5 | box-sizing: border-box;
6 | font-family: 'Montserrat', sans-serif;
7 | }
8 |
9 | section {
10 | position: absolute;
11 | z-index: -5;
12 | padding: 5vh 0 0 0;
13 | width: 100%;
14 | height: 90vh;
15 | background-color: turquoise;
16 | background-image: url("../../gambar/server/Listrik-padam-PLN.png");
17 | background-size: cover;
18 | background-repeat: repeat;
19 | background-attachment: fixed;
20 | }
21 |
22 | section legend {
23 | width: 50%;
24 | background-color: whitesmoke;
25 | font-size: 5vh;
26 | font-family: 'pacifico';
27 | text-align: center;
28 | border: 5px solid black;
29 | border-radius: 40px 0 40px 0;
30 | display: block;
31 | width: 50%;
32 | animation: fade 1s;
33 | transition: all 1s ease-in-out;
34 | padding: 2vh 0px 2vh 0px;
35 | margin: 0 auto 5vh auto;
36 | }
37 |
38 | section .pln {
39 | width: 30vh;
40 | position: absolute;
41 | transform: translate(-50%, -50%);
42 | top: 20%;
43 | right: -5%;
44 | }
45 |
46 | /* Scroll */
47 | /* width */
48 | ::-webkit-scrollbar {
49 | min-width: 30px;
50 | min-height: 30px;
51 | }
52 |
53 | ::-webkit-scrollbar-track {
54 | margin: 5px;
55 | }
56 |
57 | ::-webkit-scrollbar-thumb {
58 | border: 10px solid rgba(0, 0, 0, 0);
59 | background-clip: padding-box;
60 | border-radius: 9999px;
61 | background-color: #e41818;
62 | }
63 | /* pesan ketika ada session */
64 | .alert {
65 | padding: 20px;
66 | margin: 10px 0 10px 0;
67 | color: black;
68 | border: 3px solid black;
69 | border-radius: 20px;
70 | font-weight: 700;
71 | transition: all 1s ease-in-out;
72 | }
73 | .sukses {
74 | background-color: greenyellow;
75 | }
76 | .gagal {
77 | background-color: red;
78 | }
79 | .closebtn {
80 | margin-left: 15px;
81 | color: black;
82 | font-weight: bold;
83 | float: right;
84 | font-size: 22px;
85 | line-height: 20px;
86 | cursor: pointer;
87 | transition: all 1s;
88 | }
89 | .closebtn:hover {
90 | color: whitesmoke;
91 | }
92 |
93 | @media (max-width: 1140px) {
94 | section {
95 | padding-top: 15vh;
96 | height: 100vh;
97 | }
98 | }
99 |
100 | @media screen and (max-width:575px) {
101 | section legend {
102 | width: 95%;
103 | }
104 |
105 | section .pln {
106 | display: none;
107 | }
108 | }
--------------------------------------------------------------------------------
/public/assets/css/admin/form.css:
--------------------------------------------------------------------------------
1 | .isi-form input[type=text],
2 | .isi-form select,
3 | .isi-form textarea {
4 | width: 100%;
5 | padding: 12px;
6 | border: 1px solid black;
7 | border-radius: 4px;
8 | resize: vertical;
9 | }
10 | .isi-form input[type=file] {
11 | padding: 12px;
12 | border: 1px solid black;
13 | border-radius: 4px;
14 | width: 50%;
15 | }
16 | .tidak-valid {
17 | border: 1px solid red;
18 | background-color:rgb(252, 209, 209);
19 | }
20 | .tidak-valid-feedback {
21 | font-size: 12px;
22 | color: red;
23 | }
24 | .isi-form label {
25 | padding: 12px 12px 12px 0;
26 | display: inline-block;
27 | }
28 |
29 | .isi-form button[type=submit],
30 | .isi-form input[type=submit] {
31 | background-color: #00e490;
32 | color: white;
33 | margin: 10px 0px 0px 0px;
34 | padding: 12px 20px;
35 | border: none;
36 | border-radius: 4px;
37 | cursor: pointer;
38 | float: right;
39 | transition: all 1s ease-in-out;
40 | }
41 | button[type=submit]:hover,
42 | input[type=submit]:hover {
43 | background-color: #8cb98e;
44 | }
45 |
46 | .isi-form {
47 | padding: 10px;
48 | }
49 |
50 | .isi-form .kolom-25 {
51 | float: left;
52 | width: 25%;
53 | margin-top: 6px;
54 | }
55 | .isi-form select option{
56 | padding: 10px;
57 | margin: 10px;
58 | border: 1px solid black;
59 | }
60 | .isi-form img {
61 | margin: 0;
62 | width: 50%;
63 | }
64 |
65 | .isi-form .kolom-75 {
66 | float: left;
67 | width: 75%;
68 | margin-top: 6px;
69 | }
70 |
71 | /* Clear floats after the kolomumns */
72 | .isi-form .baris:after {
73 | content: "";
74 | display: table;
75 | clear: both;
76 | }
77 | .pencarian {
78 | width: 100%;
79 | display: flex;
80 | flex-wrap: wrap;
81 | justify-content: center;
82 | margin: 10px auto 10px auto;
83 | }
84 | .pencarian input[type=text] {
85 | padding: 10px;
86 | border: 3px solid black;
87 | border-radius: 20px;
88 | }
89 | .pencarian button {
90 | padding: 10px;
91 | border-radius: 20px;
92 | border: 3px solid black;
93 | width: 50px;
94 | cursor: pointer;
95 | background-color: burlywood;
96 | }
97 | @media screen and (max-width: 600px) {
98 | input[type=file] {
99 | width: 100%;
100 | }
101 | .isi-form .kolom-25,
102 | .isi-form .kolom-75,
103 | input[type=submit] {
104 | width: 100%;
105 | margin: 5px 0 5px 0;
106 | }
107 | .isi-form img {
108 | width: 100%;
109 | }
110 | .pencarian input[type=text] {
111 | width: 75%;
112 | }
113 | }
--------------------------------------------------------------------------------
/Views/admin/agen/pelanggan/tambah.php:
--------------------------------------------------------------------------------
1 | = $this->extend('layout/agen'); ?>
2 | = $this->section('konten'); ?>
3 | Tambah Pelanggan
4 |
5 |
61 |
62 | = $this->endSection() ?>
--------------------------------------------------------------------------------
/Views/admin/petugas/pelanggan/tambah.php:
--------------------------------------------------------------------------------
1 | = $this->extend('layout/admin'); ?>
2 | = $this->section('konten'); ?>
3 | Tambah Pelanggan
4 |
5 |
61 |
62 | = $this->endSection() ?>
--------------------------------------------------------------------------------
/Views/admin/agen/pelanggan/detail.php:
--------------------------------------------------------------------------------
1 | = $this->extend('layout/agen'); ?>
2 | = $this->section('konten'); ?>
3 | Detail
4 |
5 | getFlashdata('pesan')) : ?>
6 |
7 | ×
8 | = session()->getFlashdata('pesan'); ?>
9 |
10 |
11 |
12 |
13 |
14 |
15 | no
16 | Nama
17 | Meter
18 | Bulan
19 | Tahun
20 | Meter Awal
21 | Meter Akhir
22 | Tgl Cek
23 | petugas
24 | Aksi
25 |
26 | query("SELECT * from penggunaan where id_pelanggan = '$pelanggan'");
30 | foreach ($tampil->getResultArray() as $data_penggunaan) {
31 | ?>
32 |
33 | = $i++; ?>
34 | query("SELECT * from pelanggan where no_pelanggan = '$pelanggan'");
36 | foreach ($tampil->getResultArray() as $data_pelanggan) {
37 | ?>
38 | = $data_pelanggan['nama']; ?>
39 | = $data_pelanggan['no_meter']; ?>
40 |
43 | = $data_penggunaan['bulan']; ?>
44 | = $data_penggunaan['tahun']; ?>
45 | = $data_penggunaan['meter_awal']; ?>
46 | = $data_penggunaan['meter_akhir']; ?>
47 | = $data_penggunaan['tgl_cek']; ?>
48 | query("SELECT * from petugas where id_petugas = '$petugas'");
51 | foreach ($tampil->getResultArray() as $data_petugas) {
52 | ?>
53 | = $data_petugas['nama']; ?>
54 |
57 |
58 |
59 |
60 |
61 |
63 |
64 |
65 |
68 |
69 |
70 | = $this->endSection(); ?>
--------------------------------------------------------------------------------
/Views/admin/petugas/pelanggan/detail.php:
--------------------------------------------------------------------------------
1 | = $this->extend('layout/admin'); ?>
2 | = $this->section('konten'); ?>
3 | Detail
4 |
5 | getFlashdata('pesan')) : ?>
6 |
7 | ×
8 | = session()->getFlashdata('pesan'); ?>
9 |
10 |
11 |
12 |
13 |
14 | no
15 | Nama
16 | Meter
17 | Bulan
18 | Tahun
19 | Meter Awal
20 | Meter Akhir
21 | Tgl Cek
22 | petugas
23 | Aksi
24 |
25 | query("SELECT * from penggunaan where id_pelanggan = '$pelanggan'");
29 | foreach ($tampil->getResultArray() as $data_penggunaan) {
30 | ?>
31 |
32 | = $i++; ?>
33 | query("SELECT * from pelanggan where no_pelanggan = '$pelanggan'");
35 | foreach ($tampil->getResultArray() as $data_pelanggan) {
36 | ?>
37 | = $data_pelanggan['nama']; ?>
38 | = $data_pelanggan['no_meter']; ?>
39 |
42 | = $data_penggunaan['bulan']; ?>
43 | = $data_penggunaan['tahun']; ?>
44 | = $data_penggunaan['meter_awal']; ?>
45 | = $data_penggunaan['meter_akhir']; ?>
46 | = $data_penggunaan['tgl_cek']; ?>
47 | query("SELECT * from petugas where id_petugas = '$petugas'");
50 | foreach ($tampil->getResultArray() as $data_petugas) {
51 | ?>
52 | = $data_petugas['nama']; ?>
53 |
56 |
57 |
58 |
59 |
60 |
62 |
63 |
64 |
67 |
68 |
69 | = $this->endSection(); ?>
--------------------------------------------------------------------------------
/Views/errors/html/debug.js:
--------------------------------------------------------------------------------
1 | // Tabs
2 |
3 | var tabLinks = new Array();
4 | var contentDivs = new Array();
5 |
6 | function init()
7 | {
8 | // Grab the tab links and content divs from the page
9 | var tabListItems = document.getElementById('tabs').childNodes;
10 | console.log(tabListItems);
11 | for (var i = 0; i < tabListItems.length; i ++)
12 | {
13 | if (tabListItems[i].nodeName == "LI")
14 | {
15 | var tabLink = getFirstChildWithTagName(tabListItems[i], 'A');
16 | var id = getHash(tabLink.getAttribute('href'));
17 | tabLinks[id] = tabLink;
18 | contentDivs[id] = document.getElementById(id);
19 | }
20 | }
21 |
22 | // Assign onclick events to the tab links, and
23 | // highlight the first tab
24 | var i = 0;
25 |
26 | for (var id in tabLinks)
27 | {
28 | tabLinks[id].onclick = showTab;
29 | tabLinks[id].onfocus = function () {
30 | this.blur()
31 | };
32 | if (i == 0)
33 | {
34 | tabLinks[id].className = 'active';
35 | }
36 | i ++;
37 | }
38 |
39 | // Hide all content divs except the first
40 | var i = 0;
41 |
42 | for (var id in contentDivs)
43 | {
44 | if (i != 0)
45 | {
46 | console.log(contentDivs[id]);
47 | contentDivs[id].className = 'content hide';
48 | }
49 | i ++;
50 | }
51 | }
52 |
53 | function showTab()
54 | {
55 | var selectedId = getHash(this.getAttribute('href'));
56 |
57 | // Highlight the selected tab, and dim all others.
58 | // Also show the selected content div, and hide all others.
59 | for (var id in contentDivs)
60 | {
61 | if (id == selectedId)
62 | {
63 | tabLinks[id].className = 'active';
64 | contentDivs[id].className = 'content';
65 | }
66 | else
67 | {
68 | tabLinks[id].className = '';
69 | contentDivs[id].className = 'content hide';
70 | }
71 | }
72 |
73 | // Stop the browser following the link
74 | return false;
75 | }
76 |
77 | function getFirstChildWithTagName(element, tagName)
78 | {
79 | for (var i = 0; i < element.childNodes.length; i ++)
80 | {
81 | if (element.childNodes[i].nodeName == tagName)
82 | {
83 | return element.childNodes[i];
84 | }
85 | }
86 | }
87 |
88 | function getHash(url)
89 | {
90 | var hashPos = url.lastIndexOf('#');
91 | return url.substring(hashPos + 1);
92 | }
93 |
94 | function toggle(elem)
95 | {
96 | elem = document.getElementById(elem);
97 |
98 | if (elem.style && elem.style['display'])
99 | {
100 | // Only works with the "style" attr
101 | var disp = elem.style['display'];
102 | }
103 | else if (elem.currentStyle)
104 | {
105 | // For MSIE, naturally
106 | var disp = elem.currentStyle['display'];
107 | }
108 | else if (window.getComputedStyle)
109 | {
110 | // For most other browsers
111 | var disp = document.defaultView.getComputedStyle(elem, null).getPropertyValue('display');
112 | }
113 |
114 | // Toggle the state of the "display" style
115 | elem.style.display = disp == 'block' ? 'none' : 'block';
116 |
117 | return false;
118 | }
119 |
--------------------------------------------------------------------------------
/Views/admin/agen/pelanggan/ubah.php:
--------------------------------------------------------------------------------
1 | = $this->extend('layout/agen'); ?>
2 | = $this->section('konten'); ?>
3 | Update Pelanggan
4 |
5 |
60 |
61 | = $this->endSection() ?>
--------------------------------------------------------------------------------
/Views/admin/petugas/pelanggan/ubah.php:
--------------------------------------------------------------------------------
1 | = $this->extend('layout/admin'); ?>
2 | = $this->section('konten'); ?>
3 | Update Pelanggan
4 |
5 |
60 |
61 | = $this->endSection() ?>
--------------------------------------------------------------------------------
/Views/layout/agen.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 | Makan
17 |
18 |
19 |
20 |
21 | get('username_agen') == '') {
23 | session()->setFlashdata('gagal', 'anda belum login sayang !!!');
24 | return redirect()->to(base_url('admin/agen/login'));
25 | }
26 | ?>
27 |
28 |
31 |
32 |
33 |
34 |
38 |
45 |
46 |
47 |
48 | = session()->get('nama') . ' / ' . session()->get('akses') ?>
49 |
50 |
51 |
52 |
53 | getFlashdata('gagal'))) {
55 | ?>
56 |
59 |
62 | = $this->renderSection('konten'); ?>
63 |
64 |
65 |
66 |
91 |
92 |
93 |
--------------------------------------------------------------------------------
/Views/layout/admin.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | Makan
18 |
19 |
20 |
21 |
22 | get('username') == '') {
24 | session()->setFlashdata('gagal', 'anda belum login sayang !!!');
25 | return redirect()->to(base_url('admin/petugas/login'));
26 | }
27 | ?>
28 |
29 |
32 |
33 |
34 |
35 |
39 |
46 |
47 |
48 |
49 | = session()->get('nama') . ' / ' . session()->get('akses') ?>
50 |
51 |
52 |
53 |
54 | getFlashdata('gagal'))) {
56 | ?>
57 |
60 |
63 | = $this->renderSection('konten'); ?>
64 |
65 |
66 |
67 |
92 |
93 |
94 |
--------------------------------------------------------------------------------
/Views/errors/html/debug.css:
--------------------------------------------------------------------------------
1 | :root {
2 | --main-bg-color: #fff;
3 | --main-text-color: #555;
4 | --dark-text-color: #222;
5 | --light-text-color: #c7c7c7;
6 | --brand-primary-color: #E06E3F;
7 | --light-bg-color: #ededee;
8 | --dark-bg-color: #404040;
9 | }
10 |
11 | body {
12 | height: 100%;
13 | background: var(--main-bg-color);
14 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
15 | color: var(--main-text-color);
16 | font-weight: 300;
17 | margin: 0;
18 | padding: 0;
19 | }
20 | h1 {
21 | font-weight: lighter;
22 | letter-spacing: 0.8;
23 | font-size: 3rem;
24 | color: var(--dark-text-color);
25 | margin: 0;
26 | }
27 | h1.headline {
28 | margin-top: 20%;
29 | font-size: 5rem;
30 | }
31 | .text-center {
32 | text-align: center;
33 | }
34 | p.lead {
35 | font-size: 1.6rem;
36 | }
37 | .container {
38 | max-width: 75rem;
39 | margin: 0 auto;
40 | padding: 1rem;
41 | }
42 | .header {
43 | background: var(--light-bg-color);
44 | color: var(--dark-text-color);
45 | }
46 | .header .container {
47 | padding: 1rem 1.75rem 1.75rem 1.75rem;
48 | }
49 | .header h1 {
50 | font-size: 2.5rem;
51 | font-weight: 500;
52 | }
53 | .header p {
54 | font-size: 1.2rem;
55 | margin: 0;
56 | line-height: 2.5;
57 | }
58 | .header a {
59 | color: var(--brand-primary-color);
60 | margin-left: 2rem;
61 | display: none;
62 | text-decoration: none;
63 | }
64 | .header:hover a {
65 | display: inline;
66 | }
67 |
68 | .footer {
69 | background: var(--dark-bg-color);
70 | color: var(--light-text-color);
71 | }
72 | .footer .container {
73 | border-top: 1px solid #e7e7e7;
74 | margin-top: 1rem;
75 | text-align: center;
76 | }
77 |
78 | .source {
79 | background: #343434;
80 | color: var(--light-text-color);
81 | padding: 0.5em 1em;
82 | border-radius: 5px;
83 | font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
84 | font-size: 0.85rem;
85 | margin: 0;
86 | overflow-x: scroll;
87 | }
88 | .source span.line {
89 | line-height: 1.4;
90 | }
91 | .source span.line .number {
92 | color: #666;
93 | }
94 | .source .line .highlight {
95 | display: block;
96 | background: var(--dark-text-color);
97 | color: var(--light-text-color);
98 | }
99 | .source span.highlight .number {
100 | color: #fff;
101 | }
102 |
103 | .tabs {
104 | list-style: none;
105 | list-style-position: inside;
106 | margin: 0;
107 | padding: 0;
108 | margin-bottom: -1px;
109 | }
110 | .tabs li {
111 | display: inline;
112 | }
113 | .tabs a:link,
114 | .tabs a:visited {
115 | padding: 0rem 1rem;
116 | line-height: 2.7;
117 | text-decoration: none;
118 | color: var(--dark-text-color);
119 | background: var(--light-bg-color);
120 | border: 1px solid rgba(0,0,0,0.15);
121 | border-bottom: 0;
122 | border-top-left-radius: 5px;
123 | border-top-right-radius: 5px;
124 | display: inline-block;
125 | }
126 | .tabs a:hover {
127 | background: var(--light-bg-color);
128 | border-color: rgba(0,0,0,0.15);
129 | }
130 | .tabs a.active {
131 | background: var(--main-bg-color);
132 | color: var(--main-text-color);
133 | }
134 | .tab-content {
135 | background: var(--main-bg-color);
136 | border: 1px solid rgba(0,0,0,0.15);
137 | }
138 | .content {
139 | padding: 1rem;
140 | }
141 | .hide {
142 | display: none;
143 | }
144 |
145 | .alert {
146 | margin-top: 2rem;
147 | display: block;
148 | text-align: center;
149 | line-height: 3.0;
150 | background: #d9edf7;
151 | border: 1px solid #bcdff1;
152 | border-radius: 5px;
153 | color: #31708f;
154 | }
155 | ul, ol {
156 | line-height: 1.8;
157 | }
158 |
159 | table {
160 | width: 100%;
161 | overflow: hidden;
162 | }
163 | th {
164 | text-align: left;
165 | border-bottom: 1px solid #e7e7e7;
166 | padding-bottom: 0.5rem;
167 | }
168 | td {
169 | padding: 0.2rem 0.5rem 0.2rem 0;
170 | }
171 | tr:hover td {
172 | background: #f1f1f1;
173 | }
174 | td pre {
175 | white-space: pre-wrap;
176 | }
177 |
178 | .trace a {
179 | color: inherit;
180 | }
181 | .trace table {
182 | width: auto;
183 | }
184 | .trace tr td:first-child {
185 | min-width: 5em;
186 | font-weight: bold;
187 | }
188 | .trace td {
189 | background: var(--light-bg-color);
190 | padding: 0 1rem;
191 | }
192 | .trace td pre {
193 | margin: 0;
194 | }
195 | .args {
196 | display: none;
197 | }
198 |
--------------------------------------------------------------------------------
/public/assets/css/admin/navigasi.css:
--------------------------------------------------------------------------------
1 | nav {
2 | background: #171c24;
3 | display: flex;
4 | flex-wrap: wrap;
5 | align-items: center;
6 | justify-content: space-between;
7 | height: 10vh;
8 | }
9 |
10 | nav .logo {
11 | margin: 0px 0px 0px 100px;
12 | color: #fff;
13 | font-size: 5vh;
14 | font-weight: 600;
15 | letter-spacing: 0;
16 | }
17 |
18 | nav .logo .wrapper {
19 | background: #59284e;
20 | border-radius: 5px;
21 | position: absolute;
22 | }
23 |
24 | nav .logo .logo-text {
25 | flex: 0 0 100%;
26 | color: #00000000;
27 | text-align: center;
28 | font-family: 'Lato', sans-serif;
29 | position: absolute;
30 | transform: translate(-50%, -50%);
31 | border-bottom: 1px solid #d4d7ff;
32 | border-top: 1px solid #d4d7ff;
33 | background: url(https://media1.giphy.com/media/kLMfRZwHtzr7a/source.gif);
34 | background-clip: text;
35 | -webkit-background-clip: text;
36 | }
37 |
38 | nav .logo-text:after {
39 | content: attr(data-text);
40 | -webkit-text-stroke: 1.5px #d4d7ff;
41 | position: absolute;
42 | left: 50%;
43 | top: 50%;
44 | transform: translate(-50%, -49%);
45 | background: url(https://media1.giphy.com/media/kLMfRZwHtzr7a/source.gif);
46 | background-clip: text;
47 | -webkit-background-clip: text;
48 | background-size: 43%;
49 | }
50 |
51 | nav .nav-items {
52 | display: flex;
53 | flex: 1;
54 | padding: 0 0 0 110px;
55 | }
56 |
57 | nav .nav-items li {
58 | list-style: none;
59 | padding: 0 15px;
60 | }
61 |
62 | nav .nav-items li a {
63 | color: #fff;
64 | font-size: 3vh;
65 | font-weight: 500;
66 | text-decoration: none;
67 | }
68 |
69 | nav .nav-items li a:hover {
70 | color: #ff3d00;
71 | }
72 |
73 | nav .pengguna {
74 | display: flex;
75 | position: relative;
76 | z-index: 99;
77 | margin: 0px 20px 0px 0px;
78 | align-items: center;
79 | }
80 | nav .pengguna img {
81 | height: 8vh;
82 | margin-right: 10px;
83 | }
84 | nav .pengguna h3 {
85 | color: white;
86 | font-size: 2.5vh;
87 | }
88 |
89 | nav .menu-icon,
90 | nav .cancel-icon {
91 | width: 40px;
92 | text-align: center;
93 | margin: 0 20px;
94 | font-size: 18px;
95 | color: #fff;
96 | cursor: pointer;
97 | animation: putar 1s;
98 | transition: all 1s ease-in-out;
99 | display: none;
100 | }
101 |
102 | nav .menu-icon span,
103 | nav .cancel-icon {
104 | display: none;
105 | }
106 |
107 | @media (max-width: 1140px) {
108 | nav {
109 | width: 100%;
110 | padding: 0px;
111 | position: fixed;
112 | }
113 |
114 | nav .logo {
115 | display: none;
116 | }
117 |
118 | nav .nav-items {
119 | position: absolute;
120 | z-index: 99;
121 | top: 0;
122 | width: 200px;
123 | left: -100%;
124 | height: 100vh;
125 | padding: 5vh 0 0 0;
126 | text-align: center;
127 | background: #171c24;
128 | display: flex;
129 | flex-wrap: wrap;
130 | flex: 100%;
131 | align-items: center;
132 | justify-content: space-around;
133 | transition: left 0.3s ease;
134 | }
135 |
136 | nav .nav-items.active {
137 | left: 0px;
138 | }
139 |
140 | nav .nav-items li {
141 | width: 100%;
142 | line-height: 40px;
143 | }
144 |
145 | nav .nav-items li a {
146 | font-size: 3vh;
147 | }
148 |
149 | nav .menu-icon {
150 | display: block;
151 | }
152 |
153 | nav .menu-icon span {
154 | display: block;
155 | position: relative;
156 | animation: putar 1s;
157 | z-index: 9999;
158 | font-size: 5vh;
159 | transition: all 1s ease-in-out;
160 | }
161 |
162 | nav .menu-icon span.hide {
163 | display: none;
164 | }
165 |
166 | nav .cancel-icon.show {
167 | display: block;
168 | animation: putar 1s;
169 | position: absolute;
170 | z-index: 9999;
171 | font-size: 5vh;
172 | transition: all 1s ease-in-out;
173 | }
174 | }
175 |
176 | @media (max-width: 980px) {
177 | nav .menu-icon,
178 | nav .cancel-icon {
179 | margin: 0 10px;
180 | }
181 | }
182 |
183 | @media (max-width: 350px) {
184 |
185 | nav .menu-icon,
186 | nav .cancel-icon {
187 | margin: 0 10px;
188 | font-size: 40px;
189 | }
190 | }
--------------------------------------------------------------------------------
/Controllers/Agen/Pelanggan.php:
--------------------------------------------------------------------------------
1 | get('username_agen') == '') {
14 | session()->setFlashdata('gagal', 'anda belum login sayang !!!');
15 | return redirect()->to(base_url('agen/login'));
16 | }
17 | $this->pelangganModel = new PelangganModel();
18 | $this->penggunaanModel = new PenggunaanModel();
19 | }
20 | public function index()
21 | {
22 | $this->pelangganModel = new PelangganModel();
23 | // pencarian
24 | $kunci = $this->request->getVar('kunci');
25 | if ($kunci) {
26 | $pelanggan = $this->pelangganModel->cari($kunci);
27 | } else {
28 | $pelanggan = $this->pelangganModel;
29 | }
30 | $halaman = $this->request->getVar('page_pelanggan') ? $this->request->getVar('page_pelanggan') : 1;
31 | $data = [
32 | 'judul' => 'Pelanggan',
33 | 'pelanggan' => $pelanggan->paginate(5, 'pelanggan'),
34 | "pager" => $this->pelangganModel->pager,
35 | "halaman" => $halaman
36 | ];
37 | return view('admin/agen/pelanggan/index', $data);
38 | }
39 |
40 | public function tambah()
41 | {
42 | $data = [
43 | 'title' => 'tambah Pelanggan',
44 | "validasi" => \Config\Services::validation()
45 | ];
46 | return view('admin/agen/pelanggan/tambah', $data);
47 | }
48 |
49 | public function simpan()
50 | {
51 | // dd('berhasil');
52 | // dd($this->request->getVar());
53 | $this->pelangganModel->save([
54 | 'no_pelanggan' => $this->request->getVar('no_pelanggan'),
55 | 'no_meter' => $this->request->getVar('no_meter'),
56 | 'nama' => $this->request->getVar('nama'),
57 | 'alamat' => $this->request->getVar('alamat'),
58 | 'tenggang' => $this->request->getVar('tenggang'),
59 | 'id_tarif' => $this->request->getVar('id_tarif'),
60 | ]);
61 | session()->setFlashdata('pesan', 'data berhasil ditambahkan.');
62 | return redirect()->to('agen/pelanggan');
63 | }
64 |
65 | public function detail($no_pelanggan)
66 | {
67 | $data = [
68 | "title" => "detail Pelanggan",
69 | "pelanggan" => $this->pelangganModel->getPelanggan($no_pelanggan)
70 | ];
71 | // jika pelanggan tidak ada maka
72 | if (empty($data['pelanggan'])) {
73 | throw new \CodeIgniter\Exceptions\PageNotFoundException('Judul pelanggan ' . $no_pelanggan . ' tidak ditemukan');
74 | }
75 | return view('admin/agen/pelanggan/detail', $data);
76 | }
77 |
78 | public function ubah($no_pelanggan)
79 | {
80 | $data = [
81 | 'title' => "Ubah pelanggan",
82 | 'validasi' => \Config\Services::validation(),
83 | 'pelanggan' => $this->pelangganModel->getPelanggan($no_pelanggan)
84 | ];
85 | return view('admin/agen/pelanggan/ubah', $data);
86 | }
87 |
88 | public function hapus($id)
89 | {
90 | $this->pelangganModel->delete($id);
91 | session()->setFlashdata('pesan', 'data berhasil dihapus.');
92 | return redirect()->to('agen/pelanggan');
93 | }
94 |
95 | public function perbarui($id)
96 | {
97 | // dd($this->request->getVar());
98 | $this->pelangganModel->save([
99 | 'id' => $id,
100 | 'no_pelanggan' => $this->request->getVar('no_pelanggan'),
101 | 'nama' => $this->request->getVar('nama'),
102 | 'no_meter' => $this->request->getVar('no_meter'),
103 | 'alamat' => $this->request->getVar('alamat'),
104 | 'tenggang' => $this->request->getVar('tenggang'),
105 | 'id_tarif' => $this->request->getVar('id_tarif')
106 | ]);
107 | session()->setFlashdata('pesan', 'data berhasil diubah.');
108 | return redirect()->to('agen/pelanggan');
109 | }
110 |
111 | public function tagihan($id_penggunaan)
112 | {
113 | $data = [
114 | 'title' => "Ubah pelanggan",
115 | 'validasi' => \Config\Services::validation(),
116 | 'pelanggan' => $this->pelangganModel->findAll(),
117 | 'penggunaan' => $this->penggunaanModel->getPenggunaan($id_penggunaan)
118 | ];
119 | return view('admin/agen/pelanggan/tagihan', $data);
120 | }
121 |
122 | public function bayar($id)
123 | {
124 | // dd($this->request->getVar());
125 | $kembali = $this->request->getVar('bayar') - $this->request->getVar('jumlah_bayar');
126 | $this->penggunaanModel->save([
127 | 'id' => $id,
128 | 'no_penggunaan' => $this->request->getVar('no_penggunaan'),
129 | 'id_pelanggan' => $this->request->getVar('id_pelanggan'),
130 | 'bulan' => $this->request->getVar('bulan'),
131 | 'tahun' => $this->request->getVar('tahun'),
132 | 'meter_awal' => $this->request->getVar('meter_awal'),
133 | 'meter_akhir' => $this->request->getVar('meter_akhir'),
134 | 'jumlah_meter' => $this->request->getVar('jumlah_meter'),
135 | 'tarif_perkwh' => $this->request->getVar('tarif_perkwh'),
136 | 'jumlah_bayar' => $this->request->getVar('jumlah_bayar'),
137 | 'bayar' => $this->request->getVar('bayar'),
138 | 'kembali' => $kembali,
139 | 'status' => $this->request->getVar('status'),
140 | 'tgl_cek' => $this->request->getVar('tgl_cek'),
141 | 'id_petugas' => $this->request->getVar('id_petugas'),
142 | ]);
143 | session()->setFlashdata('pesan', 'Transaksi berhasil dibayar pada bulan ini');
144 | $db = \Config\Database::connect();
145 | $tampil = $db->query("SELECT * from penggunaan where id = $id");
146 | foreach ($tampil->getResultArray() as $t) {
147 | $id_pelanggan = $t['id_pelanggan'];
148 | }
149 | return redirect()->to('agen/pelanggan/detail/' . $id_pelanggan);
150 | }
151 | }
152 |
--------------------------------------------------------------------------------
/Controllers/Petugas/Pelanggan.php:
--------------------------------------------------------------------------------
1 | get('username') == '') {
14 | session()->setFlashdata('gagal', 'anda belum login sayang !!!');
15 | return redirect()->to(base_url('petugas/login'));
16 | }
17 | $this->pelangganModel = new PelangganModel();
18 | $this->penggunaanModel = new PenggunaanModel();
19 | }
20 | public function index()
21 | {
22 | $this->pelangganModel = new PelangganModel();
23 | // pencarian
24 | $kunci = $this->request->getVar('kunci');
25 | if ($kunci) {
26 | $pelanggan = $this->pelangganModel->cari($kunci);
27 | } else {
28 | $pelanggan = $this->pelangganModel;
29 | }
30 | $halaman = $this->request->getVar('page_pelanggan') ? $this->request->getVar('page_pelanggan') : 1;
31 | $data = [
32 | 'judul' => 'Pelanggan',
33 | 'pelanggan' => $pelanggan->paginate(5, 'pelanggan'),
34 | "pager" => $this->pelangganModel->pager,
35 | "halaman" => $halaman
36 | ];
37 | return view('admin/petugas/pelanggan/index', $data);
38 | }
39 |
40 | public function tambah()
41 | {
42 | $data = [
43 | 'title' => 'tambah Pelanggan',
44 | "validasi" => \Config\Services::validation()
45 | ];
46 | return view('admin/petugas/pelanggan/tambah', $data);
47 | }
48 |
49 | public function simpan()
50 | {
51 | // dd('berhasil');
52 | // dd($this->request->getVar());
53 | $this->pelangganModel->save([
54 | 'no_pelanggan' => $this->request->getVar('no_pelanggan'),
55 | 'no_meter' => $this->request->getVar('no_meter'),
56 | 'nama' => $this->request->getVar('nama'),
57 | 'alamat' => $this->request->getVar('alamat'),
58 | 'tenggang' => $this->request->getVar('tenggang'),
59 | 'id_tarif' => $this->request->getVar('id_tarif'),
60 | ]);
61 | session()->setFlashdata('pesan', 'data berhasil ditambahkan.');
62 | return redirect()->to('petugas/pelanggan');
63 | }
64 |
65 | public function detail($no_pelanggan)
66 | {
67 | $data = [
68 | "title" => "detail Pelanggan",
69 | "pelanggan" => $this->pelangganModel->getPelanggan($no_pelanggan)
70 | ];
71 | // jika pelanggan tidak ada maka
72 | if (empty($data['pelanggan'])) {
73 | throw new \CodeIgniter\Exceptions\PageNotFoundException('Judul pelanggan ' . $no_pelanggan . ' tidak ditemukan');
74 | }
75 | return view('admin/petugas/pelanggan/detail', $data);
76 | }
77 |
78 | public function ubah($no_pelanggan)
79 | {
80 | $data = [
81 | 'title' => "Ubah pelanggan",
82 | 'validasi' => \Config\Services::validation(),
83 | 'pelanggan' => $this->pelangganModel->getPelanggan($no_pelanggan)
84 | ];
85 | return view('admin/petugas/pelanggan/ubah', $data);
86 | }
87 |
88 | public function hapus($id)
89 | {
90 | $this->pelangganModel->delete($id);
91 | session()->setFlashdata('pesan', 'data berhasil dihapus.');
92 | return redirect()->to('petugas/pelanggan');
93 | }
94 |
95 | public function perbarui($id)
96 | {
97 | // dd($this->request->getVar());
98 | $this->pelangganModel->save([
99 | 'id' => $id,
100 | 'no_pelanggan' => $this->request->getVar('no_pelanggan'),
101 | 'nama' => $this->request->getVar('nama'),
102 | 'no_meter' => $this->request->getVar('no_meter'),
103 | 'alamat' => $this->request->getVar('alamat'),
104 | 'tenggang' => $this->request->getVar('tenggang'),
105 | 'id_tarif' => $this->request->getVar('id_tarif')
106 | ]);
107 | session()->setFlashdata('pesan', 'data berhasil diubah.');
108 | return redirect()->to('petugas/pelanggan');
109 | }
110 |
111 | public function tagihan($id_penggunaan)
112 | {
113 | $data = [
114 | 'title' => "Ubah pelanggan",
115 | 'validasi' => \Config\Services::validation(),
116 | 'pelanggan' => $this->pelangganModel->findAll(),
117 | 'penggunaan' => $this->penggunaanModel->getPenggunaan($id_penggunaan)
118 | ];
119 | return view('admin/petugas/pelanggan/tagihan', $data);
120 | }
121 |
122 | public function bayar($id)
123 | {
124 | // dd($this->request->getVar());
125 | $kembali = $this->request->getVar('bayar') - $this->request->getVar('jumlah_bayar');
126 | $this->penggunaanModel->save([
127 | 'id' => $id,
128 | 'no_penggunaan' => $this->request->getVar('no_penggunaan'),
129 | 'id_pelanggan' => $this->request->getVar('id_pelanggan'),
130 | 'bulan' => $this->request->getVar('bulan'),
131 | 'tahun' => $this->request->getVar('tahun'),
132 | 'meter_awal' => $this->request->getVar('meter_awal'),
133 | 'meter_akhir' => $this->request->getVar('meter_akhir'),
134 | 'jumlah_meter' => $this->request->getVar('jumlah_meter'),
135 | 'tarif_perkwh' => $this->request->getVar('tarif_perkwh'),
136 | 'jumlah_bayar' => $this->request->getVar('jumlah_bayar'),
137 | 'bayar' => $this->request->getVar('bayar'),
138 | 'kembali' => $kembali,
139 | 'status' => $this->request->getVar('status'),
140 | 'tgl_cek' => $this->request->getVar('tgl_cek'),
141 | 'id_petugas' => $this->request->getVar('id_petugas'),
142 | ]);
143 | session()->setFlashdata('pesan', 'Transaksi berhasil dibayar pada bulan ini');
144 | $db = \Config\Database::connect();
145 | $tampil = $db->query("SELECT * from penggunaan where id = $id");
146 | foreach ($tampil->getResultArray() as $t) {
147 | $id_pelanggan = $t['id_pelanggan'];
148 | }
149 | return redirect()->to('petugas/pelanggan/detail/' . $id_pelanggan);
150 | }
151 | }
152 |
--------------------------------------------------------------------------------
/Views/admin/agen/pelanggan/tagihan.php:
--------------------------------------------------------------------------------
1 | = $this->extend('layout/agen'); ?>
2 | = $this->section('konten'); ?>
3 | Tagihan
4 |
5 | query("SELECT * from pelanggan where no_pelanggan = '$id_pelanggan'");
9 | foreach ($tampil->getResultArray() as $data) {
10 | $tarif = $data['id_tarif'];
11 | $tampil = $db->query("SELECT * from tarif where id_tarif = '$tarif'");
12 | foreach ($tampil->getResultArray() as $t) {
13 | $tarif_kwh = $t['tarif_perkwh'];
14 | }
15 | }
16 | $total_meter = $penggunaan['meter_akhir'] - $penggunaan['meter_awal'];
17 | $total_bayar = $tarif_kwh * $total_meter;
18 | $status = $penggunaan['status'];
19 | if (!$status == 1) {
20 | $status = 'belum bayar';
21 | } else {
22 | $status = 'sudah bayar';
23 | }
24 | ?>
25 |
122 |
123 | = $this->endSection() ?>
--------------------------------------------------------------------------------
/Views/admin/petugas/pelanggan/tagihan.php:
--------------------------------------------------------------------------------
1 | = $this->extend('layout/admin'); ?>
2 | = $this->section('konten'); ?>
3 | Tagihan
4 |
5 | query("SELECT * from pelanggan where no_pelanggan = '$id_pelanggan'");
9 | foreach ($tampil->getResultArray() as $data) {
10 | $tarif = $data['id_tarif'];
11 | $tampil = $db->query("SELECT * from tarif where id_tarif = '$tarif'");
12 | foreach ($tampil->getResultArray() as $t) {
13 | $tarif_kwh = $t['tarif_perkwh'];
14 | }
15 | }
16 | $total_meter = $penggunaan['meter_akhir'] - $penggunaan['meter_awal'];
17 | $total_bayar = $tarif_kwh * $total_meter;
18 | $status = $penggunaan['status'];
19 | if (!$status == 1) {
20 | $status = 'belum bayar';
21 | } else {
22 | $status = 'sudah bayar';
23 | }
24 | ?>
25 |
122 |
123 | = $this->endSection() ?>
--------------------------------------------------------------------------------
/listrik_db.sql:
--------------------------------------------------------------------------------
1 | -- phpMyAdmin SQL Dump
2 | -- version 5.1.1
3 | -- https://www.phpmyadmin.net/
4 | --
5 | -- Host: 127.0.0.1
6 | -- Generation Time: May 15, 2022 at 02:34 PM
7 | -- Server version: 10.4.19-MariaDB
8 | -- PHP Version: 8.0.7
9 |
10 | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
11 | START TRANSACTION;
12 | SET time_zone = "+00:00";
13 |
14 |
15 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
16 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
17 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
18 | /*!40101 SET NAMES utf8mb4 */;
19 |
20 | --
21 | -- Database: `listrik_db`
22 | --
23 |
24 | -- --------------------------------------------------------
25 |
26 | --
27 | -- Table structure for table `agen`
28 | --
29 |
30 | CREATE TABLE `agen` (
31 | `id` int(11) NOT NULL,
32 | `id_petugas` varchar(32) NOT NULL,
33 | `nama` varchar(32) NOT NULL,
34 | `alamat` varchar(32) NOT NULL,
35 | `no_telepon` varchar(32) NOT NULL,
36 | `jk` varchar(32) NOT NULL,
37 | `akses` varchar(32) NOT NULL,
38 | `username_agen` varchar(32) NOT NULL,
39 | `password_agen` varchar(32) NOT NULL
40 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
41 |
42 | --
43 | -- Dumping data for table `agen`
44 | --
45 |
46 | INSERT INTO `agen` (`id`, `id_petugas`, `nama`, `alamat`, `no_telepon`, `jk`, `akses`, `username_agen`, `password_agen`) VALUES
47 | (1, 'P20180125001', 'Rafie', 'Bekasi', '082182771538', 'L', 'Agen', 'rafie', '1'),
48 | (2, 'P20180125002', 'Maryadi', 'Bekasi', '082182771538', 'L', 'Agen', 'mar', '1');
49 |
50 | -- --------------------------------------------------------
51 |
52 | --
53 | -- Table structure for table `antrian`
54 | --
55 |
56 | CREATE TABLE `antrian` (
57 | `id` int(11) NOT NULL,
58 | `tanggal` date NOT NULL,
59 | `no_antrian` int(32) NOT NULL,
60 | `status` enum('1','0') NOT NULL DEFAULT '0',
61 | `updated_date` datetime NOT NULL
62 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
63 |
64 | -- --------------------------------------------------------
65 |
66 | --
67 | -- Table structure for table `pelanggan`
68 | --
69 |
70 | CREATE TABLE `pelanggan` (
71 | `id` int(11) NOT NULL,
72 | `no_pelanggan` varchar(255) NOT NULL,
73 | `no_meter` varchar(255) NOT NULL,
74 | `nama` varchar(255) NOT NULL,
75 | `alamat` varchar(255) NOT NULL,
76 | `tenggang` varchar(255) NOT NULL,
77 | `id_tarif` varchar(255) NOT NULL
78 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
79 |
80 | --
81 | -- Dumping data for table `pelanggan`
82 | --
83 |
84 | INSERT INTO `pelanggan` (`id`, `no_pelanggan`, `no_meter`, `nama`, `alamat`, `tenggang`, `id_tarif`) VALUES
85 | (1, '20180129132711', '029180121647', 'Muhammmad Rafie', 'Jakarta', '30', '4'),
86 | (2, '20180128141026', '027180171426', 'Rafie', 'Jakarta', '28', '5'),
87 | (3, '20220121004244', '020220150044', 'Maryadi', 'Jati Asih', '21', '5'),
88 | (8, '20220121010142', '020220150142', 'Aripin Suantoro', 'Jakarta', '20', '16'),
89 | (10, '20220126045018', '025220130418', 'Faqih18', 'Jakarta', '26', '16');
90 |
91 | -- --------------------------------------------------------
92 |
93 | --
94 | -- Table structure for table `penggunaan`
95 | --
96 |
97 | CREATE TABLE `penggunaan` (
98 | `id` int(11) NOT NULL,
99 | `no_penggunaan` varchar(255) NOT NULL,
100 | `id_pelanggan` varchar(255) NOT NULL,
101 | `bulan` varchar(255) NOT NULL,
102 | `tahun` varchar(255) NOT NULL,
103 | `meter_awal` int(11) NOT NULL,
104 | `meter_akhir` int(11) NOT NULL,
105 | `jumlah_meter` int(11) NOT NULL,
106 | `tarif_perkwh` double NOT NULL,
107 | `jumlah_bayar` double NOT NULL,
108 | `bayar` int(11) NOT NULL,
109 | `kembali` int(11) NOT NULL,
110 | `status` enum('1','0') NOT NULL DEFAULT '0',
111 | `tgl_cek` varchar(255) NOT NULL,
112 | `id_petugas` varchar(255) NOT NULL
113 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
114 |
115 | --
116 | -- Dumping data for table `penggunaan`
117 | --
118 |
119 | INSERT INTO `penggunaan` (`id`, `no_penggunaan`, `id_pelanggan`, `bulan`, `tahun`, `meter_awal`, `meter_akhir`, `jumlah_meter`, `tarif_perkwh`, `jumlah_bayar`, `bayar`, `kembali`, `status`, `tgl_cek`, `id_petugas`) VALUES
120 | (3, '20180128141026022018', '20180128141026', '1', '2021', 0, 100, 100, 750, 75000, 100000, 25000, '1', '2021-10-01', 'P20180125001'),
121 | (4, '20180128141026032018', '20180128141026', '2', '2021', 0, 150, 150, 750, 112500, 250000, 137500, '1', '2021-10-01', 'P20180125001'),
122 | (6, '20180128141026042018', '20180128141026', '3', '2021', 150, 400, 250, 750, 187500, 400000, 212500, '1', '2021-10-01', 'P20180125001'),
123 | (9, '1111111111112222', '20180129132711', '12', '2021', 0, 100, 100, 1500, 150000, 200000, 50000, '1', '18 Agustus 2021', 'P20180125001');
124 |
125 | -- --------------------------------------------------------
126 |
127 | --
128 | -- Table structure for table `petugas`
129 | --
130 |
131 | CREATE TABLE `petugas` (
132 | `id` int(11) NOT NULL,
133 | `id_petugas` varchar(255) NOT NULL,
134 | `nama` varchar(255) NOT NULL,
135 | `alamat` varchar(255) NOT NULL,
136 | `no_telepon` varchar(255) NOT NULL,
137 | `jk` varchar(255) NOT NULL,
138 | `akses` varchar(32) NOT NULL,
139 | `username` varchar(255) NOT NULL,
140 | `password` varchar(255) NOT NULL
141 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
142 |
143 | --
144 | -- Dumping data for table `petugas`
145 | --
146 |
147 | INSERT INTO `petugas` (`id`, `id_petugas`, `nama`, `alamat`, `no_telepon`, `jk`, `akses`, `username`, `password`) VALUES
148 | (1, 'P20180125001', 'Faqih', 'Bekasi', '082182771538', 'L', 'Petugas', 'faqih', '1');
149 |
150 | -- --------------------------------------------------------
151 |
152 | --
153 | -- Table structure for table `tarif`
154 | --
155 |
156 | CREATE TABLE `tarif` (
157 | `id_tarif` int(11) NOT NULL,
158 | `kode_tarif` varchar(20) NOT NULL,
159 | `golongan` varchar(10) NOT NULL,
160 | `daya` varchar(10) NOT NULL,
161 | `tarif_perkwh` double NOT NULL
162 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
163 |
164 | --
165 | -- Dumping data for table `tarif`
166 | --
167 |
168 | INSERT INTO `tarif` (`id_tarif`, `kode_tarif`, `golongan`, `daya`, `tarif_perkwh`) VALUES
169 | (3, 'R3/450VA', 'R3', '450VA', 1000),
170 | (4, 'R1/900VA', 'R1', '900VA', 1500),
171 | (5, 'R2/450VA', 'R2', '450VA', 750),
172 | (8, 'R2/900VA', 'R2', '900VA', 1500),
173 | (9, 'B1/1500VA', 'B1', '1500VA', 2000),
174 | (10, 'R3/900VA', 'R3', '900VA', 1400),
175 | (13, 'R1/450VA', 'R1', '450VA', 1000),
176 | (16, 'R3/1300VA', 'R3', '1300VA', 1500);
177 |
178 | --
179 | -- Indexes for dumped tables
180 | --
181 |
182 | --
183 | -- Indexes for table `agen`
184 | --
185 | ALTER TABLE `agen`
186 | ADD PRIMARY KEY (`id`);
187 |
188 | --
189 | -- Indexes for table `antrian`
190 | --
191 | ALTER TABLE `antrian`
192 | ADD PRIMARY KEY (`id`);
193 |
194 | --
195 | -- Indexes for table `pelanggan`
196 | --
197 | ALTER TABLE `pelanggan`
198 | ADD PRIMARY KEY (`id`);
199 |
200 | --
201 | -- Indexes for table `penggunaan`
202 | --
203 | ALTER TABLE `penggunaan`
204 | ADD PRIMARY KEY (`id`);
205 |
206 | --
207 | -- Indexes for table `petugas`
208 | --
209 | ALTER TABLE `petugas`
210 | ADD PRIMARY KEY (`id`),
211 | ADD UNIQUE KEY `id_petugas` (`id_petugas`);
212 |
213 | --
214 | -- Indexes for table `tarif`
215 | --
216 | ALTER TABLE `tarif`
217 | ADD PRIMARY KEY (`id_tarif`);
218 |
219 | --
220 | -- AUTO_INCREMENT for dumped tables
221 | --
222 |
223 | --
224 | -- AUTO_INCREMENT for table `agen`
225 | --
226 | ALTER TABLE `agen`
227 | MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
228 |
229 | --
230 | -- AUTO_INCREMENT for table `antrian`
231 | --
232 | ALTER TABLE `antrian`
233 | MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
234 |
235 | --
236 | -- AUTO_INCREMENT for table `pelanggan`
237 | --
238 | ALTER TABLE `pelanggan`
239 | MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;
240 |
241 | --
242 | -- AUTO_INCREMENT for table `penggunaan`
243 | --
244 | ALTER TABLE `penggunaan`
245 | MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;
246 |
247 | --
248 | -- AUTO_INCREMENT for table `petugas`
249 | --
250 | ALTER TABLE `petugas`
251 | MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
252 |
253 | --
254 | -- AUTO_INCREMENT for table `tarif`
255 | --
256 | ALTER TABLE `tarif`
257 | MODIFY `id_tarif` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17;
258 | COMMIT;
259 |
260 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
261 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
262 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
263 |
--------------------------------------------------------------------------------
/Views/errors/html/error_exception.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | = esc($title) ?>
9 |
12 |
13 |
16 |
17 |
18 |
19 |
20 |
30 |
31 |
32 |
33 |
= esc(static::cleanPath($file, $line)) ?> at line = esc($line) ?>
34 |
35 |
36 |
37 | = static::highlightFile($file, $line, 15); ?>
38 |
39 |
40 |
41 |
42 |
43 |
44 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | $row) : ?>
60 |
61 |
62 |
63 |
64 |
65 |
72 |
73 | {PHP internal code}
74 |
75 |
76 |
77 |
78 | — = esc($row['class'] . $row['type'] . $row['function']) ?>
79 |
80 |
81 | ( arguments )
82 |
83 |
84 |
85 | getParameters();
91 | }
92 |
93 | foreach ($row['args'] as $key => $value) : ?>
94 |
95 | = esc(isset($params[$key]) ? '$' . $params[$key]->name : "#{$key}") ?>
96 | = esc(print_r($value, true)) ?>
97 |
98 |
99 |
100 |
101 |
102 |
103 | ()
104 |
105 |
106 |
107 |
108 | — = esc($row['function']) ?>()
109 |
110 |
111 |
112 |
113 |
114 |
115 | = static::highlightFile($row['file'], $row['line']) ?>
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
132 |
133 |
$= esc($var) ?>
134 |
135 |
136 |
137 |
138 | Key
139 | Value
140 |
141 |
142 |
143 | $value) : ?>
144 |
145 | = esc($key) ?>
146 |
147 |
148 | = esc($value) ?>
149 |
150 | = esc(print_r($value, true)) ?>
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
Constants
164 |
165 |
166 |
167 |
168 | Key
169 | Value
170 |
171 |
172 |
173 | $value) : ?>
174 |
175 | = esc($key) ?>
176 |
177 |
178 | = esc($value) ?>
179 |
180 | = esc(print_r($value, true)) ?>
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 | Path
198 | = esc($request->getUri()) ?>
199 |
200 |
201 | HTTP Method
202 | = esc($request->getMethod(true)) ?>
203 |
204 |
205 | IP Address
206 | = esc($request->getIPAddress()) ?>
207 |
208 |
209 | Is AJAX Request?
210 | = $request->isAJAX() ? 'yes' : 'no' ?>
211 |
212 |
213 | Is CLI Request?
214 | = $request->isCLI() ? 'yes' : 'no' ?>
215 |
216 |
217 | Is Secure Request?
218 | = $request->isSecure() ? 'yes' : 'no' ?>
219 |
220 |
221 | User Agent
222 | = esc($request->getUserAgent()->getAgentString()) ?>
223 |
224 |
225 |
226 |
227 |
228 |
229 |
230 |
231 |
235 |
236 |
237 |
238 |
$= esc($var) ?>
239 |
240 |
241 |
242 |
243 | Key
244 | Value
245 |
246 |
247 |
248 | $value) : ?>
249 |
250 | = esc($key) ?>
251 |
252 |
253 | = esc($value) ?>
254 |
255 | = esc(print_r($value, true)) ?>
256 |
257 |
258 |
259 |
260 |
261 |
262 |
263 |
264 |
265 |
266 |
267 |
268 | No $_GET, $_POST, or $_COOKIE Information to show.
269 |
270 |
271 |
272 |
273 | getHeaders(); ?>
274 |
275 |
276 |
Headers
277 |
278 |
279 |
280 |
281 | Header
282 | Value
283 |
284 |
285 |
286 |
287 |
295 |
296 |
297 | = esc($h->getName(), 'html') ?>
298 | = esc($h->getValueLine(), 'html') ?>
299 |
300 |
301 |
302 |
303 |
304 |
305 |
306 |
307 |
308 |
309 | setStatusCode(http_response_code());
312 | ?>
313 |
314 |
315 |
316 | Response Status
317 | = esc($response->getStatusCode() . ' - ' . $response->getReason()) ?>
318 |
319 |
320 |
321 | getHeaders(); ?>
322 |
323 |
324 |
325 |
Headers
326 |
327 |
328 |
329 |
330 | Header
331 | Value
332 |
333 |
334 |
335 | $value) : ?>
336 |
337 | = esc($name, 'html') ?>
338 | = esc($response->getHeaderLine($name), 'html') ?>
339 |
340 |
341 |
342 |
343 |
344 |
345 |
346 |
347 |
348 |
349 |
350 |
351 |
352 |
353 | = esc(static::cleanPath($file)) ?>
354 |
355 |
356 |
357 |
358 |
359 |
360 |
361 |
362 |
363 |
364 | Memory Usage
365 | = esc(static::describeMemory(memory_get_usage(true))) ?>
366 |
367 |
368 | Peak Memory Usage:
369 | = esc(static::describeMemory(memory_get_peak_usage(true))) ?>
370 |
371 |
372 | Memory Limit:
373 | = esc(ini_get('memory_limit')) ?>
374 |
375 |
376 |
377 |
378 |
379 |
380 |
381 |
382 |
383 |
384 |
395 |
396 |
397 |
398 |
--------------------------------------------------------------------------------
/Views/welcome_message.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Welcome to CodeIgniter 4!
7 |
8 |
9 |
10 |
11 |
12 |
13 |
232 |
233 |
234 |
235 |
236 |
237 |
264 |
265 |
266 |
267 |
268 |
269 | About this page
270 |
271 | The page you are looking at is being generated dynamically by CodeIgniter.
272 |
273 | If you would like to edit this page you will find it located at:
274 |
275 | app/Views/welcome_message.php
276 |
277 | The corresponding controller for this page can be found at:
278 |
279 | app/Controllers/Home.php
280 |
281 |
282 |
283 |
284 |
285 |
286 |
287 | Go further
288 |
289 |
290 |
291 |
292 |
293 |
294 |
295 |
296 |
297 |
298 | Learn
299 |
300 |
301 | The User Guide contains an introduction, tutorial, a number of "how to"
302 | guides, and then reference documentation for the components that make up
303 | the framework. Check the User Guide !
304 |
305 |
306 |
307 |
308 |
309 |
310 | Discuss
311 |
312 |
313 | CodeIgniter is a community-developed open source project, with several
314 | venues for the community members to gather and exchange ideas. View all
315 | the threads on CodeIgniter's forum , or chat on Slack !
316 |
317 |
318 |
319 |
320 |
321 |
322 |
323 | Contribute
324 |
325 |
326 | CodeIgniter is a community driven project and accepts contributions
327 | of code and documentation from the community. Why not
328 |
329 | join us ?
330 |
331 |
332 |
333 |
334 |
335 |
336 |
337 |
338 |
355 |
356 |
357 |
358 |
367 |
368 |
369 |
370 |
371 |
372 |
--------------------------------------------------------------------------------