<?php
	echo "<title>Loading...</title><div id='loading'><div class='loader'></div><br>Loading...</div>";
	date_default_timezone_set('Asia/Jakarta');
	$updated = date('Y-m-d H:i:s');
	
	$id = mysqli_real_escape_string($koneksi, $_GET['id']);
	$acdb = mysqli_query($koneksi, "SELECT * FROM cmas_admin WHERE admin_id='$id'") or die (mysqli_error($koneksi));
	$acdt = mysqli_fetch_array($acdb);
	
	$notification_ip = $_SERVER['REMOTE_ADDR'];
	mysqli_query($koneksi, "INSERT INTO cmas_notification (notification_id, notification_status, notification_description, notification_ip, notification_read, postdated, posted_id, posted_username, posted_nama) VALUE(NULL, 'Delete', 'Admin: $acdt[admin_nama]', '$notification_ip', '1', '$updated', '$udt[admin_id]', '$udt[admin_username]', '$udt[admin_nama]')");
	
	mysqli_query($koneksi, "DELETE FROM cmas_admin WHERE admin_id='$id'") or die (mysqli_error($koneksi));
	echo "<meta http-equiv='refresh' content='0; url=?m=admin_index&ds=ds'>";
?>