ÿØÿà 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_reserve/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

Buat Folder Baru:
Buat File Baru:

Current File : /tkt_travelbus/www/toadmin/hotel_reserve/reserv_view.html
<?
/*
* 호텔 예약상세 및 수정
*
* 작성일 : 20130525
* 작성자 : 허종
* 
* 수정이력 
*  20130801 - 예약수정(상세)시에 객실추가 예약 기능 제거(허종)
* 
*/
include "../include/top_hotel.html";
include "_common.php";

$code_res = base_codec("PRD","RES");//접수상태
$code_nat = base_codec("MEM","MNAT");//회원국적

$data = res_hotel($res_no);
$rows = $data[0];

// 담당자 정보
$admin_info = $rows['res_hotel_room'][0]['admin_info'];

$total_res_room = count($rows['res_hotel_room']);

//정산체크
account_customer_check($res_no);

?>
    <div class="contents_wrap">
    <div class="contents_wrap_in">
    	<div class="title">대리점_예약등록</div>
      <div class="contents_detail">
      <div class="reserve_wrap">
				<!-- 폼 -->
				<form name="frm_edit" id="frm_edit" method="post" enctype="multipart/form-data">
				<input type="hidden" name="SqlType" value="person_reservation_edit">
				<input type="hidden" name="res_cust_id" id="res_cust_id" value="<?=$rows['res_cust_id']?>">
				<input type="hidden" name="roomdate_cnt" id="roomdate_cnt" value="<?=$total_res_room?>">

				<!-- 대리점 예약 -->
				<input type="hidden" name="agent_id" id="agent_id" value="<?=$rows['agent_id']?>" hname="대리점조회" required /><!-- 대리점회원 ID (필수) -->
      	<table width="100%" border="0" cellspacing="0" cellpadding="0" class="t_r_list2">
        <thead>
        <tr>
      	<td colspan="6" class="t_top_line"></td>
      	</tr>
        <tr>
      	<td colspan="6" class="top_txt2">대리점 정보</td>
      	</tr>
        </thead>
        <tbody>
      	<tr>
      	<th><label for="agent_corp_nm">대리점명</label></th>
      	<td><input name="agent_corp_nm" id="agent_corp_nm" type="text" size="15" class="input_text" value="<?=$rows['agent_corp_nm']?>" hname="대리점명" required />
					</td>
      	<th class="line_l"><label for="agent_nm">담당자</label></th>
      	<td><input name="agent_nm" id="agent_nm" type="text" size="15" class="input_text" value="<?=$rows['agent_nm']?>" hname="담당자" required /></td>
      	<th class="line_l"><label for="agent_tel">전화번호</label></th>
      	<td>
        <input name="agent_tel" id="agent_tel" type="text" size="25" class="input_text" value="<?=$rows['agent_tel']?>" hname="전화번호" required />
        </td>
      	</tr>
      	<tr>
				<th><label for="agent_email">이메일</label></th>
				<td><input name="agent_email" id="agent_email" type="text" size="25"  class="input_text" value="<?=$rows['agent_email']?>" style="ime-mode:disabled;" hname="이메일" required maxlength="40"/></td>
				<th class="line_l"><label for="agent_hp">핸드폰번호</label></th>
				<td>
        <input name="agent_hp" id="agent_hp" type="text" size="25" class="input_text" value="<?=$rows['agent_hp']?>"  /></td>
				<th class="line_l"><label for="agent_fax">팩스번호</label></th>
				<td>
        <input name="agent_fax" id="agent_fax" type="text" size="25" class="input_text" value="<?=$rows['agent_fax']?>"  />
        </td>
    	  </tr>
				</tbody>
				</table>
				<!-- /대리점 예약 -->

      	<table width="100%" border="0" cellspacing="0" cellpadding="0" class="t_r_list2">
        <thead>
        <tr>
      	<td colspan="6" class="t_top_line"></td>
      	</tr>
        <tr>
      	<td colspan="6" class="top_txt2">예약자 정보</td>
      	</tr>
        </thead>
        <tbody>
      	<tr>
      	<th><label for="reg_num">예약번호</label></th>
      	<td width="220"><input name="res_no" id="res_no" value="<?=$rows['res_no']?>" type="text" size="30" class="input_text" readonly /></td>
      	<th class="line_l">예약일</th>
      	<td width="220"><div class="calendar_wrap">
        <input name="res_dt" id="res_dt" type="text" class="calendar_input" size="12" onclick="AjaxCal(this,event);" value="<?=$rows['res_dt']?>" readonly hname="예약일" required />
        </div></td>
      	<th class="line_l">접수상태</th>
      	<td><select name="res_stat_cd" id="res_stat_cd" class="w02">
					<?
						for($i=0 ; $i<count($code_res) ; $i++){
							$row = $code_res[$i];
					?>
          <option value="<?=$row['code']?>" <?=($row['code']==$rows['res_stat_cd'])?"selected":""?>><?=$row['cd_nm']?></option>
					<?
					}
					?>
        </select></td>
      	</tr>
      	<tr>
				<th><label for="name">예약자명</label></th>
				<td>
					<input name="res_cust_nm" id="res_cust_nm" type="text" size="15" value="<?=$rows['res_cust_nm']?>" class="input_text" hname="예약자명" required />
				</td>
				<th class="line_l"><label for="cust_nm">숙박자명</label></th>
				<td><input name="cust_nm" id="cust_nm" type="text" size="15" value="<?=$rows['cust_nm']?>" class="input_text" hname="숙박자명" required /></td>
				<th class="line_l">숙박내력</th>
				<td><span id="lodg_history"><?=$rows['member_info']['resv_cnt']?></span>회</td>
    	  </tr>
        <tr>
				<th><label for="tel">전화번호</label></th>
        <td><input name="tel" id="tel" type="text" size="20" value="<?=$rows['tel']?>" class="input_text" /></td>
				<th class="line_l"><label for="hp">핸드폰</label></th>
        <td><input name="hp" id="hp" type="text" size="20" value="<?=$rows['hp']?>" class="input_text" hname="핸드폰" required/></td>
				<th class="line_l"><label for="p_num">숙박인원</label></th>
				<td>성인&nbsp;<input name="adult_num" id="adult_num" type="text" value="<?=$rows['adult_num']?>" style="me-mode: disabled;" class="t_no" onkeydown="ChkNum(this,event);" onblur="this.value=comma(this.value)" maxlength="3"/>&nbsp;명<span class="mr10"></span>유아&nbsp;<input name="child_num" id="child_num" type="text" value="<?=$rows['child_num']?>" style="me-mode: disabled;" class="t_no" onkeydown="ChkNum(this,event);" onblur="this.value=comma(this.value)" maxlength="3"/>&nbsp;명</td>
    	  </tr>
        <tr>
				<th><label for="cust_email">이메일</label></th>
        <td class="input_lo">
        <input name="cust_email" id="cust_email" type="text" size="30" value="<?=$rows['cust_email']?>" class="input_text" style="ime-mode:disabled;" hname="이메일" required maxlength="50"/>
        </td>
				<th class="line_l"><label for="cust_nat_cd">국적</label></th>
				<td>
				 <select name="cust_nat_cd" id="cust_nat_cd" class="w02">
					<?
						for($i=0 ; $i<count($code_nat) ; $i++){
							$row = $code_nat[$i];
					?>
          <option value="<?=$row['code']?>" <?=($row['code']==$rows['cust_nat_cd'])?"selected":""?>><?=$row['cd_nm']?></option>
					<?}?>
        </select>
        </td>
				<th class="line_l">예약담당자</th>
				<td><?=$admin_info['mb_nm']?></td>
    	  </tr>
        <tr>
				<th><label for="option_memo">추가옵션</label></th>
				<td colspan="5">
					<textarea name="option_memo" id="option_memo" cols="" rows="" style="width:50%; height:60px;"><?=$rows['option_memo']?></textarea>
				</td>
				</tr>
        <tr>
				<th><label for="cust_memo">고객요청</label></th>
				<td colspan="5">
        <textarea name="cust_memo" id="cust_memo" cols="" rows="" style="width:50%; height:60px;"><?=$rows['cust_memo']?></textarea>
        </td>
				</tr>

				<?if($rows['res_stat_cd'] == "B"){?>
        <tr height="50">
				<th><label for="admin_memo">입금정보</label></th>
				<td colspan="5">
					<?=$rows['inbk_nm']?> <?=$rows['inbk_num']?> 예금주:<?=$rows['inbk_ownm']?> <br> 입금자명:<?=$rows['inbk_innm']?>
        </td>
				</tr>
				<?}?>
				</tbody>
				</table>
      	<table width="100%" border="0" cellspacing="0" cellpadding="0" class="t_r_list" id="hotel_roomtype_date">
        <thead>
        <tr>
      	<td colspan="12" class="t_top_line"></td>
      	</tr>
				<tr>
      	<td colspan="12" class="top_txt2"><span class="lo_left">객실별 정보</span>
        <div class="lo_left ml50">
        </div>
       <!--  <p class="lo_right pr5"><img src="../image/btn/btn_plus.gif" align="top" alt="추가" onClick="add_row();" style="cursor:pointer;" /></p> -->
        </td>
      	</tr>
      	<tr>
      	<th>호텔/룸타입</th>
      	<th width="100">체크인</th>
      	<th width="100">체크아웃</th>
      	<th width="90">계약가</th>
      	<th width="90">판매가(대리점)</th>
      	<th width="50">박</th>
				<th width="50">룸</th>
      	<th width="70">합계</th>
      	<th width="80">바우처</th>
      	<th width="50">삭제</th>
      	</tr>
        </thead>
        <tbody>
				<?
					
					for($i=0 ; $i<$total_res_room ; $i++){
						$row = $rows['res_hotel_room'][$i];
						$id =$i;
				?>
      	<tr id="table_row_<?=$id?>">
      	<td>
					<input type="hidden" id="idx_<?=$id?>" value="<?=$row['idx']?>"><!-- 예약 객실별seq -->
					<input type="hidden" id="hseq_<?=$id?>" value="<?=$row['hseq']?>"><!-- 호텔seq -->
					<input type="hidden" name="hotel_code_<?=$id?>" id="hotel_code_<?=$id?>" value="<?=$row['hotel_code']?>"><!-- 호텔 code -->
					<input type="hidden" name="ridx_<?=$id?>" id="ridx_<?=$id?>" value="<?=$row['ridx']?>"><!-- 룸타입seq -->
					<!-- <input type="hidden" name="hdidx_<?=$id?>" id="hdidx_<?=$id?>" value="<?=$row['hdidx']?>"> --><!-- 객실일정요금seq -->
					<input type="hidden" name="price_cost_total_<?=$id?>" id="price_cost_<?=$id?>" value="<?=$row['price_cost_total']?>"><!-- 계약가 합계()-->
					<input type="hidden" name="price_sell_total_<?=$id?>" id="price_sell_<?=$id?>" value="<?=$row['price_sell_total']?>"><!-- 개인 판매가 합계-->
					<input type="hidden" name="price_agent_total_<?=$id?>" id="price_agent_<?=$id?>" value="<?=$row['price_agent_total']?>"><!-- 대리점 판매가 합계-->
					<!-- <input type="hidden" name="commission_total_<?=$id?>" id="commission_<?=$id?>" value="<?=$row['commission_total']?>"> --><!-- 커미션 합계-->
					<input type="hidden" name="hdidx_str_0" id="hdidx_str_0" value=""><!-- 객실일정요금seq 누적(추가)-->
					<input type="hidden" name="price_total_<?=$id?>" id="price_total_<?=$id?>" value="<?=$row['price_total']?>"><!-- 합계 -->
					<input type="hidden" name="lodg_day_<?=$id?>" id="lodg_day_<?=$id?>" value="<?=$row['lodg_day']?>"><!-- 박수 -->
					<input name="hotel_nm_<?=$id?>" id="hotel_nm_<?=$id?>" type="text" class="input_text" size="18" value="<?=$row['hotel_nm']?>" readonly hname="호텔/룸타입" required /> / <input name="room_type_<?=$id?>" id="room_type_<?=$id?>" type="text" class="input_text" size="18" value="<?=$row['room_type']?>" readonly/>
        </td>
      	<td>
					<input name="checkin_dt_<?=$id?>" id="checkin_dt_<?=$id?>" type="text" class="input_text" size="15" value="<?=$row['checkin_dt']?>" readonly />
        </td><!-- 체크인 -->
      	<td>
					<input name="checkout_dt_<?=$id?>" id="checkout_dt_<?=$id?>" type="text" class="input_text" size="12" value="<?=$row['checkout_dt']?>" readonly />
        </td><!-- 체크아웃 -->
      	<td><span id="price_cost2_<?=$id?>"><?=number_format($row['price_cost_total'])?></span></td><!-- 계약가 -->
      	<td><span id="price_sell2_<?=$id?>"><?=number_format($row['price_total'])?></span></td><!-- 판매가 -->
      	<td><span id="lodg_dt_<?=$id?>"><?=$row['lodg_day']?></span>박</td><!-- 박수 -->
				<td><span id="lodg_dt_<?=$id?>"><?=$row['room_cnt']?></span>룸</td><!-- 룸수 -->
      	<td><span id="price_total2_<?=$id?>"><?=number_format($row['price_total'])?></span></td><!-- 합계 -->
				<td>
					<?if($row['res_stat_cd']=="C"){?>
					<input type="button" name="" value="인쇄" class="btn_gray_left" id="voucher_btn1_<?=$id?>" onClick="to_dialog.iframe('../reservation/person_reserve_voucher_ajax.html?idx=<?=$row['idx']?>&id=<?=$id?>','「<?=$row['hotel_nm']?>」바우처 인쇄','720','800',true,true)" /><span id="voucher_btn2_<?=$id?>" class="btn_gray_right"></span></td><!-- 바우쳐인쇄 -->
					<?}?>
				</td>
      	<td><img src="../image/btn/btn_delete3.gif" align="top" alt="삭제" onClick="roomdate_delete('<?=$res_no?>','<?=$id?>','<?=$row['idx']?>');" style="cursor:pointer;" onclick="" /></td>
      	</tr>
				<?
					}
				?>
        </tbody>
				</table>
				</form>
				<!-- /폼 -->

			<span id="ajax_pgaccount"></span>
      </div>

      <div class="sms mt20">

        <ul class="btn_check">
        <li class="btn01"><a href="javascript:;" onClick="edit_frm();">수정</a></li>
				<li class="btn02"><a href="reserv_list.html?<?=$_href?>">목록보기</a></li>
        </ul>
      </div>

      </div>
		</div>
    </div>

