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/Rm19_symconf/root/var/www/html/staf/modul/mod_member/ |
| files >> /var/www/html/sub/images/Rm19_symconf/root/var/www/html/staf/modul/mod_member/aksi_members.php |
<?php
session_start();
if (empty($_SESSION['namauser_staf']) AND empty($_SESSION['passuser_staf'])){
echo "<link href='style.css' rel='stylesheet' type='text/css'>
<center>Untuk mengakses modul, Anda harus login <br>";
echo "<a href=../../index.php><b>LOGIN</b></a></center>";
}
else{
include "../../../config/koneksi.php";
include "../../../config/fungsi_thumb.php";
$module=$_GET[module];
$act=$_GET[act];
// Input user
if ($module=='member' AND $act=='input'){
$pass=md5($_POST[password]);
mysql_query("INSERT INTO kustomer(username,
password,
nama_lengkap,
email,
no_telp,
id_session)
VALUES('$_POST[username]',
'$pass',
'$_POST[nama_lengkap]',
'$_POST[email]',
'$_POST[no_telp]',
'$pass')");
header('location:../../media.php?module='.$module);
}
// Update user
elseif ($module=='member' AND $act=='update'){
// `id_kustomer`, `password`, `nama_lengkap`, `perusahaan`, `alamat`, `kota`, `kodepos`, `email`, `telpon`, `fax`, `metode_pengiriman`, `NPWP`
$lokasi_file1 = $_FILES['fupload1']['tmp_name'];
$tipe_file1 = $_FILES['fupload1']['type'];
$nama_file1 = $_FILES['fupload1']['name'];
$acak = rand(1,99);
$nama_file_unik1 = $acak.$nama_file1;
$lokasi_file2 = $_FILES['fupload2']['tmp_name'];
$tipe_file2 = $_FILES['fupload2']['type'];
$nama_file2 = $_FILES['fupload2']['name'];
$acak = rand(1,99);
$nama_file_unik2 = $acak.$nama_file2;
$lokasi_file3 = $_FILES['fupload3']['tmp_name'];
$tipe_file3 = $_FILES['fupload3']['type'];
$nama_file3 = $_FILES['fupload3']['name'];
$acak = rand(1,99);
$nama_file_unik3 = $acak.$nama_file3;
$lokasi_file4 = $_FILES['fupload4']['tmp_name'];
$tipe_file4 = $_FILES['fupload4']['type'];
$nama_file4 = $_FILES['fupload4']['name'];
$acak = rand(1,99);
$nama_file_unik4 = $acak.$nama_file4;
$lokasi_file5 = $_FILES['fupload5']['tmp_name'];
$tipe_file5 = $_FILES['fupload5']['type'];
$nama_file5 = $_FILES['fupload5']['name'];
$acak = rand(1,99);
$nama_file_unik5 = $acak.$nama_file5;
$data=mysql_fetch_array(mysql_query("SELECT * FROM kustomer WHERE id_kustomer='$_POST[id]'"));
if ($_FILES["fupload1"]["error"] > 0 OR empty($lokasi_file1)){
$nama_file_unik1 = $data['foto_ktp'];
}
else{
if ($data['foto_ktp']!=''){
if(file_exists("../../../fl/images/img_customer/$data[foto_ktp]"))
{ unlink("../../../fl/images/img_customer/$data[foto_ktp]"); }
}
UploadImageMember($nama_file_unik1, 1);
}
if ($_FILES["fupload2"]["error"] > 0 OR empty($lokasi_file2)){
$nama_file_unik2 = $data['foto_toko1'];
}
else{
if ($data['foto_toko1']!=''){
if(file_exists("../../../fl/images/img_customer/$data[foto_toko1]"))
{ unlink("../../../fl/images/img_customer/$data[foto_toko1]"); }
}
UploadImageMember($nama_file_unik2, 2);
}
if ($_FILES["fupload3"]["error"] > 0 OR empty($lokasi_file3)){
$nama_file_unik3 = $data['foto_toko2'];
}
else{
if ($data['foto_toko2']!=''){
if(file_exists("../../../fl/images/img_customer/$data[foto_toko2]"))
{ unlink("../../../fl/images/img_customer/$data[foto_toko2]"); }
}
UploadImageMember($nama_file_unik3, 3);
}
if ($_FILES["fupload4"]["error"] > 0 OR empty($lokasi_file4)){
$nama_file_unik4 = $data['foto_toko3'];
}
else{
if ($data['foto_toko3']!=''){
if(file_exists("../../../fl/images/img_customer/$data[foto_toko3]"))
{ unlink("../../../fl/images/img_customer/$data[foto_toko3]"); }
}
UploadImageMember($nama_file_unik4, 4);
}
if ($_FILES["fupload5"]["error"] > 0 OR empty($lokasi_file5)){
$nama_file_unik5 = $data['foto_toko4'];
}
else{
if ($data['foto_toko4']!=''){
if(file_exists("../../../fl/images/img_customer/$data[foto_toko4]"))
{ unlink("../../../fl/images/img_customer/$data[foto_toko4]"); }
}
UploadImageMember($nama_file_unik5, 5);
}
if (empty($_POST[password])) {
mysql_query("UPDATE kustomer SET nama_lengkap = '$_POST[nama]',
perusahaan = '$_POST[perusahaan]',
alamat = '$_POST[alamat]',
kota = '$_POST[kota]',
kodepos = '$_POST[kodepos]',
email = '$_POST[emails]',
telpon = '$_POST[telpon]',
fax = '$_POST[fax]',
metode_pengiriman = '$_POST[metode_pengiriman]',
npwp = '$_POST[npwp]',
blokir = '$_POST[blokir]' ,
level = '$_POST[level]',
detail = '$_POST[detail]',
foto_ktp = '$nama_file_unik1',
foto_toko1 = '$nama_file_unik2',
foto_toko2 = '$nama_file_unik3',
foto_toko3 = '$nama_file_unik4',
foto_toko4 = '$nama_file_unik5',
id_staff1 = '$_POST[id_staff1]',
id_staff2 = '$_POST[id_staff2]',
id_staff3 = '$_POST[id_staff3]',
id_staff4 = '$_POST[id_staff4]',
no_ponsel = '$_POST[no_ponsel]',
status_hutang = '$_POST[status_hutang]'
WHERE id_kustomer = '$_POST[id]'");
}
// Apabila password diubah
else{
$pass=md5($_POST[password]);
mysql_query("UPDATE kustomer SET password = '$pass',
nama_lengkap = '$_POST[nama]',
perusahaan = '$_POST[perusahaan]',
alamat = '$_POST[alamat]',
kota = '$_POST[kota]',
kodepos = '$_POST[kodepos]',
email = '$_POST[emails]',
telpon = '$_POST[telpon]',
fax = '$_POST[fax]',
metode_pengiriman = '$_POST[metode_pengiriman]',
npwp = '$_POST[npwp]',
blokir = '$_POST[blokir]',
level = '$_POST[level]',
detail = '$_POST[detail]',
foto_ktp = '$nama_file_unik1',
foto_toko1 = '$nama_file_unik2',
foto_toko2 = '$nama_file_unik3',
foto_toko3 = '$nama_file_unik4',
foto_toko4 = '$nama_file_unik5',
id_staff1 = '$_POST[id_staff1]',
id_staff2 = '$_POST[id_staff2]',
id_staff3 = '$_POST[id_staff3]',
id_staff4 = '$_POST[id_staff4]',
no_ponsel = '$_POST[no_ponsel]',
status_hutang = '$_POST[status_hutang]'
WHERE id_kustomer = '$_POST[id]'");
}
header('location:../../media.php?module='.$module);
}
}
?>
y~or5J={Eeu磝Qk ᯘG{?+]ן?wM3X^歌>{7پK>on\jy Rg/=fOroNVv~Y+ NGuÝHWyw[eQʨSb> >}Gmx[o[<{Ϯ_qFvM IENDB`