<?
require_once('include/global.php');
require_once('include/mail_lib.php');
require_once('include/file.php');
require_once('conf.inc.php');

set_time_limit(1200);
page_loading_view("편지함을 모두 읽음 표시 처리하고 있습니다.");

// check
	if (!$_GET['mb_id'])
		msg('올바른 URL로 접근하여 주십시오');


// data

	// db update
	$now = date('Y-m-d H:i:s');
	$sql = " UPDATE " .
		$AUTH[auth_m_mf_table] .
		" SET 
			mf_is_read='Y', 
			mf_is_read_date = '" . $now . "' 
		WHERE mf_is_read='N' 
		AND m_no='". $AUTH['auth_m_no'] . "' 
		AND mb_id='" . $_GET['mb_id'] . "'";
	db_query($sql);

// end
	#msg("편지함을 비웠습니다.", 0);
	if (!$_GET['back_url'])
		$_GET['back_url'] = 'mail_box.php';
	movepage($_GET['back_url']);


require_once('include/global_end.php');
?>