Assalamualaikum Warahmatullahi Wabarakatuh...mas mau tanya bagaimanacara merubah atau menambah modul kontributor di admin pada baris 74 id_modul di kontibutor.php function pendaftaran(){ if (isset($_POST['submit'])){ $cek = $this->model_app->view_where('users',array('username'=>cetak ($this->input->post('a')))); if ($cek->num_rows()>0){ echo $this->session->set_flashdata('message', '<div class="alert alert-danger">Maaf, Username '.cetak($this->input->post('a')).' tidak tersedia.</div>'); redirect('kontributor'); }else{ $config['upload_path'] = 'asset/foto_user/'; $config['allowed_types'] = 'gif|jpg|png|JPG|JPEG'; $config['max_size'] = '1000'; // kb $this->load->library('upload', $config); $this->upload->do_upload('f'); $hasil=$this->upload->data(); if ($this->input->post() && (strtolower($this->input->post('secutity_code')) == strtolower($this->session->userdata('mycaptcha')))) { if ($hasil['file_name']==''){ $data = array('username'=>cetak ($this->input->post('a',TRUE)), 'password'=>hash("sha512", md5(cetak ($this->input->post('b',TRUE)))), 'nama_lengkap'=>cetak($this->input->post('c',TRUE)), 'email'=>cetak($this->input->post('d',TRUE)), 'no_telp'=>cetak($this->input->post('e',TRUE)), 'level'=>'kontributor', 'blokir'=>'N', 'id_session'=>md5(cetak ($this->input->post('a'))).'-'.date('YmdHis')); }else{ $data = array('username'=>cetak ($this->input->post('a',TRUE)), 'password'=>hash("sha512", md5(cetak ($this->input->post('b',TRUE)))), 'nama_lengkap'=>cetak($this->input->post('c',TRUE)), 'email'=>cetak($this->input->post('d',TRUE)), 'no_telp'=>cetak($this->input->post('e',TRUE)), 'foto'=>$hasil['file_name'], 'level'=>'kontributor', 'blokir'=>'N', 'id_session'=>md5(cetak ($this->input->post('a'))).'-'.date('YmdHis')); } $this->model_app->insert('users',$data); $datam = array('id_session'=>md5(cetak ($this->input->post('a'))).'-'.date('YmdHis'), 'id_modul'=>18); $this->model_app->insert('users_modul',$datam); $this->session->set_userdata('upload_image_file_manager',true); $this->session->set_userdata(array('username'=>cetak ($this->input->post('a')), 'level'=>'kontributor', 'id_session'=>md5(cetak ($this->input->post('a'))).'-'.date('YmdHis'))); } redirect('administrator/home'); }
|