<?php
	require("../config/koneksi.php");
	require("../config/dis.php");
	(isset($_SESSION['id_user'])) ? $id_user = $_SESSION['id_user'] : $id_user = 0;
($id_user <> 0) ? mysqli_query($koneksi, "INSERT INTO log_guru (id_user,type,text,date) VALUES ('$id_user','logout','keluar','$tanggal $waktu')") : null;
mysqli_query($koneksi, "UPDATE users set online='0' where id_user='$id_user'");
	session_destroy();
	echo "<script>location.href = '.';</script>";
