<?php
require("../../config/koneksi.php");
require("../../config/function.php");
require("../../config/crud.php");
$kode = $_POST['id'];
cek_session_guru();
$query = "SELECT * FROM materi WHERE id_materi='".$kode."'";
		$sql = mysqli_query($koneksi, $query); 
		$data = mysqli_fetch_array($sql);

		if(is_file("../../datafile/".$data['file'])) 
			unlink("../../datafile/".$data['file']); 
$exec = mysqli_query($koneksi, "DELETE FROM materi WHERE id_materi='$kode'");
$exec = mysqli_query($koneksi, "DELETE FROM chating WHERE materi='$kode'");

$exec = mysqli_query($koneksi, "DELETE FROM absen_daring WHERE materi='$kode'");
