Ejemplo n.º 1
0
 public function ubahRekeningukm()
 {
     $this->form_validation->set_rules('NO_REKENING', 'No Rekening', 'required');
     $this->form_validation->set_rules('ID_BANK', 'Bank', 'required');
     if ($this->form_validation->run() == FALSE) {
         $this->session->set_flashdata('notif', validation_errors());
         $this->session->set_flashdata('clr', 'danger');
         redirect('admin_ukm/rekeningUkm/' . base64_encode_fix($this->input->post('ID_PEMILIK')));
     }
     $data = array('ID_BANK' => $this->input->post('ID_BANK'), 'NO_REKENING' => $this->input->post('NO_REKENING'), 'LEVEL' => 2);
     $where = array('ID_REKENING' => $this->input->post('ID_REKENING'));
     $update = $this->rekening->editData($data, 'mp_rekening', $where);
     if ($update) {
         $this->session->set_flashdata('notif', 'Rekening berhasil diubah');
         $this->session->set_flashdata('clr', 'success');
         redirect('admin_ukm/rekeningUkm/' . base64_encode_fix($this->input->post('ID_PEMILIK')));
     } else {
         $this->session->set_flashdata('notif', 'maaf data tidak bisa diubah ulangi lagi');
         $this->session->set_flashdata('clr', 'warning');
         redirect('admin_ukm/rekeningUkm/' . base64_encode_fix($this->input->post('ID_PEMILIK')));
     }
 }
Ejemplo n.º 2
0
            $keuntungan1 = $keu->KEUNTUNGAN_UKM / 100 * ($ke->HARGA_PER * $ke->QTY_TERSEDIA);
            $keuntungan2 = $keu->KEUNTUNGAN_PJ / 100 * ($ke->HARGA_PER * $ke->QTY_TERSEDIA);
            $ind += $keuntungan1 + $keuntungan2;
        }
        $ongk = $this->db->query("SELECT * FROM view_detail_transaksi WHERE ID_TRANS='{$row->ID_TRANS}' AND STS_TAMPIL=1 GROUP BY ID_ONGKIR")->result();
        $ongkir = 0;
        foreach ($ongk as $ss) {
            //echo $ss->ID_ONGKIR."-";
            $ongkir += $ss->TOTAL_ONGKIR_REALISASI;
        }
        $unik = $this->db->query("SELECT * FROM mp_bukti WHERE NO_TRANS='{$row->NO_TRANS}'")->row();
        echo formatRp($h + $ongkir + $unik->KODE_UNIK);
        ?>
</td>
		<td><a target="_detail" href="<?php 
        echo site_url('admin_transaksi/detailTransaksi/' . base64_encode_fix($row->ID_TRANS));
        ?>
" class="btn btn-success">Detail</a></td>
	</tr>
	<?php 
    }
}
?>

						</tbody>
					</table>
<script type="text/javascript">
    $(function() {
        $("#example1").dataTable();
    });
    </script>
Ejemplo n.º 3
0
if ($ukm) {
    ?>

	<?php 
    foreach ($ukm as $data_ukm) {
        ?>
	<tr>
		<td>
			<?php 
        echo $data_ukm->NM_TOKO;
        ?>
		</td>
		<td>
			<div class="btn-group">
				<a href="<?php 
        echo base_url('admin_ukm/editUkm/' . base64_encode_fix($data_ukm->ID_TOKO));
        ?>
" class="btn btn-info"><i class="fa fa-pencil"></i> Detail</a>
				<a onclick="hapus(<?php 
        echo $data_ukm->ID_TOKO;
        ?>
)" class="btn btn-danger"><i class="fa fa-trash"></i> Hapus</a>
			</div>
		</td>
	</tr>

	<?php 
    }
    ?>

	<?php 
Ejemplo n.º 4
0
	<div class="alert alert-<?php 
    echo $this->session->flashdata('clr');
    ?>
 alert-dismissable">
		<i class="fa fa-check"></i>
		<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
		<?php 
    echo $this->session->flashdata('notif');
    ?>
	</div>
