Hallo! Selamat Datang di Marketplace produk digital, Freelancer terbaik di indonesia (68414 Members, 793 Products, 5353 Topic, 13045 Comments)

menu testimoni pada Marketplace Multi Seller Multi Buyer

Dibuat
Login Terakhir 5 Hari lalu,
Telah Dilihat 991 Kali
ali sadikin Mengatakan : Sultan Account
  1. Assalamualaikum Warahmatullahi Wabarakatuh...
  2. bagaimana cara mengaktifkan menu testimoni pada administrator
  3. terima kasi sebelumnya

Ada 2 Jawaban

Bukhori Muslim
commented on 16 Okt 2019 07:22:37
  1. Assalamualaikum,.. tambahkan pada : application/controllers/administrator.php script berikut :
  2. function testimoni(){
  3. cek_session_admin();
  4. $data['record'] = $this->db->query("SELECT a.*, b.nama_lengkap, b.username, b.id_konsumen FROM testimoni a JOIN rb_konsumen b ON a.id_konsumen=b.id_konsumen ORDER BY a.id_testimoni DESC");
  5. $this->template->load('administrator/template','administrator/mod_testimoni/view_testimoni',$data);
  6. }
  7.  
  8. function edit_testimoni(){
  9. cek_session_admin();
  10. $id = $this->uri->segment(3);
  11. if (isset($_POST['submit'])){
  12. $data = array('isi_testimoni'=>$this->input->post('b'),
  13. 'aktif'=>$this->input->post('f'));
  14. $where = array('id_testimoni' => $this->input->post('id'));
  15. $this->model_app->update('testimoni', $data, $where);
  16. redirect('administrator/testimoni');
  17. }else{
  18. $data['rows'] = $this->db->query("SELECT a.*, b.nama_lengkap, b.username, b.id_konsumen FROM testimoni a JOIN rb_konsumen b ON a.id_konsumen=b.id_konsumen where a.id_konsumen='$id'")->row_array();
  19. $this->template->load('administrator/template','administrator/mod_testimoni/view_testimoni_edit',$data);
  20. }
  21. }
  22.  
  23. function delete_testimoni(){
  24. $id = array('id_testimoni' => $this->uri->segment(3));
  25. $this->model_app->delete('testimoni',$id);
  26. redirect('administrator/testimoni');
  27. }
  28.  
  29. lalu untuk viewsnya saya lampirkan dibawah ini, extract lalu copas ke folder : application/views/administrator
  30. silahkan dipelajari semoga bermanfaat, aksesnya nanti di admin :
  31. http://localhost/swarakalibata_marketplace/administrator/testimoni
Terdapat 1 File dilampirkan :
1. mod_testimoni.zip (1 KB)
Bukhori Muslim
commented on 16 Okt 2019 07:29:20
  1. Assalamualaikum,.. ada kekeliruan sedikit pada baeis 18 diatas ubah menjadi :
  2. $data['rows'] = $this->db->query("SELECT a.*, b.nama_lengkap, b.username, b.id_konsumen FROM testimoni a LEFT JOIN rb_konsumen b ON a.id_konsumen=b.id_konsumen where a.id_testimoni='$id'")->row_array();
Maaf, Untuk Memberikan Komentar Anda Harus Login !!!

Online