ÿØÿà JFIF ` ` ÿþ
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/admin/res_hotel/ |
Upload File : |
<? /* * 호텔 예약등록 * * 작성일 : 20160307 * 작성자 : 허종 * * 수정이력 */ include "../include/top_iframe.html"; include "_common.html"; $class_HotelReserv = new HotelReserv(); $class_AccountCustomer = new AccountCustomer(); // 정산 정보 업데이트 $class_AccountCustomer->account_customer_check($res_no); // 예약정보 $data = $class_HotelReserv->res_hotel_master(" and res_no='{$res_no}' "); $row = $class_HotelReserv->res_hotel_master_replace($data[0]); // 예약상태 $res_type_arr = base_codec("PRD","RES"); // 관리자목록 $admin_arr = member_fetch(" and mb_level <= 10 "); // 통합예약정보(이전예약정보 제외) $data_res_all = array(); $rdata = array("sql_where"=>" and res_cust_id='{$row[res_cust_id]}' and start_dt >= curdate()" , "sql_order"=>"start_dt"); if ($row['res_cust_id']) $data_res_all = to_res_all($rdata); // 대리점 정보 $row_agent = get_member($row['agent_id']); ?> <div class="iframe"> <!-- 폼 --> <form name="frm_updt" id="frm_updt" method="post"> <input type="hidden" name="SqlType" value="reserv_updt"> <input type="hidden" name="res_no" value="<?=$res_no?>"> <input type="hidden" name="tmp_layer_id" value="<?=$tmp_layer_id?>"> <input type="hidden" name="sales_total" value="<?=$row['sales_total']?>"><!-- 총판매가 --> <input type="hidden" name="lang" value="<?=$row[lang]?>"> <table width="1030px" border="0" cellspacing="0" cellpadding="0"> <tr> <td valign="top" colspan="3"><h2 class="mt5">1 . 예약목록</h2></td> </tr> <tr> <td valign="top" colspan="3"> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="setting_write"> <thead> <tr> <th width="80">예약접수일</th> <th width="70">구분</th> <th width="">행사명</th> <th width="100">행사일/투숙일</th> <th width="80">행사상태</th> <th width="">예약자명</th> <th width="">연락처</th> <th width="">담당자</th> </tr> </thead> <tbody> <? foreach($data_res_all as $v) { $style_bold = "normal"; $url = "document.location.href='{$v[res_url]}?res_no={$v[res_no]}&tmp_layer_id={$tmp_layer_id}';"; $cursor = "pointer"; if($v['res_no']==$res_no) { $style_bold = "bold"; $url = "javascript:void(0);"; $cursor = "normal"; } ?> <tr style="font-weight:<?=$style_bold?>;cursor:<?=$cursor?>;" onclick="<?=$url?>"> <td><?=$v['ins_dt2']?></td> <td><?=$v['tab_nm']?></td> <td><?=$v['good_nm_s']?></td> <td><?=$v['start_dt']?></td> <td><?=$v['order_state_nm']?></td> <td><?=$v['res_cust_nm']?></td> <td><?=$v['res_cust_tel2']?></td> <td><?=$v['admin_nm']?></td> </tr> <?}?> </tbody> </table> </td> <tr> <td valign="top" colspan="3"> </td> </tr> <tr> <td valign="top" colspan="3"><h2 class="mt15">2 . 예약정보</h2></td> </tr> <tr> <td valign="top" colspan="3"><div class="pop_title"><div class="lo_left">■ 예약자 정보</div></div></td> </tr> <tr> <td valign="top" width="490px"> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="setting_write"> <tbody> <tr> <th width="70">예약자ID</th> <td class="top_line" colspan="3"><input type="text" class="input_text" id="mb_id" name="res_cust_id" value="<?=$row['res_cust_id']?>" size="20" readonly> <input class="Table_btn gray" id="btn_agent_search" onclick="to_dialog.iframe('../res_good/member_find_ajax.html','회원검색','680','360',true,true,'no');" type="button" value="회원조회"/> <?php if($row['res_cust_id']){?> <input class="Table_btn blue" id="btn_agent_search" onclick="to_dialog.iframe('../res_good/member_point.html?mb_id=<?=$row['res_cust_id']?>','<?=$row['res_cust_nm']?>님 적립금내역','800','450',true,true,'yes');" type="button" value="적립금내역"/> <?php }?> </td> </tr> <tr> <th width="70">예약자명*</th> <td class="top_line"><input type="text" class="input_text" id="cu_name" name="res_cust_nm" value="<?=$row['res_cust_nm']?>" size="10" hname="예약자명" required></td> <th width="70">국적</th> <td class="top_line"><input type="text" class="input_text" id="cu_nat_cd" name="res_cust_nat_cd" value="<?=$row['res_cust_nat_cd']?>" size="11" style="width:90px;"></td> </tr> <tr> <th>핸드폰*</th> <td class="top_line"><input type="text" class="input_text" id="cu_phone" name="res_cust_hp" value="<?=$row['res_cust_hp']?>" size="11" style="width:90px;" hname="핸드폰" required></td> <th width="70">전화</th> <td class="top_line"><input type="text" class="input_text" id="cu_tel" name="res_cust_tel" value="<?=$row['res_cust_tel']?>" size="11" style="width:90px;"></td> </tr> <tr> <th width="70">이메일</th> <td class="top_line" colspan="3"><input type="text" class="input_text" id="cu_email" name="res_cust_email" value="<?=$row['res_cust_email']?>" size="30"></td> </tr> </tbody> </table> </td> <td valign="top" width="490px"> <table width="100%" height="189px;" border="0" cellspacing="0" cellpadding="0" class="setting_write item_agent_disp"> <tbody> <tr> <th width="70">대리점</th> <td class="top_line" colspan="3"> <select name="agent_id" id="agent_id" style="width:180px;display:none;"> <option value=""></option> <? for($a=0 ; $a<count($row['agent_all']) ; $a++) { $v = $row['agent_all'][$a]; ?> <option value="<?=$v['agent_id']?>" <?=($v['agent_id']==$row['agent_id'])?"selected":""?>><?=$v['agent_nm']?> | <?=$v['agent_id']?></option> <?}?> </select> </td> </tr> <tr> <th width="70">담당자</th> <td class="top_line" colspan="3"><span class="mb_nm"><?=$row_agent['mb_nm']?></span></td> </tr> <tr> <th width="70">연락처</th> <td><span class="mb_tel"><?=$row_agent['mb_tel']?></span></td> <th width="70">전화번호</th> <td><span class="mb_phone"><?=$row_agent['mb_phone']?></span></td> </tr> <tr> <th>이메일</th> <td colspan="3"><span class="mb_email"><?=$row_agent['mb_email']?></span></td> </tr> </tbody> </table> </td> </tr> <tr> <td valign="top" colspan="3"> <div class="pop_title"><div class="lo_left">■ 숙박정보</div> <div class="r_btn"> <?=$row['res_stat_str']?> <? if ($row['res_stat_cd'] != "D" ) { ?> <? if ($row['res_stat_cd'] == "R" ) { // 대기상태(R)?> <input type="button" value="예약확정" class="Table_btn red" onclick="if(!confirm('예약확정 하시겠습니까?'))return;ajax_loader('../res_hotel/hotel_res_proc.html?SqlType=res_roomdate_fix&res_no=<?=$res_no?>');"> <? } ?> <input type="button" value="예약취소" class="Table_btn blue" onclick="if(!confirm('정말 취소하시겠습니까?'))return;ajax_loader('../res_hotel/hotel_res_proc.html?SqlType=res_roomdate_delete&res_no=<?=$res_no?>');"> <? } ?> </div> </div> </td> </tr> <tr> <td valign="top" colspan="3"> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="setting_write"> <tbody> <tr style="text-align:center;"> <th width="70">진행전달</th> <?for($i=0 ; $i<count($res_type_arr); $i++) { $arr = $res_type_arr[$i]; ?> <td><input type='radio' name="order_state" id="order_state_<?=$arr['code']?>" value="<?=$arr['code']?>" <?=($arr['code']==$row['order_state'])?"checked":""?>><label for="order_state_<?=$arr['code']?>"><?=$arr['cd_nm']?></label> </td> <?}?> <td colspan="2">-</td> </tr> <tr style="text-align:center;"> <th>메일발송</th> <?for($i=0 ; $i<count($res_type_arr); $i++) { $arr = $res_type_arr[$i]; $class = "gray"; $data_macro = to_macro_list(array('type'=>'M','resp'=>'RES','res_cd'=>$arr['code'],'disp_yn'=>'Y'));// 메일 템플릿 ?> <td> <?foreach($data_macro as $v) { $class = "gray"; if($v['auto_send']=="Y") $class = "orange"; $title = $row['res_cust_nm']."고객님! ".$v['subj']." 입니다."; ?> <div style="padding:4px 0 0 0;"> <input type="button" name="btn_send_mail" value="<?=cut_str($v['subj'],10,'...')?>" class="Table_btn" onclick="<?if(!$row['res_cust_email']){?>alert('예약자이메일 정보가 없습니다.메일발송이 불가능합니다.');<?}?>parent.parent.to_dialog.iframe('../reservation/mail_send.html?type=<?=$v['mtype']?>&cust_email=<?=$row['res_cust_email']?>&cust_nm=<?=$row['res_cust_nm']?>&tab=<?=$row['tab']?>&res_no=<?=$res_no?>&title=<?=urlencode($title)?>','<?=$v['subj']?> 메일 발송','1000','750',true,true,'yes');" title="<?=$v['subj']?>"> </div> <?}?> </td> <?}?> <td><input type="button" name="" value="메일발송" class="Table_btn" onclick="parent.parent.to_dialog.iframe('../reservation/mail_send.html?type=common&cust_email=<?=$row['res_cust_email']?>&cust_nm=<?=$row['res_cust_nm']?>&tab=<?=$row['tab']?>&res_no=<?=$res_no?>','메일 발송','1000','750',true,true,'yes');"></td> <td><input type="button" name="" value="메일발송내역" class="Table_btn" onclick="to_dialog.iframe('../reservation/history_mailsms.html?type=M&res_no=<?=$res_no?>','메일발송내역','700','440',true,true,'no');"></td> </tr> <tr style="text-align:center;"> <th>SMS발송</th> <?for($i=0 ; $i<count($res_type_arr); $i++){ $arr = $res_type_arr[$i]; $data_macro = to_macro_list(array('type'=>'S','resp'=>'RES','res_cd'=>$arr['code'],'disp_yn'=>'Y'));// SMS 상용구 ?> <td> <?foreach($data_macro as $v) { $class = "gray"; if($v['auto_send']=="Y") $class = "orange";?> <div style="padding:4px 0 0 0;"> <input type="button" name="btn_send_mail" value="<?=cut_str($v['subj'],10,'...')?>" class="Table_btn <?=($v['auto_send']=="Y") ? "red":""?>" onclick="parent.parent.to_dialog.iframe('../reservation/sms_sender_pop.html?res_no=<?=$res_no?>&midx=<?=$v['midx']?>','<?=$v['subj']?> SMS 발송','350','440',true,true,'no');" title="<?=$v['subj']?>" style="width:70px;"> </div> <?}?> </td> <?}?> <td><input type="button" name="" value="일반SMS" class="Table_btn" onclick="parent.parent.to_dialog.iframe('../reservation/sms_sender_pop.html?res_no=<?=$res_no?>','일반SMS 발송','350','440',true,true,'no');"></td> <td><input type="button" name="" value="SMS발송내역" class="Table_btn" onclick="to_dialog.iframe('../reservation/history_mailsms.html?res_no=<?=$res_no?>&type=S','SMS발송내역','700','440',true,true,'yes');"></td> </tr> </tbody> </table> </td> </tr> <tr> <td valign="top" colspan="4" style="height:10px;"></td> </tr> <tr> <td width="500" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="setting_write"> <tbody> <tr> <th width="70">호텔명</th> <td class="top_line"> <input type="text" class="input_text" id="" name="" value="<?=$row['hnm']?>" size="20" readonly> </td> <th width="70">룸타입</th> <td class="top_line"> <input type="text" class="input_text" id="" name="" value="<?=$row['rnm']?>" size="20" readonly> </td> </tr> <tr> <th width="50">예약번호</th> <td class="top_line" colspan="3"> <span style="width:150px;float:left;"><?=$row['res_no']?></span> <span style="width:150px;float:right;text-align:right;padding-right:15px;"> <input type="button" name="" value="예약변경" class="Table_btn red" onclick="to_dialog.iframe('../res_hotel/again_hotel_res.html?res_no=<?=$res_no?>&lang=<?=$row[lang]?>','예약변경','1000','550',true,true,'yes');"> </span> </td> </tr> <tr> <th>체크인</th> <td><input type="text" name="room_date" id="room_date" value="<?=$row['room_date']?>" class="input_text" size="11" readonly></td> <th width="50">박수</th> <td> <?=$row['room_day']?>박 </td> </tr> <tr> <th>체크아웃</th> <td><input type="text" name="room_date_out" id="room_date_out" value="<?=$row['room_date_out']?>" class="input_text" size="11" readonly></td> <th>룸수</th> <td> <?=$row['room_cnt']?>룸 </td> </tr> <tr> <th>성인</th> <td><input type="text" style="width:20px;" name="room_adult_num" class="input_text" value="<?=$row['room_adult_num']?>" onkeydown="ChkNum(this,event);" style="text-align:right;ime-mode:disabled;" maxlength="3">명</td> <th>아동</th> <td><input type="text" style="width:20px;" name="room_child_num" class="input_text" value="<?=$row['room_child_num']?>" onkeydown="ChkNum(this,event);" style="text-align:right;ime-mode:disabled;" maxlength="3">명</td> </tr> <tr> <th>초과인원</th> <td colspan="3"><input type="text" style="width:20px;" name="room_over_num" class="input_text" value="<?=$row['room_over_num']?>" onkeydown="ChkNum(this,event);" style="text-align:right;ime-mode:disabled;" maxlength="3">명</td> </tr> <tr> <th>베드타입</th> <td colspan="3"><input type="text" name="room_bedtype" value="<?=$row['room_bedtype']?>" class="input_text" size="31"></td> </tr> <tr> <th width="70">고객요청</th> <td colspan="3" style="height:42px;"><?=nl2br($row['res_cust_memo'])?></td> </tr> </tbody> </table> </td> <td valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="setting_write item_option"> <tr> <th rowspan="<?=count($row['option_all'])+1?>" width="80">행사가격/개수</th> </tr> <? $option_arr = $row['option_all']; for($i=0 ; $i<count($option_arr) ; $i++) { $arr = $option_arr[$i]; $num = count($option_arr)-$i; ?> <tr> <th class="top_line" width="160"> <?=$arr['op_nm']?> <input type="hidden" name="opid_arr[]" value="<?=$arr['opid']?>"> <input type="hidden" name="op_nm_arr[]" value="<?=$arr['op_nm']?>"> </th> <td class="top_line"> <INPUT TYPE="text" NAME="op_price_sell_arr[]" class="input_text item_disp_price_sell" value="<?=number_format($arr['op_price_sell'])?>" style="text-align:right;ime-mode:disabled;display:<?=($row['agent_id'])?"none":"inline"?>;" onkeydown="ChkNum(this,event);" onblur="this.value=comma(this.value);" maxlength="10" size="10" title="판매가"> <INPUT TYPE="text" NAME="op_price_agent_arr[]" class="input_text item_disp_agent_sell" value="<?=number_format($arr['op_price_agent'])?>" style="text-align:right;ime-mode:disabled;display:<?=($row['agent_id'])?"inline":"none"?>;" onkeydown="ChkNum(this,event);" onblur="this.value=comma(this.value);" maxlength="10" size="10" title="대리점가"> <select name="op_num_arr[]" id="op_num_<?=$arr['opid']?>" style="width:40px;" > <? for( $j=0 ; $j<=20 ; $j++) { ?> <option value="<?=$j?>" <?=($arr['op_num']==$j)?"selected":""?>><?=$j?></option> <? } ?> </select> </td> </tr> <? } ?> </table> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="setting_write item_option"> <tbody> <tr> <th rowspan="5" width="80" style="border-top:0px;">합계</th> </tr> <tr> <th width="160" style="border-top:0px;"><b>객 실</b></th> <td ><input type="text" name="price_tot" value="<?=number_format($row['price_tot'])?>" class="input_text" size="10" onkeydown="ChkNum(this,event);" style="text-align:right;ime-mode:disabled;" maxlength="12" onblur="this.value=comma(this.value);"></td> </tr> <tr> <th><b>옵 션</b></th> <td><input type="text" name="option_tot" value="<?=number_format($row['option_tot'])?>" class="input_text" size="10" onkeydown="ChkNum(this,event);" style="text-align:right;ime-mode:disabled;" maxlength="12" onblur="this.value=comma(this.value);"> </td> </tr> <tr> <th><b>초과금</b></th> <td ><input type="text" name="over_tot" value="<?=number_format($row['over_tot'])?>" class="input_text" size="10" onkeydown="ChkNum(this,event);" style="text-align:right;ime-mode:disabled;" maxlength="12" onblur="this.value=comma(this.value);"></td> </tr> <tr> <th><b><font color='red'>판매금액</font></b></th> <td height=""><span id="item_sales_total" style="font-weight:bold;"><?=number_format($row['sales_total'])?></span></td> </tr> </tbody> </table> </td> </tr> <!-- 입출금 기장 --> <tr> <td valign="top" colspan="3"> <div class="pop_title"><div class="lo_left">■ 입출금 정보</div><div class="r_btn"><input type="button" class="Table_btn gray" value="입출금 기장" onclick="to_dialog.ajax('../reservation/person_reserve_account_edit_ajax.html?res_no=<?=$res_no?>','입출금 기장','550','450',true,true);"></div></div> <div id="ajax_pgaccount"></div> </td> </tr> <tr> <td valign="top" colspan="3"> <div class="pop_title"><div class="lo_left">■ 정산 정보</div><div class="r_btn"><input type="button" class="Table_btn gray" value=" 정산상세" onclick="to_dialog.iframe('../cal_hotel/hotel_cal_res.html?res_no=<?=$row[res_no]?>','개별정산 - <?=$row[res_no]?>','1000','500',true,true,'yes','docReload();');"></div></div> <div id="ajax_account_hotel"></div> </td> </tr> <tr> <td valign="top" colspan="3"> <div class="title" style="margin-top:10px;">등록정보</div> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="setting_write"> <tbody> <tr> <th width="70">담당자</th> <td class="top_line" width="200"> <select name="admin_id" id="admin_id" hname="담당자" required> <option value="">==선택==</option> <? for($i=0 ; $i < count($admin_arr) ; $i++){ $arr = $admin_arr[$i]; ?> <option value="<?=$arr['mb_id']?>" <?=($arr['mb_id']==$row['admin_id'])?"selected":""?>><?=$arr['mb_nm']?></option> <?}?> </select> </td> <th width="70" width="200">등록자</th> <td class="top_line"><?=$row['admin_nm']?></td> <th width="70">등록일</th> <td class="top_line"><?=$row['ins_dt']?></td> </tr> </tbody> </table> </td> </tr> </table> </form> <!-- /폼 --> <div class="btn_wrap_C mt30"> <a class="Bbtn red" href="javascript:;" onclick="chk_form();">저장</a> </div> <!-- 상담및 메모 --> <div class="sms mt20" id="ajax_contab" style="width:1030px;overflow-x:hidden;overflow-x:auto;"></div> <!-- 문자발송 --> <div class="sms mt20" id="ajax_sms_send" style="width:1030px;overflow-x:hidden;overflow-x:auto;"></div> </div><!-- /iframe --> <script type="text/javascript"> $(function(){ ajax_loader('../reservation/person_reserve_account_ajax.html?res_no=<?=$res_no?>','ajax_pgaccount'); ajax_loader('ajaxAccHotel.html?res_no=<?=$res_no?>','ajax_account_hotel'); ajax_loader('../res_good/ajaxResContab.html?res_no=<?=$res_no?>&cseq=<?=$row[cseq]?>','ajax_contab'); $(".item_option input").blur(function(){ date_dw_option(); }); $(".item_option select , #frm_updt select[name='agent_id']").change(function(){ date_dw_option(); }); $("#frm_updt input[name='price_tot'],#frm_updt input[name='option_tot'],#frm_updt input[name='over_tot']").blur(function(){ date_dw_calcul(); }); // 대리점 선택 $("#agent_id").bind("change",function(){ var agent_id=''; agent_id = $(this).val(); if(!agent_id) { $(".item_agent_disp .mb_nm").html(''); $(".item_agent_disp .mb_tel").html(''); $(".item_agent_disp .mb_phone").html(''); $(".item_agent_disp .mb_email").html(''); $(".item_disp_price_sell").show(); $(".item_disp_agent_sell").hide(); return; } var url = '../reservation/jsonMemberInfo.html'; var q = 'mb_id='+agent_id; $.post(url,q,function(data){ if(data.mb_id){ $(".item_agent_disp .mb_nm").html(data.mb_nm); $(".item_agent_disp .mb_tel").html(data.mb_tel); $(".item_agent_disp .mb_phone").html(data.mb_phone); $(".item_agent_disp .mb_email").html(data.mb_email); $(".item_disp_price_sell").hide(); $(".item_disp_agent_sell").show(); } },'json'); }); }); // 옵션상품 계산 function date_dw_option() { var agent_id = $("#agent_id").val(); var option_tot=0; var op_num=0,op_price; $(".item_option select[name='op_num_arr[]']").each(function(){ op_num = parseInt($(this).val()); // 대리점 가격적용 if(agent_id) { op_price = $(this).parent().find("input:eq(1)").val().replace(/,/g,''); } // 일반 가격적용 else{ op_price = $(this).parent().find("input:eq(0)").val().replace(/,/g,''); } option_tot += parseInt(op_num) * parseInt(op_price); }); $("#frm_updt input[name='option_tot']").val(option_tot); date_dw_calcul(); } // 판매금액 계산 function date_dw_calcul() { var price_tot=0,option_tot=0, over_tot=0; var sales_total=0; // 판매가 price_tot = $("#frm_updt input[name='price_tot']").val().replace(/,/g,''); // 객실가 option_tot = $("#frm_updt input[name='option_tot']").val().replace(/,/g,''); // 옵션가 over_tot = $("#frm_updt input[name='over_tot']").val().replace(/,/g,''); // 초과금 sales_total = parseInt(price_tot) + parseInt(option_tot) + parseInt(over_tot); $("#frm_updt input[name='sales_total']").val(sales_total); $("#item_sales_total").html(number_format(sales_total.toString())); } // 저장 function chk_form() { var f = document.frm_updt; var result = to_validation(f) if( result == false ) return false; if(!confirm('예약을 저장하시겠습니까?')) return; ajax_post('ajax_proc','hotel_res_proc.html','frm_updt'); } function docReload() { ajax_loader('ajaxAccHotel.html?res_no=<?=$res_no?>','ajax_account_hotel'); } </script>