diff --git a/application/config/routes.php b/application/config/routes.php
index cdf45f7..4450ec7 100644
--- a/application/config/routes.php
+++ b/application/config/routes.php
@@ -50,7 +50,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
| my-controller/my-method -> my_controller/my_method
*/
-$route['default_controller'] = 'Login';
+$route['default_controller'] = 'Dashboard';
$route['404_override'] = '';
$route['translate_uri_dashes'] = FALSE;
$route['admin'] = 'admin/Dashboard';
diff --git a/application/controllers/Dashboard.php b/application/controllers/Dashboard.php
new file mode 100644
index 0000000..f18fce8
--- /dev/null
+++ b/application/controllers/Dashboard.php
@@ -0,0 +1,26 @@
+load->model("UserModel");
+ $this->load->model("ProdukModel");
+ $this->load->model("UmkmModel");
+
+ }
+
+ public function index()
+ {
+
+ $data['produk'] = $this->ProdukModel->getThree();
+ $data['umkm'] = $this->UmkmModel->getThree();
+ $data['user_logged'] = $this->session->userdata('user_logged');
+ $this->load->view('dashboard',$data);
+
+ }
+
+
+}
diff --git a/application/models/ProdukModel.php b/application/models/ProdukModel.php
index f64871d..eda4b80 100644
--- a/application/models/ProdukModel.php
+++ b/application/models/ProdukModel.php
@@ -26,6 +26,12 @@ class ProdukModel extends CI_Model
return $produk = $this->db->get($this->_table)->row();
}
+ public function getThree(){
+ $this->db->order_by('id_produk', 'DESC');
+ $this->db->limit('3');
+ return $produk = $this->db->get($this->_table)->result();
+ }
+
public function getLastProdukByIdUmkm($id_umkm){
$this->db->where('id_umkm', $id_umkm);
$this->db->order_by('id_produk', 'DESC');
diff --git a/application/models/UmkmModel.php b/application/models/UmkmModel.php
index 0e7b3f2..cc81dd0 100644
--- a/application/models/UmkmModel.php
+++ b/application/models/UmkmModel.php
@@ -77,6 +77,11 @@ class UmkmModel extends CI_Model
return $umkm = $this->db->get($this->_table)->row();
}
+ public function getThree(){
+ $this->db->order_by('id_umkm', 'DESC');
+ $this->db->limit('3');
+ return $umkm = $this->db->get($this->_table)->result();
+ }
public function getUmkmCountByUserId($id_pemilik){
$this->db->where('id_pemilik', $id_pemilik);
diff --git a/application/views/dashboard.php b/application/views/dashboard.php
new file mode 100644
index 0000000..d5c87df
--- /dev/null
+++ b/application/views/dashboard.php
@@ -0,0 +1,262 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Portal Data UMKM Kota Magelang
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
UMKM KOTA MAGELANG
+ saat ini, kota magelang mempunyai 5 UMKM aktif
+
+
+
+
+
+
TENAGA KERJA
+ 500 Tenaga kerja terserap oleh kegiatan UMKM
+
+
+
+
+
+
PRODUK UMKM
+ UMKM kota magelang menghasilkan 500 produk
+
+
+
+
+
+ Previous
+
+
+
+ Next
+
+
+
+
+
+
+
PRODUK UMKM
+
+
+
+
+
+
+
+
+
+
+
+
+
nama ?>
+
deskripsi ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
nama ?>
+
deskripsi ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/application/views/login.php b/application/views/login.php
index e0e39ec..72a8bac 100644
--- a/application/views/login.php
+++ b/application/views/login.php
@@ -53,7 +53,9 @@
+
+
diff --git a/assets/images/corousel.jpg b/assets/images/corousel.jpg
new file mode 100644
index 0000000..782d630
Binary files /dev/null and b/assets/images/corousel.jpg differ
diff --git a/assets/images/corousel1.jpg b/assets/images/corousel1.jpg
new file mode 100644
index 0000000..7e16e54
Binary files /dev/null and b/assets/images/corousel1.jpg differ
diff --git a/assets/images/corousel2.jpg b/assets/images/corousel2.jpg
new file mode 100644
index 0000000..a9767d9
Binary files /dev/null and b/assets/images/corousel2.jpg differ
diff --git a/assets/images/corousel3.jpg b/assets/images/corousel3.jpg
new file mode 100644
index 0000000..32d3593
Binary files /dev/null and b/assets/images/corousel3.jpg differ
diff --git a/assets/images/produk/12.jpg b/assets/images/produk/12.jpg
new file mode 100644
index 0000000..eec0ce4
Binary files /dev/null and b/assets/images/produk/12.jpg differ
diff --git a/assets/images/produk/13.jpg b/assets/images/produk/13.jpg
new file mode 100644
index 0000000..7ea0cba
Binary files /dev/null and b/assets/images/produk/13.jpg differ
diff --git a/assets/images/produk/15.jpg b/assets/images/produk/15.jpg
new file mode 100644
index 0000000..b7af1cd
Binary files /dev/null and b/assets/images/produk/15.jpg differ
diff --git a/assets/images/produk/default.png b/assets/images/produk/default.png
index 8226e9b..5ccd158 100644
Binary files a/assets/images/produk/default.png and b/assets/images/produk/default.png differ
diff --git a/assets/images/umkm/14.jpg b/assets/images/umkm/14.jpg
new file mode 100644
index 0000000..3c80b89
Binary files /dev/null and b/assets/images/umkm/14.jpg differ
diff --git a/assets/images/umkm/2.jpg b/assets/images/umkm/2.jpg
new file mode 100644
index 0000000..7564aab
Binary files /dev/null and b/assets/images/umkm/2.jpg differ
diff --git a/assets/images/umkm/3.jpg b/assets/images/umkm/3.jpg
new file mode 100644
index 0000000..cc4dbe0
Binary files /dev/null and b/assets/images/umkm/3.jpg differ
diff --git a/assets/images/umkm/4.jpg b/assets/images/umkm/4.jpg
new file mode 100644
index 0000000..424cdb8
Binary files /dev/null and b/assets/images/umkm/4.jpg differ