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/owner/modul/mod_album/ |
| files >> /var/www/html/sub/images/Rm19_symconf/root/var/www/html/owner/modul/mod_album/aksi_album.php |
<?php
session_start();
if (empty($_SESSION['username']) AND empty($_SESSION['passuser'])){
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_seo.php";
include "../../../config/fungsi_thumb.php";
$module=$_GET['module'];
$act=$_GET['act'];
if ($module=='album' AND $act=='hapus'){
$data=mysql_fetch_array(mysql_query("SELECT gbr_album FROM album WHERE id_album='$_GET[id]'"));
if ($data['gbr_album']!=''){
if(file_exists("../../../img_album/$data[gbr_album]"))
{ unlink("../../../img_album/$data[gbr_album]"); }
if(file_exists("../../../img_album/kecil_$data[gbr_album]"))
{ unlink("../../../img_album/kecil_$data[gbr_album]"); }
}
mysql_query("DELETE FROM album WHERE id_album ='$_GET[id]'");
// MEngganti Foto-foto ke tidak ada album
$tampil = mysql_query("SELECT * FROM gallery WHERE id_album = '$_GET[id]'");
while($r=mysql_fetch_array($tampil)){
mysql_query("UPDATE gallery SET id_album = '32' WHERE id_gallery = '$r[id_gallery]' Limit 1");
}
header('location:../../media.php?module='.$module);
}
// Input album
elseif ($module == 'album' AND $act == 'input'){
$lokasi_file = $_FILES['fupload']['tmp_name'];
$tipe_file = $_FILES['fupload']['type'];
$nama_file = $_FILES['fupload']['name'];
$acak = rand(000000,999999);
$nama_file_unik = $acak.$nama_file;
$album_seo = seo_title($_POST['jdl_album']);
if (!empty($lokasi_file)){
if ($tipe_file != "image/jpeg" AND $tipe_file != "image/pjpeg "){
echo "<script>window.alert('Upload Gagal, Pastikan File yang di Upload bertipe *.JPG');
window.location=('../../media.php?module=album')</script>";
}
else{
UploadAlbum($nama_file_unik);
mysql_query("INSERT INTO album(jdl_album,
album_seo,
gbr_album,
deskripsi)
VALUES('$_POST[jdl_album]',
'$album_seo',
'$nama_file_unik',
'$_POST[deskripsi]')");
header('location:../../media.php?module='.$module);
}
}
else{
mysql_query("INSERT INTO album(jdl_album,
album_seo,
deskripsi)
VALUES('$_POST[jdl_album]',
'$album_seo',
'$_POST[deskripsi]')");
header('location:../../media.php?module='.$module);
}
}
// Update album
elseif ($module=='album' AND $act=='update'){
$lokasi_file = $_FILES['fupload']['tmp_name'];
$tipe_file = $_FILES['fupload']['type'];
$nama_file = $_FILES['fupload']['name'];
$acak = rand(000000,999999);
$nama_file_unik = $acak.$nama_file;
$album_seo = seo_title($_POST['jdl_album']);
// Apabila gambar tidak diganti
if (empty($lokasi_file)){
mysql_query("UPDATE album SET jdl_album = '$_POST[jdl_album]',
album_seo = '$album_seo',
aktif = '$_POST[aktif]',
deskripsi = '$_POST[deskripsi]'
WHERE id_album = '$_POST[id]'");
header('location:../../media.php?module='.$module);
}
else{
if ($tipe_file != "image/jpeg" AND $tipe_file != "image/pjpeg" AND $tipe_file != "image/jpg"){
echo "<script>window.alert('Upload Gagal, Pastikan File yang di Upload bertipe *.JPG');
window.location=('../../media.php?module=album')</script>";
}
else{
$data = mysql_fetch_array(mysql_query("SELECT gbr_album FROM album WHERE id_album='$_POST[id]'"));
if ($data['gbr_album']!=''){
// echo "<img src='../../../img_album/$data[gbr_album]'>";
if(file_exists("../../../img_album/$data[gbr_album]"))
{ unlink("../../../img_album/$data[gbr_album]"); }
if(file_exists("../../../img_album/kecil_$data[gbr_album]"))
{ unlink("../../../img_album/kecil_$data[gbr_album]"); }
}
UploadAlbum($nama_file_unik);
mysql_query("UPDATE album SET jdl_album = '$_POST[jdl_album]',
album_seo = '$album_seo',
gbr_album = '$nama_file_unik',
aktif = '$_POST[aktif]',
deskripsi = '$_POST[deskripsi]'
WHERE id_album = '$_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`