function bayar_iuran_manual($id)
{
$data = array(
'content' => 'dashboard/bayar_iuran_manual.php',
'i' => $this->db->query("SELECT * from buat_iuran where id_b_iuran='$id'")->row_array(),
'id' => $id
);
$this->load->view('template', $data);
}
function bayarkanmanual()
{
$ktp = MAU SAYA AMBIL DATA NO_KTP dari IURAN.PHP DAN DITAMPILKAN DISINI;
$id = $this->input->post('id');
$rt = get_rt_by_ktp($ktp);
$config['upload_path'] = './assets/upload/'.$ktp.'/';
$config['allowed_types'] = 'jpg|jpeg|png|bmp';
$config['max_size'] = '5000';
$config['file_name'] = $ktp.'_buktiIuran';
$this->load->library('upload',$config);
$this->upload->do_upload('bukti');
$upload_data = array('uploads' => $this->upload->data());
$config['image_library'] = 'gd2';
$config['source_image'] = './assets/upload/'.$ktp.'/'.$upload_data['uploads']['file_name'];
$this->load->library('image_lib', $config);
$data = array(
'id_b_iuran' => $this->input->post('id_b_iuran'),
'no_ktp' => "$ktp",
'besaran' => $this->input->post('besaran'),
'via' => $this->input->post('via'),
'tgl_bayar' => date('Y-m-d H:i:s'),
'bukti' => $upload_data['uploads']['file_name']
);
$pendapatan = array(
'rt' => $rt,
'nama_item' => 'Iuran Bulanan dari ' .$ktp,
'nominal' => $this->input->post('besaran'),
'jenis' => 'pendapatan',
'via' => $this->input->post('via'),
'tgl' => date('Y-m-d'),
//'bukti' => $upload_data['uploads']['file_name']
);
$this->db->insert('keuangan', $pendapatan);
$this->db->where('id_b_iuran', $id);
$this->db->insert('iuran', $data);
$this->session->set_flashdata('sukses','Iuran berhasil dibayarkan');
redirect('Panel_rt/iuran_rt/8');
}