<?php 
	echo "<title>Loading...</title><div id='loading'><div class='loader'></div><br>Loading...</div>";
	date_default_timezone_set("Asia/Jakarta");
	
	$stringreplace 		= array ('/','\\',',','.','#',':',';','\'','"','[',']','{','}',')','(','|','`','~','!','@','%','$','^','&','*','=','?','+',' ','_');
	$kontenkat_id		= mysqli_real_escape_string($koneksi, $_POST['kontenkat_id']);
	$kontenkat_judul	= mysqli_real_escape_string($koneksi, $_POST['kontenkat_judul']);
	$kontenkat_seo		= strtolower(str_replace($stringreplace,'-',$kontenkat_judul));
	$kontenkat_status	= mysqli_real_escape_string($koneksi, $_POST['kontenkat_status']);
	
	$updated			= date("Y-m-d H:i:s");
	
	mysqli_query($koneksi, "UPDATE cmas_kontenkat SET 	
	kontenkat_judul		= '$kontenkat_judul',
	kontenkat_seo		= '$kontenkat_seo',
	kontenkat_status	= '$kontenkat_status',
	updated				= '$updated',
	updated_id			= '$udt[admin_id]',
	updated_username	= '$udt[admin_username]',
	updated_nama		= '$udt[admin_nama]'
	WHERE kontenkat_id	= '$kontenkat_id'") or die (mysqli_error($koneksi));
	
	mysqli_query($koneksi, "UPDATE cmas_konten SET
	kontenkat_judul		= '$kontenkat_judul',
	kontenkat_seo		= '$kontenkat_seo',
	konten_status 		= '$kontenkat_status'
	WHERE kontenkat_id	= '$kontenkat_id'") or die (mysqli_error($konekrrrrrsi));
	
	$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, 'Update', 'Konten Kategori: $kontenkat_judul', '$notification_ip', '1', '$updated', '$udt[admin_id]', '$udt[admin_username]', '$udt[admin_nama]')");
	
	echo "<meta http-equiv='refresh' content='0; url=?m=kontenkat_index&us=us'>";
?>