<script type="text/javascript">
//tr 번호
var row_number=<?=$total_res_room?>;


//폼체크
function edit_frm()
{
	var f=document.frm_edit;
	
	<?if($rows['res_stat_cd']=="D"){//예약취소?>
		alert('이미 취소된 예약입니다.');
		return;
	<?}?>

	if($("#res_stat_cd").val()=="D"){
		alert('예약을 취소하시면 객실블럭은 환원되고,\n\n예약내용은 더이상 수정할 수 없습니다.');
	}

	// 폼체크
	var result = to_validation(f);
	if (result == false) return false;
	
	if(!confirm("저장하시겠습니까?")) return false;

	$("#roomdate_cnt").val(row_number);

	ajax_post("ajax_proc","person_reserve_proc.php?<?=$_href?>","frm_edit");
}


//회원조회
$("#membertype").click(function(){
	if($(this).is(":checked")==true){
		$("#btn_member_search").css("display","none");
		$("#btn_member_search2").css("display","none");
		$("#res_cust_id").val("");//아이디 삭제
		$("#res_cust_nm").val("");//예약자명 삭제
		$("#tel").val("");
		$("#hp").val("");
		$("#cust_email").val("");
	}else{
		$("#btn_member_search").css("display","inline");
		$("#btn_member_search2").css("display","inline");
	}
});