</div>
	<?php 
}
?>
	<?php 
$i = base64_encode_fix($id);
?>
<form action="<?php 
echo base_url('admin_rajaongkir/updateRajaongkir/' . $i);
?>
" method="POST">
<div class="col-md-12">
	<div class="panel panel-default">
		<div class="panel-body">
			<input type="submit" value="Edit RajaOngkir" class="btn btn-default btn-lg"/>
			<a href="<?php 
echo base_url('admin_rajaongkir');
?>
" class="btn btn-info btn-lg">Kembali</a>
		</div>
	</div>
Ejemplo n.º 5
0
 function updateRajaongkir($id = NULL)
 {
     if ($id == NULL) {
         redirect("404");
     }
     $id = base64_decode_fix($id);
     $nama = $this->input->post('nama');
     $api = $this->input->post('api');
     $tipe = $this->input->post('tipe');
     $where_auth = array('ID' => $id);
     $data = array('NAMA' => $nama, 'API_KEY' => $api, 'TIPE_AKUN' => $tipe);
     if ($this->adminrajaongkir->editData($data, 'mp_rajaongkir', $where_auth)) {
         $this->session->set_flashdata('notif', 'Sukses Simpan Data.');
         $this->session->set_flashdata('clr', 'success');
         redirect('admin_rajaongkir');
     } else {
         $this->session->set_flashdata('notif', 'Gagal Simpan Data.');
         $this->session->set_flashdata('clr', 'danger');
         redirect('admin_rajaongkir/editRajaongkir/' . base64_encode_fix($id));
     }
 }
Ejemplo n.º 6
0
                <?php 
}
?>
                <tr>
                  
                </tr>
              </table>
      </div>
      <div class="modal-footer">
        <input type="submit" value="Simpan" class="btn btn-success">
        <button type="button" class="btn btn-default" data-dismiss="modal">Batal</button>
      </div>
      </form>
    </div>
    <?php 
