php IHDR w Q )Ba pHYs sRGB gAMA a IDATxMk\U s&uo,mD )Xw+e?tw.oWp;QHZnw`gaiJ9̟灙a=nl[ ʨ G;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ y H@E7j 1j+OFRg}ܫ;@Ea~ j`u'o> j- $_q?qS XzG'ay
files >> /var/www/html/FTFL/mobile/ |
files >> //var/www/html/FTFL/mobile/customeredit.php |
<?php require('inc/konekmobile.php'); require('inc/fungsi_tanggal.php'); $myObj = new stdClass(); $kunci = $_POST['kunci']; $uuid_staff = $_POST['uuid_staff']; $uuid_customer = $_POST['uuid_customer']; $kode_toko = $_POST['kode_toko']; //pemilik $nama_pemilik = $_POST['nama_pemilik']; $no_ktp = $_POST['no_ktp']; $alamat_pemilik = $_POST['alamat_pemilik']; $kota_pemilik = $_POST['kota_pemilik']; $area_pemilik = $_POST['area_pemilik']; $phone_pemilik = $_POST['phone_pemilik']; $email_pemilik = $_POST['email_pemilik']; $wa_pemilik = $_POST['wa_pemilik']; //toko $nama_toko = $_POST['nama_toko']; $alamat_toko = $_POST['alamat_toko']; $kota_toko = $_POST['kota_toko']; $area_toko = $_POST['area_toko']; $phone_toko = $_POST['phone_toko']; $email_toko = $_POST['email_toko']; $wa_toko = $_POST['wa_toko']; $staff_toko = $_POST['staff_toko']; $detail_toko = $_POST['detail_toko']; //other $jenis = $_POST['jenis']; $tgl_edit = date("Y-m-d"); $ada_image1 = $_POST['ada_image1']; $ada_image2 = $_POST['ada_image2']; $ada_image3 = $_POST['ada_image3']; $status='HOLD'; $stmtImage = $r->prepare("SELECT foto_ktp, foto_toko1, foto_toko2 FROM db_customer WHERE uuid_customer=?"); $stmtImage->bind_param('s',$uuid_customer); $stmtImage->execute(); $resultImage=$stmtImage->get_result(); $dataImage=$resultImage->fetch_assoc(); if($ada_image1==1) { $nama_image_ktp = "ktp_".$kode_toko."_".date('YmdHis').".JPEG"; } else { $nama_image_ktp = $dataImage['foto_ktp']; } if($ada_image2==1) { $nama_image_toko1 = "toko1_".$kode_toko."_".date('YmdHis').".JPEG"; } else { $nama_image_toko1 = $dataImage['foto_toko1']; } if($ada_image3==1) { $nama_image_toko2 = "toko2_".$kode_toko."_".date('YmdHis').".JPEG"; } else { $nama_image_toko2 = $dataImage['foto_toko2']; } //input android log $waktu = date('Y-m-d H:i:s'); $data_post = $kunci."||".$uuid_staff."||".$uuid_customer."||".$kode_toko."||".$nama_pemilik."||".$no_ktp."||".$alamat_pemilik."||".$kota_pemilik."||".$area_pemilik."||".$phone_pemilik."||".$email_pemilik."||".$wa_pemilik."||".$nama_toko."||".$alamat_toko."||".$kota_toko."||".$area_toko."||".$phone_toko."||".$email_toko."||".$wa_toko."||".$staff_toko."||".$detail_toko."||".$status."||".$jenis."||".$ada_image1."||".$ada_image2."||".$ada_image3; $tentang = 'CUSTOMER EDIT'; $insertLog = $r->prepare("INSERT INTO android_post SET uuid_member=?, waktu=?, data_post=?, tentang=? "); $insertLog->bind_param('ssss',$uuid_staff,$waktu,$data_post,$tentang); $insertLog->execute(); //if ($kunci != 'eFTeeFeL') { if ($kunci != md5('eFTeeFeL'.$uuid_staff.$nama_pemilik.$nama_toko)) { $myObj->status = 'gagal'; $myObj->subject = 'aplikasi tidak dikenal.'; $myObj->result = ''; echo json_encode(array($myObj)); exit(); } $stmtEditCustomer = "UPDATE `db_customer` SET `nama_pemilik`='$nama_pemilik', `no_ktp`='$no_ktp', `alamat_pemilik`='$alamat_pemilik', `kota_pemilik`='$kota_pemilik', `area_pemilik`='$area_pemilik', `phone_pemilik`='$phone_pemilik', `email_pemilik`='$email_pemilik', `wa_pemilik`='$wa_pemilik', `foto_ktp`='$nama_image_ktp', `nama_toko`='$nama_toko', `alamat_toko`='$alamat_toko', `area_toko`='$area_toko', `kota_toko`='$kota_toko', `phone_toko`='$phone_toko', `email_toko`='$email_toko', `wa_toko`='$wa_toko', `staff_toko`='$staff_toko', `detail_toko`='$detail_toko', `foto_toko1`='$nama_image_toko1', `foto_toko2`='$nama_image_toko2', `status`='$status', `jenis`='$status' WHERE `uuid_customer`='$uuid_customer' "; $editCustomer = $r->prepare( "UPDATE `db_customer` SET `nama_pemilik`=?, `no_ktp`=?, `alamat_pemilik`=?, `kota_pemilik`=?, `area_pemilik`=?, `phone_pemilik`=?, `email_pemilik`=?, `wa_pemilik`=?, `foto_ktp`=?, `nama_toko`=?, `alamat_toko`=?, `area_toko`=?, `kota_toko`=?, `phone_toko`=?, `email_toko`=?, `wa_toko`=?, `staff_toko`=?, `detail_toko`=?, `foto_toko1`=?, `foto_toko2`=?, `status`=?, `jenis`=? WHERE `uuid_customer`=? "); $editCustomer->bind_param('sssssssssssssssssssssss',$nama_pemilik,$no_ktp,$alamat_pemilik,$kota_pemilik,$area_pemilik,$phone_pemilik,$email_pemilik,$wa_pemilik,$nama_image_ktp,$nama_toko,$alamat_toko,$area_toko,$kota_toko,$phone_toko,$email_toko,$wa_toko,$staff_toko,$detail_toko,$nama_image_toko1,$nama_image_toko2,$status,$jenis,$uuid_customer); $editCustomer->execute(); $catatan = 'Customer Edit'; $insertCatatan = $r->prepare("INSERT INTO `db_cust_catatan`(`tgl_catat`, `uuid_staff`, `catatan`, `uuid_customer`, `status`) VALUES (?,?,?,?,?)"); $insertCatatan->bind_param('sssss',$tgl_daftar,$uuid_staff,$catatan,$uuid_customer,$status); $insertCatatan->execute(); $error_message = ''; /* //this is our upload folder $upload_path = 'uploads/'; //creating the upload url $upload_url = 'http://206.189.152.149/FTFL/mobile/'.$upload_path; //$response = array(); if($_SERVER['REQUEST_METHOD']=='POST'){ $response['error1']=false; $response['error2']=false; $response['error3']=false; //image1 ============================= if($ada_image1==1) { $extension1 = 'KSG'; if (isset($_FILES['image1']['name'])) { $image_info1 = pathinfo($_FILES['image1']['name']); $extension1 = $image_info1['extension']; } if ($extension1=='jpeg' OR $extension1=='JPEG' OR $extension1=='jpg' OR $extension1=='JPG' OR $extension1=='png' OR $extension1=='PNG' OR $extension1=='pdf' OR $extension1=='KSG') { //file path to upload in the server $file_path1 = $upload_path.$nama_image_ktp; $file_url1 = $upload_url.$nama_image_ktp; $response['error1']=false; $response['message1']=$file_path1; //move_uploaded_file($_FILES['image1']['tmp_name'],$file_path1); //trying to save the file in the directory try{ //saving the file move_uploaded_file($_FILES['image1']['tmp_name'],$file_path1); } catch(Exception $e){ $response['error1']=true; $response['message1']=$e->getMessage(); } } } //image2 ================================= if($ada_image2==1) { $extension2 = 'KSG'; if (isset($_FILES['image2']['name'])) { $image_info2 = pathinfo($_FILES['image2']['name']); $extension2 = $image_info2['extension']; } if ($extension2=='jpeg' OR $extension2=='JPEG' OR $extension2=='jpg' OR $extension2=='JPG' OR $extension2=='png' OR $extension2=='PNG' OR $extension2=='pdf' OR $extension2=='KSG') { //file path to upload in the server $file_path2 = $upload_path.$nama_image_toko1; $file_url2 = $upload_url.$nama_image_toko1; $response['error2']=false; $response['message2']=$file_path2; //move_uploaded_file($_FILES['image2']['tmp_name'],$file_path2); //trying to save the file in the directory try{ //saving the file move_uploaded_file($_FILES['image2']['tmp_name'],$file_path2); } catch(Exception $e){ $response['error2']=true; $response['message2']=$e->getMessage(); } } } //image3 =============================== if($ada_image3==1) { $extension3 = 'KSG'; if (isset($_FILES['image3']['name'])) { $image_info3 = pathinfo($_FILES['image3']['name']); $extension3 = $image_info3['extension']; } if ($extension3=='jpeg' OR $extension3=='JPEG' OR $extension3=='jpg' OR $extension3=='JPG' OR $extension3=='png' OR $extension3=='PNG' OR $extension3=='pdf' OR $extension3=='KSG') { //file path to upload in the server $file_path3 = $upload_path.$nama_image_toko2; $file_url3 = $upload_url.$nama_image_toko2; $response['error3']=false; $response['message3']=$file_path3; //move_uploaded_file($_FILES['image3']['tmp_name'],$file_path3); //trying to save the file in the directory try{ //saving the file move_uploaded_file($_FILES['image3']['tmp_name'],$file_path3); } catch(Exception $e){ $response['error3']=true; $response['error3']=$e->getMessage(); } } } $error_message = ''; if ($response['error1']==true) { $error_message = $error_message."foto KTP error / ".$response['message1']."<br>"; } if ($response['error2']==true) { $error_message = $error_message."foto toko-1 error / ".$response['message2']."<br>"; } if ($response['error3']==true) { $error_message = $error_message."foto toko-2 error / ".$response['message3']; } } else { $response['error']=true; $response['message']='Wrong method'; } */ $myObj->status = 'sukses'; $myObj->subject = 'Detail Customer telah diUPDATE. Status masih HOLD. Hub. Admin untuk NORMALkan.<br>'.$error_message; //$myObj->result = $response['message']; $myObj->result = ''; echo json_encode(array($myObj)); exit(); ?>y~or5J={Eeu磝Qk ᯘG{?+]ן?wM3X^歌>{7پK>on\jy Rg/=fOroNVv~Y+ NGuÝHWyw[eQʨSb> >}Gmx[o[<{Ϯ_qFvM IENDB`