<?php
    include('../loginsession.php');
    error_reporting(E_ALL);
    $filename = __FILE__;  //---Nama file saat ini
    if (strlen(__FILE__) > 48) {$filename = substr(__FILE__, 48);}
    $save = mysqli_query($conn, "INSERT INTO novia_abc_user_logs (userid,filename) VALUES ('$userini_id','$filename')");
//-------------
    if(isset($_GET['id'])){
        $id = $_GET['id'];
    }
    if(isset($_GET['check'])){
        $check = $_GET['check'];
    }
    
    $hapus = mysqli_query($conn, "DELETE FROM novia_abc_diary WHERE id = $id");
    
    if($hapus && $check == "0"){
    echo "<script>document.location='index.php?check=0'</script>";
    }
    if($hapus && $check == "1"){
        echo "<script>document.location='index.php?check=1'</script>";
    }