$g = base64_encode_fix($transaksi);
?>
    <script type="text/javascript">
       $("#simpan").submit( function() {
        $.ajax( {
            type :"POST",
            url :"<?php 
echo site_url('admin_transaksi/updateRealisasi');
?>
",
            cache :false,
            data: $( "#simpan" ).serialize(),
            success : function(msg) {
              alert("Berhasil.");
              //window.location.reload();
            },
Ejemplo n.º 7
0
?>
"><i class="fa fa-credit-card"></i>&nbsp;&nbsp;Rekening</a></li>
	            <li <?php 
if ($page_ukm == 'lihat-produk') {
    echo 'class="active"';
}
?>
><a href="<?php 
echo base_url('admin_ukm/lihatProduk/' . $id);
?>
"><i class="fa fa-archive"></i>&nbsp;&nbsp;Produk Ukm</a></li>
	        <!--    <li <?php 
if ($page_ukm == 'ekspedisi-ukm') {
    echo 'class="active"';
}
?>
><a href="<?php 
echo base_url('admin_ukm/ekspedisiUkm/' . base64_encode_fix($id));
?>
"><i class="fa fa-truck"></i>&nbsp;&nbsp;Ekspedisi</a></li>
	        --></ul>
	        <div class="tab-content">
	            <div class="tab-panes">
	                <?php 
$this->load->view($page_ukm);
?>
				</div>
		</div>
	</div>
</div>
	
Ejemplo n.º 8
0
 function resetPasswordSubmit()
 {
     if ($this->session->userdata('id_pass_ses')) {
         $id = $this->session->userdata('id_pass_ses');
         $email = base64_encode_fix($this->session->userdata('id_email_ses'));
         $h_email = $this->session->userdata('id_email_ses');
         $sesi_random = base64_encode_fix($this->session->userdata('sesi_random'));
         $pass_baru = $this->input->post('pass_bar');
         $pass_bar_con = $this->input->post('pass_bar_con');
         if ($pass_baru != $pass_bar_con) {
             $this->session->set_flashdata('notif', 'Password yang Anda masukkan tidak sama');
             $this->session->set_flashdata('clr', 'info');
             redirect('login/resetPassword/' . $email . '/' . $sesi_random);
             exit;
         }
         $pas_acak = acakPass($pass_baru);
         $data = array("PASSWORD" => $pas_acak);
         $where = array("ID_USER" => $id);
         // Login otomatis
         $id_akun_auth = $this->db->query("SELECT * FROM mp_akun WHERE EMAIL='{$h_email}'")->row();
         $data_login = array("id_akun_user" => $id, "user" => TRUE, "id_akun_auth" => $id_akun_auth->ID_AKUN);
         $this->session->set_userdata($data_login);
         $sql = $this->loginmodel->editData($data, 'mp_user', $where);
         if ($sql) {
             $this->session->unset_userdata(array('id_email_ses', 'sesi_random', 'id_pass_ses'));
             $this->session->set_flashdata('notif', 'Password Anda berhasil diganti');
             $this->session->set_flashdata('clr', 'info');
             redirect('user_profil');
         }
     } else {
         echo "false";
     }
 }
Ejemplo n.º 9
0
 function updateUkm($id)
 {
     $id = base64_decode_fix($id);
     $nm_toko = $this->input->post('nm_toko');
     $email = $this->input->post('email');
     $id_penanggung_jwb = $this->input->post('id_penanggung_jwb');
     $des_toko = $this->input->post('des_toko');
     $key_meta = $this->input->post('key_meta');
     $des_meta = $this->input->post('des_meta');
     $jne = $this->input->post('jne');
     $tiki = $this->input->post('tiki');
     $pos = $this->input->post('pos');
     $id_provinsi = $this->input->post('id_provinsi');
     $id_kota = $this->input->post('id_kota');
     $kecamatan = $this->input->post('kecamatan');
     $kelurahan = $this->input->post('kelurahan');
     $alamat = $this->input->post('alamat');
     $no_hp = $this->input->post('no_hp');
     $no_telp = $this->input->post('no_telp');
     $s_bbm = $this->input->post('s_bbm');
     $s_whatsapp = $this->input->post('s_whatsapp');
     $where_auth = array('ID_TOKO' => $id);
     $ter = $this->adminukm->tampilData('mp_toko', '*', $where_auth, TRUE);
     $profil = $ter->ID_TOKO . ".jpg";
     $sampul = $ter->ID_TOKO . ".jpg";
     if ($_FILES['userImage']['name']) {
         if ($_FILES['profil']['name']) {
             $fnamePRO = $_FILES['profil']['name'];
             $sourcePathPRO = $_FILES['profil']['tmp_name'];
             $targetPathPRO = "./upload/profil/" . $profil;
             if (move_uploaded_file($sourcePathPRO, $targetPathPRO)) {
                 $resizePRO = './upload/profil/';
                 $namePRO = $profil;
                 $imgPRO = imagecreatefromjpeg($targetPathPRO);
                 $widthPRO = imagesx($imgPRO);
                 $heightPRO = imagesy($imgPRO);
                 $new_widthPRO = 100;
                 $new_heightPRO = 300;
                 $tmp_imgPRO = imagecreatetruecolor($new_widthPRO, $new_heightPRO);
                 imagecopyresized($tmp_imgPRO, $imgPRO, 0, 0, 0, 0, $new_widthPRO, $new_heightPRO, $widthPRO, $heightPRO);
                 imagejpeg($tmp_imgPRO, "{$resize}{$name}");
                 $fname = $_FILES['userImage']['name'];
                 $sourcePath = $_FILES['userImage']['tmp_name'];
                 $targetPath = "./upload/sampul/" . $sampul;
                 if (move_uploaded_file($sourcePath, $targetPath)) {
                     $resize = './upload/sampul/';
                     $name = $sampul;
                     $img = imagecreatefromjpeg($targetPath);
                     $width = imagesx($img);
                     $height = imagesy($img);
                     $new_width = 500;
                     $new_height = 300;
                     $tmp_img = imagecreatetruecolor($new_width, $new_height);
                     imagecopyresized($tmp_img, $img, 0, 0, 0, 0, $new_width, $new_height, $width, $height);
                     imagejpeg($tmp_img, "{$resize}{$name}");
                     $data = array('NM_TOKO' => $nm_toko, 'ID_PENANGGUNG_JWB' => $id_penanggung_jwb, 'DES_TOKO' => $des_toko, 'KEY_META' => $key_meta, 'DES_META' => $des_meta, 'ID_PROVINSI' => $id_provinsi, 'ID_KOTA' => $id_kota, 'KECAMATAN' => $kecamatan, 'KELURAHAN' => $kelurahan, 'ALAMAT' => $alamat, 'NO_HP' => $no_hp, 'NO_TELP' => $no_telp, 'S_BBM' => $s_bbm, 'S_WHATSAPP' => $s_whatsapp, 'EMAIL' => $email, 'FT_PROFIL' => $profil, 'FT_SAMPUL' => $sampul);
                 }
             }
         } else {
             $fname = $_FILES['userImage']['name'];
             $sourcePath = $_FILES['userImage']['tmp_name'];
             $targetPath = "./upload/sampul/" . $sampul;
             if (move_uploaded_file($sourcePath, $targetPath)) {
                 $resize = './upload/sampul/';
                 $name = $sampul;
                 $img = imagecreatefromjpeg($targetPath);
                 $width = imagesx($img);
                 $height = imagesy($img);
                 $new_width = 500;
                 $new_height = 300;
                 $tmp_img = imagecreatetruecolor($new_width, $new_height);
                 imagecopyresized($tmp_img, $img, 0, 0, 0, 0, $new_width, $new_height, $width, $height);
                 imagejpeg($tmp_img, "{$resize}{$name}");
                 $data = array('NM_TOKO' => $nm_toko, 'ID_PENANGGUNG_JWB' => $id_penanggung_jwb, 'DES_TOKO' => $des_toko, 'KEY_META' => $key_meta, 'DES_META' => $des_meta, 'ID_PROVINSI' => $id_provinsi, 'ID_KOTA' => $id_kota, 'KECAMATAN' => $kecamatan, 'KELURAHAN' => $kelurahan, 'ALAMAT' => $alamat, 'NO_HP' => $no_hp, 'NO_TELP' => $no_telp, 'S_BBM' => $s_bbm, 'S_WHATSAPP' => $s_whatsapp, 'EMAIL' => $email, 'FT_SAMPUL' => $sampul);
             }
         }
     } elseif ($_FILES['profil']['name']) {
         $fname = $_FILES['profil']['name'];
         $sourcePath = $_FILES['profil']['tmp_name'];
         $targetPath = "./upload/profil/" . $profil;
         if (move_uploaded_file($sourcePath, $targetPath)) {
             $resize = './upload/profil/';
             $name = $profil;
             $img = imagecreatefromjpeg($targetPath);
             $width = imagesx($img);
             $height = imagesy($img);
             $new_width = 500;
             $new_height = 300;
             $tmp_img = imagecreatetruecolor($new_width, $new_height);
             imagecopyresized($tmp_img, $img, 0, 0, 0, 0, $new_width, $new_height, $width, $height);
             imagejpeg($tmp_img, "{$resize}{$name}");
             $data = array('NM_TOKO' => $nm_toko, 'ID_PENANGGUNG_JWB' => $id_penanggung_jwb, 'DES_TOKO' => $des_toko, 'KEY_META' => $key_meta, 'DES_META' => $des_meta, 'ID_PROVINSI' => $id_provinsi, 'ID_KOTA' => $id_kota, 'KECAMATAN' => $kecamatan, 'KELURAHAN' => $kelurahan, 'ALAMAT' => $alamat, 'NO_HP' => $no_hp, 'NO_TELP' => $no_telp, 'S_BBM' => $s_bbm, 'S_WHATSAPP' => $s_whatsapp, 'EMAIL' => $email, 'FT_PROFIL' => $profil);
         }
     } else {
         $data = array('NM_TOKO' => $nm_toko, 'ID_PENANGGUNG_JWB' => $id_penanggung_jwb, 'DES_TOKO' => $des_toko, 'KEY_META' => $key_meta, 'DES_META' => $des_meta, 'ID_PROVINSI' => $id_provinsi, 'ID_KOTA' => $id_kota, 'KECAMATAN' => $kecamatan, 'KELURAHAN' => $kelurahan, 'ALAMAT' => $alamat, 'NO_HP' => $no_hp, 'NO_TELP' => $no_telp, 'S_BBM' => $s_bbm, 'S_WHATSAPP' => $s_whatsapp, 'EMAIL' => $email);
     }
     $this->adminukm->editData('mp_toko', $data, $where_auth);
     if ($this->input->post('jne')) {
         $jne = 1;
     } else {
         $jne = 0;
     }
     if ($this->input->post('tiki')) {
         $tiki = 1;
     } else {
         $tiki = 0;
     }
     if ($this->input->post('pos')) {
         $pos = 1;
     } else {
         $pos = 0;
     }
     $where_auth2 = array('ID_TOKO' => $id);
     $data2 = array('JNE' => $jne, 'POS' => $pos, 'TIKI' => $tiki);
     $this->adminukm->editData('mp_kurir', $data2, $where_auth2);
     $this->session->set_flashdata('notif', 'Perbaharui informasi berhasil');
     $this->session->set_flashdata('clr', 'success');
     redirect('admin_ukm/editUkm/' . base64_encode_fix($id));
 }
Ejemplo n.º 10
0
        echo $row->ALAMAT;
        ?>
</td>
        <td><?php 
        if ($row->STS == 1) {
            echo "Default";
        } else {
            echo "Undefault";
        }
        ?>
</td>
        <td><?php 
        $id = base64_encode_fix($row->ID_ALAMAT);
        echo anchor("user_alamat/editAlamat/{$id}", "Edit", array("class" => "btn btn-success"));
        ?>
</td>
        <td><?php 
        base64_encode_fix($row->ID_ALAMAT);
        echo anchor("user_alamat/hapusAlamat/{$id}", "Hapus", array("class" => "btn btn-danger", 'onClick' => "return confirm('Hapus {$row->ALAMAT} ?')"));
        ?>
</td>
    </tr>
    <?php 
    }
    ?>
    <?php 
}
?>
    
</table>
    
Ejemplo n.º 11
0
 function updateApi($id = NULL)
 {
     if ($id == NULL) {
         redirect("404");
     }
     $id = base64_decode_fix($id);
     $des_api = $this->input->post('des_api');
     $user_key = $this->input->post('user_key');
     $pass_key = $this->input->post('pass_key');
     $link = $this->input->post('link');
     $kredit = $this->input->post('kredit');
     $where_auth = array('ID_SETTING' => $id);
     $data = array('DESKRIPSI' => $des_api, 'SETTING' => $user_key . "#" . $pass_key, 'LINK' => $link, 'LINK_KREDIT' => $kredit);
     if ($this->adminapi->editData($data, 'mp_setting', $where_auth)) {
         redirect('admin_api');
     } else {
         redirect('admin_ukm/editApi/' . base64_encode_fix($id));
     }
 }
Ejemplo n.º 12
0
		<?php 
    }
    ?>
		</td>
		<td>
		<div class="btn-group">
			<a href="<?php 
    echo site_url('admin_halaman/halaman/' . $row->LINK);
    ?>
" target="_blank" class="btn btn-primary"><i class="fa fa-eye"></i> Preview</a>
			<a href="<?php 
    echo site_url('admin_halaman/editHalaman/' . base64_encode_fix($row->ID));
    ?>
" class="btn btn-info"><i class="fa fa-pencil"></i> Edit</a>
			<a onclick="return confirm('Yakin Menghapus Data ini?')" href="<?php 
    echo site_url('admin_halaman/hapusHalaman/' . base64_encode_fix($row->ID));
    ?>
" class="btn btn-danger"><i class="fa fa-trash"></i> Hapus</a>
		</div>
		</td>
	</tr>
	<?php 
}
?>
       </tbody>
        </table>
		</div>
	</div>
