PATH: //proc/thread-self/cwd/kerbau/function
FILE_BARU
CREATE
FOLDER_BARU
MKDIR
UPLOAD_FILE
GO
[ .. KEMBALI ]
📄 add-bank.php
↓
X
📄 add-banner.php
↓
X
📄 add-game.php
↓
X
📄 add-member.php
↓
X
📄 add-post.php
↓
X
📄 add-promo.php
↓
X
📄 add-promosid.php
↓
X
📄 add-slide.php
↓
X
📄 add-user.php
↓
X
📄 api_call_scatter.php
↓
X
📄 api_nexusggr.php
↓
X
📄 api_set_rtp.php
↓
X
📄 bank-status.php
↓
X
📄 banner-status.php
↓
X
📄 banner.php
↓
X
📄 del-backup.php
↓
X
📄 del-bank.php
↓
X
📄 del-banner.php
↓
X
📄 del-post.php
↓
X
📄 del-promosid.php
↓
X
📄 del-slide.php
↓
X
📄 del-user.php
↓
X
📄 delete_qris.php
↓
X
📄 edit-member.php
↓
X
📄 edit-user.php
↓
X
📄 end-session.php
↓
X
📄 error_log
↓
X
📄 getwinner.php
↓
X
📄 getwinner_2.php
↓
X
📄 index.php
↓
X
📄 integapi.php
↓
X
📄 minimal.php
↓
X
📄 nexus.php
↓
X
📄 post-chat.php
↓
X
📄 post-status.php
↓
X
📄 proses-group.php
↓
X
📄 proses_topup-manual.php
↓
X
📄 proses_topup.php
↓
X
📄 proses_withdraw.php
↓
X
📄 qris.php
↓
X
📄 reject_topup.php
↓
X
📄 reject_withdraw.php
↓
X
📄 setting.php
↓
X
📄 slide-status.php
↓
X
📄 social.php
↓
X
📄 topup.php
↓
X
📄 update_qris.php
↓
X
📄 user-game.php
↓
X
📄 user-status.php
↓
X
SAVING...
BERHASIL DIUBAH!
EDITING: add-post.php
<?php require_once('session.php'); $users = $u['user']; $author = $u['full_name']; $title = str_replace(array( "’","'" ),"'",$_POST['title']); $slugs = preg_replace("/[^a-zA-Z0-9]/", "-", $title); $slug = strtolower($slugs); $content = str_replace(array( "’","'" ),"'",$_POST['content']); $postID = $_POST['postID']; $date = date('Y-m-d'); $kode = date('YdmHis'); $tipe_gambar = array('image/jpg','image/jpeg','image/bmp', 'image/x-png', 'image/png'); $gbr = $_FILES['image']['name']; $ukuran = $_FILES['image']['size']; $tipe = $_FILES['image']['type']; $error = $_FILES['image']['error']; $explode = explode('.',$gbr); $extensi = $explode[count($explode)-1]; $newname = 'blog_'.$users.'_'.$kode.'.'.$extensi; $upload_dir = "../../upload/"; if($postID == ''){ if($gbr !=="" && $error == 0){ if(in_array(strtolower($tipe), $tipe_gambar)){ move_uploaded_file($_FILES['image']['tmp_name'], $upload_dir . $newname); $query = mysqli_query($conn,"INSERT INTO `tb_post` (`slug`, `title`, `meta_desc`, `keyword`, `image`, `video`, `content`, `author`, `kategori`, `created_date`, `last_update`, `user`, `status`) VALUES ('$slug','$title','','','$newname','','$content','$author',0,'$date','$date','$users', 1)") or die(mysqli_error()); header('location:../post/?do=add¬if=1'); } else { header('location:../post/?do=add¬if=3'); } } else { $query = mysqli_query($conn,"INSERT INTO `tb_post` (`slug`, `title`, `meta_desc`, `keyword`, `image`, `video`, `content`, `author`, `kategori`, `created_date`, `last_update`, `user`, `status`) VALUES ('$slug','$title','$meta_desc','$keywords','no-photo.jpg','','$content','$author',0,'$date','$date','$users', 1)") or die(mysqli_error()); header('location:../post/?do=add¬if=1'); } } else { if($gbr !=="" && $error == 0){ if(in_array(strtolower($tipe), $tipe_gambar)){ move_uploaded_file($_FILES['image']['tmp_name'], $upload_dir . $newname); $query = mysqli_query($conn,"UPDATE `tb_post` SET `slug` = '$slug', `title` = '$title', `image` = '$newname', `content` = '$content', `author` = '$author', `last_update` = '$date', `user` = '$users', `status` = '$status' WHERE cuid = '$postID'") or die(mysqli_error()); header('location:../post/?do=add&postID='.$postID.'¬if=1'); } else { header('location:../post/?do=add&postID='.$postID.'¬if=3'); } } else { $query = mysqli_query($conn,"UPDATE `tb_post` SET `slug` = '$slug', `title` = '$title', `content` = '$content', `author` = '$author', `last_update` = '$date', `user` = '$users', `status` = '$status' WHERE cuid = '$postID'") or die(mysqli_error()); header('location:../post/?do=add&postID='.$postID.'¬if=1'); } } ?>
SIMPAN PERUBAHAN