mysql_query("DELETE FROM slide WHERE id_slide='{$_GET['id']}'"); } else { mysql_query("DELETE FROM slide WHERE id_slide='{$_GET['id']}'"); } echo "<script>alert('Sukses! Data Telah Berhasil Dihapus.'); window.location = '../../media.php?module={$module}';</script>"; } else { echo "<script>alert('Maaf! Data Gagal Dihapus, Silahkan coba lagi.'); window.location = '../../media.php?module={$module}';</script>"; } } if ($act == 'insertnew') { // Insert if ($module == 'slideshow' and $act == 'insertnew') { $lokasi_file = $_FILES['fupload']['tmp_name']; $tipe_file = $_FILES['fupload']['type']; $nama_file = $_FILES['fupload']['name']; $nama_seo = substr(seo_title($_POST['nama']), 0, 75); $acak = rand(00, 999); $nama_file_unik = $nama_seo . '-' . $acak . '-' . $nama_file; if (!empty($lokasi_file)) { if ($tipe_file != "image/jpeg" and $tipe_file != "image/pjpeg" and $tipe_file != "image/gif" and $tipe_file != "image/png") { ?> <script>window.alert("Upload Gagal, Pastikan File yang di Upload bertipe *.JPG, *.GIF, *.PNG"); window.location=("../../media.php?module=<?php echo $module . '&act=edit&id=' . $_POST['id']; ?> ")</script>; <?php die; } ImageUpload($fupload_name = $nama_file_unik, $to_dir = '../../../joimg/slide/'); mysql_query("INSERT INTO slide(nama, gambar, deskripsi) \n\t\t VALUES('{$_POST['nama']}', '{$nama_file_unik}', '{$_POST['deskripsi']}')");
// Apabila ada gambar yang diupload if (empty($_POST['judul'])) { echo "<script>window.alert('Judul harus diisi');\n window.location(history.back(-1))</script>"; } else { UploadEvent($nama_file_unik); mysql_query("INSERT INTO event(judul,\n tanggal, \n judul_seo,\n isi,\n oleh,\n gambar,\n aktif) \n VALUES('{$_POST['judul']}',\n now(),\n '{$produk_seo}',\n '{$isi}',\n '{$_POST['oleh']}',\n '{$nama_file_unik}',\n 'Ya')"); header('location:../../media.php?module=' . $module); } } elseif ($module == 'event' and $act == 'update') { $lokasi_file = $_FILES['fupload']['tmp_name']; $tipe_file = $_FILES['fupload']['type']; $nama_file = $_FILES['fupload']['name']; $acak = rand(1, 99); $nama_file_unik = $acak . $nama_file; $isi = mysql_real_escape_string($_POST['deskripsi']); $produk_seo = seo_title(trim($_POST['judul'])); // Apabila gambar tidak diganti if (empty($lokasi_file)) { mysql_query("UPDATE event SET judul = '{$_POST['judul']}',\n oleh = '{$_POST['oleh']}',\n judul_seo = '{$produk_seo}',\n isi = '{$isi}'\n WHERE id_event = '{$_POST['id']}'"); header('location:../../media.php?module=' . $module); } else { $data = mysql_fetch_array(mysql_query("SELECT gambar FROM event WHERE id_event ='{$_POST['id']}'")); if ($data['gambar'] != '') { //hapus foto dari folder unlink("../../../joimg/event/{$data['gambar']}"); unlink("../../../joimg/event/s_{$data['gambar']}"); UploadEvent($nama_file_unik); mysql_query("UPDATE event SET judul = '{$_POST['judul']}',\n oleh = '{$_POST['oleh']}',\n judul_seo = '{$produk_seo}',\n isi = '{$isi}',\n gambar = '{$nama_file_unik}' \n WHERE id_event = '{$_POST['id']}'"); header('location:../../media.php?module=' . $module); } else { UploadEvent($nama_file_unik);
$table->updateBy('id_gallery', $id, $data); header('location:../../admin.php?mod=' . $mod); } else { $data = array('id_album' => $id_album, 'title' => $title); $table = new PoTable('gallery'); $table->updateBy('id_gallery', $id, $data); header('location:../../admin.php?mod=' . $mod); } } else { header('location:../../404.php'); } } elseif ($mod == 'gallery' and $act == 'editalbum') { if ($currentRoleAccess->modify_access == "Y") { $id = $val->validasi($_POST['id'], 'sql'); $title = $val->validasi($_POST['title'], 'xss'); $seotitle = seo_title($title); $data = array('title' => $title, 'seotitle' => $seotitle); $table = new PoTable('album'); $table->updateBy('id_album', $id, $data); header('location:../../admin.php?mod=' . $mod . '&act=album'); } else { header('location:../../404.php'); } } elseif ($mod == 'gallery' and $act == 'activealbum') { if ($currentRoleAccess->modify_access == "Y") { $id = $val->validasi($_POST['id'], 'sql'); $active = $val->validasi($_POST['active'], 'xss'); $data = array('active' => $active); $table = new PoTable('album'); $table->updateBy('id_album', $id, $data); echo "{$active}";
if (empty($_SESSION['username']) and empty($_SESSION['passuser'])) { echo "<link href='style.css' rel='stylesheet' type='text/css'>\r\n <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/library.php"; $module = $_GET[module]; $act = $_GET[act]; // Hapus agenda if ($module == 'agenda' and $act == 'hapus') { mysql_query("DELETE FROM agenda WHERE id_agenda='{$_GET['id']}'"); header('location:../../media.php?module=' . $module); } elseif ($module == 'agenda' and $act == 'input') { $mulai = $_POST['mulai']; $selesai = $_POST['akhir']; $jam = $_POST['waktu_mulai']; $jam2 = $_POST['waktu_akhir']; $tema_seo = seo_title($_POST['tema']); mysql_query("INSERT INTO agenda(tema,\r\n tema_seo, \r\n isi_agenda,\r\n tempat,\r\n\t\t\t\t\t\t\t\t jam_mulai,\r\n jam_akhir,\r\n tgl_mulai,\r\n tgl_selesai,\r\n tgl_posting,\r\n pengirim, \r\n username) \r\n\t\t\t\t\t VALUES('{$_POST['tema']}',\r\n\t\t\t\t\t '{$tema_seo}', \r\n '{$_POST['isi_agenda']}',\r\n '{$_POST['tempat']}',\r\n '{$jam}',\r\n\t\t\t\t\t\t\t\t '{$jam2}',\r\n '{$mulai}',\r\n '{$selesai}',\r\n '{$tgl_sekarang}',\r\n '{$_POST['pengirim']}',\r\n '{$_SESSION['namauser']}')"); header('location:../../media.php?module=' . $module); } elseif ($module == 'agenda' and $act == 'update') { $mulai = $_POST['mulai']; $selesai = $_POST['akhir']; $jam = $_POST['waktu_mulai']; $jam2 = $_POST['waktu_akhir']; $tema_seo = seo_title($_POST['tema']); mysql_query("UPDATE agenda SET tema = '{$_POST['tema']}',\r\n tema_seo = '{$tema_seo}',\r\n isi_agenda = '{$_POST['isi_agenda']}',\r\n tgl_mulai = '{$mulai}',\r\n tgl_selesai = '{$selesai}',\r\n tempat = '{$_POST['tempat']}', \r\n jam_mulai = '{$jam}', \r\n\t\t\t\t\t\t\t\t jam_akhir = '{$jam2}', \t\t\t\t\t\t\t\t \r\n pengirim = '{$_POST['pengirim']}' \r\n WHERE id_agenda = '{$_POST['id']}'"); header('location:../../media.php?module=' . $module); } }
$title = $_POST["title"]; $description = $_POST["description"]; $tags = $_POST["tags"]; //check if form filled in fully //////////////////////////////// if ($title == "" || $description == "" || $tags == "") { //error notification $show_notification = 1; $message = $config["fill_all_fields"]; //fill all fields } else { //Update Database ///////////////// //get same form as above but process ready for mysql $title = @mysql_real_escape_string($title); $title_seo = seo_title($title); $description = @mysql_real_escape_string($description); $tags = @mysql_real_escape_string($tags); $allow_comments = mysql_real_escape_string($_POST["allow_comments"]); $allow_ratings = mysql_real_escape_string($_POST["allow_ratings"]); $public_private = mysql_real_escape_string($_POST["public_private"]); $sql = "UPDATE image_galleries SET\r\n\tgallery_name ='{$title}',\r\n\tgallery_name_seo ='{$title_seo}',\r\n\tgallery_description ='{$description}',\r\n\tpublic_private ='{$public_private}',\r\n\tallow_comments ='{$allow_comments}',\r\n\tallow_ratings ='{$allow_ratings}',\r\n\tgallery_tags ='{$tags}' WHERE\tgallery_id ={$id}"; @mysql_query($sql); //Update images table also ////////////////////////// $sql = "UPDATE images SET gallery_name = '{$title}',\r\n\tpublic_private ='{$public_private}',\r\n\tallow_ratings ='{$allow_ratings}',\r\n\tallow_comments ='{$allow_comments}' WHERE gallery_id = {$id}"; @mysql_query($sql); if (mysql_error()) { $show_notification = 1; $message = $config["error_26"]; //error
} $twit = twitter_shares('http://www.popojicms.org'); $sharetw = $twit; hapus baris ini dan ubah urlnya jika web Anda sudah di hosting ---*/ if ($mode_maintenance == "Y") { header('location:maintenance'); } else { if (!isset($_SESSION['submit'])) { $_SESSION['submit'] = true; } $mod = $_GET['mod']; if (file_exists("po-content/{$folder}/{$mod}.php")) { if ($website_cache == "Y") { $cacheuri = $_SERVER['REQUEST_URI']; $cachename = md5(seo_title($cacheuri)); $cachefile = 'po-cache/' . $cachename . '.tmp'; $cachetime = $website_cache_time * 60; if (file_exists($cachefile) && time() - $cachetime < filemtime($cachefile)) { include_once $cachefile; } else { ob_start(); include_once "po-content/{$folder}/{$mod}.php"; $fp = fopen($cachefile, 'w'); fwrite($fp, ob_get_contents()); fclose($fp); ob_end_flush(); } } else { include_once "po-content/{$folder}/{$mod}.php"; }
//hapus foto dari folder unlink("../../../joimg/produk/{$data['gambar']}"); unlink("../../../joimg/produk/s_{$data['gambar']}"); UploadProduk($nama_file_unik); mysql_query("UPDATE produk SET judul = '{$_POST['nama_produk']}',\n judul_seo = '{$produk_seo}',\n id_kategori = '{$_POST['id_kategori']}',\n id_sub_kategori = '{$_POST['id_sub_kategori']}',\n bestseller = '{$_POST['bestseller']}',\n new_release = '{$_POST['new_release']}',\n harga = '{$_POST['harga']}',\n\t\t\t\t\t\t\t\t\tdiskon = '{$_POST['diskon']}',\n\t\t\t\t\t\t\t\t\tberat = '{$_POST['berat']}',\n\t\t\t\t\t\t\t\t\tstok = '{$_POST['stok']}',\n deskripsi = '{$isi}',\n tgl_update = now(),\n gambar = '{$nama_file_unik}' \n WHERE id_produk = '{$_POST['id']}'"); header('location:../../media.php?module=' . $module); //echo "<script>window.history.go(-2);</script>"; } else { UploadProduk($nama_file_unik); mysql_query("UPDATE produk SET judul = '{$_POST['nama_produk']}',\n judul_seo = '{$produk_seo}',\n bestseller = '{$_POST['bestseller']}',\n new_release = '{$_POST['new_release']}',\n id_kategori = '{$_POST['id_kategori']}',\n id_sub_kategori = '{$_POST['id_sub_kategori']}',\n harga = '{$_POST['harga']}',\n\t\t\t\t\t\t\t\t\tdiskon = '{$_POST['diskon']}',\n\t\t\t\t\t\t\t\t\tberat = '{$_POST['berat']}',\n\t\t\t\t\t\t\t\t\tstok = '{$_POST['stok']}',\n deskripsi = '{$isi}',\n tgl_update = now(),\n gambar = '{$nama_file_unik}' \n WHERE id_produk = '{$_POST['id']}'"); echo $sql; header('location:../../media.php?module=' . $module); //echo "<script>window.history.go(-2);</script>"; } } } elseif ($module == 'produk' and $act == 'hapusCat') { mysql_query("DELETE FROM kategori_produk WHERE id_kategori='{$_GET['id']}'"); header('location:../../media.php?module=' . $module . '&act=addCat'); } elseif ($module == 'produk' and $act == 'inputCat') { if (empty($_POST['judul'])) { echo "<script>window.alert('Nama KATEGORI harus diisi !!');\n window.location=('../../media.php?module=produk&act=addCat')</script>"; } else { $judul_seo = seo_title(trim($_POST['judul'])); mysql_query("INSERT IGNORE INTO kategori_produk(nama_kategori, kategori_seo, hapus) \n\t\t\t\t\t\t\t\t VALUES('{$_POST['judul']}','{$judul_seo}', 'Ya')"); header('location:../../media.php?module=' . $module . '&act=addCat'); } } elseif ($module == 'produk' and $act == 'updateCat') { $judul_seo = seo_title(trim($_POST['judul'])); mysql_query("UPDATE kategori_produk SET nama_kategori = '{$_POST['judul']}',\n\t\t\t\t\t\t\t\t\t\t\tkategori_seo = '{$judul_seo}'\n\t\t\t\t\t\t\t\t\t\t\tWHERE id_kategori ='{$_POST['id']}'"); header('location:../../media.php?module=' . $module . '&act=addCat'); }
<?php session_start(); if (empty($_SESSION['username']) and empty($_SESSION['passuser'])) { echo "<link href='style.css' rel='stylesheet' type='text/css'>\r\n <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"; $module = $_GET[module]; $act = $_GET[act]; // Hapus Tag if ($module == 'tag' and $act == 'hapus') { mysql_query("DELETE FROM tag WHERE id_tag='{$_GET['id']}'"); header('location:../../media.php?module=' . $module); } elseif ($module == 'tag' and $act == 'input') { $tag_seo = seo_title($_POST['nama_tag']); mysql_query("INSERT INTO tag(nama_tag,tag_seo) VALUES('{$_POST['nama_tag']}','{$tag_seo}')"); header('location:../../media.php?module=' . $module); } elseif ($module == 'tag' and $act == 'update') { $tag_seo = seo_title($_POST['nama_tag']); mysql_query("UPDATE tag SET nama_tag = '{$_POST['nama_tag']}', tag_seo='{$tag_seo}' WHERE id_tag = '{$_POST['id']}'"); header('location:../../media.php?module=' . $module); } }
<?php session_start(); if (empty($_SESSION['username']) and empty($_SESSION['passuser'])) { echo "<link href='style.css' rel='stylesheet' type='text/css'>\n <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"; $module = $_GET['module']; $act = $_GET['act']; // Hapus kategori if ($module == 'kategori' and $act == 'hapus') { mysql_query("DELETE FROM kategori WHERE id_kategori='{$_GET['id']}'"); header('location:../../media.php?module=' . $module); } elseif ($module == 'kategori' and $act == 'input') { $nama_kategori = seo_title($_POST['kd_kategori']); mysql_query("INSERT INTO kategori(kd_kategori,\n nama_kategori) \n VALUES('{$_POST['kd_kategori']}',\n '{$_POST['nama_kategori']}')"); header('location:../../media.php?module=' . $module); } elseif ($module == 'kategori' and $act == 'update') { $nama_kategori = seo_title($_POST['kd_kategori']); mysql_query("UPDATE kategori SET kd_kategori ='{$_POST['kd_kategori']}', \n nama_kategori='{$_POST['nama_kategori']}'\n WHERE id_kategori = '{$_POST['id']}'"); header('location:../../media.php?module=' . $module); } }
} else { UploadAlbum($nama_file_unik); mysql_query("INSERT INTO album(jdl_album,\n album_seo,\n gbr_album) \n VALUES('{$_POST['jdl_album']}',\n '{$album_seo}',\n '{$nama_file_unik}')"); header('location:../../media.php?module=' . $module); } } else { mysql_query("INSERT INTO album(jdl_album,\n album_seo) \n VALUES('{$_POST['jdl_album']}',\n '{$album_seo}')"); header('location:../../media.php?module=' . $module); } } elseif ($module == 'album' and $act == 'update') { $lokasi_file = $_FILES['fupload']['tmp_name']; $nama_file = $_FILES['fupload']['name']; $tipe_file = $_FILES['fupload']['type']; $acak = rand(00, 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']}',\n album_seo = '{$album_seo}', \n aktif='{$_POST['aktif']}' \n 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');\n window.location=('../../media.php?module=album')</script>"; } else { UploadAlbum($nama_file_unik); mysql_query("UPDATE album SET jdl_album = '{$_POST['jdl_album']}',\n album_seo = '{$album_seo}',\n gbr_album = '{$nama_file_unik}', \n aktif='{$_POST['aktif']}' \n WHERE id_album = '{$_POST['id']}'"); header('location:../../media.php?module=' . $module); } } } }
} $jml = count($tag_seo); for ($i = 0; $i < $jml; $i++) { mysql_query("UPDATE tag SET count=count+1 WHERE tag_seo='{$tag_seo[$i]}'"); } } elseif ($module == 'berita' and $act == 'update') { $lokasi_file = $_FILES['fupload']['tmp_name']; $tipe_file = $_FILES['fupload']['type']; $nama_file = $_FILES['fupload']['name']; $acak = rand(1, 99); $nama_file_unik = $acak . $nama_file; if (!empty($_POST['tag_seo'])) { $tag_seo = $_POST['tag_seo']; $tag = implode(',', $tag_seo); } $judul_seo = seo_title($_POST['judul']); // Apabila gambar tidak diganti if (empty($lokasi_file)) { mysql_query("UPDATE berita SET judul = '{$_POST['judul']}',\n judul_seo = '{$judul_seo}', \n id_kategori = '{$_POST['kategori']}',\n headline = '{$_POST['headline']}',\n tag = '{$tag}',\n isi_berita = '{$_POST['isi_berita']}' \n WHERE id_berita = '{$_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');\n window.location=('../../media.php?module=berita')</script>"; } else { UploadImage($nama_file_unik); mysql_query("UPDATE berita SET judul = '{$_POST['judul']}',\n judul_seo = '{$judul_seo}', \n id_kategori = '{$_POST['kategori']}',\n headline = '{$_POST['headline']}',\n tag = '{$tag}',\n isi_berita = '{$_POST['isi_berita']}',\n gambar = '{$nama_file_unik}' \n WHERE id_berita = '{$_POST['id']}'"); header('location:../../media.php?module=' . $module); } } } }
<?php session_start(); include "../../../josys/koneksi.php"; include "../../../josys/library.php"; include "../../../josys/fungsi_thumb.php"; include "../../../josys/fungsi_seo.php"; $module = $_GET['module']; $act = $_GET['act']; $act = $_GET['act']; if ($module == 'subkategori' and $act == 'del') { mysql_query("DELETE FROM sub_kategori WHERE id_sub_kategori='{$_GET['id']}'"); header('location:../../media.php?module=' . $module); } elseif ($module == 'subkategori' and $act == 'input') { if (empty($_POST['nama'])) { echo "<script>window.alert('Nama Kategori harus diisi !!');\n window.location=('../../media.php?module=subkategori')</script>"; } else { $judul_seo = seo_title(trim($_POST['nama'])); mysql_query("INSERT INTO sub_kategori(id_kategori, nama, nama_seo, status) \n\t\t\t\t\t\t\t\t VALUES('{$_POST['id_kategori']}','{$_POST['nama']}','{$judul_seo}','{$_POST['status']}')"); header('location:../../media.php?module=' . $module); } } elseif ($module == 'subkategori' and $act == 'update') { $judul_seo = seo_title(trim($_POST['nama'])); mysql_query("UPDATE sub_kategori SET nama = '{$_POST['nama']}',\n\t\t\t\t\t\t\t\t\t\t\tid_kategori = '{$_POST['id_kategori']}',\n\t\t\t\t\t\t\t\t\t\t\tnama_seo = '{$judul_seo}'\n\t\t\t\t\t\t\t\t\t\t\tWHERE id_sub_kategori ='{$_POST['id']}'"); header('location:../../media.php?module=' . $module); }
//get form post (no mysql_real_escapE) so that it can be checked for full completion $group_name = $_POST["group_name"]; $group_description = $_POST["group_description"]; //check if form filled in fully //////////////////////////////// if ($group_name == "" || $group_description == "") { //error notification $show_notification = 1; $message = $config["fill_all_fields"]; //fill all fields } else { //Update Database ///////////////// //get same form as above but process ready for mysql $group_name = @mysql_real_escape_string($group_name); $group_name_seo = seo_title($group_name); $group_description = @mysql_real_escape_string($group_description); $public_private = mysql_real_escape_string($_POST["public_private"]); $sql = "UPDATE group_profile SET\r\n\tgroup_name ='{$group_name}',\r\n\tgroup_name_seo ='{$group_name_seo}',\r\n\tgroup_description ='{$group_description}',\r\n\tpublic_private ='{$public_private}'\r\n\tWHERE indexer ={$id}"; @mysql_query($sql); if (mysql_error()) { $show_notification = 1; $message = $config["error_26"]; //error } else { $show_notification = 1; $message = $config["error_25"]; //request success } } }
<?php session_start(); if (empty($_SESSION['username']) and empty($_SESSION['passuser'])) { echo "<link href='style.css' rel='stylesheet' type='text/css'>\n <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"; $module = $_GET['module']; $act = $_GET['act']; // Hapus cabang if ($module == 'cabang' and $act == 'hapus') { mysql_query("DELETE FROM cabang WHERE id_cabang='{$_GET['id']}'"); header('location:../../media.php?module=' . $module); } elseif ($module == 'cabang' and $act == 'input') { $nama_cabang = seo_title($_POST['kd_cabang']); mysql_query("INSERT INTO cabang VALUES('NULL',\n '{$_POST['kd_cabang']}',\n '{$_POST['nama_cabang']}',\n '{$_POST['alamat']}',\n '{$_POST['telp']}',\n '{$_POST['pic']}')"); header('location:../../media.php?module=' . $module); } elseif ($module == 'cabang' and $act == 'update') { $nama_cabang = seo_title($_POST['kd_cabang']); mysql_query("UPDATE cabang SET kd_cabang='{$_POST['kd_cabang']}', \n nama_cabang='{$_POST['nama_cabang']}', \n alamat='{$_POST['alamat']}', \n telp='{$_POST['telp']}', \n pic='{$_POST['pic']}'\n WHERE id_cabang = '{$_POST['id']}'"); header('location:../../media.php?module=' . $module); } }
$thumb_desc[] = mysql_real_escape_string($_POST['thumb_desc_2']); $image_tags[] = mysql_real_escape_string($_POST['image_tags_2']); $image_id[] = mysql_real_escape_string($_POST['img_name_3']); $thumb_title[] = mysql_real_escape_string($_POST['thumb_title_3']); $thumb_desc[] = mysql_real_escape_string($_POST['thumb_desc_3']); $image_tags[] = mysql_real_escape_string($_POST['image_tags_3']); $new_photo_album = ucwords($new_photo_album); // enter image into db for ($x = 0; $x < $img_uploaded; $x++) { $thumb_title[$x] = ucwords($thumb_title[$x]); if (is_numeric($thumb_title[$x])) { $thumb_title[$x] = $lang_edit_me; } $thumb_title[$x] = str_replace('/', '-', $thumb_title[$x]); $thumb_title[$x] = str_replace("'", '', $thumb_title[$x]); $title_seo[$x] = seo_title($thumb_title[$x]); $sql = "INSERT INTO images (indexer, image_id, gallery_id, user_id, viewtime, title, title_seo, description, tags, gallery_name, date_recorded, date_uploaded, image_size, allow_comments, allow_embedding, allow_ratings, rating_number_votes, rating_total_points, updated_rating, public_private, approved, number_of_views, featured, promoted, flag_counter)\r\n\t\t\t\tVALUES (NULL, '{$image_id[$x]}', '{$album_id}', '{$user_id}', '0000-00-00 00-00-00', '{$thumb_title[$x]}', '{$title_seo[$x]}', '{$thumb_desc[$x]}', '{$image_tags[$x]}', '{$new_photo_album}', '0000-00-00 00:00:00', NOW(), NULL, '{$allow_comments}', 'yes', '{$allow_ratings}', '0', '0', '0', '{$album_type}', 'yes', '0', 'no', 'no', '0')"; $insert_query = @mysql_query($sql); // update image gallery enter has images $sql_2 = "UPDATE image_galleries SET has_images = '1' WHERE gallery_id = {$album_id}"; $query_update = @mysql_query($sql_2); } // update album cover image if an image is selected if ($ablum_cover_img != "") { $sql = "UPDATE image_galleries SET gallery_picture = '{$ablum_cover_img}' WHERE gallery_id = {$album_id}"; $cover_query = @mysql_query($sql); if (!$cover_query) { die($config['error_26']); @mysql_close(); die; }
include "../../../config/library.php"; include "../../../config/fungsi_thumb.php"; include "../../../config/fungsi_seo.php"; $module = $_GET[module]; $act = $_GET[act]; // Hapus produk if ($act == 'hapus') { mysql_query("DELETE FROM subproduk WHERE id_subproduk='{$_GET['id']}'"); header('location:../../media.php?p=subproduk'); } elseif ($act == 'input') { $lokasi_file = $_FILES['fupload']['tmp_name']; $tipe_file = $_FILES['fupload']['type']; $nama_file = $_FILES['fupload']['name']; $acak = rand(1, 99); $nama_file_unik = $acak . $nama_file; $produk_seo = seo_title($_POST[nama_produk]); // Apabila ada gambar yang diupload if (!empty($lokasi_file)) { UploadImage($nama_file_unik); mysql_query("INSERT INTO subproduk(id_produk,\n gambar) \n VALUES('{$_POST['produk']}',\n '{$nama_file_unik}')"); } else { echo "<script>window.alert('Anda belum memilih gambar');\n window.location=('../../media.php?p=subproduk')</script>"; header('location:../../media.php?p=subproduk'); } header('location:../../media.php?p=subproduk'); } elseif ($act == 'update') { $lokasi_file = $_FILES['fupload']['tmp_name']; $tipe_file = $_FILES['fupload']['type']; $nama_file = $_FILES['fupload']['name']; $acak = rand(1, 99); $nama_file_unik = $acak . $nama_file;
} else { mysql_query("UPDATE galeri SET id_album\t= '{$_POST['album']}',\n\t\t\t\t\t\t\t\tnama\t\t= '{$_POST['nama']}',\n\t\t\t\t\t\t\t\tseo\t\t= '{$judul_seo}'\n\t \t\tWHERE \t\tid_galeri \t= '{$_POST['id']}'"); } echo "<script>alert('Sukses! Data Telah Berhasil Disimpan.'); window.location = '../../media.php?module={$module}';</script>"; //header('location:../../media.php?module='.$module); } else { echo "<script>alert('Maaf! Data Gagal Disimpan, Silahkan coba lagi.'); window.location = '../../media.php?module={$module}';</script>"; } } if ($act == 'insertnew') { // Update Room Type if ($module == 'galeri' and $act == 'insertnew') { $lokasi_file = $_FILES['fupload']['tmp_name']; $tipe_file = $_FILES['fupload']['type']; $nama_file = $_FILES['fupload']['name']; $judul_seo = seo_title($_POST['nama']); $nama_seo = substr($judul_seo, 0, 50); $acak = rand(00, 999); $nama_file_unik = 'cincin-kawin-perak-' . $acak . '-' . $nama_seo . '-' . $nama_file; if (!empty($lokasi_file)) { if ($tipe_file != "image/jpeg" and $tipe_file != "image/pjpeg" and $tipe_file != "image/gif" and $tipe_file != "image/png") { ?> <script>window.alert("Upload Gagal, Pastikan File yang di Upload bertipe *.JPG, *.GIF, *.PNG"); window.location=("../../media.php?module=<?php echo $module . '&act=edit&id=' . $_POST['id']; ?> ")</script>; <?php die; } //proses upload gambar sebenarnya
<?php session_start(); if (empty($_SESSION['username']) and empty($_SESSION['passuser'])) { echo "<link href='style.css' rel='stylesheet' type='text/css'>\n <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"; $module = $_GET['module']; $act = $_GET['act']; // Hapus tangki if ($module == 'tangki' and $act == 'hapus') { mysql_query("DELETE FROM tangki WHERE id_tangki='{$_GET['id']}'"); header('location:../../media.php?module=' . $module); } elseif ($module == 'tangki' and $act == 'input') { $nama_tangki = seo_title($_POST['kd_tangki']); mysql_query("INSERT INTO tangki(kd_tangki, \n nama_tangki, \n isi_tangki) \n VALUES('{$_POST['kd_tangki']}',\n '{$_POST['nama_tangki']}', \n '{$_POST['isi_tangki']}')"); header('location:../../media.php?module=' . $module); } elseif ($module == 'tangki' and $act == 'update') { $nama_tangki = seo_title($_POST['kd_tangki']); mysql_query("UPDATE tangki SET kd_tangki='{$_POST['kd_tangki']}', \n nama_tangki='{$_POST['nama_tangki']}', \n isi_tangki='{$_POST['isi_tangki']}'\n WHERE id_tangki = '{$_POST['id']}'"); header('location:../../media.php?module=' . $module); } }
function update() { $data = array('nama_kategori' => $this->input->post('nama_kategori'), 'link' => $this->input->post('link'), 'parent' => $this->input->post('parent'), 'nama_kategori_seo' => seo_title($this->input->post('nama_kategori'))); $this->db->where('kategori_id', $this->input->post('kategori_id')); $this->db->update('kategori', $data); }
function build_seo_title2($id) { global $lep; $query = "select title from lep_resource where res_id = '$id'"; $title = $lep->db->GetOne($query); $seo_title = seo_title($title); $title = addslashes($title); // check duplicate seo title $query = "select count(res_id) from lep_resource where title = '{$title}' and res_id <> '{$id}'"; $num_dup = $lep->db->GetOne($query); if ($num_dup) { $seo_title = seo_title($title).'-'.$num_dup; } $query = "update lep_resource set seo_title = '$seo_title' where res_id = '$id'"; $rs = $lep->db->Execute($query); }
$id = $val->validasi($item['deldata'], 'xss'); $tabledel->deleteBy('id_tag', $id); } header('location:../../admin.php?mod=' . $mod); } else { header('location:../../404.php'); } } else { header('location:../../404.php'); } } elseif ($mod == 'tag' and $act == 'input') { if ($currentRoleAccess->write_access == "Y") { if (empty($_POST['tag'])) { header('location:../../404.php'); } else { $post = $val->validasi($_POST['tag'], 'xss'); $pecah = explode(",", $post); $total = count($pecah); $table = new PoTable('tag'); for ($i = 0; $i < $total; $i++) { $tag_title = $pecah[$i]; $tag_seo = seo_title($tag_title); $table->save(array('tag_title' => $tag_title, 'tag_seo' => $tag_seo)); } header('location:../../admin.php?mod=' . $mod); } } else { header('location:../../404.php'); } } }
<?php session_start(); if (empty($_SESSION['username']) and empty($_SESSION['passuser'])) { echo "<link href='style.css' rel='stylesheet' type='text/css'>\n <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"; $module = $_GET[module]; $act = $_GET[act]; // Input kategori if ($module == 'kategori' and $act == 'input') { $kategori_seo = seo_title($_POST['nama_kategori']); mysql_query("INSERT INTO kategori(nama_kategori,kategori_seo) VALUES('{$_POST['nama_kategori']}','{$kategori_seo}')"); header('location:../../media.php?module=' . $module); } elseif ($module == 'kategori' and $act == 'update') { $kategori_seo = seo_title($_POST['nama_kategori']); mysql_query("UPDATE kategori SET nama_kategori='{$_POST['nama_kategori']}', kategori_seo='{$kategori_seo}', aktif='{$_POST['aktif']}' \n WHERE id_kategori = '{$_POST['id']}'"); header('location:../../media.php?module=' . $module); } }
<?php if (defined('WP_DEBUG') && true !== WP_DEBUG) { ob_start('ob_html_compress'); } ?> <!DOCTYPE html> <html lang="en" data-a="<?php echo admin_url('admin-ajax.php'); ?> "> <head> <meta charset="UTF-8"> <title><?php seo_title(); ?> </title> <meta name="MobileOptimized" content="width" /> <meta name="HandheldFriendly" content="True"/> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, minimal-ui, minimum-scale=1.0, maximum-scale=1.0" /> <link rel="shortcut icon" type="image/vnd.microsoft.icon" href="//s1.wp.com/i/favicon.ico?m=1311976025g" sizes="16x16 32x32 48x48"> <link rel="shortcut icon" type="image/x-icon" href="//s1.wp.com/i/favicon.ico?m=1311976025g" sizes="16x16"> <link rel="icon" type="image/x-icon" href="//s1.wp.com/i/favicon.ico?m=1311976025g" sizes="16x16"> <?php wp_head(); ?> </head> <body <?php body_class(); ?> >
$targetDir = '../../../../po-content/po-upload/'; //$cleanupTargetDir = false; // Remove old files //$maxFileAge = 60 * 60; // Temp file age in seconds // 5 minutes execution time @set_time_limit(5 * 60); // Uncomment this one to fake upload time // usleep(5000); // Get parameters $chunk = isset($_REQUEST["chunk"]) ? $_REQUEST["chunk"] : 0; $chunks = isset($_REQUEST["chunks"]) ? $_REQUEST["chunks"] : 0; $fileName = isset($_REQUEST["name"]) ? $_REQUEST["name"] : ''; // Clean the fileName for security reasons $fileName = preg_replace('/[^\\w\\._]+/', '', $fileName); $ext = strrpos($fileName, '.'); $fileName_1 = substr($fileName, 0, $ext); $fileName_a = seo_title($fileName_1); $fileName_b = substr($fileName, $ext); $fileName_c = rand(00, 999999); $fileName = $fileName_a . '-' . $fileName_c . '-polibrary' . $fileName_b; // Create target dir if (!file_exists($targetDir)) { @mkdir($targetDir); } // Remove old temp files /* this doesn't really work by now if (is_dir($targetDir) && ($dir = opendir($targetDir))) { while (($file = readdir($dir)) !== false) { $filePath = $targetDir . DIRECTORY_SEPARATOR . $file; // Remove temp files if they are older than the max age
echo $seo_keywords_show; ?> " style="width:90%;"/><br/> <?php echo seo_title('seo_keywords_show', array('showtitle', 'catname', 'catkeywords', 'modulename', 'sitename', 'sitekeywords')); ?> </td> </tr> <tr> <td class="tl">内容页Description<br/>(网页描述)</td> <td><input name="setting[seo_description_show]" type="text" id="seo_description_show" value="<?php echo $seo_description_show; ?> " style="width:90%;"/><br/> <?php echo seo_title('seo_description_show', array('showtitle', 'showintroduce', 'catname', 'catdescription', 'modulename', 'sitename', 'sitedescription')); ?> </td> </tr> </table> </div> <div id="Tabs2" style="display:none"> <div class="tt">权限收费</div> <table cellpadding="2" cellspacing="1" class="tb"> <tr> <td class="tl">允许浏览模块首页</td> <td><?php echo group_checkbox('setting[group_index][]', $group_index); ?> </td>
if ($act == 'hapus') { // Delete if ($module == 'category' and $act == 'hapus') { $id = $_GET['id']; mysql_query("DELETE FROM kategori WHERE id_kategori='{$id}'"); echo "<script>alert('Sukses! Data Telah Berhasil Dihapus.'); window.location = '../../media.php?module={$module}';</script>"; } else { echo "<script>alert('Maaf! Data Gagal Dihapus, Silahkan coba lagi.'); window.location = '../../media.php?module={$module}';</script>"; } } if ($act == 'update') { // Update if ($module == 'category' and $act == 'update') { $nama_seo = seo_title($_POST['nama']); mysql_query("UPDATE kategori \tSET \tnama\t\t= '{$_POST['nama']}',\n\t\t\t\t\t\t\t\tnama_seo\t= '{$nama_seo}'\n\t\t\t\t\t\t\tWHERE id_kategori \t= '{$_POST['id']}' "); echo "<script>alert('Sukses! Data Telah Berhasil Disimpan.'); window.location = '../../media.php?module={$module}';</script>"; } else { echo "<script>alert('Maaf! Data Gagal Disimpan, Silahkan coba lagi.'); window.location = '../../media.php?module={$module}';</script>"; } } if ($act == 'insertnew') { // Add if ($module == 'category' and $act == 'insertnew') { $nama_seo = seo_title($_POST['nama']); mysql_query("INSERT INTO kategori(nama,nama_seo) \n\t\t\t\t\tVALUES ('{$_POST['nama']}','{$nama_seo}')"); echo "<script>alert('Sukses! Data Telah Berhasil Disimpan.'); window.location = '../../media.php?module={$module}';</script>"; } else { echo "<script>alert('Maaf! Data Gagal Disimpan, Silahkan coba lagi.'); window.location = '../../media.php?module={$module}';</script>"; } } }
<?php session_start(); if (empty($_SESSION['username']) and empty($_SESSION['passuser'])) { echo "<link href='style.css' rel='stylesheet' type='text/css'>\n <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"; $module = $_GET[module]; $act = $_GET[act]; // Hapus dispenser if ($module == 'dispenser' and $act == 'hapus') { mysql_query("DELETE FROM dispenser WHERE id_dispenser='{$_GET['id']}'"); header('location:../../media.php?module=' . $module); } elseif ($module == 'dispenser' and $act == 'input') { $nama_dispenser = seo_title($_POST['nama_dispenser']); mysql_query("INSERT INTO dispenser(id_pompa,id_tangki,kd_dispenser,nama_dispenser) VALUES\n ('{$_POST['id_pompa']}',\n '{$_POST['id_tangki']}',\n '{$_POST['kd_dispenser']}',\n '{$_POST['nama_dispenser']}')"); header('location:../../media.php?module=' . $module); } elseif ($module == 'dispenser' and $act == 'update') { $nama_dispenser = seo_title($_POST['nama_dispenser']); mysql_query("UPDATE dispenser SET id_pompa='{$_POST['id_pompa']}',\n id_tangki='{$_POST['id_tangki']}',\n kd_dispenser='{$_POST['kd_dispenser']}', \n nama_dispenser='{$_POST['nama_dispenser']}'\n WHERE id_dispenser = '{$_POST['id']}'"); header('location:../../media.php?module=' . $module); } }
} else { UploadGallery($nama_file_unik); mysql_query("INSERT INTO gallery(jdl_gallery,\n gallery_seo,\n id_album,\n keterangan,\n gbr_gallery) \n VALUES('{$_POST['jdl_gallery']}',\n '{$gallery_seo}',\n '{$_POST['album']}',\n '{$_POST['keterangan']}',\n '{$nama_file_unik}')"); header('location:../../media.php?module=' . $module); } } else { mysql_query("INSERT INTO gallery(jdl_gallery,\n gallery_seo,\n id_album,\n keterangan) \n VALUES('{$_POST['jdl_gallery']}',\n '{$gallery_seo}',\n '{$_POST['album']}',\n '{$_POST['keterangan']}')"); header('location:../../media.php?module=' . $module); } } elseif ($module == 'galerifoto' and $act == 'update') { $lokasi_file = $_FILES['fupload']['tmp_name']; $tipe_file = $_FILES['fupload']['type']; $nama_file = $_FILES['fupload']['name']; $acak = rand(00, 999999); $nama_file_unik = $acak . $nama_file; $gallery_seo = seo_title($_POST['jdl_gallery']); // Apabila gambar tidak diganti if (empty($lokasi_file)) { mysql_query("UPDATE gallery SET jdl_gallery = '{$_POST['jdl_gallery']}',\n gallery_seo = '{$gallery_seo}', \n id_album = '{$_POST['album']}',\n keterangan = '{$_POST['keterangan']}' \n WHERE id_gallery = '{$_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');\n window.location=('../../media.php?module=galerifoto')</script>"; } else { UploadGallery($nama_file_unik); mysql_query("UPDATE gallery SET jdl_gallery = '{$_POST['jdl_gallery']}',\n gallery_seo = '{$gallery_seo}', \n id_album = '{$_POST['album']}',\n keterangan = '{$_POST['keterangan']}', \n gbr_gallery = '{$nama_file_unik}' \n WHERE id_gallery = '{$_POST['id']}'"); header('location:../../media.php?module=' . $module); } } } }
<?php session_start(); include "../../../fungsi/fungsi_seo.php"; include "../../../koneksi/koneksi.php"; $module = $_GET[module]; $act = $_GET[act]; // Hapus Group if ($module == 'group' and $act == 'hapus') { mysql_query("DELETE FROM tgrup WHERE id_grup='{$_GET['id']}'"); header('location:../../master.php?module=group'); } elseif ($module == 'group' and $act == 'input') { $groupSeo = seo_title($_POST['group']); $groupName = $_POST['group']; $idUser = $_SESSION['idUser']; $masuk = mysql_query("INSERT INTO tgrup(grup,grup_seo,id_user,lastUpdate) VALUES('{$groupName}','{$groupSeo}','{$idUser}','{$idUser}')"); header('location:../../master.php?module=group'); } elseif ($module == 'group' and $act == 'update') { $groupSeo = seo_title($_POST['group']); mysql_query("UPDATE tgrup SET grup = '{$_POST['group']}', grup_seo='{$groupSeo}', lastUpdate='{$_SESSION['idUser']}' WHERE id_grup = '{$_POST['id']}'"); header('location:../../master.php?module=group'); }
function cache_module($moduleid = 0) { global $db; if ($moduleid) { $r = $db->get_one("SELECT * FROM {$db->pre}module WHERE disabled=0 AND moduleid='{$moduleid}'"); $setting = array(); $setting = get_setting($moduleid); if (isset($setting['seo_title_index'])) { $setting['title_index'] = seo_title($setting['seo_title_index']); } if (isset($setting['seo_title_list'])) { $setting['title_list'] = seo_title($setting['seo_title_list']); } if (isset($setting['seo_title_show'])) { $setting['title_show'] = seo_title($setting['seo_title_show']); } if (isset($setting['seo_keywords_index'])) { $setting['keywords_index'] = seo_title($setting['seo_keywords_index']); } if (isset($setting['seo_keywords_list'])) { $setting['keywords_list'] = seo_title($setting['seo_keywords_list']); } if (isset($setting['seo_keywords_show'])) { $setting['keywords_show'] = seo_title($setting['seo_keywords_show']); } if (isset($setting['seo_description_index'])) { $setting['description_index'] = seo_title($setting['seo_description_index']); } if (isset($setting['seo_description_list'])) { $setting['description_list'] = seo_title($setting['seo_description_list']); } if (isset($setting['seo_description_show'])) { $setting['description_show'] = seo_title($setting['seo_description_show']); } //cache_write('setting/module-'.$moduleid.'.php', $setting); $setting['moduleid'] = $moduleid; $setting['name'] = $r['name']; $setting['moduledir'] = $r['moduledir']; $setting['module'] = $r['module']; $setting['ismenu'] = $r['ismenu']; $setting['domain'] = $r['domain']; $setting['linkurl'] = $r['linkurl']; if ($moduleid == 3) { foreach ($setting as $k => $v) { if (strpos($k, '_domain') !== false) { $e = str_replace('_domain', '', $k); $key = $e . '_url'; $setting[$key] = $v ? $v : DT_PATH . $e . '/'; } } } cache_write('module-' . $moduleid . '.php', $setting); if (isset($setting['split'])) { if ($setting['split']) { cache_write($moduleid . '.part', $moduleid); } else { cache_delete($moduleid . '.part'); } } return true; } else { $result = $db->query("SELECT moduleid,module,name,moduledir,domain,linkurl,style,listorder,islink,ismenu,isblank,logo FROM {$db->pre}module WHERE disabled=0 ORDER by listorder asc,moduleid desc"); $CACHE = array(); $modules = array(); while ($r = $db->fetch_array($result)) { if (!$r['islink']) { $linkurl = $r['domain'] ? $r['domain'] : linkurl($r['moduledir'] . '/'); if ($r['moduleid'] == 1) { $linkurl = DT_PATH; } if ($linkurl != $r['linkurl']) { $r['linkurl'] = $linkurl; $db->query("UPDATE {$db->pre}module SET linkurl='{$linkurl}' WHERE moduleid='{$r['moduleid']}' "); } cache_module($r['moduleid']); } $modules[$r['moduleid']] = $r; } $CACHE['module'] = $modules; $CACHE['dt'] = cache_read('module-1.php'); cache_write('module.php', $CACHE); } }