Senin, 16 September 2013

PHP Indonesia - Facebook: [ASK] code: // Input album elseif ($module=='alb...

PHP Indonesia - Facebook
PHP Indonesia is a community for everyone that loves PHP. Our focus is in the PHP world but our topics encompass the entire LAMP stack. Topics include PHP coding, to memcached handling, db optimizations, server stack, web server tuning, code deploying, hosting options and much much more. Youtube Channel : http://www.youtube.com/user/OurPHPIndonesia Twitter : @php_indonesia NOTE: Rules for Wall posting: https://www.facebook.com/groups/35688476100/doc/10151597056316101/ Daftar Keanggotaan : http://www.facebook.com/groups/35688476100/doc/10150671770741101/ 
The Best Way to Manage your Money.

Start using Mint today to set a budget, track your goals and do more with your money.
From our sponsors
[ASK] code: // Input album elseif ($module=='alb...
Sep 17th 2013, 06:17, by Albet Sagan S

Albet Sagan S 6:17am Sep 17
[ASK]

code:

// 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;

// Apabila ada gambar yang diupload
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)
VALUES('$_POST[jdl_album]',
'$album_seo',
'$nama_file_unik')");
header('location:media.php?module='.$module);
}
}
else{
mysql_query("INSERT INTO album(jdl_album,
album_seo)
VALUES('$_POST[jdl_album]',
'$album_seo')");
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;

// 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]'
WHERE id_album = '$_POST[id]'");
header('location:media.php?module='.$module);
}
else{
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("UPDATE album SET jdl_album = '$_POST[jdl_album]',
album_seo = '$album_seo',
gbr_album = '$nama_file_unik',
aktif='$_POST[aktif]'
WHERE id_album = '$_POST[id]'");
header('location:media.php?module='.$module);
}
}
}

Albet Sagan S 6:17am Sep 17
kalau boleh tau ini kenapa ya?

You are receiving this email because you subscribed to this feed at blogtrottr.com.

If you no longer wish to receive these emails, you can unsubscribe from this feed, or manage all your subscriptions

Tidak ada komentar:

Posting Komentar