├── .htaccess
├── README.md
├── config.php
├── controllers
├── C_Akun.php
├── C_Auth.php
├── C_Dashboard.php
├── C_Jenis_Bayar.php
├── C_Merk.php
├── C_Mobil.php
├── C_Pemesan.php
├── C_Perjalanan.php
├── C_Pesanan.php
└── index.html
├── core
├── Controller.php
├── Database.php
├── Model.php
├── Route.php
└── index.html
├── functions
├── index.html
├── session_function.php
├── url_function.php
└── web_function.php
├── index.php
├── libraries
├── Request.php
└── index.html
├── models
├── M_Akun.php
├── M_Jenis_Bayar.php
├── M_Merk.php
├── M_Mobil.php
├── M_Pemesan.php
├── M_Perjalanan.php
├── M_Pesanan.php
└── index.html
├── rental_mobil.sql
├── sb-admin-2
├── css
│ └── sb-admin-2.min.css
├── img
│ └── undraw_posting_photo.svg
├── js
│ ├── demo
│ │ └── datatables-demo.js
│ └── sb-admin-2.min.js
└── vendor
│ ├── bootstrap
│ └── js
│ │ └── bootstrap.bundle.min.js
│ ├── datatables
│ ├── dataTables.bootstrap4.min.css
│ ├── dataTables.bootstrap4.min.js
│ └── jquery.dataTables.min.js
│ ├── fontawesome-free
│ ├── css
│ │ └── all.min.css
│ └── webfonts
│ │ ├── fa-brands-400.eot
│ │ ├── fa-brands-400.svg
│ │ ├── fa-brands-400.ttf
│ │ ├── fa-brands-400.woff
│ │ ├── fa-brands-400.woff2
│ │ ├── fa-regular-400.eot
│ │ ├── fa-regular-400.svg
│ │ ├── fa-regular-400.ttf
│ │ ├── fa-regular-400.woff
│ │ ├── fa-regular-400.woff2
│ │ ├── fa-solid-900.eot
│ │ ├── fa-solid-900.svg
│ │ ├── fa-solid-900.ttf
│ │ ├── fa-solid-900.woff
│ │ └── fa-solid-900.woff2
│ ├── jquery-easing
│ └── jquery.easing.min.js
│ └── jquery
│ └── jquery.min.js
├── uploads
├── administrator-1579273408.png
├── fakhrul-1579004931.jpg
├── fakhrul-fanani-nugroho-1579279638.jpg
├── fanani-1579275545.png
├── suzuki-all-new-ertiga-1579279546.png
└── toyota-kijang-innova-1579004786.png
└── views
├── _partials
├── footer.php
├── navbar.php
└── topbar.php
├── akun
├── detail.php
├── index.php
└── ubah.php
├── dashboard.php
├── index.html
├── jenis_bayar
├── index.php
└── ubah.php
├── login.php
├── merk
├── index.php
└── ubah.php
├── mobil
├── detail.php
├── index.php
└── ubah.php
├── pemesan
├── detail.php
├── index.php
└── ubah.php
├── perjalanan
├── index.php
└── ubah.php
└── pesanan
├── detail.php
├── index.php
└── ubah.php
/.htaccess:
--------------------------------------------------------------------------------
1 | RewriteEngine On
2 |
3 | RewriteCond %{REQUEST_FILENAME} !-f
4 | RewriteCond %{REQUEST_FILENAME} !-d
5 |
6 | RewriteRule ^(.*) index.php?url=$1 [L]
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Aplikasi Rental Mobil Menggunakan Konsep PHP MVC & MySQL
2 |
3 | ### Kenapa saya membuat aplikasi ini?
4 |
5 | Ini merupakan aplikasi yang saya jadikan sebagai portfolio. Sebenarnya saya sudah banyak membuat banyak aplikasi berbasi web, namun saya lupa membackupnya. Jadi saya harus mengulang lagi dari awal demi portfolio. Selain sebagai portfolio, contoh aplikasi ini juga bisa saya jadikan sebagai latihan untuk mengasah skill koding saya.
6 |
7 | ### Untuk siapa sih aplikasi ini?
8 |
9 | Untuk kalian semua yang mau belajar atau yang butuh inspirasi tentang aplikasi berbasis web terutama yang menggunakan PHP dan MySQL.
10 |
11 | ### Boleh ga memodifikasi aplikasi ini?
12 |
13 | Jawabanya adalah **sangat sangat boleh!** Tapi ingat tetap sertakan siapa yang membuat aplikasi ini.
14 |
15 | ### Kalo di jual boleh ga?
16 |
17 | **Dilarang Keras!** Karena ini aplikasi bener bener gratis dan bebas bagi siapapun yang menggunakan dan ingin memodifikasinya.
18 |
19 | ### Fiturnya apa saja sih?
20 | Untuk fiturnya masih sangas sederhana, contohnya sebagai berikut
21 | 1. **Modul Master Mobil**
22 |
23 | Di modul ini saya membuat fitur untuk melihat, menambah, mengubah dan menghapus master mobil.
24 |
25 | 2. **Modul Master Pemesan**
26 |
27 | Di modul ini saya membuat fitur untuk melihat, menambah, mengubah dan menghapus data pemesan.
28 |
29 | 3. **Modul Master Pesanan**
30 |
31 | Di modul ini saya membuat fitur untuk melihat, menambah, mengubah dan menghapus data pesanan.
32 |
33 | 4. **Modul Manajemen Akun**
34 |
35 | Di modul ini saya membuat fitur untuk melihat, menambah dan menghapus data akun atau pengguna.
36 |
37 |
38 | ### Instalasi & Konfigurasi
39 |
40 | Untuk cara instalasi dan konfigurasi caranya sangat mudah
41 |
42 | 1. Kalian download atau clone repositori ini
43 | 2. Selanjutnya kalian bisa buka file `config.php`
44 | 3. Ubah isi dari konstanta `BASE_URL` dengan `http://localhost/namafolder/`
45 | 4. Untuk `namafolder` silahkan kalian ganti sesuai nama folder dari aplikasi ini di komputer atau laptop kalian
46 | 5. Ubah juga konfigurasi database di file `config.php`
47 | 6. Untuk login kalian bisa register terlebih dahulu atau menggunakan username = `admin` dan password `admin`
48 |
49 | ### Tentang Saya
50 |
51 | Fakhrul Nugroho siswa Kelas 12 Jurusan Teknik Komputer Informatika di SMK Negeri 1 Wanareja. https://www.instagram.com/nugrohospace/
52 |
--------------------------------------------------------------------------------
/config.php:
--------------------------------------------------------------------------------
1 |
15 |
--------------------------------------------------------------------------------
/controllers/C_Akun.php:
--------------------------------------------------------------------------------
1 | addFunction('url');
6 | if(!isset($_SESSION['login'])) {
7 | $_SESSION['error'] = 'Anda harus masuk dulu!';
8 | header('Location: ' . base_url());
9 | }
10 |
11 | $this->addFunction('web');
12 | $this->addFunction('session');
13 | $this->req = $this->library('Request');
14 | $this->akun = $this->model('M_Akun');
15 | }
16 |
17 | public function index(){
18 | $data = [
19 | 'aktif' => 'akun',
20 | 'judul' => 'Data Akun',
21 | 'data_akun' => $this->akun->lihat(),
22 | 'no' => 1
23 | ];
24 | $this->view('akun/index', $data);
25 | }
26 |
27 | public function tambah(){
28 | if(!isset($_POST['tambah'])) redirect('akun');
29 |
30 | if($_POST['password'] !== $_POST['password2']) {
31 | setSession('error', 'Password tidak sama!');
32 | redirect('akun');
33 | } else {
34 | // proses upload
35 | $upload_dir = BASEPATH . DS . 'uploads' . DS;
36 | $asal = $_FILES['foto']['tmp_name'];
37 | $ekstensi = pathinfo($_FILES['foto']['name'], PATHINFO_EXTENSION);
38 | $error = $_FILES['foto']['error'];
39 |
40 | $img_name = $this->req->post('nama');
41 | $img_name = $this->req->post('nama');
42 | $img_name = strtolower($img_name);
43 | $img_name = str_replace(' ', '-', $img_name);
44 | $img_name = $img_name . '-' . time();
45 |
46 | if($error == 0){
47 | if(file_exists($upload_dir . $img_name . '.' . $ekstensi)) unlink($upload_dir . $img_name . '.' . $ekstensi);
48 |
49 | if(move_uploaded_file($asal, $upload_dir . $img_name . '.' . $ekstensi)){
50 | $data = [
51 | 'nama' => $this->req->post('nama'),
52 | 'username' => $this->req->post('username'),
53 | 'password' => password_hash($this->req->post('password'), PASSWORD_DEFAULT),
54 | 'foto' => $img_name . '.' . $ekstensi,
55 | ];
56 |
57 | if($this->akun->tambah($data)){
58 | setSession('success', 'Data berhasil ditambahkan!');
59 | redirect('akun');
60 | } else {
61 | setSession('error', 'Data gagal ditambahkan!');
62 | redirect('akun');
63 | }
64 | } else die('gagal upload gambar');
65 | } else die('gambar error');
66 | }
67 | }
68 |
69 | public function hapus($id = null){
70 | if(!isset($id) || $this->akun->cek($id)->num_rows == 0) redirect('akun');
71 |
72 | $gambar = $this->akun->detail($id)->fetch_object()->foto;
73 |
74 | unlink(BASEPATH . DS . 'uploads' . DS . $gambar) or die('gagal hapus gambar!');
75 | if($this->akun->hapus($id)){
76 | setSession('success', 'Data berhasil dihapus!');
77 | redirect('akun');
78 | } else {
79 | setSession('error', 'Data gagal dihapus!');
80 | redirect('akun');
81 | }
82 | }
83 |
84 | public function detail($id){
85 | if(!isset($id) || $this->akun->cek($id)->num_rows == 0) redirect('akun');
86 |
87 | $data = [
88 | 'aktif' => 'akun',
89 | 'judul' => 'Detail Akun',
90 | 'akun' => $this->akun->detail($id)->fetch_object(),
91 | ];
92 |
93 | $this->view('akun/detail', $data);
94 | }
95 | }
--------------------------------------------------------------------------------
/controllers/C_Auth.php:
--------------------------------------------------------------------------------
1 | addFunction('url');
8 | if(isset($_SESSION['login'])) {
9 | header('Location: ' . base_url('dashboard'));
10 | }
11 |
12 | $this->addFunction('web');
13 | $this->addFunction('session');
14 | $this->req = $this->library('Request');
15 | $this->akun = $this->model('M_Akun');
16 | }
17 |
18 | public function index(){
19 | $this->view('login');
20 | }
21 |
22 | public function login(){
23 | if(!isset($_POST['login'])) redirect();
24 | else {
25 | $username = $this->req->post('username');
26 | $password = $this->req->post('password');
27 |
28 | $akun = $this->akun->cek_login($username);
29 |
30 | if($akun->num_rows > 0){
31 | $akun = $akun->fetch_object();
32 | if(password_verify($password, $akun->password)){
33 | setSession('login', [
34 | 'auth' => true,
35 | 'nama' => $akun->nama,
36 | 'username' => $akun->username,
37 | 'foto' => $akun->foto,
38 | 'waktu' => date('d M Y H:i:s')
39 | ]);
40 | redirect('dashboard');
41 | } else {
42 | setSession('error', 'Password salah!');
43 | redirect();
44 | }
45 | } else {
46 | setSession('error', 'Username tidak ditemukan!');
47 | redirect();
48 | }
49 | }
50 | }
51 |
52 | public function logout(){
53 | unset($_SESSION['login']);
54 | redirect();
55 | }
56 | }
--------------------------------------------------------------------------------
/controllers/C_Dashboard.php:
--------------------------------------------------------------------------------
1 | addFunction('url');
6 | if(!isset($_SESSION['login'])) {
7 | $_SESSION['error'] = 'Anda harus masuk dulu!';
8 | header('Location: ' . base_url());
9 | }
10 |
11 | $this->addFunction('web');
12 | $this->mobil = $this->model('M_Mobil');
13 | $this->pemesan = $this->model('M_Pemesan');
14 | $this->pesanan = $this->model('M_Pesanan');
15 | $this->akun = $this->model('M_Akun');
16 | }
17 | public function index(){
18 | $data = [
19 | 'aktif' => 'dashboard',
20 | 'judul' => 'Dashboard',
21 | 'mobil' => $this->mobil->lihat(),
22 | 'pemesan' => $this->pemesan->lihat(),
23 | 'pesanan' => $this->pesanan->lihat(),
24 | 'akun' => $this->akun->lihat(),
25 | ];
26 | $this->view('dashboard', $data);
27 | }
28 | }
--------------------------------------------------------------------------------
/controllers/C_Jenis_Bayar.php:
--------------------------------------------------------------------------------
1 | addFunction('url');
6 | if(!isset($_SESSION['login'])) {
7 | $_SESSION['error'] = 'Anda harus masuk dulu!';
8 | header('Location: ' . base_url());
9 | }
10 |
11 | $this->addFunction('web');
12 | $this->addFunction('session');
13 | $this->req = $this->library('Request');
14 | $this->j_bayar = $this->model('M_Jenis_Bayar');
15 | }
16 |
17 | public function index(){
18 | $data = [
19 | 'aktif' => 'jenis_bayar',
20 | 'judul' => 'Data Jenis Bayar',
21 | 'data_jenis_bayar' => $this->j_bayar->lihat(),
22 | 'no' => 1
23 | ];
24 | $this->view('jenis_bayar/index', $data);
25 | }
26 |
27 | public function tambah(){
28 | if(!isset($_POST['tambah'])) redirect('jenis_bayar');
29 |
30 | $jenis_bayar = $this->req->post('jenis_bayar');
31 | if($this->j_bayar->tambah($jenis_bayar)){
32 | setSession('success', 'Data berhasil ditambahkan!');
33 | redirect('jenis_bayar');
34 | } else {
35 | setSession('error', 'Data gagal ditambahkan!');
36 | redirect('jenis_bayar');
37 | }
38 | }
39 |
40 | public function ubah($id){
41 | if(!isset($id) || $this->j_bayar->cek($id)->num_rows == 0) redirect('jenis_bayar');
42 |
43 | $data = [
44 | 'aktif' => 'jenis_bayar',
45 | 'judul' => 'Ubah Jenis Bayar',
46 | 'jenis_bayar' => $this->j_bayar->lihat_id($id)->fetch_object(),
47 | ];
48 | $this->view('jenis_bayar/ubah', $data);
49 | }
50 |
51 | public function proses_ubah($id){
52 | if(!isset($id) || $this->j_bayar->cek($id)->num_rows == 0 || !isset($_POST['ubah'])) redirect('jenis_bayar');
53 |
54 | $jenis_bayar = $this->req->post('jenis_bayar');
55 | if($this->j_bayar->ubah($jenis_bayar, $id)){
56 | setSession('success', 'Data berhasil diubah!');
57 | redirect('jenis_bayar');
58 | } else {
59 | setSession('error', 'Data gagal diubah!');
60 | redirect('jenis_bayar');
61 | }
62 | }
63 |
64 | public function hapus($id = null){
65 | if(!isset($id) || $this->j_bayar->cek($id)->num_rows == 0) redirect('jenis_bayar');
66 |
67 | if($this->j_bayar->hapus($id)){
68 | setSession('success', 'Data berhasil dihapus!');
69 | redirect('jenis_bayar');
70 | } else {
71 | setSession('error', 'Data gagal dihapus!');
72 | redirect('jenis_bayar');
73 | }
74 | }
75 | }
--------------------------------------------------------------------------------
/controllers/C_Merk.php:
--------------------------------------------------------------------------------
1 | addFunction('url');
6 | if(!isset($_SESSION['login'])) {
7 | $_SESSION['error'] = 'Anda harus masuk dulu!';
8 | header('Location: ' . base_url());
9 | }
10 |
11 | $this->addFunction('web');
12 | $this->addFunction('session');
13 | $this->req = $this->library('Request');
14 | $this->merk = $this->model('M_Merk');
15 | }
16 |
17 | public function index(){
18 | $data = [
19 | 'aktif' => 'merk',
20 | 'judul' => 'Data Merk',
21 | 'data_merk' => $this->merk->lihat(),
22 | 'no' => 1
23 | ];
24 | $this->view('merk/index', $data);
25 | }
26 |
27 | public function tambah(){
28 | if(!isset($_POST['tambah'])) redirect('merk');
29 |
30 | $merk = $this->req->post('merk');
31 | if($this->merk->tambah($merk)){
32 | setSession('success', 'Data berhasil ditambahkan!');
33 | redirect('merk');
34 | } else {
35 | setSession('error', 'Data gagal ditambahkan!');
36 | redirect('merk');
37 | }
38 | }
39 |
40 | public function ubah($id){
41 | if(!isset($id) || $this->merk->cek($id)->num_rows == 0) redirect('merk');
42 |
43 | $data = [
44 | 'aktif' => 'merk',
45 | 'judul' => 'Ubah Merk',
46 | 'merk' => $this->merk->lihat_id($id)->fetch_object(),
47 | ];
48 | $this->view('merk/ubah', $data);
49 | }
50 |
51 | public function proses_ubah($id){
52 | if(!isset($id) || $this->merk->cek($id)->num_rows == 0 || !isset($_POST['ubah'])) redirect('merk');
53 |
54 | $merk = $this->req->post('merk');
55 | if($this->merk->ubah($merk, $id)){
56 | setSession('success', 'Data berhasil diubah!');
57 | redirect('merk');
58 | } else {
59 | setSession('error', 'Data gagal diubah!');
60 | redirect('merk');
61 | }
62 | }
63 |
64 | public function hapus($id = null){
65 | if(!isset($id) || $this->merk->cek($id)->num_rows == 0) redirect('merk');
66 |
67 | if($this->merk->hapus($id)){
68 | setSession('success', 'Data berhasil dihapus!');
69 | redirect('merk');
70 | } else {
71 | setSession('error', 'Data gagal dihapus!');
72 | redirect('merk');
73 | }
74 | }
75 | }
--------------------------------------------------------------------------------
/controllers/C_Mobil.php:
--------------------------------------------------------------------------------
1 | addFunction('url');
6 | if(!isset($_SESSION['login'])) {
7 | $_SESSION['error'] = 'Anda harus masuk dulu!';
8 | header('Location: ' . base_url());
9 | }
10 |
11 | $this->addFunction('web');
12 | $this->addFunction('session');
13 | $this->req = $this->library('Request');
14 | $this->merk = $this->model('M_Merk');
15 | $this->mobil = $this->model('M_Mobil');
16 | }
17 |
18 | public function index(){
19 | $data = [
20 | 'aktif' => 'mobil',
21 | 'judul' => 'Data Mobil',
22 | 'data_merk' => $this->merk->lihat(),
23 | 'data_mobil' => $this->mobil->lihat(),
24 | 'no' => 1
25 | ];
26 | $this->view('mobil/index', $data);
27 | }
28 |
29 | public function tambah(){
30 | if(!isset($_POST['tambah'])) redirect('mobil');
31 |
32 | // proses upload
33 | $upload_dir = BASEPATH . DS . 'uploads' . DS;
34 | $asal = $_FILES['gambar']['tmp_name'];
35 | $ekstensi = pathinfo($_FILES['gambar']['name'], PATHINFO_EXTENSION);
36 | $error = $_FILES['gambar']['error'];
37 |
38 | $img_name = $this->req->post('nama');
39 | $img_name = $this->req->post('nama');
40 | $img_name = strtolower($img_name);
41 | $img_name = str_replace(' ', '-', $img_name);
42 | $img_name = $img_name . '-' . time();
43 |
44 | if($error == 0){
45 | if(file_exists($upload_dir . $img_name . '.' . $ekstensi)) unlink($upload_dir . $img_name . '.' . $ekstensi);
46 |
47 | if(move_uploaded_file($asal, $upload_dir . $img_name . '.' . $ekstensi)){
48 | $data = [
49 | 'id_merk' => $this->req->post('id_merk'),
50 | 'nama' => $this->req->post('nama'),
51 | 'warna' => $this->req->post('warna'),
52 | 'jumlah_kursi' => $this->req->post('jumlah_kursi'),
53 | 'no_polisi' => $this->req->post('no_polisi'),
54 | 'tahun_beli' => $this->req->post('tahun_beli'),
55 | 'gambar' => $img_name . '.' . $ekstensi,
56 | ];
57 |
58 | if($this->mobil->tambah($data)){
59 | setSession('success', 'Data berhasil ditambahkan!');
60 | redirect('mobil');
61 | } else {
62 | setSession('error', 'Data gagal ditambahkan!');
63 | redirect('mobil');
64 | }
65 | } else die('gagal upload gambar');
66 | } else die('gambar error');
67 | }
68 |
69 | public function detail($id){
70 | if(!isset($id) || $this->mobil->cek($id)->num_rows == 0) redirect('mobil');
71 |
72 | $data = [
73 | 'aktif' => 'mobil',
74 | 'judul' => 'Detail Mobil',
75 | 'mobil' => $this->mobil->detail($id)->fetch_object(),
76 | ];
77 |
78 | $this->view('mobil/detail', $data);
79 | }
80 |
81 | public function ubah($id){
82 | if(!isset($id) || $this->mobil->cek($id)->num_rows == 0) redirect('mobil');
83 |
84 | $data = [
85 | 'aktif' => 'mobil',
86 | 'judul' => 'Ubah Mobil',
87 | 'mobil' => $this->mobil->lihat_id($id)->fetch_object(),
88 | 'data_merk' => $this->merk->lihat(),
89 | ];
90 | $this->view('mobil/ubah', $data);
91 | }
92 |
93 | public function proses_ubah($id){
94 | if(!isset($id) || $this->mobil->cek($id)->num_rows == 0 || !isset($_POST['ubah'])) redirect('mobil');
95 |
96 | $upload_dir = BASEPATH . DS . 'uploads' . DS;
97 | $asal = $_FILES['gambar']['tmp_name'];
98 | $ekstensi = pathinfo($_FILES['gambar']['name'], PATHINFO_EXTENSION);
99 | $error = $_FILES['gambar']['error'];
100 |
101 | $img_name = $this->req->post('nama');
102 | $img_name = $this->req->post('nama');
103 | $img_name = strtolower($img_name);
104 | $img_name = str_replace(' ', '-', $img_name);
105 | $img_name = $img_name . '-' . time();
106 |
107 | $data = [
108 | 'id_merk' => $this->req->post('id_merk'),
109 | 'nama' => $this->req->post('nama'),
110 | 'warna' => $this->req->post('warna'),
111 | 'jumlah_kursi' => $this->req->post('jumlah_kursi'),
112 | 'no_polisi' => $this->req->post('no_polisi'),
113 | 'tahun_beli' => $this->req->post('tahun_beli'),
114 | 'gambar' => $img_name . '.' . $ekstensi,
115 | ];
116 |
117 | $gambar_sebelumnya = $this->mobil->detail($id)->fetch_object()->gambar;
118 |
119 | if($this->mobil->ubah($data, $id)){
120 | unlink($upload_dir . $gambar_sebelumnya) or die('gagal hapus gambar lama');
121 | if($error == 0){
122 | if(file_exists($upload_dir . $img_name . '.' . $ekstensi)) unlink($upload_dir . $img_name . '.' . $ekstensi);
123 |
124 | if(move_uploaded_file($asal, $upload_dir . $img_name . '.' . $ekstensi)){
125 | setSession('success', 'Data berhasil diubah!');
126 | redirect('mobil');
127 | } else die('gagal upload gambar');
128 | } else die('gambar error');
129 | } else {
130 | setSession('error', 'Data gagal diubah!');
131 | redirect('mobil');
132 | }
133 | }
134 |
135 | public function hapus($id = null){
136 | if(!isset($id) || $this->mobil->cek($id)->num_rows == 0) redirect('mobil');
137 |
138 | $gambar = $this->mobil->detail($id)->fetch_object()->gambar;
139 | unlink(BASEPATH . DS . 'uploads' . DS . $gambar) or die('gagal hapus gambar!');
140 | if($this->mobil->hapus($id)){
141 | setSession('success', 'Data berhasil dihapus!');
142 | redirect('mobil');
143 | } else {
144 | setSession('error', 'Data gagal dihapus!');
145 | redirect('mobil');
146 | }
147 | }
148 | }
--------------------------------------------------------------------------------
/controllers/C_Pemesan.php:
--------------------------------------------------------------------------------
1 | addFunction('url');
6 | if(!isset($_SESSION['login'])) {
7 | $_SESSION['error'] = 'Anda harus masuk dulu!';
8 | header('Location: ' . base_url());
9 | }
10 |
11 | $this->addFunction('web');
12 | $this->addFunction('session');
13 | $this->req = $this->library('Request');
14 | $this->pemesan = $this->model('M_Pemesan');
15 | }
16 |
17 | public function index(){
18 | $data = [
19 | 'aktif' => 'pemesan',
20 | 'judul' => 'Data Pemesan',
21 | 'data_pemesan' => $this->pemesan->lihat(),
22 | 'no' => 1
23 | ];
24 | $this->view('pemesan/index', $data);
25 | }
26 |
27 | public function detail($id){
28 | if(!isset($id) || $this->pemesan->cek($id)->num_rows == 0) redirect('pemesan');
29 |
30 | $data = [
31 | 'aktif' => 'pemesan',
32 | 'judul' => 'Detail Pemesan',
33 | 'pemesan' => $this->pemesan->detail($id)->fetch_object(),
34 | ];
35 |
36 | $this->view('pemesan/detail', $data);
37 | }
38 |
39 | public function tambah(){
40 | if(!isset($_POST['tambah'])) redirect('pemesan');
41 |
42 | // proses upload
43 | $upload_dir = BASEPATH . DS . 'uploads' . DS;
44 | $asal = $_FILES['foto']['tmp_name'];
45 | $ekstensi = pathinfo($_FILES['foto']['name'], PATHINFO_EXTENSION);
46 | $error = $_FILES['foto']['error'];
47 |
48 | $img_name = $this->req->post('nama');
49 | $img_name = $this->req->post('nama');
50 | $img_name = strtolower($img_name);
51 | $img_name = str_replace(' ', '-', $img_name);
52 | $img_name = $img_name . '-' . time();
53 |
54 | if($error == 0){
55 | if(file_exists($upload_dir . $img_name . '.' . $ekstensi)) unlink($upload_dir . $img_name . '.' . $ekstensi);
56 |
57 | if(move_uploaded_file($asal, $upload_dir . $img_name . '.' . $ekstensi)){
58 | $data = [
59 | 'nama' => $this->req->post('nama'),
60 | 'alamat' => $this->req->post('alamat'),
61 | 'jenis_kelamin' => $this->req->post('jenis_kelamin'),
62 | 'foto' => $img_name . '.' . $ekstensi,
63 | ];
64 |
65 | if($this->pemesan->tambah($data)){
66 | setSession('success', 'Data berhasil ditambahkan!');
67 | redirect('pemesan');
68 | } else {
69 | setSession('error', 'Data gagal ditambahkan!');
70 | redirect('pemesan');
71 | }
72 | } else die('gagal upload gambar');
73 | } else die('gambar error');
74 | }
75 |
76 | public function hapus($id = null){
77 | if(!isset($id) || $this->pemesan->cek($id)->num_rows == 0) redirect('pemesan');
78 |
79 | $gambar = $this->pemesan->detail($id)->fetch_object()->foto;
80 |
81 | unlink(BASEPATH . DS . 'uploads' . DS . $gambar) or die('gagal hapus gambar!');
82 | if($this->pemesan->hapus($id)){
83 | setSession('success', 'Data berhasil dihapus!');
84 | redirect('pemesan');
85 | } else {
86 | setSession('error', 'Data gagal dihapus!');
87 | redirect('pemesan');
88 | }
89 | }
90 |
91 | public function ubah($id){
92 | if(!isset($id) || $this->pemesan->cek($id)->num_rows == 0) redirect('pemesan');
93 |
94 | $data = [
95 | 'aktif' => 'pemesan',
96 | 'judul' => 'Ubah Pemesan',
97 | 'pemesan' => $this->pemesan->lihat_id($id)->fetch_object(),
98 | ];
99 | $this->view('pemesan/ubah', $data);
100 | }
101 |
102 | public function proses_ubah($id){
103 | if(!isset($id) || $this->pemesan->cek($id)->num_rows == 0 || !isset($_POST['ubah'])) redirect('pemesan');
104 |
105 | // proses upload
106 | $upload_dir = BASEPATH . DS . 'uploads' . DS;
107 | $asal = $_FILES['foto']['tmp_name'];
108 | $ekstensi = pathinfo($_FILES['foto']['name'], PATHINFO_EXTENSION);
109 | $error = $_FILES['foto']['error'];
110 |
111 | $img_name = $this->req->post('nama');
112 | $img_name = $this->req->post('nama');
113 | $img_name = strtolower($img_name);
114 | $img_name = str_replace(' ', '-', $img_name);
115 | $img_name = $img_name . '-' . time();
116 |
117 | if($error == 0){
118 | if(file_exists($upload_dir . $img_name . '.' . $ekstensi)) unlink($upload_dir . $img_name . '.' . $ekstensi);
119 |
120 | if(move_uploaded_file($asal, $upload_dir . $img_name . '.' . $ekstensi)){
121 | $data = [
122 | 'nama' => $this->req->post('nama'),
123 | 'alamat' => $this->req->post('alamat'),
124 | 'jenis_kelamin' => $this->req->post('jenis_kelamin'),
125 | 'foto' => $img_name . '.' . $ekstensi,
126 | ];
127 |
128 | if($this->pemesan->ubah($data, $id)){
129 | setSession('success', 'Data berhasil diubah!');
130 | redirect('pemesan');
131 | } else {
132 | setSession('error', 'Data gagal diubah!');
133 | redirect('pemesan');
134 | }
135 | } else die('gagal upload gambar');
136 | } else die('gambar error');
137 | }
138 | }
--------------------------------------------------------------------------------
/controllers/C_Perjalanan.php:
--------------------------------------------------------------------------------
1 | addFunction('url');
6 | if(!isset($_SESSION['login'])) {
7 | $_SESSION['error'] = 'Anda harus masuk dulu!';
8 | header('Location: ' . base_url());
9 | }
10 |
11 | $this->addFunction('web');
12 | $this->addFunction('session');
13 | $this->req = $this->library('Request');
14 | $this->perjalanan = $this->model('M_Perjalanan');
15 | }
16 |
17 | public function index(){
18 | $data = [
19 | 'aktif' => 'perjalanan',
20 | 'judul' => 'Data Perjalanan',
21 | 'data_perjalanan' => $this->perjalanan->lihat(),
22 | 'no' => 1
23 | ];
24 | $this->view('perjalanan/index', $data);
25 | }
26 |
27 | public function tambah(){
28 | if(!isset($_POST['tambah'])) redirect('perjalanan');
29 |
30 | $data = [
31 | 'asal' => $this->req->post('asal'),
32 | 'tujuan' => $this->req->post('tujuan'),
33 | 'jarak' => $this->req->post('jarak'),
34 | ];
35 |
36 | if($this->perjalanan->tambah($data)){
37 | setSession('success', 'Data berhasil ditambahkan!');
38 | redirect('perjalanan');
39 | } else {
40 | setSession('error', 'Data gagal ditambahkan!');
41 | redirect('perjalanan');
42 | }
43 | }
44 |
45 | public function ubah($id){
46 | if(!isset($id) || $this->perjalanan->cek($id)->num_rows == 0) redirect('perjalanan');
47 |
48 | $data = [
49 | 'aktif' => 'perjalanan',
50 | 'judul' => 'Ubah Perjalanan',
51 | 'perjalanan' => $this->perjalanan->lihat_id($id)->fetch_object(),
52 | ];
53 | $this->view('perjalanan/ubah', $data);
54 | }
55 |
56 | public function proses_ubah($id){
57 | if(!isset($id) || $this->perjalanan->cek($id)->num_rows == 0 || !isset($_POST['ubah'])) redirect('perjalanan');
58 |
59 | $data = [
60 | 'asal' => $this->req->post('asal'),
61 | 'tujuan' => $this->req->post('tujuan'),
62 | 'jarak' => $this->req->post('jarak'),
63 | ];
64 | if($this->perjalanan->ubah($data, $id)){
65 | setSession('success', 'Data berhasil diubah!');
66 | redirect('perjalanan');
67 | } else {
68 | setSession('error', 'Data gagal diubah!');
69 | redirect('perjalanan');
70 | }
71 | }
72 |
73 | public function hapus($id = null){
74 | if(!isset($id) || $this->perjalanan->cek($id)->num_rows == 0) redirect('perjalanan');
75 |
76 | if($this->perjalanan->hapus($id)){
77 | setSession('success', 'Data berhasil dihapus!');
78 | redirect('perjalanan');
79 | } else {
80 | setSession('error', 'Data gagal dihapus!');
81 | redirect('perjalanan');
82 | }
83 | }
84 | }
--------------------------------------------------------------------------------
/controllers/C_Pesanan.php:
--------------------------------------------------------------------------------
1 | addFunction('url');
6 | if(!isset($_SESSION['login'])) {
7 | $_SESSION['error'] = 'Anda harus masuk dulu!';
8 | header('Location: ' . base_url());
9 | }
10 |
11 | $this->addFunction('web');
12 | $this->addFunction('session');
13 | $this->req = $this->library('Request');
14 | $this->pesanan = $this->model('M_Pesanan');
15 | $this->j_bayar = $this->model('M_Jenis_Bayar');
16 | $this->mobil = $this->model('M_Mobil');
17 | $this->pemesan = $this->model('M_Pemesan');
18 | $this->perjalanan = $this->model('M_Perjalanan');
19 | }
20 |
21 | public function index(){
22 | $data = [
23 | 'aktif' => 'pesanan',
24 | 'judul' => 'Data Pesanan',
25 | 'data_pesanan' => $this->pesanan->lihat(),
26 | 'data_pemesan' => $this->pemesan->lihat(),
27 | 'data_mobil' => $this->mobil->lihat(),
28 | 'data_perjalanan' => $this->perjalanan->lihat(),
29 | 'data_jenis_bayar' => $this->j_bayar->lihat(),
30 | 'no' => 1
31 | ];
32 | $this->view('pesanan/index', $data);
33 | }
34 |
35 | public function tambah(){
36 | if(!isset($_POST['tambah'])) redirect('pesanan');
37 | $data = [
38 | 'id_pemesan' => $this->req->post('id_pemesan'),
39 | 'id_mobil' => $this->req->post('id_mobil'),
40 | 'id_perjalanan' => $this->req->post('id_perjalanan'),
41 | 'id_jenis_bayar' => $this->req->post('id_jenis_bayar'),
42 | 'harga' => $this->req->post('harga'),
43 | 'tgl_pinjam' => $this->req->post('tgl_pinjam'),
44 | 'tgl_kembali' => $this->req->post('tgl_kembali'),
45 | ];
46 |
47 | if($this->pesanan->tambah($data)){
48 | setSession('success', 'Data berhasil ditambahkan!');
49 | redirect('pesanan');
50 | } else {
51 | setSession('error', 'Data gagal ditambahkan!');
52 | redirect('pesanan');
53 | }
54 | }
55 |
56 | public function ubah($id){
57 | if(!isset($id) || $this->pesanan->cek($id)->num_rows == 0) redirect('pesanan');
58 | $pesanan = $this->pesanan->lihat_id($id)->fetch_object();
59 | $id_pemesan = $pesanan->id_pemesan;
60 | $id_mobil = $pesanan->id_mobil;
61 | $id_perjalanan = $pesanan->id_perjalanan;
62 | $id_jenis_bayar = $pesanan->id_jenis_bayar;
63 |
64 | $data = [
65 | 'aktif' => 'pesanan',
66 | 'judul' => 'Ubah Pesanan',
67 | 'pemesan' => $this->pemesan->lihat_id($id_pemesan)->fetch_object(),
68 | 'mobil' => $this->mobil->lihat_id($id_mobil)->fetch_object(),
69 | 'perjalanan' => $this->perjalanan->lihat_id($id_perjalanan)->fetch_object(),
70 | 'jenis_bayar' => $this->j_bayar->lihat_id($id_jenis_bayar)->fetch_object(),
71 | 'pesanan' => $pesanan
72 | ];
73 | $this->view('pesanan/ubah', $data);
74 | }
75 |
76 | public function proses_ubah($id){
77 | if(!isset($id) || $this->pesanan->cek($id)->num_rows == 0 || !isset($_POST['ubah'])) redirect('pesanan');
78 |
79 | $data = [
80 | 'harga' => $this->req->post('harga'),
81 | 'tgl_kembali' => $this->req->post('tgl_kembali'),
82 | ];
83 | if($this->pesanan->ubah($data, $id)){
84 | setSession('success', 'Data berhasil diubah!');
85 | redirect('pesanan');
86 | } else {
87 | setSession('error', 'Data gagal diubah!');
88 | redirect('pesanan');
89 | }
90 | }
91 |
92 | public function hapus($id = null){
93 | if(!isset($id) || $this->pesanan->cek($id)->num_rows == 0) redirect('pesanan');
94 |
95 | if($this->pesanan->hapus($id)){
96 | setSession('success', 'Data berhasil dihapus!');
97 | redirect('pesanan');
98 | } else {
99 | setSession('error', 'Data gagal dihapus!');
100 | redirect('pesanan');
101 | }
102 | }
103 |
104 | public function detail($id){
105 | if(!isset($id) || $this->pesanan->cek($id)->num_rows == 0) redirect('pesanan');
106 |
107 | $data = [
108 | 'aktif' => 'pesanan',
109 | 'judul' => 'Detail Pesanan',
110 | 'pesanan' => $this->pesanan->detail($id)->fetch_object(),
111 | ];
112 |
113 | $this->view('pesanan/detail', $data);
114 | }
115 | }
--------------------------------------------------------------------------------
/controllers/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 403 Forbidden
6 |
7 |
8 | Halaman tidak boleh diakses!
9 |
10 |
--------------------------------------------------------------------------------
/core/Controller.php:
--------------------------------------------------------------------------------
1 | _koneksi = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME);
8 | if($this->_koneksi->connect_error) die('gagal konek!');
9 | }
10 |
11 | public function query($query){
12 | return $this->_koneksi->query($query);
13 | }
14 |
15 | public function error(){
16 | return $this->_koneksi->error;
17 | }
18 |
19 | }
--------------------------------------------------------------------------------
/core/Model.php:
--------------------------------------------------------------------------------
1 | db = new Database();
9 | }
10 |
11 | public function get($table, $kolom = []){
12 | if (count($kolom) == 0) {
13 | $this->_query = "SELECT * FROM {$table}";
14 | } else {
15 | $i = 0;
16 | $total = count($kolom);
17 | $this->_query = "SELECT ";
18 | foreach ($kolom as $k) {
19 | $i++;
20 | $this->_query = $this->_query . "{$k}";
21 |
22 | if($total > $i) $this->_query = $this->_query . ', ';
23 | }
24 |
25 | $this->_query = $this->_query . " FROM {$table}";
26 | }
27 | }
28 |
29 | public function get_where($table, $where = [], $kolom = []){
30 | if(count($where) == 0) die('paramater kedua dibutuhkan!');
31 |
32 | if (count($kolom) == 0) {
33 | $this->_query = "SELECT * FROM {$table}";
34 | } else {
35 | $i = 0;
36 | $total = count($kolom);
37 | $this->_query = "SELECT ";
38 | foreach ($kolom as $k) {
39 | $i++;
40 | $this->_query = $this->_query . "{$k}";
41 |
42 | if($total > $i) $this->_query = $this->_query . ', ';
43 | }
44 |
45 | $this->_query = $this->_query . " FROM {$table}";
46 | }
47 |
48 | $this->_query = $this->_query . " WHERE ";
49 |
50 | $i = 0;
51 | $total = count($where);
52 | foreach ($where as $key => $value) {
53 | $i++;
54 | $this->_query = $this->_query . "{$key} = '{$value}'";
55 |
56 | if($total > $i) $this->_query = $this->_query . ' AND ';
57 | }
58 | }
59 |
60 | public function insert($table, $insert = []){
61 | if(count($insert) == 0) die('paramater kedua dibutuhkan!');
62 |
63 | $this->_query = "INSERT INTO {$table} (";
64 |
65 | $i = 0;
66 | $total = count($insert);
67 | foreach ($insert as $key => $value) {
68 | $i++;
69 | $this->_query = $this->_query . "{$key}";
70 |
71 | if($total > $i) $this->_query = $this->_query . ', ';
72 | }
73 |
74 | $this->_query = $this->_query . ") VALUES (";
75 |
76 | $i = 0;
77 | $total = count($insert);
78 | foreach ($insert as $key => $value) {
79 | $i++;
80 | $this->_query = $this->_query . "'{$value}'";
81 |
82 | if($total > $i) $this->_query = $this->_query . ', ';
83 | }
84 |
85 | $this->_query = $this->_query . ")";
86 | }
87 |
88 | public function update($table, $update = [], $where = []){
89 | if(count($update) == 0) die('paramater kedua dibutuhkan!');
90 | if(count($where) == 0) die('paramater ketiga dibutuhkan!');
91 |
92 | $this->_query = "UPDATE {$table} SET ";
93 |
94 | $i = 0;
95 | $total = count($update);
96 | foreach ($update as $key => $value) {
97 | $i++;
98 | $this->_query = $this->_query . "{$key} = '{$value}'";
99 |
100 | if($total > $i) $this->_query = $this->_query . ', ';
101 | }
102 |
103 | $this->_query = $this->_query . " WHERE ";
104 |
105 | $i = 0;
106 | $total = count($where);
107 | foreach ($where as $key => $value) {
108 | $i++;
109 | $this->_query = $this->_query . "{$key} = '{$value}'";
110 |
111 | if($total > $i) $this->_query = $this->_query . ' AND ';
112 | }
113 |
114 | }
115 |
116 | public function delete($table, $where = []){
117 | if(count($where) == 0) die('paramater kedua dibutuhkan!');
118 |
119 | $this->_query = "DELETE FROM {$table} WHERE ";
120 |
121 | $i = 0;
122 | $total = count($where);
123 | foreach ($where as $key => $value) {
124 | $i++;
125 | $this->_query = $this->_query . "{$key} = '{$value}'";
126 |
127 | if($total > $i) $this->_query = $this->_query . ' AND ';
128 | }
129 |
130 | }
131 |
132 | public function setQuery($query){
133 | $this->_query = $query;
134 | }
135 |
136 | public function execute(){
137 | return $this->db->query($this->_query);
138 | }
139 | }
--------------------------------------------------------------------------------
/core/Route.php:
--------------------------------------------------------------------------------
1 | _dispatchUrl();
14 | $this->_setController();
15 | $this->_setMethod();
16 | $this->_setParams();
17 |
18 | if(method_exists($this->_controller, $this->_method)) call_user_func_array([$this->_controller, $this->_method], $this->_params);
19 | else die('method tidak ditemukan!');
20 | }
21 |
22 | protected function _dispatchUrl(){
23 | $this->_url = isset($_GET['url']) ? $_GET['url'] : '';
24 | $this->_url = filter_var($this->_url, FILTER_SANITIZE_URL);
25 | $this->_url = rtrim($this->_url, '/');
26 | $this->_url = explode('/', $this->_url);
27 | }
28 |
29 | protected function _setController(){
30 | if($this->_url[0] != '') {
31 | $controller = explode("_", $this->_url[0]);
32 | $this->_controller = 'C_';
33 | for ($i = 0; $i < count($controller); $i++) {
34 | if($i > 0) $this->_controller .= '_';
35 | $this->_controller .= ucfirst($controller[$i]);
36 | }
37 | } else $this->_controller = DEFAULT_CONTROLLER;
38 | if(file_exists(C_PATH . DS . $this->_controller . '.php')) {
39 | require_once C_PATH . DS . $this->_controller . '.php';
40 | $this->_controller = new $this->_controller();
41 | unset($this->_url[0]);
42 | } else die('controller tidak ditemukan!');
43 | }
44 |
45 | protected function _setMethod(){
46 | if(isset($this->_url[1])) $this->_method = $this->_url[1];
47 | else $this->_method = 'index';
48 |
49 | if(method_exists($this->_controller, $this->_method)) unset($this->_url[1]);
50 | }
51 |
52 | protected function _setParams(){
53 | if(!empty($this->_url)) $this->_params = array_values($this->_url);
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/core/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 403 Forbidden
6 |
7 |
8 | Halaman tidak boleh diakses!
9 |
10 |
--------------------------------------------------------------------------------
/functions/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 403 Forbidden
6 |
7 |
8 | Halaman tidak boleh diakses!
9 |
10 |
--------------------------------------------------------------------------------
/functions/session_function.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/libraries/Request.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 403 Forbidden
6 |
7 |
8 | Halaman tidak boleh diakses!
9 |
10 |
--------------------------------------------------------------------------------
/models/M_Akun.php:
--------------------------------------------------------------------------------
1 | get('tbl_akun', ['nama', 'username', 'id']);
6 | $query = $this->execute();
7 | return $query;
8 | }
9 |
10 | public function tambah($data){
11 | $query = $this->insert('tbl_akun', $data);
12 | $query = $this->execute();
13 | return $query;
14 | }
15 |
16 | public function lihat_id($id){
17 | $query = $this->get_where('tbl_akun', ['id' => $id]);
18 | $query = $this->execute();
19 | return $query;
20 | }
21 |
22 | public function cek($id){
23 | $query = $this->get_where('tbl_akun', ['id' => $id]);
24 | $query = $this->execute();
25 | return $query;
26 | }
27 |
28 | public function cek_login($username){
29 | $query = $this->get_where('tbl_akun', ['username' => $username]);
30 | $query = $this->execute();
31 | return $query;
32 | }
33 |
34 | public function detail($id){
35 | $query = $this->get_where('tbl_akun', ['id' => $id]);
36 | $query = $this->execute();
37 | return $query;
38 | }
39 |
40 | public function hapus($id){
41 | $query = $this->delete('tbl_akun', ['id' => $id]);
42 | $query = $this->execute();
43 | return $query;
44 | }
45 | }
--------------------------------------------------------------------------------
/models/M_Jenis_Bayar.php:
--------------------------------------------------------------------------------
1 | insert('tbl_jenis_bayar', ['jenis_bayar' => $data]);
6 | $query = $this->execute();
7 | return $query;
8 | }
9 |
10 | public function lihat(){
11 | $query = $this->get('tbl_jenis_bayar');
12 | $query = $this->execute();
13 | return $query;
14 | }
15 |
16 | public function lihat_id($id){
17 | $query = $this->get_where('tbl_jenis_bayar', ['id' => $id]);
18 | $query = $this->execute();
19 | return $query;
20 | }
21 |
22 | public function ubah($jenis_bayar, $id){
23 | $query = $this->update('tbl_jenis_bayar', ['jenis_bayar' => $jenis_bayar], ['id' => $id]);
24 | $query = $this->execute();
25 | return $query;
26 | }
27 |
28 | public function cek($id){
29 | $query = $this->get_where('tbl_jenis_bayar', ['id' => $id]);
30 | $query = $this->execute();
31 | return $query;
32 | }
33 |
34 | public function hapus($id){
35 | $query = $this->delete('tbl_jenis_bayar', ['id' => $id]);
36 | $query = $this->execute();
37 | return $query;
38 | }
39 | }
--------------------------------------------------------------------------------
/models/M_Merk.php:
--------------------------------------------------------------------------------
1 | insert('tbl_merk', ['merk' => $data]);
6 | $query = $this->execute();
7 | return $query;
8 | }
9 |
10 | public function lihat(){
11 | $query = $this->get('tbl_merk');
12 | $query = $this->execute();
13 | return $query;
14 | }
15 |
16 | public function lihat_id($id){
17 | $query = $this->get_where('tbl_merk', ['id' => $id]);
18 | $query = $this->execute();
19 | return $query;
20 | }
21 |
22 | public function ubah($merk, $id){
23 | $query = $this->update('tbl_merk', ['merk' => $merk], ['id' => $id]);
24 | $query = $this->execute();
25 | return $query;
26 | }
27 |
28 | public function cek($id){
29 | $query = $this->get_where('tbl_merk', ['id' => $id]);
30 | $query = $this->execute();
31 | return $query;
32 | }
33 |
34 | public function hapus($id){
35 | $query = $this->delete('tbl_merk', ['id' => $id]);
36 | $query = $this->execute();
37 | return $query;
38 | }
39 | }
--------------------------------------------------------------------------------
/models/M_Mobil.php:
--------------------------------------------------------------------------------
1 | setQuery('SELECT nama, tbl_merk.merk AS merk, jumlah_kursi, tbl_mobil.id as id FROM tbl_mobil INNER JOIN tbl_merk ON tbl_merk.id = tbl_mobil.id_merk');
6 | $query = $this->execute();
7 | return $query;
8 | }
9 |
10 | public function tambah($data){
11 | $query = $this->insert('tbl_mobil', $data);
12 | $query = $this->execute();
13 | return $query;
14 | }
15 |
16 | public function lihat_id($id){
17 | $query = $this->setQuery("SELECT *, tbl_mobil.id AS id_mobil, tbl_mobil.id_merk AS id_merk FROM tbl_mobil INNER JOIN tbl_merk ON tbl_merk.id = tbl_mobil.id_merk where tbl_mobil.id = $id");
18 | $query = $this->execute();
19 | return $query;
20 | }
21 |
22 | public function ubah($data, $id){
23 | $query = $this->update('tbl_mobil', $data, ['id' => $id]);
24 | $query = $this->execute();
25 | return $query;
26 | }
27 |
28 | public function cek($id){
29 | $query = $this->get_where('tbl_mobil', ['id' => $id]);
30 | $query = $this->execute();
31 | return $query;
32 | }
33 |
34 | public function detail($id){
35 | $query = $this->setQuery("SELECT *, tbl_mobil.id AS id_mobil, tbl_mobil.id_merk AS id_merk FROM tbl_mobil INNER JOIN tbl_merk ON tbl_merk.id = tbl_mobil.id_merk where tbl_mobil.id = $id");
36 | $query = $this->execute();
37 | return $query;
38 | }
39 |
40 | public function hapus($id){
41 | $query = $this->delete('tbl_mobil', ['id' => $id]);
42 | $query = $this->execute();
43 | return $query;
44 | }
45 | }
--------------------------------------------------------------------------------
/models/M_Pemesan.php:
--------------------------------------------------------------------------------
1 | get('tbl_pemesan', ['nama', 'jenis_kelamin', 'id']);
6 | $query = $this->execute();
7 | return $query;
8 | }
9 |
10 | public function tambah($data){
11 | $query = $this->insert('tbl_pemesan', $data);
12 | $query = $this->execute();
13 | return $query;
14 | }
15 |
16 | public function lihat_id($id){
17 | $query = $this->get_where('tbl_pemesan', ['id' => $id]);
18 | $query = $this->execute();
19 | return $query;
20 | }
21 |
22 | public function ubah($data, $id){
23 | $query = $this->update('tbl_pemesan', $data, ['id' => $id]);
24 | $query = $this->execute();
25 | return $query;
26 | }
27 |
28 | public function cek($id){
29 | $query = $this->get_where('tbl_pemesan', ['id' => $id]);
30 | $query = $this->execute();
31 | return $query;
32 | }
33 |
34 | public function detail($id){
35 | $query = $this->get_where('tbl_pemesan', ['id' => $id]);
36 | $query = $this->execute();
37 | return $query;
38 | }
39 |
40 | public function hapus($id){
41 | $query = $this->delete('tbl_pemesan', ['id' => $id]);
42 | $query = $this->execute();
43 | return $query;
44 | }
45 | }
--------------------------------------------------------------------------------
/models/M_Perjalanan.php:
--------------------------------------------------------------------------------
1 | insert('tbl_perjalanan', $data);
6 | $query = $this->execute();
7 | return $query;
8 | }
9 |
10 | public function lihat(){
11 | $query = $this->get('tbl_perjalanan');
12 | $query = $this->execute();
13 | return $query;
14 | }
15 |
16 | public function lihat_id($id){
17 | $query = $this->get_where('tbl_perjalanan', ['id' => $id]);
18 | $query = $this->execute();
19 | return $query;
20 | }
21 |
22 | public function ubah($data, $id){
23 | $query = $this->update('tbl_perjalanan', $data, ['id' => $id]);
24 | $query = $this->execute();
25 | return $query;
26 | }
27 |
28 | public function cek($id){
29 | $query = $this->get_where('tbl_perjalanan', ['id' => $id]);
30 | $query = $this->execute();
31 | return $query;
32 | }
33 |
34 | public function hapus($id){
35 | $query = $this->delete('tbl_perjalanan', ['id' => $id]);
36 | $query = $this->execute();
37 | return $query;
38 | }
39 | }
--------------------------------------------------------------------------------
/models/M_Pesanan.php:
--------------------------------------------------------------------------------
1 | insert('tbl_pesanan', $data);
6 | $query = $this->execute();
7 | return $query;
8 | }
9 |
10 | public function lihat(){
11 | $query = $this->setQuery("SELECT tbl_pesanan.id, tbl_pemesan.nama AS nama_pemesan, tbl_mobil.nama AS nama_mobil, tbl_jenis_bayar.jenis_bayar FROM tbl_pesanan INNER JOIN tbl_pemesan ON tbl_pesanan.id_pemesan = tbl_pemesan.id INNER JOIN tbl_mobil ON tbl_pesanan.id_mobil = tbl_mobil.id INNER JOIN tbl_jenis_bayar ON tbl_pesanan.id_jenis_bayar = tbl_jenis_bayar.id");
12 | $query = $this->execute();
13 | return $query;
14 | }
15 |
16 | public function lihat_id($id){
17 | $query = $this->get_where('tbl_pesanan', ['id' => $id]);
18 | $query = $this->execute();
19 | return $query;
20 | }
21 |
22 | public function ubah($data, $id){
23 | $query = $this->update('tbl_pesanan', $data, ['id' => $id]);
24 | $query = $this->execute();
25 | return $query;
26 | }
27 |
28 | public function cek($id){
29 | $query = $this->get_where('tbl_pesanan', ['id' => $id]);
30 | $query = $this->execute();
31 | return $query;
32 | }
33 |
34 | public function hapus($id){
35 | $query = $this->delete('tbl_pesanan', ['id' => $id]);
36 | $query = $this->execute();
37 | return $query;
38 | }
39 |
40 | public function detail($id){
41 | $query = $this->setQuery("SELECT tbl_pesanan.*, tbl_pemesan.nama AS nama_pemesan, tbl_mobil.nama AS nama_mobil, tbl_perjalanan.asal, tbl_perjalanan.tujuan, tbl_jenis_bayar.jenis_bayar FROM tbl_pesanan INNER JOIN tbl_pemesan ON tbl_pesanan.id_pemesan = tbl_pemesan.id INNER JOIN tbl_mobil ON tbl_pesanan.id_mobil = tbl_mobil.id INNER JOIN tbl_jenis_bayar ON tbl_pesanan.id_jenis_bayar = tbl_jenis_bayar.id INNER JOIN tbl_perjalanan ON tbl_pesanan.id_perjalanan = tbl_perjalanan.id WHERE tbl_pesanan.id = $id");
42 | $query = $this->execute();
43 | return $query;
44 | }
45 | }
--------------------------------------------------------------------------------
/models/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 403 Forbidden
6 |
7 |
8 | Halaman tidak boleh diakses!
9 |
10 |
--------------------------------------------------------------------------------
/rental_mobil.sql:
--------------------------------------------------------------------------------
1 | -- phpMyAdmin SQL Dump
2 | -- version 4.9.2
3 | -- https://www.phpmyadmin.net/
4 | --
5 | -- Host: 127.0.0.1
6 | -- Generation Time: Jan 17, 2020 at 06:57 PM
7 | -- Server version: 10.4.10-MariaDB
8 | -- PHP Version: 7.3.12
9 |
10 | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
11 | SET AUTOCOMMIT = 0;
12 | START TRANSACTION;
13 | SET time_zone = "+00:00";
14 |
15 |
16 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
17 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
18 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
19 | /*!40101 SET NAMES utf8mb4 */;
20 |
21 | --
22 | -- Database: `rental_mobil`
23 | --
24 |
25 | -- --------------------------------------------------------
26 |
27 | --
28 | -- Table structure for table `tbl_akun`
29 | --
30 |
31 | CREATE TABLE `tbl_akun` (
32 | `id` int(11) NOT NULL,
33 | `nama` varchar(50) DEFAULT NULL,
34 | `username` varchar(15) DEFAULT NULL,
35 | `password` varchar(255) DEFAULT NULL,
36 | `foto` varchar(60) DEFAULT NULL
37 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
38 |
39 | --
40 | -- Dumping data for table `tbl_akun`
41 | --
42 |
43 | INSERT INTO `tbl_akun` (`id`, `nama`, `username`, `password`, `foto`) VALUES
44 | (4, 'Administrator', 'admin', '$2y$10$tf2VKfD.kjhXFc16fbaNY.EvtMhvhb8iYFWvHVr5MURTg443VwmIm', 'administrator-1579273408.png'),
45 | (5, 'Fakhrul Fanani Nugroho', 'nugrohoff', '$2y$10$MzYgUN41HVHtmLixc40jxuBwXbstCYqeCxMTitlUsTcEIO8KdN.Su', 'fakhrul-fanani-nugroho-1579279638.jpg');
46 |
47 | -- --------------------------------------------------------
48 |
49 | --
50 | -- Table structure for table `tbl_jenis_bayar`
51 | --
52 |
53 | CREATE TABLE `tbl_jenis_bayar` (
54 | `id` int(11) NOT NULL,
55 | `jenis_bayar` varchar(20) DEFAULT NULL
56 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
57 |
58 | --
59 | -- Dumping data for table `tbl_jenis_bayar`
60 | --
61 |
62 | INSERT INTO `tbl_jenis_bayar` (`id`, `jenis_bayar`) VALUES
63 | (3, 'Cash'),
64 | (4, 'Kredit');
65 |
66 | -- --------------------------------------------------------
67 |
68 | --
69 | -- Table structure for table `tbl_merk`
70 | --
71 |
72 | CREATE TABLE `tbl_merk` (
73 | `id` int(11) NOT NULL,
74 | `merk` varchar(20) DEFAULT NULL
75 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
76 |
77 | --
78 | -- Dumping data for table `tbl_merk`
79 | --
80 |
81 | INSERT INTO `tbl_merk` (`id`, `merk`) VALUES
82 | (8, 'Toyota'),
83 | (9, 'Suzuki');
84 |
85 | -- --------------------------------------------------------
86 |
87 | --
88 | -- Table structure for table `tbl_mobil`
89 | --
90 |
91 | CREATE TABLE `tbl_mobil` (
92 | `id` int(11) NOT NULL,
93 | `nama` varchar(30) DEFAULT NULL,
94 | `warna` varchar(20) DEFAULT NULL,
95 | `no_polisi` varchar(10) DEFAULT NULL,
96 | `jumlah_kursi` int(1) DEFAULT NULL,
97 | `tahun_beli` int(4) DEFAULT NULL,
98 | `gambar` varchar(100) DEFAULT NULL,
99 | `id_merk` int(11) DEFAULT NULL
100 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
101 |
102 | --
103 | -- Dumping data for table `tbl_mobil`
104 | --
105 |
106 | INSERT INTO `tbl_mobil` (`id`, `nama`, `warna`, `no_polisi`, `jumlah_kursi`, `tahun_beli`, `gambar`, `id_merk`) VALUES
107 | (13, 'Toyota Kijang Innova', 'Putih', 'R 6788 KM', 6, 2019, 'toyota-kijang-innova-1577631464.png', NULL),
108 | (14, 'Toyota Kijang Innova', 'Abu Abu', 'R 1309 KN', 7, 2018, 'toyota-kijang-innova-1579004786.png', 8),
109 | (15, 'Suzuki All New Ertiga', 'Putih', 'R 1739 KN', 8, 2018, 'suzuki-all-new-ertiga-1579279546.png', 9);
110 |
111 | -- --------------------------------------------------------
112 |
113 | --
114 | -- Table structure for table `tbl_pemesan`
115 | --
116 |
117 | CREATE TABLE `tbl_pemesan` (
118 | `id` int(11) NOT NULL,
119 | `nama` varchar(50) DEFAULT NULL,
120 | `alamat` varchar(100) DEFAULT NULL,
121 | `jenis_kelamin` enum('L','P') DEFAULT NULL,
122 | `foto` varchar(100) DEFAULT NULL
123 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
124 |
125 | --
126 | -- Dumping data for table `tbl_pemesan`
127 | --
128 |
129 | INSERT INTO `tbl_pemesan` (`id`, `nama`, `alamat`, `jenis_kelamin`, `foto`) VALUES
130 | (6, 'Fakhrul', 'Sidareja', 'L', 'fakhrul-1579004931.jpg'),
131 | (7, 'Fanani', 'Sidareja', 'L', 'fanani-1579275545.png');
132 |
133 | -- --------------------------------------------------------
134 |
135 | --
136 | -- Table structure for table `tbl_perjalanan`
137 | --
138 |
139 | CREATE TABLE `tbl_perjalanan` (
140 | `id` int(11) NOT NULL,
141 | `asal` varchar(20) DEFAULT NULL,
142 | `tujuan` varchar(20) DEFAULT NULL,
143 | `jarak` int(3) DEFAULT NULL
144 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
145 |
146 | --
147 | -- Dumping data for table `tbl_perjalanan`
148 | --
149 |
150 | INSERT INTO `tbl_perjalanan` (`id`, `asal`, `tujuan`, `jarak`) VALUES
151 | (3, 'Cilacap', 'Jogjakarta', 300),
152 | (4, 'Cilacap', 'Ciamis', 70);
153 |
154 | -- --------------------------------------------------------
155 |
156 | --
157 | -- Table structure for table `tbl_pesanan`
158 | --
159 |
160 | CREATE TABLE `tbl_pesanan` (
161 | `id` int(11) NOT NULL,
162 | `harga` int(11) DEFAULT NULL,
163 | `tgl_pinjam` date DEFAULT NULL,
164 | `tgl_kembali` date DEFAULT NULL,
165 | `id_pemesan` int(11) DEFAULT NULL,
166 | `id_mobil` int(11) DEFAULT NULL,
167 | `id_perjalanan` int(11) DEFAULT NULL,
168 | `id_jenis_bayar` int(11) DEFAULT NULL
169 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
170 |
171 | --
172 | -- Dumping data for table `tbl_pesanan`
173 | --
174 |
175 | INSERT INTO `tbl_pesanan` (`id`, `harga`, `tgl_pinjam`, `tgl_kembali`, `id_pemesan`, `id_mobil`, `id_perjalanan`, `id_jenis_bayar`) VALUES
176 | (1, 1000000, '2020-01-01', '2020-01-04', NULL, 13, NULL, NULL),
177 | (6, 2000000, '2020-01-17', '2020-01-20', 6, 14, 3, 3),
178 | (8, 1500000, '2020-01-18', '2020-01-21', 7, 15, 4, 3);
179 |
180 | --
181 | -- Indexes for dumped tables
182 | --
183 |
184 | --
185 | -- Indexes for table `tbl_akun`
186 | --
187 | ALTER TABLE `tbl_akun`
188 | ADD PRIMARY KEY (`id`);
189 |
190 | --
191 | -- Indexes for table `tbl_jenis_bayar`
192 | --
193 | ALTER TABLE `tbl_jenis_bayar`
194 | ADD PRIMARY KEY (`id`);
195 |
196 | --
197 | -- Indexes for table `tbl_merk`
198 | --
199 | ALTER TABLE `tbl_merk`
200 | ADD PRIMARY KEY (`id`);
201 |
202 | --
203 | -- Indexes for table `tbl_mobil`
204 | --
205 | ALTER TABLE `tbl_mobil`
206 | ADD PRIMARY KEY (`id`),
207 | ADD KEY `tbl_mobil_ibfk_2` (`id_merk`);
208 |
209 | --
210 | -- Indexes for table `tbl_pemesan`
211 | --
212 | ALTER TABLE `tbl_pemesan`
213 | ADD PRIMARY KEY (`id`);
214 |
215 | --
216 | -- Indexes for table `tbl_perjalanan`
217 | --
218 | ALTER TABLE `tbl_perjalanan`
219 | ADD PRIMARY KEY (`id`);
220 |
221 | --
222 | -- Indexes for table `tbl_pesanan`
223 | --
224 | ALTER TABLE `tbl_pesanan`
225 | ADD PRIMARY KEY (`id`),
226 | ADD KEY `id_pemesan` (`id_pemesan`),
227 | ADD KEY `id_mobil` (`id_mobil`),
228 | ADD KEY `id_perjalanan` (`id_perjalanan`),
229 | ADD KEY `id_jenis_bayar` (`id_jenis_bayar`);
230 |
231 | --
232 | -- AUTO_INCREMENT for dumped tables
233 | --
234 |
235 | --
236 | -- AUTO_INCREMENT for table `tbl_akun`
237 | --
238 | ALTER TABLE `tbl_akun`
239 | MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
240 |
241 | --
242 | -- AUTO_INCREMENT for table `tbl_jenis_bayar`
243 | --
244 | ALTER TABLE `tbl_jenis_bayar`
245 | MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
246 |
247 | --
248 | -- AUTO_INCREMENT for table `tbl_merk`
249 | --
250 | ALTER TABLE `tbl_merk`
251 | MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;
252 |
253 | --
254 | -- AUTO_INCREMENT for table `tbl_mobil`
255 | --
256 | ALTER TABLE `tbl_mobil`
257 | MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16;
258 |
259 | --
260 | -- AUTO_INCREMENT for table `tbl_pemesan`
261 | --
262 | ALTER TABLE `tbl_pemesan`
263 | MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;
264 |
265 | --
266 | -- AUTO_INCREMENT for table `tbl_perjalanan`
267 | --
268 | ALTER TABLE `tbl_perjalanan`
269 | MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
270 |
271 | --
272 | -- AUTO_INCREMENT for table `tbl_pesanan`
273 | --
274 | ALTER TABLE `tbl_pesanan`
275 | MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;
276 |
277 | --
278 | -- Constraints for dumped tables
279 | --
280 |
281 | --
282 | -- Constraints for table `tbl_mobil`
283 | --
284 | ALTER TABLE `tbl_mobil`
285 | ADD CONSTRAINT `tbl_mobil_ibfk_2` FOREIGN KEY (`id_merk`) REFERENCES `tbl_merk` (`id`) ON DELETE SET NULL ON UPDATE CASCADE;
286 |
287 | --
288 | -- Constraints for table `tbl_pesanan`
289 | --
290 | ALTER TABLE `tbl_pesanan`
291 | ADD CONSTRAINT `tbl_pesanan_ibfk_1` FOREIGN KEY (`id_pemesan`) REFERENCES `tbl_pemesan` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
292 | ADD CONSTRAINT `tbl_pesanan_ibfk_2` FOREIGN KEY (`id_mobil`) REFERENCES `tbl_mobil` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
293 | ADD CONSTRAINT `tbl_pesanan_ibfk_3` FOREIGN KEY (`id_perjalanan`) REFERENCES `tbl_perjalanan` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
294 | ADD CONSTRAINT `tbl_pesanan_ibfk_4` FOREIGN KEY (`id_jenis_bayar`) REFERENCES `tbl_jenis_bayar` (`id`) ON DELETE SET NULL ON UPDATE CASCADE;
295 | COMMIT;
296 |
297 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
298 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
299 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
300 |
--------------------------------------------------------------------------------
/sb-admin-2/img/undraw_posting_photo.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/sb-admin-2/js/demo/datatables-demo.js:
--------------------------------------------------------------------------------
1 | // Call the dataTables jQuery plugin
2 | $(document).ready(function() {
3 | $('#dataTable').DataTable();
4 | });
5 |
--------------------------------------------------------------------------------
/sb-admin-2/js/sb-admin-2.min.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * Start Bootstrap - SB Admin 2 v4.0.7 (https://startbootstrap.com/template-overviews/sb-admin-2)
3 | * Copyright 2013-2019 Start Bootstrap
4 | * Licensed under MIT (https://github.com/BlackrockDigital/startbootstrap-sb-admin-2/blob/master/LICENSE)
5 | */
6 |
7 | !function(t){"use strict";t("#sidebarToggle, #sidebarToggleTop").on("click",function(o){t("body").toggleClass("sidebar-toggled"),t(".sidebar").toggleClass("toggled"),t(".sidebar").hasClass("toggled")&&t(".sidebar .collapse").collapse("hide")}),t(window).resize(function(){t(window).width()<768&&t(".sidebar .collapse").collapse("hide")}),t("body.fixed-nav .sidebar").on("mousewheel DOMMouseScroll wheel",function(o){if(768tr>th.sorting_asc,table.dataTable thead>tr>th.sorting_desc,table.dataTable thead>tr>th.sorting,table.dataTable thead>tr>td.sorting_asc,table.dataTable thead>tr>td.sorting_desc,table.dataTable thead>tr>td.sorting{padding-right:30px}table.dataTable thead>tr>th:active,table.dataTable thead>tr>td:active{outline:none}table.dataTable thead .sorting,table.dataTable thead .sorting_asc,table.dataTable thead .sorting_desc,table.dataTable thead .sorting_asc_disabled,table.dataTable thead .sorting_desc_disabled{cursor:pointer;position:relative}table.dataTable thead .sorting:before,table.dataTable thead .sorting:after,table.dataTable thead .sorting_asc:before,table.dataTable thead .sorting_asc:after,table.dataTable thead .sorting_desc:before,table.dataTable thead .sorting_desc:after,table.dataTable thead .sorting_asc_disabled:before,table.dataTable thead .sorting_asc_disabled:after,table.dataTable thead .sorting_desc_disabled:before,table.dataTable thead .sorting_desc_disabled:after{position:absolute;bottom:0.9em;display:block;opacity:0.3}table.dataTable thead .sorting:before,table.dataTable thead .sorting_asc:before,table.dataTable thead .sorting_desc:before,table.dataTable thead .sorting_asc_disabled:before,table.dataTable thead .sorting_desc_disabled:before{right:1em;content:"\2191"}table.dataTable thead .sorting:after,table.dataTable thead .sorting_asc:after,table.dataTable thead .sorting_desc:after,table.dataTable thead .sorting_asc_disabled:after,table.dataTable thead .sorting_desc_disabled:after{right:0.5em;content:"\2193"}table.dataTable thead .sorting_asc:before,table.dataTable thead .sorting_desc:after{opacity:1}table.dataTable thead .sorting_asc_disabled:before,table.dataTable thead .sorting_desc_disabled:after{opacity:0}div.dataTables_scrollHead table.dataTable{margin-bottom:0 !important}div.dataTables_scrollBody table{border-top:none;margin-top:0 !important;margin-bottom:0 !important}div.dataTables_scrollBody table thead .sorting:before,div.dataTables_scrollBody table thead .sorting_asc:before,div.dataTables_scrollBody table thead .sorting_desc:before,div.dataTables_scrollBody table thead .sorting:after,div.dataTables_scrollBody table thead .sorting_asc:after,div.dataTables_scrollBody table thead .sorting_desc:after{display:none}div.dataTables_scrollBody table tbody tr:first-child th,div.dataTables_scrollBody table tbody tr:first-child td{border-top:none}div.dataTables_scrollFoot>.dataTables_scrollFootInner{box-sizing:content-box}div.dataTables_scrollFoot>.dataTables_scrollFootInner>table{margin-top:0 !important;border-top:none}@media screen and (max-width: 767px){div.dataTables_wrapper div.dataTables_length,div.dataTables_wrapper div.dataTables_filter,div.dataTables_wrapper div.dataTables_info,div.dataTables_wrapper div.dataTables_paginate{text-align:center}}table.dataTable.table-sm>thead>tr>th{padding-right:20px}table.dataTable.table-sm .sorting:before,table.dataTable.table-sm .sorting_asc:before,table.dataTable.table-sm .sorting_desc:before{top:5px;right:0.85em}table.dataTable.table-sm .sorting:after,table.dataTable.table-sm .sorting_asc:after,table.dataTable.table-sm .sorting_desc:after{top:5px}table.table-bordered.dataTable th,table.table-bordered.dataTable td{border-left-width:0}table.table-bordered.dataTable th:last-child,table.table-bordered.dataTable th:last-child,table.table-bordered.dataTable td:last-child,table.table-bordered.dataTable td:last-child{border-right-width:0}table.table-bordered.dataTable tbody th,table.table-bordered.dataTable tbody td{border-bottom-width:0}div.dataTables_scrollHead table.table-bordered{border-bottom-width:0}div.table-responsive>div.dataTables_wrapper>div.row{margin:0}div.table-responsive>div.dataTables_wrapper>div.row>div[class^="col-"]:first-child{padding-left:0}div.table-responsive>div.dataTables_wrapper>div.row>div[class^="col-"]:last-child{padding-right:0}
2 |
--------------------------------------------------------------------------------
/sb-admin-2/vendor/datatables/dataTables.bootstrap4.min.js:
--------------------------------------------------------------------------------
1 | /*!
2 | DataTables Bootstrap 4 integration
3 | ©2011-2017 SpryMedia Ltd - datatables.net/license
4 | */
5 | (function(b){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(a){return b(a,window,document)}):"object"===typeof exports?module.exports=function(a,d){a||(a=window);if(!d||!d.fn.dataTable)d=require("datatables.net")(a,d).$;return b(d,a,a.document)}:b(jQuery,window,document)})(function(b,a,d,m){var f=b.fn.dataTable;b.extend(!0,f.defaults,{dom:"<'row'<'col-sm-12 col-md-6'l><'col-sm-12 col-md-6'f>><'row'<'col-sm-12'tr>><'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",
6 | renderer:"bootstrap"});b.extend(f.ext.classes,{sWrapper:"dataTables_wrapper dt-bootstrap4",sFilterInput:"form-control form-control-sm",sLengthSelect:"custom-select custom-select-sm form-control form-control-sm",sProcessing:"dataTables_processing card",sPageButton:"paginate_button page-item"});f.ext.renderer.pageButton.bootstrap=function(a,h,r,s,j,n){var o=new f.Api(a),t=a.oClasses,k=a.oLanguage.oPaginate,u=a.oLanguage.oAria.paginate||{},e,g,p=0,q=function(d,f){var l,h,i,c,m=function(a){a.preventDefault();
7 | !b(a.currentTarget).hasClass("disabled")&&o.page()!=a.data.action&&o.page(a.data.action).draw("page")};l=0;for(h=f.length;l",
8 | {"class":t.sPageButton+" "+g,id:0===r&&"string"===typeof c?a.sTableId+"_"+c:null}).append(b("",{href:"#","aria-controls":a.sTableId,"aria-label":u[c],"data-dt-idx":p,tabindex:a.iTabIndex,"class":"page-link"}).html(e)).appendTo(d),a.oApi._fnBindAction(i,{action:c},m),p++)}},i;try{i=b(h).find(d.activeElement).data("dt-idx")}catch(v){}q(b(h).empty().html('').children("ul"),s);i!==m&&b(h).find("[data-dt-idx="+i+"]").focus()};return f});
9 |
--------------------------------------------------------------------------------
/sb-admin-2/vendor/fontawesome-free/webfonts/fa-brands-400.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fakhrulnugroho/rental-mobil/caf223a3e5d3b799fb3c50f5f59d54c28ccf941c/sb-admin-2/vendor/fontawesome-free/webfonts/fa-brands-400.eot
--------------------------------------------------------------------------------
/sb-admin-2/vendor/fontawesome-free/webfonts/fa-brands-400.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fakhrulnugroho/rental-mobil/caf223a3e5d3b799fb3c50f5f59d54c28ccf941c/sb-admin-2/vendor/fontawesome-free/webfonts/fa-brands-400.ttf
--------------------------------------------------------------------------------
/sb-admin-2/vendor/fontawesome-free/webfonts/fa-brands-400.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fakhrulnugroho/rental-mobil/caf223a3e5d3b799fb3c50f5f59d54c28ccf941c/sb-admin-2/vendor/fontawesome-free/webfonts/fa-brands-400.woff
--------------------------------------------------------------------------------
/sb-admin-2/vendor/fontawesome-free/webfonts/fa-brands-400.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fakhrulnugroho/rental-mobil/caf223a3e5d3b799fb3c50f5f59d54c28ccf941c/sb-admin-2/vendor/fontawesome-free/webfonts/fa-brands-400.woff2
--------------------------------------------------------------------------------
/sb-admin-2/vendor/fontawesome-free/webfonts/fa-regular-400.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fakhrulnugroho/rental-mobil/caf223a3e5d3b799fb3c50f5f59d54c28ccf941c/sb-admin-2/vendor/fontawesome-free/webfonts/fa-regular-400.eot
--------------------------------------------------------------------------------
/sb-admin-2/vendor/fontawesome-free/webfonts/fa-regular-400.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fakhrulnugroho/rental-mobil/caf223a3e5d3b799fb3c50f5f59d54c28ccf941c/sb-admin-2/vendor/fontawesome-free/webfonts/fa-regular-400.ttf
--------------------------------------------------------------------------------
/sb-admin-2/vendor/fontawesome-free/webfonts/fa-regular-400.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fakhrulnugroho/rental-mobil/caf223a3e5d3b799fb3c50f5f59d54c28ccf941c/sb-admin-2/vendor/fontawesome-free/webfonts/fa-regular-400.woff
--------------------------------------------------------------------------------
/sb-admin-2/vendor/fontawesome-free/webfonts/fa-regular-400.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fakhrulnugroho/rental-mobil/caf223a3e5d3b799fb3c50f5f59d54c28ccf941c/sb-admin-2/vendor/fontawesome-free/webfonts/fa-regular-400.woff2
--------------------------------------------------------------------------------
/sb-admin-2/vendor/fontawesome-free/webfonts/fa-solid-900.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fakhrulnugroho/rental-mobil/caf223a3e5d3b799fb3c50f5f59d54c28ccf941c/sb-admin-2/vendor/fontawesome-free/webfonts/fa-solid-900.eot
--------------------------------------------------------------------------------
/sb-admin-2/vendor/fontawesome-free/webfonts/fa-solid-900.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fakhrulnugroho/rental-mobil/caf223a3e5d3b799fb3c50f5f59d54c28ccf941c/sb-admin-2/vendor/fontawesome-free/webfonts/fa-solid-900.ttf
--------------------------------------------------------------------------------
/sb-admin-2/vendor/fontawesome-free/webfonts/fa-solid-900.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fakhrulnugroho/rental-mobil/caf223a3e5d3b799fb3c50f5f59d54c28ccf941c/sb-admin-2/vendor/fontawesome-free/webfonts/fa-solid-900.woff
--------------------------------------------------------------------------------
/sb-admin-2/vendor/fontawesome-free/webfonts/fa-solid-900.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fakhrulnugroho/rental-mobil/caf223a3e5d3b799fb3c50f5f59d54c28ccf941c/sb-admin-2/vendor/fontawesome-free/webfonts/fa-solid-900.woff2
--------------------------------------------------------------------------------
/sb-admin-2/vendor/jquery-easing/jquery.easing.min.js:
--------------------------------------------------------------------------------
1 | (function(factory){if(typeof define==="function"&&define.amd){define(["jquery"],function($){return factory($)})}else if(typeof module==="object"&&typeof module.exports==="object"){exports=factory(require("jquery"))}else{factory(jQuery)}})(function($){$.easing.jswing=$.easing.swing;var pow=Math.pow,sqrt=Math.sqrt,sin=Math.sin,cos=Math.cos,PI=Math.PI,c1=1.70158,c2=c1*1.525,c3=c1+1,c4=2*PI/3,c5=2*PI/4.5;function bounceOut(x){var n1=7.5625,d1=2.75;if(x<1/d1){return n1*x*x}else if(x<2/d1){return n1*(x-=1.5/d1)*x+.75}else if(x<2.5/d1){return n1*(x-=2.25/d1)*x+.9375}else{return n1*(x-=2.625/d1)*x+.984375}}$.extend($.easing,{def:"easeOutQuad",swing:function(x){return $.easing[$.easing.def](x)},easeInQuad:function(x){return x*x},easeOutQuad:function(x){return 1-(1-x)*(1-x)},easeInOutQuad:function(x){return x<.5?2*x*x:1-pow(-2*x+2,2)/2},easeInCubic:function(x){return x*x*x},easeOutCubic:function(x){return 1-pow(1-x,3)},easeInOutCubic:function(x){return x<.5?4*x*x*x:1-pow(-2*x+2,3)/2},easeInQuart:function(x){return x*x*x*x},easeOutQuart:function(x){return 1-pow(1-x,4)},easeInOutQuart:function(x){return x<.5?8*x*x*x*x:1-pow(-2*x+2,4)/2},easeInQuint:function(x){return x*x*x*x*x},easeOutQuint:function(x){return 1-pow(1-x,5)},easeInOutQuint:function(x){return x<.5?16*x*x*x*x*x:1-pow(-2*x+2,5)/2},easeInSine:function(x){return 1-cos(x*PI/2)},easeOutSine:function(x){return sin(x*PI/2)},easeInOutSine:function(x){return-(cos(PI*x)-1)/2},easeInExpo:function(x){return x===0?0:pow(2,10*x-10)},easeOutExpo:function(x){return x===1?1:1-pow(2,-10*x)},easeInOutExpo:function(x){return x===0?0:x===1?1:x<.5?pow(2,20*x-10)/2:(2-pow(2,-20*x+10))/2},easeInCirc:function(x){return 1-sqrt(1-pow(x,2))},easeOutCirc:function(x){return sqrt(1-pow(x-1,2))},easeInOutCirc:function(x){return x<.5?(1-sqrt(1-pow(2*x,2)))/2:(sqrt(1-pow(-2*x+2,2))+1)/2},easeInElastic:function(x){return x===0?0:x===1?1:-pow(2,10*x-10)*sin((x*10-10.75)*c4)},easeOutElastic:function(x){return x===0?0:x===1?1:pow(2,-10*x)*sin((x*10-.75)*c4)+1},easeInOutElastic:function(x){return x===0?0:x===1?1:x<.5?-(pow(2,20*x-10)*sin((20*x-11.125)*c5))/2:pow(2,-20*x+10)*sin((20*x-11.125)*c5)/2+1},easeInBack:function(x){return c3*x*x*x-c1*x*x},easeOutBack:function(x){return 1+c3*pow(x-1,3)+c1*pow(x-1,2)},easeInOutBack:function(x){return x<.5?pow(2*x,2)*((c2+1)*2*x-c2)/2:(pow(2*x-2,2)*((c2+1)*(x*2-2)+c2)+2)/2},easeInBounce:function(x){return 1-bounceOut(1-x)},easeOutBounce:bounceOut,easeInOutBounce:function(x){return x<.5?(1-bounceOut(1-2*x))/2:(1+bounceOut(2*x-1))/2}})});
--------------------------------------------------------------------------------
/uploads/administrator-1579273408.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fakhrulnugroho/rental-mobil/caf223a3e5d3b799fb3c50f5f59d54c28ccf941c/uploads/administrator-1579273408.png
--------------------------------------------------------------------------------
/uploads/fakhrul-1579004931.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fakhrulnugroho/rental-mobil/caf223a3e5d3b799fb3c50f5f59d54c28ccf941c/uploads/fakhrul-1579004931.jpg
--------------------------------------------------------------------------------
/uploads/fakhrul-fanani-nugroho-1579279638.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fakhrulnugroho/rental-mobil/caf223a3e5d3b799fb3c50f5f59d54c28ccf941c/uploads/fakhrul-fanani-nugroho-1579279638.jpg
--------------------------------------------------------------------------------
/uploads/fanani-1579275545.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fakhrulnugroho/rental-mobil/caf223a3e5d3b799fb3c50f5f59d54c28ccf941c/uploads/fanani-1579275545.png
--------------------------------------------------------------------------------
/uploads/suzuki-all-new-ertiga-1579279546.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fakhrulnugroho/rental-mobil/caf223a3e5d3b799fb3c50f5f59d54c28ccf941c/uploads/suzuki-all-new-ertiga-1579279546.png
--------------------------------------------------------------------------------
/uploads/toyota-kijang-innova-1579004786.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fakhrulnugroho/rental-mobil/caf223a3e5d3b799fb3c50f5f59d54c28ccf941c/uploads/toyota-kijang-innova-1579004786.png
--------------------------------------------------------------------------------
/views/_partials/footer.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/views/_partials/navbar.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/views/_partials/topbar.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/views/akun/detail.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | = APP_NAME ?> - = $judul ?>
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
= $judul ?>
29 |
30 |
33 |
34 |
35 |
36 |
37 |
42 |
43 |
44 |
45 |
48 |
49 |
50 |
51 |
 ?>)
52 |
53 |
54 |
55 |
56 | Nama |
57 | : |
58 | = $akun->nama ?> |
59 |
60 |
61 | Username |
62 | : |
63 | = $akun->username ?> |
64 |
65 |
66 |
67 |
68 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
--------------------------------------------------------------------------------
/views/akun/index.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | = APP_NAME ?> - = $judul ?>
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
= $judul ?>
29 |
30 |
33 |
34 |
35 |
36 |
37 |
42 |
43 |
79 |
80 |
81 |
82 |
85 |
86 |
87 |
88 | = getSession('success', true) ?>
89 |
92 |
93 |
94 |
95 | = getSession('error', true) ?>
96 |
99 |
100 |
101 |
102 |
103 |
104 |
105 | No |
106 | Nama |
107 | Username |
108 | Aksi |
109 |
110 |
111 |
112 |
113 | No |
114 | Nama |
115 | Username |
116 | Aksi |
117 |
118 |
119 |
120 | fetch_object()) : ?>
121 |
122 | = $no++ ?> |
123 | = $akun->nama ?> |
124 | = $akun->username ?> |
125 |
126 | Detail
127 | Hapus
128 | |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
--------------------------------------------------------------------------------
/views/akun/ubah.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | = APP_NAME ?> - = $judul ?>
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
Ubah Merk
29 |
30 |
33 |
34 |
35 |
36 |
37 |
42 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
--------------------------------------------------------------------------------
/views/dashboard.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | = APP_NAME ?> - = $judul ?>
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
Dashboard = APP_NAME ?>
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
Data Mobil
30 |
num_rows) ?> Mobil
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
Data Pemesan
45 |
= $pemesan->num_rows ?> Pemesan
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
Data Pesanan
60 |
61 |
62 |
= $pesanan->num_rows ?> Pesanan
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
Data Akun
79 |
= $akun->num_rows ?> Akun
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
95 |
96 |
97 |
98 |
 ?>)
99 |
100 |
101 |
102 |
103 | Nama |
104 | : |
105 | = $_SESSION['login']['nama'] ?> |
106 |
107 |
108 | Username |
109 | : |
110 | = $_SESSION['login']['username'] ?> |
111 |
112 |
113 | Tanggal & Jam Login |
114 | : |
115 | = $_SESSION['login']['waktu'] ?> |
116 |
117 |
118 | Server |
119 | : |
120 | = $_SERVER['SERVER_NAME'] ?> |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
--------------------------------------------------------------------------------
/views/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 403 Forbidden
6 |
7 |
8 | Halaman tidak boleh diakses!
9 |
10 |
--------------------------------------------------------------------------------
/views/jenis_bayar/index.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | = APP_NAME ?> - = $judul ?>
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
= $judul ?>
29 |
30 |
33 |
34 |
35 |
36 |
37 |
42 |
43 |
44 |
45 |
48 |
49 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
68 |
69 |
70 |
71 | = getSession('success', true) ?>
72 |
75 |
76 |
77 |
78 | = getSession('error', true) ?>
79 |
82 |
83 |
84 |
85 |
86 |
87 |
88 | No |
89 | Jenis Bayar |
90 | Aksi |
91 |
92 |
93 |
94 |
95 | No |
96 | Jenis Bayar |
97 | Aksi |
98 |
99 |
100 |
101 | fetch_object()) : ?>
102 |
103 | = $no++ ?> |
104 | = $jenis_bayar->jenis_bayar ?> |
105 |
106 | Ubah
107 | Hapus
108 | |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
--------------------------------------------------------------------------------
/views/jenis_bayar/ubah.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | = APP_NAME ?> - = $judul ?>
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
= $judul ?>
29 |
30 |
33 |
34 |
35 |
36 |
37 |
42 |
43 |
44 |
45 |
48 |
49 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
--------------------------------------------------------------------------------
/views/login.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | = APP_NAME ?> - Login
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
Welcome Back!
37 |
38 |
39 |
40 | = getSession('success', true) ?>
41 |
44 |
45 |
46 |
47 | = getSession('error', true) ?>
48 |
51 |
52 |
53 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
--------------------------------------------------------------------------------
/views/merk/index.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | = APP_NAME ?> - = $judul ?>
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
= $judul ?>
29 |
30 |
33 |
34 |
35 |
36 |
37 |
42 |
43 |
44 |
45 |
48 |
49 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
68 |
69 |
70 |
71 | = getSession('success', true) ?>
72 |
75 |
76 |
77 |
78 | = getSession('error', true) ?>
79 |
82 |
83 |
84 |
85 |
86 |
87 |
88 | No |
89 | Merk |
90 | Aksi |
91 |
92 |
93 |
94 |
95 | No |
96 | Merk |
97 | Aksi |
98 |
99 |
100 |
101 | fetch_object()) : ?>
102 |
103 | = $no++ ?> |
104 | = $merk->merk ?> |
105 |
106 | Ubah
107 | Hapus
108 | |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
--------------------------------------------------------------------------------
/views/merk/ubah.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | = APP_NAME ?> - = $judul ?>
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
= $judul ?>
29 |
30 |
33 |
34 |
35 |
36 |
37 |
42 |
43 |
44 |
45 |
48 |
49 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
--------------------------------------------------------------------------------
/views/mobil/detail.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | = APP_NAME ?> - = $judul ?>
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
= $judul ?>
29 |
30 |
33 |
34 |
35 |
36 |
37 |
42 |
43 |
44 |
45 |
48 |
49 |
50 |
51 |
 ?>)
52 |
53 |
54 |
55 |
56 | Nama |
57 | : |
58 | = $mobil->nama ?> |
59 |
60 |
61 | Merk |
62 | : |
63 | = $mobil->merk ?> |
64 |
65 |
66 | Nomer Polisi |
67 | : |
68 | = $mobil->no_polisi ?> |
69 |
70 |
71 | Jumlah Kursi |
72 | : |
73 | = $mobil->jumlah_kursi ?> Kursi |
74 |
75 |
76 | Tahun Beli |
77 | : |
78 | Tahun = $mobil->tahun_beli ?> |
79 |
80 |
81 |
82 |
83 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
--------------------------------------------------------------------------------
/views/mobil/index.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | = APP_NAME ?> - = $judul ?>
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
= $judul ?>
29 |
30 |
33 |
34 |
35 |
36 |
37 |
42 |
43 |
44 |
45 |
48 |
49 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
100 |
101 |
102 |
103 | = getSession('success', true) ?>
104 |
107 |
108 |
109 |
110 | = getSession('error', true) ?>
111 |
114 |
115 |
116 |
117 |
118 |
119 |
120 | No |
121 | Mobil |
122 | Merk |
123 | Kursi |
124 | Aksi |
125 |
126 |
127 |
128 |
129 | No |
130 | Mobil |
131 | Merk |
132 | Kursi |
133 | Aksi |
134 |
135 |
136 |
137 | fetch_object()) : ?>
138 |
139 |
140 | = $no++ ?> |
141 | = $mobil->nama ?> |
142 | = $mobil->merk ?> |
143 | = $mobil->jumlah_kursi ?> |
144 |
145 | Ubah
146 | Detail
147 | Hapus
148 | |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
--------------------------------------------------------------------------------
/views/mobil/ubah.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | = APP_NAME ?> - = $judul ?>
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
Ubah Merk
29 |
30 |
33 |
34 |
35 |
36 |
37 |
42 |
43 |
44 |
45 |
48 |
49 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
--------------------------------------------------------------------------------
/views/pemesan/detail.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | = APP_NAME ?> - = $judul ?>
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
= $judul ?>
29 |
30 |
33 |
34 |
35 |
36 |
37 |
42 |
43 |
44 |
45 |
48 |
49 |
50 |
51 |
 ?>)
52 |
53 |
54 |
55 |
56 | Nama |
57 | : |
58 | = $pemesan->nama ?> |
59 |
60 |
61 | Jenis Kelamin |
62 | : |
63 | = $pemesan->jenis_kelamin == 'L' ? 'Laki laki' : 'Perempuan' ?> |
64 |
65 |
66 | Alamat |
67 | : |
68 | = $pemesan->alamat ?> |
69 |
70 |
71 |
72 |
73 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
--------------------------------------------------------------------------------
/views/pemesan/index.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | = APP_NAME ?> - = $judul ?>
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
= $judul ?>
29 |
30 |
33 |
34 |
35 |
36 |
37 |
42 |
43 |
44 |
45 |
48 |
49 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
87 |
88 |
89 |
90 | = getSession('success', true) ?>
91 |
94 |
95 |
96 |
97 | = getSession('error', true) ?>
98 |
101 |
102 |
103 |
104 |
105 |
106 |
107 | No |
108 | Nama |
109 | Jenis Kelamin |
110 | Aksi |
111 |
112 |
113 |
114 |
115 | No |
116 | Nama |
117 | Jenis Kelamin |
118 | Aksi |
119 |
120 |
121 |
122 | fetch_object()) : ?>
123 |
124 | = $no++ ?> |
125 | = $pemesan->nama ?> |
126 | = $pemesan->jenis_kelamin == 'L' ? 'Laki Laki' : 'Perempuan' ?> |
127 |
128 | Ubah
129 | Detail
130 | Hapus
131 | |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
--------------------------------------------------------------------------------
/views/pemesan/ubah.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | = APP_NAME ?> - = $judul ?>
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
Ubah Merk
29 |
30 |
33 |
34 |
35 |
36 |
37 |
42 |
43 |
44 |
45 |
48 |
49 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
--------------------------------------------------------------------------------
/views/perjalanan/index.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | = APP_NAME ?> - = $judul ?>
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
= $judul ?>
29 |
30 |
33 |
34 |
35 |
36 |
37 |
42 |
43 |
70 |
71 |
72 |
73 |
76 |
77 |
78 |
79 | = getSession('success', true) ?>
80 |
83 |
84 |
85 |
86 | = getSession('error', true) ?>
87 |
90 |
91 |
92 |
93 |
94 |
95 |
96 | No |
97 | Kota Asal |
98 | Kota Tujuan |
99 | Jarak |
100 | Aksi |
101 |
102 |
103 |
104 |
105 | No |
106 | Kota Asal |
107 | Kota Tujuan |
108 | Jarak |
109 | Aksi |
110 |
111 |
112 |
113 | fetch_object()) : ?>
114 |
115 | = $no++ ?> |
116 | = $perjalanan->asal ?> |
117 | = $perjalanan->tujuan ?> |
118 | = $perjalanan->jarak ?> KM |
119 |
120 | Ubah
121 | Hapus
122 | |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
--------------------------------------------------------------------------------
/views/perjalanan/ubah.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | = APP_NAME ?> - = $judul ?>
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
= $judul ?>
29 |
30 |
33 |
34 |
35 |
36 |
37 |
42 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
--------------------------------------------------------------------------------
/views/pesanan/detail.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | = APP_NAME ?> - = $judul ?>
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
= $judul ?>
29 |
30 |
33 |
34 |
35 |
36 |
37 |
42 |
43 |
44 |
45 |
48 |
49 |
50 |
51 | Nama Pemesan
52 | Tanggal Pinjam
53 | Tanggal Kembali
54 | Mobil
55 | Perjalanan
56 | Total Harga
57 | Jenis Bayar
58 |
59 |
60 | :
61 | :
62 | :
63 | :
64 | :
65 | :
66 | :
67 |
68 |
69 | = $pesanan->nama_pemesan ?>
70 | = $pesanan->tgl_pinjam ?>
71 | = $pesanan->tgl_kembali ?>
72 | = $pesanan->nama_mobil ?>
73 | = $pesanan->asal ?> - = $pesanan->tujuan ?>
74 | Rp. = number_format($pesanan->harga, 2, ',', '.') ?>
75 | = $pesanan->jenis_bayar ?>
76 |
77 |
78 |
79 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
--------------------------------------------------------------------------------
/views/pesanan/index.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | = APP_NAME ?> - = $judul ?>
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
= $judul ?>
29 |
30 |
33 |
34 |
35 |
36 |
37 |
42 |
43 |
44 |
45 |
48 |
49 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
124 |
125 |
126 |
127 | = getSession('success', true) ?>
128 |
131 |
132 |
133 |
134 | = getSession('error', true) ?>
135 |
138 |
139 |
140 |
141 |
142 |
143 |
144 | No |
145 | Pemesan |
146 | Mobil |
147 | Jenis Bayar |
148 | Aksi |
149 |
150 |
151 |
152 |
153 | No |
154 | Pemesan |
155 | Mobil |
156 | Jenis Bayar |
157 | Aksi |
158 |
159 |
160 |
161 | fetch_object()) : ?>
162 |
163 | = $no++ ?> |
164 | = $pesanan->nama_pemesan ?> |
165 | = $pesanan->nama_mobil ?> |
166 | = $pesanan->jenis_bayar ?> |
167 |
168 | Ubah
169 | Detail
170 | Hapus
171 | |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
--------------------------------------------------------------------------------
/views/pesanan/ubah.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | = APP_NAME ?> - = $judul ?>
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
Ubah Pesanan
29 |
30 |
33 |
34 |
35 |
36 |
37 |
42 |
43 |
44 |
45 |
48 |
49 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
--------------------------------------------------------------------------------