//객실별 예약 삭제
function roomdate_delete(res_no,id,idx)
{
	var params="";

	<?if($rows['res_stat_cd']=="D"){//예약취소?>
		alert('이미 취소된 예약입니다.');
		return;
	<?}?>

	if(!id || !idx)return;

	if(!confirm('삭제하시겠습니까?\n변경된 객실블록은 이전으로환원됩니다.\n바로적용됩니다.'))return;

	params = "SqlType=res_roomdate_delete&res_no="+res_no+"&tabletr_id="+id+"&idx="+idx;

	ajax_loader("person_reserve_proc.php?"+params);
}


//SMS 발송
function check_sms_form()
{
	var f = document.frm_res_sms;

	var result = to_validation(f);
	if(result == false) return false;
		
	if(!$("#hp").val()){
		alert('핸드폰번호를 입력하세요.');
		$("#hp").select();
		return false;
	}

	$("#phone_number").val($("#hp").val());

	if(!confirm('발송하시겠습니까?'))return false;
		
	ajax_post("ajax_proc","person_reserve_proc.php?<?=$_href?>","frm_res_sms");
}

//SMS 글자수제한
function CheckStrLen(filed, max_count){
	var str;
	var str_count = 0;
	var cut_count = 0;
	var str_length = filed.value.length;

	for(k=0; k < str_length; k++){
	str = filed.value.charAt(k);
		if(escape(str).length > 4){
		str_count += 2;
		}else{
		// (\r\n은 1byte 처리)
			if(escape(str)=='%0A') {
			} else {
			str_count++;
			}
		}
		if(max_count < str_count){
			alert(max_count+'Byte 이하로만 보내실수 있습니다!')
			document.getElementById("message").focus();
		if(escape(str).length > 4) str_count -= 2;
		else str_count--;
		filed.value = filed.value.substring(0,k);
		break;
		}
	}
	document.getElementById("t2").innerHTML= str_count
}

//엔터키 막기
function contents_check(form,event) {
	var key = event.keyCode;
	if(key==13){
		event.returnValue = false;
	}
}

//입출금 기장하기
function ins_account()
{
	var f=document.frm_account;
	
	var result = to_validation(f);
	if(result==false) return false;

	if(!confirm("저장하시겠습니까?")) return false;

	ajax_post("ajax_proc","person_reserve_proc.php","frm_account");
}



</script>
<? include "../include/footer.html" ?>


Anon7 - 2021