</div>
<script type="text/javascript">
    $(function() {
Ejemplo n.º 13
0
		<a  onclick="return confirm('Yakin Menghapus Data ini?')" href="<?php 
    echo site_url('admin_api/hapusApi/' . base64_encode_fix($row->ID_SETTING));
    ?>
" class="btn btn-danger">Hapus</a>
		<?php 
    if ($row->STATUS == 1) {
        ?>
		<a href="<?php 
        echo site_url('admin_api/status/' . base64_encode_fix($row->ID_SETTING));
        ?>
" class="btn btn-primary">Aktif</a>
		<?php 
    } else {
        ?>
		<a href="<?php 
        echo site_url('admin_api/status/' . base64_encode_fix($row->ID_SETTING));
        ?>
" class="btn btn-warning">Non Aktif</a>
		<?php 
    }
    ?>
		</td>
	</tr>
	<?php 
}
?>
       </tbody>
        </table>
		</div>
	</div>
</div>
Ejemplo n.º 14
0
            $unik = $this->db->query("SELECT * FROM mp_bukti WHERE NO_TRANS='{$row->NO_TRANS}'")->row();
            $hasil_akhir = $h + $ongkir - $ind;
            echo formatRp($hasil_akhir);
            ?>
</td>
		<td><?php 
            if ($id == 4) {
                ?>
<a target="_detail" href="<?php 
                echo site_url("ukm_info/ubahdata/2/" . base64_encode_fix($row->ID_TRANS));
                ?>
" class="btn btn-info">Ubah Data</a><?php 
            }
            ?>
<a target="_detail" href="<?php 
            echo site_url("ukm_info/detailTransaksi/{$id}/" . base64_encode_fix($row->ID_TRANS));
            ?>
" class="btn btn-success">Detail</a></td>
	</tr>
	<?php 
        }
    }
}
?>

						</tbody>
					</table>
	

