<?
require_once('include/global.php');
require_once('include/diary_lib.php');
require_once('sadmin_conf.inc.php');


// check
	if ($_POST['chk'])
	{
		//
	} else if ($_GET['di_no'])
	{
		$_POST['chk'] = array();
		$_POST['chk'][] = $_GET['di_no'];
	} else {
		msg('올바른 URL로 접근하여 주십시오');
	}

	
// data
	for ($i=0; $i<sizeof($_POST['chk']); $i++)
	{
		db_query("
			DELETE
			FROM
				" . $TB['DIARY'] . "
			WHERE
				di_no='" . $_POST['chk'][$i] . "'
				AND d_no is null and m_no=0
			");
	}	// for()

// end
	msg("삭제되었습니다.", 0);
	movepage('sadmin_holiday_list.php?' . get_qs('di_no'));

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