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

Tombol submit dan cancel tidak berfungsi dalam modul baru sikoag ci

Dibuat
Login Terakhir 2 Tahun lalu,
Telah Dilihat 1446 Kali
Ryan Mansurya Mengatakan : Free Account
  1. Assalamualaikum Warahmatullahi Wabarakatuh...
  2. tolong bantuannya pak. kemarn saya menambahkan modul. tapi tombol submit dan cancelnya blm berfungsi pak

Ada 4 Jawaban

PHPMU.COM Support
commented on 12 Jun 2020 10:32:18
  1. Assalamualaikum,.. lampirkan disini mas file dari form yang tombol submitnya tidak berfungsi,
  2. biasanya hal tersebut terjadi hanya karena struktur html yang masih bermasalah.
Ryan Mansurya
commented on 13 Jun 2020 02:25:06
  1. Assalamualaikum,..
  2. ini pesan error tombol submit pak
Terdapat 1 File dilampirkan :
1. 129.png (14 KB)
Ryan Mansurya
commented on 13 Jun 2020 02:27:35
  1. Assalamualaikum,..
  2. ini skrip di administrator pak
  3.  
  4. // Controller Modul Prestasi
  5.  
  6. function prestasi(){
  7. cek_session_akses('prestasi',$this->session->id_session);
  8. if ($this->session->level=='admin'){
  9. $data['record'] = $this->model_app->view_ordering('prestasi','id_prestasi','DESC');
  10. }else{
  11. $data['record'] = $this->model_app->view_where_ordering('prestasi',array('username'=>$this->session->username),'id_prestasi','DESC');
  12. }
  13. $this->template->load('administrator/template','administrator/mod_prestasi/view_prestasi',$data);
  14. }
  15.  
  16. function tambah_prestasi(){
  17. cek_session_akses('prestasi',$this->session->id_session);
  18. if (isset($_POST['submit'])){
  19. $config['upload_path'] = 'asset/foto_prestasi/';
  20. $config['allowed_types'] = 'gif|jpg|png|JPG|JPEG';
  21. $config['max_size'] = '3000'; // kb
  22. $this->load->library('upload', $config);
  23. $this->upload->do_upload('c');
  24. $hasil=$this->upload->data();
  25.  
  26. if ($hasil['file_name']==''){
  27. $data = array('tema'->$this->db->escape_str($this->input->post('a')),
  28. 'tema_seo'->seo_title($this->input->post('a')),
  29. 'isi_prestasi'->$this->input->post('b'),
  30. 'pengirim'->$this->db->escape_str($this->input->post('g')),
  31. 'tgl_posting'->date('Y-m-d'),
  32. 'username'->$this->session->username);
  33. }
  34. else{
  35. $data = array('tema'->$this->db->escape_str($this->input->post('a')),
  36. 'tema_seo'->seo_title($this->input->post('a')),
  37. 'isi_prestasi'->$this->input->post('b'),
  38. 'pengirim'->$this->db->escape_str($this->input->post('g')),
  39. 'gambar'->$hasil['file_name'],
  40. 'tgl_posting'->date('Y-m-d'),
  41. 'username'->$this->session->username);
  42. }
  43. $this->model_app->insert('prestasi',$data);
  44. redirect('administrator/prestasi');
  45. }
  46. else{
  47. $this->template->load('administrator/template','administrator/mod_prestasi/view_prestasi_tambah');
  48. }
  49. }
  50.  
  51. function edit_prestasi(){
  52. cek_session_akses('prestasi',$this->session->id_session);
  53. $id = $this->uri->segment(3);
  54. if (isset($_POST['submit'])){
  55. $config['upload_path'] = 'asset/foto_prestasi/';
  56. $config['allowed_types'] = 'gif|jpg|png|JPG|JPEG';
  57. $config['max_size'] = '3000'; // kb
  58. $this->load->library('upload', $config);
  59. $this->upload->do_upload('c');
  60. $hasil=$this->upload->data();
  61.  
  62. if ($hasil['file_name']==''){
  63. $data = array('tema'->$this->db->escape_str($this->input->post('a')));
  64. 'tema_seo'->seo_title($this->input->post('a'));
  65. 'isi_prestasi'->$this->input->post('b');
  66. 'pengirim'->$this->db->escape_str($this->input->post('g'));
  67.  
  68. }
  69. else{
  70. $data = array('tema'->$this->db->escape_str($this->input->post('a')));
  71. 'tema_seo'->seo_title($this->input->post('a'));
  72. 'isi_prestasi'->$this->input->post('b');
  73. 'pengirim'->$this->db->escape_str($this->input->post('g'));
  74. 'gambar'->$hasil['file_name'];
  75.  
  76. }
  77.  
  78. $where = array('id_prestasi' => $this->input->post('id'));
  79. $this->model_app->update('prestasi', $data, $where);
  80. redirect('administrator/prestasi');
  81. }else{
  82. if ($this->session->level=='admin'){
  83. $proses = $this->model_app->edit('prestasi', array('id_prestasi' => $id))->row_array();
  84. }else{
  85. $proses = $this->model_app->edit('prestasi', array('id_prestasi' => $id, 'username' => $this->session->username))->row_array();
  86. }
  87.  
  88. $data = array('rows' => $proses);
  89. $this->template->load('administrator/template','administrator/mod_prestasi/view_prestasi_edit',$data);
  90. }
  91. }
  92.  
  93. function delete_prestasi(){
  94. cek_session_akses('prestasi',$this->session->id_session);
  95. if ($this->session->level=='admin'){
  96. $id = array('id_prestasi' => $this->uri->segment(3));
  97. }else{
  98. $id = array('id_prestasi' => $this->uri->segment(3), 'username'=>$this->session->username);
  99. }
  100. $this->model_app->delete('prestasi',$id);
  101. redirect('administrator/prestasi');
  102. }
  103.  
Ryan Mansurya
commented on 13 Jun 2020 02:29:47
  1. Assalamualaikum,..
  2. kemudian ini file mod_prestasi
Terdapat 1 File dilampirkan :
1. mod_prestasi.rar (2 KB)
Maaf, Untuk Memberikan Komentar Anda Harus Login !!!

Online