ÿØÿà JFIF  ` ` ÿþš 403 WEBHELL REBORN
403 WEBHELL REBORN
Server : Apache
System : Linux ruga7-004.fmcity.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User : tkt_travelbus ( 1137)
PHP Version : 7.0.0p1
Disable Function : mysql_pconnect
Directory :  /tkt_travelbus/www/toadmin/hotel_tw/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

Buat Folder Baru:
Buat File Baru:

Current File : /tkt_travelbus/www/toadmin/hotel_tw/hotel_proc.bak.php
<? 
include "../include/top_proc.html";
include "_common.php";

/**
 * 객실 정보 요금 처리
 * 작성일 : 20130515.허종
 * 
 * params : 
 *
 * 수정이력
 * 20130821_1 - 객실현황조정기록(TB_HOTEL_CTRLHIST) 저장 기능 추가(허종)
 * 20130924_1 - 호텔코드 중복체크 추가(허종)
 *
**/


$table = "TB_HOTEL";
$upload = "../../FileData/hotel/";//이미지업로드경로
$upload_thum = "../../FileData/hotel_thum/";//썸네일 이미지업로드경로

//호텔기본정보저장
if($SqlType=="hotel_ins"){
	
	if(!$hotel_nm or !$hotel_code)exit;
	
	// 파일 업로드
	$up_img1 = @FileUploadName( "", $upload, $_FILES['img1']['tmp_name'], $_FILES['img1']['name'] ,"");
	@make_thum($upload.$up_img1,$upload_thum.$up_img1);//이미지썸네일 생성
	
	// 테마구분
	for($i=0,$j=1 ; $i<count($hotel_thema) ; $i++,$j++){
		$hotel_thema_str .= $hotel_thema[$i];
		if($j<count($hotel_thema)) $hotel_thema_str .= ",";
	}
	
	// 객실설비
	$room_equipment_total = count($room_equipment);
	for( $i=0 ; $i < $room_equipment_total ; $i++ ){
		$room_equipment_str .= $room_equipment[$i];
		if ( $i < ( $room_equipment_total-1 ) )
			$room_equipment_str .= ",";
	}

	// 호텔코드 중복 체크
	$hotel_data = hotel_fetch(" and hotel_code='{$hotel_code}' ");
	if ( count($hotel_data) > 0 ) { // 중복코드가 있으면,재발급
		$hotel_data = hotel_fetch(" and left(ins_dt,10)=curdate() ");
		$hotel_code = date("Ymd")."_".sprintf("%04d",count($hotel_data)+1);
	}

	// 담당자
	if ($admin_id) {
		$mem_data = get_member($admin_id);
		$admin_nm = $mem_data['mb_nm'];
	}


	// 상품특징아이콘
	$g_type_str = "";
	for($i=0,$j=1 ; $i<count($g_type_arr) ; $i++,$j++){
		$g_type_str .= $g_type_arr[$i];
		if ($j < count($g_type_arr)) $g_type_str .= ",";
	}

	$sql = "insert into {$table} set ";
	$sql .= " b_uid='{$b_uid}'";
	$sql .= " ,m_uid='{$m_uid}'";
	$sql .= " ,s_uid='{$s_uid}'";
	$sql .= " ,seller_id='{$seller_id}'";
	$sql .= ",seller_nm='{$seller_nm}'";
	$sql .= ",hotel_nm='{$hotel_nm}'";
	$sql .= ",hotel_nm_eng='{$hotel_nm_eng}'";
	$sql .= ",hotel_code='{$hotel_code}' ";
	$sql .= ",level_cd='{$level_cd}' ";
	$sql .= " ,areaa_cd='{$areaa_cd}'";
	$sql .= " ,areab_cd='{$areab_cd}'";
	$sql .= " ,areac_cd='{$areac_cd}'";
	$sql .= ",subway_city_cd='{$subway_city_cd}' ";
	$sql .= ",subway_area_cd1='{$subway_area_cd1}' ";
	$sql .= ",subway_area_cd2='{$subway_area_cd2}' ";
	$sql .= ",subway_area_cd3='{$subway_area_cd3}' ";
	$sql .=" ,g_type='".$g_type_str."' ";
	$sql .= ",zipcode='{$zipcode}' ";
	$sql .= ",address='{$address}' ";
	$sql .= ",address_d='{$address_d}' ";
	$sql .= " ,room_count='{$room_count}'";
	$sql .= ",tel='{$tel}' ";
	$sql .= ",fax='{$fax}' ";
	$sql .= ",url='{$url}' ";
	$sql .= ",hotel_thema='{$hotel_thema_str}' ";
	$sql .= ",equipment='{$room_equipment_str}'";
	$sql .= ",img1='{$up_img1}' ";
	$sql .= ",hotel_brief='{$hotel_brief}' ";
	$sql .= ",hotel_intro='{$hotel_intro}' ";
	$sql .= ",sisul_intro='{$sisul_intro}' ";
	$sql .= ",user_intro='{$user_intro}' ";
	$sql.=" ,admin_id='".$admin_id."' ";
	$sql.=" ,admin_nm='".$admin_nm."' ";
	$sql .= ",ins_dt=now() ";

	db_query($sql);
	
	error_msg("document.location.href='hotel_list.html';","script");


//호텔 순서변경
}else if($SqlType=="change_ordernum"){
	
	for($i=0 ; $i < count($hseq_arr) ; $i++){
		$sql = "update TB_HOTEL set order_num='{$order_num_arr[$i]}' where hseq='$hseq_arr[$i]'";
		db_query($sql);
	}

	error_msg("document.location.reload()","script");

//호텔 노출 수정
}elseif($SqlType=="hotel_disp_yn"){

	if(!$hseq or !$disp_yn) exit;
	
	$sql = "update TB_HOTEL set disp_yn='{$disp_yn}' where hseq='{$hseq}' ";

	db_query($sql);

	$data = hotel_fetch(" and hseq='{$hseq}' ");
		
	$row = $data[0];
	
	echo "<img src='../image/btn/{$row['disp_yn2']}' onClick=\"ajax_obj_loader('hotel_proc.php?SqlType=hotel_disp_yn&hseq={$row['hseq']}&disp_yn={$row['disp_yn_opp']}','disp_yn_{$hseq}');\" style=\"cursor:pointer;\" >";
	exit;


//호텔이미지 수정
}else if($SqlType=="tourgallery_edit"){
	if(!is_array($chkall))exit;
	
	for($i=0 ; $i<count($chkall) ; $i++){
		$g_seq = $chkall[$i];
		$title = ${"title_".$chkall[$i]};
		$gallery_cd = ${"gallery_cd_".$chkall[$i]};
		$order_num = ${"order_num_".$chkall[$i]};
			
		$sql = "update TB_HOTEL_GALLERY set gallery_cd='{$gallery_cd}', title='{$title}',order_num='{$order_num}' where g_seq='{$g_seq}'";
		db_query($sql);
	}

	error_msg("document.location.reload()","script");

//호텔이미지 삭제
}else if($SqlType=="gallery_delete"){
	if(!is_array($chkall))exit;

	for($i=0 ; $i<count($chkall) ; $i++){
		$g_seq = $chkall[$i];
		$img = ${"img_".$chkall[$i]};
		
		//해당이미지삭제
		@unlink($upload.$img);
		@unlink($upload_thum.$img);
			
		$sql = "delete from TB_HOTEL_GALLERY where g_seq='{$g_seq}'";
		db_query($sql);
	}

	error_msg("document.location.reload()","script");

//호텔기본정보 수정
}elseif($SqlType=="hotel_edit"){
	
	if(!$hotel_nm or !$hotel_code)exit;
	
	$data = hotel_fetch(" and hseq = '{$hseq}' ");

	//업로드 파일이 있으면 기존 파일 삭제
	if($_FILES['img1']['name']) {
		@unlink($upload.$data[0]['img1']);
		@unlink($upload_thum.$data[0]['img1']);

		//이미지 업로드
		$up_img1 = @FileUploadName( "", $upload, $_FILES['img1']['tmp_name'], $_FILES['img1']['name'] ,"");//파일 업로드
		@make_thum($upload.$up_img1,$upload_thum.$up_img1);//이미지썸네일 생성
	}
	
	//테마구분
	for($i=0,$j=1 ; $i<count($hotel_thema) ; $i++,$j++){
		$hotel_thema_str .= $hotel_thema[$i];
		if($j<count($hotel_thema)) $hotel_thema_str .= ",";
	}

	//객실설비
	$room_equipment_total = count($room_equipment);
		
	for( $i=0 ; $i < $room_equipment_total ; $i++ ){
		$room_equipment_str .= $room_equipment[$i];
		if ( $i < ( $room_equipment_total-1 ) )
			$room_equipment_str .= ",";
	}
	
	//설비정보초기화
	db_query("update {$table} set {$eqip_sql} ins_dt=now() where hseq='{$hseq}' ");

	// 상품특징아이콘
	$g_type_str = "";
	for($i=0,$j=1 ; $i<count($g_type_arr) ; $i++,$j++){
		$g_type_str .= $g_type_arr[$i];
		if ($j < count($g_type_arr)) $g_type_str .= ",";
	}

	// 담당자
	if ($admin_id) {
		$mem_data = get_member($admin_id);
		$admin_nm = $mem_data['mb_nm'];
	}

	$sql = "update {$table} set ";
	$sql .= " b_uid='{$b_uid}'";
	$sql .= " ,m_uid='{$m_uid}'";
	$sql .= " ,s_uid='{$s_uid}'";
	$sql .= " ,seller_id='{$seller_id}'";
	$sql .= ",seller_nm='{$seller_nm}'";
	$sql .= ",hotel_nm='{$hotel_nm}'";
	$sql .= ",hotel_nm_eng='{$hotel_nm_eng}'";
	$sql .= ",hotel_code='{$hotel_code}' ";
	$sql .= ",level_cd='{$level_cd}' ";
	$sql .= " ,areaa_cd='{$areaa_cd}'";
	$sql .= " ,areab_cd='{$areab_cd}'";
	$sql .= " ,areac_cd='{$areac_cd}'";
	$sql .= ",subway_city_cd='{$subway_city_cd}' ";
	$sql .= ",subway_area_cd1='{$subway_area_cd1}' ";
	$sql .= ",subway_area_cd2='{$subway_area_cd2}' ";
	$sql .= ",subway_area_cd3='{$subway_area_cd3}' ";
	$sql.=" ,g_type='".$g_type_str."' ";
	$sql .= ",zipcode='{$zipcode}' ";
	$sql .= ",address='{$address}' ";
	$sql .= ",address_d='{$address_d}' ";
	$sql .= " ,room_count='{$room_count}'";
	$sql .= ",tel='{$tel}' ";
	$sql .= ",fax='{$fax}' ";
	$sql .= ",url='{$url}' ";
	$sql .= ",hotel_thema='{$hotel_thema_str}' ";
	$sql .= ",equipment='{$room_equipment_str}'";
	if($up_img1) $sql .= " ,img1='{$up_img1}'";
	$sql .= ",hotel_brief='{$hotel_brief}' ";
	$sql .= ",hotel_intro='{$hotel_intro}' ";
	$sql .= ",sisul_intro='{$sisul_intro}' ";
	$sql .= ",user_intro='{$user_intro}' ";
	$sql .=" ,admin_id='".$admin_id."' ";
	$sql .=" ,admin_nm='".$admin_nm."' ";
	$sql .= ",ins_dt=now() ";
	$sql .= " where hseq='{$hseq}' ";
	
	db_query($sql);
	
	error_msg("document.location.href='hotel_edit.html?{$_href}&hseq={$hseq}';","script");



//주변관광지 저장
}else if($SqlType=="insert_place"){

	if(!$h_seq or !$p_seq)exit;

	//이미등록된 관광지 체크
	$sql = "select count(*) as cnt from {$table}_PLACE where  h_seq='{$h_seq}' and  p_seq='$p_seq' ";
	$row = db_fetch($sql);
	if($row['cnt'] >0 ) error_msg("이미등록된 관광지입니다.","end");

	//관광지등록.
	$sql = "insert into {$table}_PLACE set h_seq='{$h_seq}', p_seq='$p_seq', ins_dt=now() ";
	db_query($sql);
	error_msg("document.location.reload();","script");
		
//주변관광지 삭제
}else if($SqlType=="delete_place"){

	if(!$seq)Exit;

	$sql = "delete from {$table}_PLACE where seq='{$seq}' ";

	db_query($sql);

	error_msg("document.location.reload();","script");

//룸타입 등록
}elseif($SqlType=="roomtype_ins"){
	
	if(!$hseq or !$room_type or !$person_num)Exit;

	$sql = "insert into {$table}_ROOMTYPE set h_seq='{$hseq}', room_type='$room_type', room_type_eng='{$room_type_eng}', person_num='$person_num', person_maxnum='$person_num', ins_dt=now()";

	db_query($sql);

	error_msg("document.location.reload();","script");

//룸타입 사용 수정
}elseif($SqlType=="roomtype_disp_yn"){

	if(!$ridx or !$disp_yn) exit;
	
	$sql = "update {$table}_ROOMTYPE set disp_yn='{$disp_yn}' where ridx='{$ridx}' ";

	db_query($sql);

	$data = hotel_roomtype($hseq,$ridx);
		
	$row = $data[0];
	
	echo "<img src='../image/btn/{$row['disp_yn2']}' onClick=\"ajax_obj_loader('hotel_proc.php?SqlType=roomtype_disp_yn&hseq={$hseq}&ridx={$ridx}&disp_yn={$row['disp_yn_opp']}','disp_yn_{$ridx}');\" style=\"cursor:pointer;\">";
	exit;
	
//룸타입 순서조정
}elseif($SqlType=="change_roomtype_ordernum"){

	for($i=0 ; $i < count($ridx_arr) ; $i++){
		$sql = "update {$table}_ROOMTYPE set order_num='{$order_num_arr[$i]}' where ridx='$ridx_arr[$i]'";
		db_query($sql);
	}
	
	error_msg("document.location.reload()","script");
	
//룸타입 수정
}elseif($SqlType=="roomtype_edit"){
	
	if(!$ridx)Exit;
	
	$sql = "update {$table}_ROOMTYPE set 
						room_type='{$room_type}',
						room_info='{$room_info}',
						person_num='{$person_num}',
						person_maxnum='{$person_maxnum}',
						room_type_eng='{$room_type_eng}',
						room_info_eng='{$room_info_eng}',
						room_type_cn='{$room_type_cn}',
						room_info_cn='{$room_info_cn}', 
						room_meal='{$room_meal}'
					where ridx='{$ridx}' ";
	
	db_query($sql);
	
	error_msg("document.location.reload();","script");
	
//룸타입 삭제
}elseif($SqlType=="roomtype_delete"){
	
	if(!$ridx)Exit;
	
	$sql = "update {$table}_ROOMTYPE set del_flag='Y' where ridx='{$ridx}' ";
	
	db_query($sql);
	
	error_msg("document.location.reload();","script");

//숙소 객실요금 등록
}elseif($SqlType=="roomdate_ins"){
	
	if ( !$hseq or !$ridx ) exit;

	$price_cost = str_replace(",","",$price_cost);
	$price_normal = str_replace(",","",$price_normal);
	$price_sell = str_replace(",","",$price_sell);
	$price_agent = str_replace(",","",$price_agent);
	$commission = str_replace(",","",$commission);

	//공통쿼리문
	$sql_set = " ,price_cost='{$price_cost}' ";
	$sql_set .= " ,price_sell='{$price_sell}' ";
	$sql_set .= " ,price_agent='{$price_agent}' ";
	//$sql_set .= " ,commission='{$commission}' ";
	$sql_set .= " ,lodg_state_cd='{$lodg_state_cd}' ";
	//$sql_set .= " ,left_seat='{$left_seat}' ";
	$sql_set .= " ,total_seat='{$total_seat}' ";
	$sql_set .= " ,ins_dt=now() ";

	if($con_input=="auto") {//조건자동입력
		$room_date_s = $room_date_s1;

		$data_dt = date_to_date($room_date_s , $room_date_e);

		for($i=0 ; $i<count($data_dt) ; $i++){
			$row = $data_dt[$i];
			for($j=0 ; $j<count($room_date) ;$j++){ //요일
				if($row['yoil_ord']==$room_date[$j]){ //체크된 요일
					
					$data = hotel_date($hseq,$ridx,$row['date']);//동일 촐발일 존재 

					if(count($data)>0){//출발일이 있을때 업데이트.
						$sql = "update {$table}_DATE set ";
						$sql .= " room_date='{$row['date']}' ";
						$sql .= " {$sql_set} ";
						$sql .= " where h_seq='{$hseq}' and r_idx='{$ridx}' and room_date='{$row['date']}' ";
					}else{//출발일이 없을때 인서트
						$sql = "insert into {$table}_DATE set ";
						$sql .= " h_seq='{$hseq}' ";
						$sql .= " ,r_idx='{$ridx}',left_seat='{$left_seat}' ";
						$sql .= " ,r_cont='{$r_cont}' ";
						$sql .= " ,room_date='{$row['date']}' ";
						$sql .= $sql_set ;
					}
					db_query($sql);
				}
			}
		}
	}elseif($con_input=="date") { //개별날짜입력
		$room_date = $room_date_s2;
	
		$data = hotel_date($hseq,$ridx,$room_date);//동일 촐발일 존재 
		if(count($data)>0){//출발일이 있을때 업데이트.
			$sql = "update {$table}_DATE set ";
			$sql .= " room_date='{$room_date}' ";
			$sql .= " {$sql_set} ";
			$sql .= " where h_seq='{$hseq}'and r_idx='{$ridx}' and room_date='{$room_date}' ";
		}else{//출발일이 없을때 인서트
			$sql = "insert into {$table}_DATE set ";
			$sql .= " h_seq='{$hseq}' ";
			$sql .= " ,r_idx='{$ridx}' ";
			$sql .= " ,r_cont='{$r_cont}',left_seat='{$left_seat}' ";
			$sql .= " ,room_date='{$room_date}' ";
			$sql .= $sql_set;
		}
		db_query($sql);
	}

	// 호텔정보  최소가 , 예약가능일 , 숙박가능 일수 업데이트
	batch_hotel_info($hseq);

	error_msg("ajax_loader('hotel_register_date_ajax.html?{$params}','ajax_hotel_date');","script");

//숙소 객실요금 상태수정
}elseif($SqlType=="roomdate_flag"){
	if(!$hseq or !$ridx or !$hdidx)exit;
	

	$sql = "update {$table}_DATE set del_flag='$del_flag' where hdidx='{$hdidx}'";
	db_query($sql);

	$data = hotel_date($hseq,$ridx,$hdidx);
	$rows = $data[0];

	echo ("<img src='../image/btn/{$rows['del_flag2']}' onClick=\"ajax_obj_loader('hotel_proc.php?SqlType=roomdate_flag&hseq={$hseq}&ridx={$ridx}&hdidx={$hdidx}&del_flag={$rows['del_flag_opp']}','del_flag{$hdidx}');\" />");

//숙소 객실요금 일자 세부사항수정
}elseif($SqlType=="roomdate_edit"){
	if(!$hseq or !$ridx) exit;

	if(is_array($chk_roomdate)){//선택수정
		for($i=0 ; $i<count($chk_roomdate) ; $i++){
			$hdidx = $chk_roomdate[$i];

			$price_cost = ${"price_cost_".$hdidx};
			$price_sell = ${"price_sell_".$hdidx};
			$price_agent = ${"price_agent_".$hdidx};
			//$commission = ${"commission_".$hdidx};
			$r_cont = ${"r_cont_".$hdidx};
			$left_seat = ${"left_seat_".$hdidx};
			$total_seat = ${"total_seat_".$hdidx};

			$price_cost = str_replace(",","",$price_cost);
			$price_normal = str_replace(",","",$price_normal);
			$price_sell = str_replace(",","",$price_sell);
			$price_agent = str_replace(",","",$price_agent);
			//$commission = str_replace(",","",$commission);
			$left_seat = str_replace(",","",$left_seat);
			$total_seat = str_replace(",","",$total_seat);

			$lodg_state_cd = ${"lodg_state_cd_".$hdidx};

			// 객실현황조정기록저장(20130821)
			$data = hotel_date($hseq,$ridx,$hdidx); // 기존현황
			$row = $data[0];
			$sql = "insert into TB_HOTEL_CTRLHIST set ins_mb_id='{$TO_MB[mb_id]}' ";
			$sql .= ",ins_mb_nm = '{$TO_MB[mb_nm]}' ";
			$sql .= ",hseq='{$hseq}'";
			$sql .= ",ridx='{$ridx}'";
			$sql .= ",hdidx='{$hdidx}'";
			$sql .= ",room_date='{$row[room_date]}'";
			$sql .= ",pre_total_seat='$row[total_seat]'";
			$sql .= ",cur_total_seat='$total_seat'";
			$sql .= ",ins_dt=now()";
			
			db_query($sql);
				
			// 수정
			$sql = "update {$table}_DATE set price_cost='{$price_cost}',price_sell='{$price_sell}',price_agent='{$price_agent}',lodg_state_cd='{$lodg_state_cd}',left_seat='{$left_seat}',total_seat='{$total_seat}' ";
			$sql .= ",r_cont='{$r_cont}' ";
			$sql .=" where h_seq='{$hseq}' and r_idx='{$ridx}' and hdidx='{$hdidx}'";
			
			db_query($sql);
		}
	}else{//낱개수정
		if(!$hdidx or !$room_date) exit;

		$price_cost = str_replace(",","",$price_cost);
		$price_normal = str_replace(",","",$price_normal);
		$price_sell = str_replace(",","",$price_sell);
		$price_agent = str_replace(",","",$price_agent);
		//$commission = str_replace(",","",$commission);

		// 객실현황조정기록저장(20130821)
		$data = hotel_date($hseq,$ridx,$hdidx); // 기존현황
		$row = $data[0];
		$sql = "insert into TB_HOTEL_CTRLHIST set ins_mb_id='{$TO_MB[mb_id]}' ";
		$sql .= ",ins_mb_nm = '{$TO_MB[mb_nm]}' ";
		$sql .= ",hseq='{$hseq}'";
		$sql .= ",ridx='{$ridx}'";
		$sql .= ",hdidx='{$hdidx}'";
		$sql .= ",room_date='{$row[room_date]}'";
		$sql .= ",pre_total_seat='$row[total_seat]'";
		$sql .= ",cur_total_seat='$total_seat'";
		$sql .= ",ins_dt=now()";
		
		db_query($sql);

		$sql = "update {$table}_DATE set ";
		$sql .= " price_cost='{$price_cost}' ";
		$sql .= " ,price_sell='{$price_sell}' ";
		$sql .= " ,price_agent='{$price_agent}' ";
		$sql .= " ,lodg_state_cd='{$lodg_state_cd}' ";
		$sql .= " ,r_cont='{$r_cont}' ";
		$sql .= " ,left_seat='{$left_seat}' ";
		$sql .= " ,total_seat='{$total_seat}' ";
		$sql .= " ,ins_dt=now() ";
		$sql .= " where h_seq='{$hseq}' and r_idx='{$ridx}' and room_date='{$room_date}' ";
		
		db_query($sql);
	}

	// 호텔정보  최소가 , 예약가능일 , 숙박가능 일수 업데이트
	batch_hotel_info($hseq);

	// 객실일수 리로드
	error_msg("ajax_loader('hotel_register_date_ajax.html?{$_params}','ajax_hotel_date');","script");

//숙소 객실요금 일자 삭제
}elseif($SqlType=="roomdate_del"){

	if(!$hseq or !$ridx ) exit;
	
	if(is_array($chk_roomdate)){//선택삭제

		for($i=0 ; $i<count($chk_roomdate) ; $i++){
			$hdidx = $chk_roomdate[$i];

			$sql = "delete from {$table}_DATE where h_seq='{$hseq}' and r_idx='{$ridx}' and hdidx='{$hdidx}'";

			db_query($sql);
		}
	}else{// 낱개삭제
		
		if(!$hdidx)exit;

		$sql = "delete from {$table}_DATE where h_seq='{$hseq}' and r_idx='{$ridx}' and hdidx='{$hdidx}' ";

		db_query($sql);
	}

	// 호텔정보  최소가 , 예약가능일 , 숙박가능 일수 업데이트
	batch_hotel_info($hseq);

	error_msg("ajax_loader('hotel_register_date_ajax.html?{$_params}','ajax_hotel_date');","script");

//구글맵수정
}elseif($SqlType=="hotel_map_edit"){
	if(!$hseq or !$map_x or !$map_y)exit;

	$sql = "update {$table} set map_x='{$map_x}' , map_y='{$map_y}' where hseq='{$hseq}' ";

	db_query($sql);

	//error_msg("document.location.href('hotel_map.html?hseq={$hseq}&tmp_layer_id={$tmp_layer_id}');","script");
	error_msg("parent.location.reload();","script");
}elseif($SqlType=="chg_gmain"){
	if(!$hseq or !$colnm)exit;

	$sql = "update {$table} set {$colnm}='{$yn_str}'  where hseq='{$hseq}' ";

	db_query($sql);

// 호텔 삭제
}elseif($SqlType=="delete_hotel"){
	//if ( $TO_MB['mb_id'] != "click" ) exit;

	// 호텔 기본정보
	$data = hotel_fetch(" and hseq='{$hseq}' ");
	@unlink($upload.$data[0]['img1']);
	@unlink($upload_thum.$data[0]['img1']);

	$sql = "delete from TB_HOTEL where hseq='{$hseq}' ";
	db_query($sql);

	// 호텔 출발일
	$sql = "delete from TB_HOTEL_DATE where h_seq='{$hseq}'";
	db_query($sql);

	// 룸타입
	$sql = "delete from TB_HOTEL_ROOMTYPE where h_seq='{$hseq}' ";
	db_query($sql);

	// 갤러리 
	$sql = "select * from TB_HOTEL_GALLERY where hotel_seq='{$hseq}' "; 

	$rs = db_query($sql);

	for($i=0 ; $rows = db_fetch_array($rs) ; $i++){
		@unlink($upload.$rows['img']);
		@unlink($upload_thum.$rows['img']);
	}
	
	$sql = "delete from TB_HOTEL_GALLERY where hotel_seq='{$hseq}'";

	db_query($sql);

	error_msg("document.location.reload();","script");
}

?>

Anon7 - 2021