<?php
if(isset($_SESSION['tmp_doc_pop'])) unset($_SESSION['tmp_doc_pop']);

if($_GET['action'] == "edit" && $_GET['m_id'] != ""){
	$m_id = mysql_real_escape_string(stripslashes($_GET['m_id']));
	$user_id = $_SESSION['sys_id']; 
	$orgunitid = mysql_real_escape_string(stripslashes($_GET['orgunitid']));
	$status = mysql_real_escape_string(stripslashes($_GET['status']));
	$start = (int)$_GET['start'];
	$type_io = (int)$_GET['type_io'];
	$bool = mysql_query("UPDATE tbl_manage_doc SET receive_status = 2, sysuserid = '$user_id' WHERE m_id = $m_id AND orgunitid = $orgunitid ");
	if($bool){
		header("Location: ?d=document/list_docin/confirm_doc&orgunitid=$orgunitid&status=$status&type_io=$type_io&start=$start");
	}else{
		$err = "<script>document.getElementById('msgwar').innerHTML = \"<span class = 'error'>ຢືນຢັນການຮັບ ລົ້ມເຫຼວ, ກະລຸນາລອງໃໝ່....!</span>\"</script>";
	} 
	
}