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/bosch/owner/modul/mod_subdomain/ |
files >> /var/www/html/bosch/owner/modul/mod_subdomain/aksi_subdomain.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]; // Input subdomain if ($module=='subdomain' AND $act=='input'){ $acak = rand(1,99); //Untuk Logo $lokasi_file = $_FILES['fupload']['tmp_name']; $tipe_file = $_FILES['fupload']['type']; $nama_file = $_FILES['fupload']['name']; if (!empty($lokasi_file)){ $nama_file_unik = $acak.$nama_file; UploadImage_foto_domain($nama_file_unik); } else{ $nama_file_unik = ""; } //Untuk Background $acak1 = rand(1,99); $lokasi_file1 = $_FILES['fupload1']['tmp_name']; $tipe_file1 = $_FILES['fupload1']['type']; $nama_file1 = $_FILES['fupload1']['name']; if(!empty($lokasi_file1)) { $nama_file_unik1 = $acak1.$nama_file1; UploadImage_bg_domain($nama_file_unik1); } else{ $nama_file_unik1 = ""; } mysql_query("INSERT INTO subdomain(id_subdomain, nama_subdomain, foto, background) VALUES( NULL, '$_POST[nama_subdomain]','$nama_file_unik','$nama_file_unik1')"); header('location:../../media.php?module='.$module); } // Update subdomain elseif ($module=='subdomain' AND $act=='update'){ $data=mysql_fetch_array(mysql_query("SELECT * FROM subdomain WHERE id_subdomain='$_POST[id]'")); $acak = rand(1,99); // Untuk Logo $lokasi_file = $_FILES['fupload']['tmp_name']; $tipe_file = $_FILES['fupload']['type']; $nama_file = $_FILES['fupload']['name']; $nama_file_unik = $acak.$nama_file; if (!empty($lokasi_file)){ if ($data['foto']!=''){ if(file_exists("../../../subdomain/images/$data[foto]")) { unlink("../../../subdomain/images/$data[foto]"); } if(file_exists("../../../subdomain/images/medium_$data[foto]")) { unlink("../../../subdomain/images/medium_$data[foto]"); } if(file_exists("../../../subdomain/images/small_$data[foto]")) { unlink("../../../subdomain/images/small_$data[foto]"); } } UploadImage_foto_domain($nama_file_unik); } else{ $nama_file_unik = $data['foto']; } $acak1 = rand(1,99); $lokasi_file1 = $_FILES['fupload1']['tmp_name']; $tipe_file1 = $_FILES['fupload1']['type']; $nama_file1 = $_FILES['fupload1']['name']; $nama_file_unik1 = $acak1.$nama_file1; if (!empty($lokasi_file1)){ if ($data['background']!=''){ if(file_exists("../../../subdomain/images/$data[background]")) { unlink("../../../subdomain/images/$data[background]"); } if(file_exists("../../../subdomain/images/medium_$data[background]")) { unlink("../../../subdomain/images/medium_$data[background]"); } if(file_exists("../../../subdomain/images/small_$data[background]")) { unlink("../../../subdomain/images/small_$data[background]"); } } UploadImage_bg_domain($nama_file_unik1); } else{ $nama_file_unik1 = $data['background']; } mysql_query("UPDATE subdomain SET foto = '$nama_file_unik', background = '$nama_file_unik1', aktif = '$_POST[aktif]' WHERE id_subdomain = '$_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`