fhdfhdfhdfhdfhdfhdfdfhdfhdfhdhfdfhdfhdfhd dfhdfhdfhdfhdfhdfhdfhdfdfhdfhdfhdhfdfhdfhdfhdfh
| DIR:/home/u1105814/www/mountanasikunir.com/admin/modul/mod_fasilitas/ |
| Current File : /home/u1105814/www/mountanasikunir.com/admin/modul/mod_fasilitas/aksi_fasilitas.php |
<?php
//session_start();
include "../../config/koneksi.php";
define ('SITE_ROOT', realpath(dirname(__FILE__)));
$module=$_GET['module'];
$act=$_GET['act'];
// Hapus modul
if ($module=='fasilitas' AND $act=='hapus'){
mysqli_query($connect,"DELETE FROM fasilitas WHERE id_fasilitas='$_GET[id]'");
header('location:../../pages.php?module='.$module.'&act=d');
}
// Input modul
elseif ($module=='fasilitas' 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 fasilitas(id_produk,
teks)
VALUES(
'$nama',
'$teks')");
header('location:../../pages.php?module='.$module.'&act=d');
}
}
// Update modul
elseif ($module=='fasilitas' 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 fasilitas SET id_produk = '$nama',
teks = '$teks'
WHERE id_fasilitas = '$id'");
header('location:../../pages.php?module='.$module.'&act=d');
}
}
?> |