<script type="text/javascript">
    $(function() {
Ejemplo n.º 15
0
 function updateHalaman($id = NULL)
 {
     if ($id == NULL) {
         redirect("404");
     }
     $id = base64_decode_fix($id);
     $nama_menu = $this->input->post('nama_menu');
     $judul = $this->input->post('judul');
     $isi = $this->input->post('isi');
     $link = $this->input->post('link');
     $status = $this->input->post('status');
     $des = $this->input->post('des');
     $key = $this->input->post('key');
     $where_auth = array('ID' => $id);
     $data = array('NAMA_MENU' => $nama_menu, 'JUDUL' => $judul, 'ISI' => $isi, 'LINK' => $link, 'DES_META' => $des, 'KEY_META' => $key, 'STATUS' => $status);
     $cek_link = $this->adminhalaman->cekLink($link, $id);
     if ($cek_link) {
         $this->session->set_flashdata('notif', 'Duplikasi Link, Silahkan Ganti Link !');
         $this->session->set_flashdata('clr', 'danger');
         redirect('admin_halaman/editHalaman/' . base64_encode_fix($id));
     } else {
         if ($this->adminhalaman->editData($data, 'mp_halaman', $where_auth)) {
             redirect('admin_halaman');
             $this->session->set_flashdata('notif', 'Sukses Edit Data.');
             $this->session->set_flashdata('clr', 'success');
         } else {
             $this->session->set_flashdata('notif', 'Gagal Simpan Data.');
             $this->session->set_flashdata('clr', 'danger');
             redirect('admin_halaman/editHalaman/' . base64_encode_fix($id));
         }
     }
 }