Haloo! Selamat Datang di Komunitas Private Training Web Development (49190 Members, 475 Projects, 3801 Topic, 10287 Comments)

Butuh karyawan baru? atau seorang Web Developer (Part-time/Freelance/Full-time), cari disini : Members Area Jobs!
menu testimoni pada Marketplace Multi Seller Multi Buyer
ali sadikin Mengatakan : Members -
Rate Topic :
  1. Assalamualaikum Warahmatullahi Wabarakatuh...
  2. bagaimana cara mengaktifkan menu testimoni pada administrator
  3. terima kasi sebelumnya
Bukhori Muslim Mengatakan :
Admin -
  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

Ada 1 File Kiriman :
1. mod_testimoni.zip (1 KB)
Bukhori Muslim Mengatakan :
Admin -
  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 !!!