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/sub/images/sym/root/proc/self/root/proc/self/root/var/www/html/fl/android/ |
| files >> /var/www/html/sub/images/sym/root/proc/self/root/proc/self/root/var/www/html/fl/android/baru.php |
<?php
include "../konfig/koneksi.php";
include "../konfig/library.php";
include "global.php";
$id_customer = $_POST['id_customer'];
$kode_produk = $_POST['kode_produk'];
$url_produk = $_POST['url_produk'];
$nama_produk = $_POST['nama_produk'];
$harga_produk = $_POST['harga_produk'];
$foto_produk = $_POST['foto_produk'];
$tenor = $_POST['tenor'];
$cicilan = $_POST['cicilan'];
/*
$sql=mysql_query("SELECT MAX(no_order) AS no_order FROM list_orderan");
$r=mysql_fetch_array($sql);
$no_order=$r['no_order'];
$kode_before = substr($no_order,2,4);
$tahun = date('Y');
$bulan = date('m');
$thn = substr($tahun,-2);
$kode_now = $thn.$bulan;
if($kode_before==$kode_now){
$no_urut = (int) substr($no_order,6,4);
$no_urut++;
$no_order_new = 'FO'.$kode_before.sprintf("%04s",$no_urut);
}
else{
$no_order_new = 'FO'.$kode_now.sprintf("%04s",1);
}
*/
$no_order_new="";
$setting = mysql_fetch_array(mysql_query("SELECT * FROM setting WHERE id_setting='1'"));
if($tenor==1){
$komisi = $setting['komisi_cash']*$tenor*$cicilan/100;
mysql_query("INSERT INTO list_orderan (no_order, tanggal, id_customer, kode_produk, url_produk, nama_produk, harga_produk, foto_produk, tenor, cicilan, sisa, tunggak, id_status_lo, komisi) VALUES ('$no_order_new', '$tgl_sekarang', '$id_customer', '$kode_produk', '$url_produk', '$nama_produk', '$harga_produk', '$foto_produk', '$tenor', '$cicilan', '$tenor', '0', '1', '$komisi')");
$d=mysql_fetch_array(mysql_query("SELECT * FROM customer a, staff b WHERE a.id_staff=b.id_staff AND a.id_customer='$id_customer'"));
$komisi_staff = $d['komisi'] + $komisi ;
mysql_query("UPDATE staff SET komisi='$komisi_staff' WHERE id_staff='$d[id_staff]'");
}
else{
if($tenor==25){
$komisi_tambahan = $setting['komisi_25'];
}
elseif($tenor==50){
$komisi_tambahan = $setting['komisi_50'];
}
$komisi = $komisi_tambahan*$tenor*$cicilan/100;
mysql_query("INSERT INTO list_orderan (no_order, tanggal, id_customer, kode_produk, url_produk, nama_produk, harga_produk, foto_produk, tenor, cicilan, sisa, tunggak, id_status_lo, komisi) VALUES ('$no_order_new', '$tgl_sekarang', '$id_customer', '$kode_produk', '$url_produk', '$nama_produk', '$harga_produk', '$foto_produk', '$tenor', '$cicilan', '$tenor', '0', '1' ,'$komisi')");
}
$result = array();
$result['success'] = "suks3s";
echo json_encode($result);
?>
y~or5J={Eeu磝Qk ᯘG{?+]ן?wM3X^歌>{7پK>on\jy Rg/=fOroNVv~Y+ NGuÝHWyw[eQʨSb> >}Gmx[o[<{Ϯ_qFvM IENDB`