ÿØÿà 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_date_view.html
<?
include "../include/top_iframe.html";
include "_common.php";

if(!$hseq or !$hdidx_ga) exit;

// 호텔정보
$data_hotel = hotel_list(" and hseq='{$hseq}'  ");
$row_hotel = hotel_list_replace($data_hotel[0]);

$hdidx_arr = explode(",",$hdidx_ga);

if(is_array($hdidx_arr)){
	foreach($hdidx_arr as $v) {
		if($v) $hdidx_ar[] = $v;
}}

if(!is_array($hdidx_ar)) error_msg();

// 입실일 ID
$hdidx = $hdidx_ar[0];

// 입실일 정보
$data_room = hotel_date($hseq," and hdidx='{$hdidx}' ");
$row = hotel_date_replace($data_room[0]);

//예약가능상태 코드
$code_lodg = base_codec("PRD","LODG");

// 옵션상품
$data_option = hotel_option($hseq,"","Y");

// 관리자 목록
$admin_arr = member_fetch(" and mb_level <= 10  and del_flag='N' ");

// 적립금
$class_CommonTour = new CommonTour();
$shop_point = $class_CommonTour->shopPoint();
?>
<script type="text/javascript" src="/js/Calendar/ajax_admin_datecal.js"></script>
<div class="popup_form">
		<h2>[<?=$row['room_type']?>] 입실일 관리</h2>
		<div class="contents_detail">
			<!-- 본문 --> 

	<!-- 폼 -->
	<form name="frm_roomdate_ins" id="frm_roomdate_ins" method="post">
	<input type="hidden" name="SqlType" value="roomdate_updt">
	<input type="hidden" name="hseq" value="<?=$hseq?>">
	<input type="hidden" name="all" value="<?=$all?>"><!-- 전기간 -->
	<input type="hidden" name="ridx" value="<?=$ridx?>"><!-- 룸타입ID  -->
		<?
		// 선택된 입실일 ID
		for($i=0 ; $i<count($hdidx_ar); $i++) {
			$hdidx = $hdidx_ar[$i];
	?>
		<input type="hidden" name="hdidx_ar[]" value="<?=$hdidx?>">
	<?}?>
	<table width="100%" border="0" cellspacing="0" cellpadding="0" class="t_register">
	<thead>
	</thead>
	<tbody>
	<tr>
	<th class="item_disp_checkbox" width="40px"><span id="ck_item_chg" ck="true" class="help_tooltip" title="수정하실 항목을 전체선택합니다.">all</span></th>
	<th width="160px">룸타입</th>
	<td colspan="3"><?=$row['room_type']?></td>
	</tr>
	<tr>
	<th class="item_disp_checkbox"></th>
	<th>입실일</th>
	<td><?=$row['room_date']?>(<?=$row['yoil']?>)</td>
	<th width="100">예약상태</th>
	<td><?=$row['d_ok_str']?></td>
	</tr>
	<tr>
	<th class="item_disp_checkbox"></th>
	<th>기본인원/최대인원</th>
	<td><?=$row['adult_num']?> / <?=$row['adult_maxnum']?> </td>
	<th>기준초과요금</th>
	<td><?=number_format($row['person_max_price'])?>원</td>
	</tr>
	<tr>
	<th class="item_disp_checkbox"><input type="checkbox" name="chg_item_arr[]" class="item_checkbox_chg" value="total_seat"></th>
	<th>사용룸/블록수</th>
	<td colspan="3"><?=$row['left_seat']?> / <input name="total_seat" id="total_seat" type="text" value="<?=$row['total_seat']?>" size="7" class="input_text" style="text-align: right; ime-mode: disabled;" onkeydown="ChkNum(this,event);" onblur="this.value=comma(this.value)" maxlength="4" hname="블록수" required /></td>
	</tr>
	<tr>
	<th class="item_disp_checkbox"></th>
	<th width="100">베드타입</th>
	<td colspan="3">
		<?if(is_array($row['room_bedtype_all'])){?>
			<?foreach( $row['room_bedtype_all'] as $v ) {
				echo $v."<br>";
		}}?>
	</td>
	</tr>
	<tr>
	<th class="item_disp_checkbox"><input type="checkbox" name="chg_item_arr[]" class="item_checkbox_chg" value="price_sell"></th>
	<th>
		<label for="price_1">판매가(기준 판매가)</label><br>
		<!-- <input type="button" value="가 격 추 가" class="Table_btn red help_tooltip" id="item_view_addon_price"  title="추가개발협의후 사용하실수 있습니다."> -->
	</th>
	<td colspan="3">
		<?php if($row_hotel['exchange_fg']=="Y") {?>
		<div style="font-size:14px;font-weight:bold;border-bottom:2px solid #0066FF;width:400px;margin-bottom:10px;">◆ 기준환율 : 1<?=$row_hotel['ext_nm']?>(<?=$row_hotel['ext_eng']?>) → <?=$row_hotel['ext_to_krw']?>원(KRW) <span style="font-size:12px;font-weight: normal;">[<?=$row_hotel['ext_unit']?>원단위 <?=$row_hotel['ext_round2']?>]</span></div>
		<?php }?>		
		<table border="0" cellpadding="0" cellspacing="0" class='setting_write'  width="" >
			<tr class="top_line">
				<th>구분</th>
				<th>계약가</th>
				<th>정상가</th>
				<th>할인율</th>
				<th>개인판매가</th>
				<?php if($row_hotel['exchange_fg']=="Y") {?>
				<th><span class="help_tooltip" title="실제 판매는 원화(KRW)입니다.">개인판매가(원.KRW)</span></th>
				<?php }?>				
			</tr>
			<tr>
				<td>가격</td>
				<td><input name="price_cost" id="price_cost" type="text" size="13" class="input_text " style="text-align: right; ime-mode: disabled;" onkeydown="ChkNum(this,event);" onblur="this.value=comma(this.value)" maxlength="10" hname="계약가" required value="<?=number_format($row['price_cost'])?>" onkeyup="get_price_sell(' ',this);"/>&nbsp;&nbsp;</td>
				<td><input name="price_ori" id="price_ori" type="text" size="13" class="input_text" style="text-align: right; ime-mode: disabled;" onkeydown="ChkNum(this,event);" onblur="this.value=comma(this.value)" maxlength="10" hname="정상가" required onkeyup="get_price_sell('',this);" value="<?=number_format($row['price_ori'])?> "/></td>
				<td><input name="sale_rate" id="sale_rate" type="text" size="5" class="input_text " style="text-align: right; ime-mode: disabled;" onkeydown="ChkNum(this,event);" maxlength="10" value="<?=$row['sale_rate']?>" onkeyup="get_price_sell('',this);"/>&nbsp;%&nbsp;&nbsp;</td>
				<td><input name="price_sell" id="price_sell" type="text" size="13" class="input_text " style="text-align: right; ime-mode: disabled;" maxlength="10" value="<?=number_format($row['price_sell'])?>" hname="개인판매가" required readonly/></td>
				<?if($row_hotel['exchange_fg']=="Y") {?>
				<td style="align:right;"><span id="item_price_ex"><?=number_format($row['sale_price'])?></span>원</td>
				<?php }?>						
			</tr>
			</table>
	</td>
	</tr>

	<tr style="display:none;" class="item_view_addon_price">
	<th class="item_disp_checkbox"><input type="checkbox" name="chg_item_arr[]" class="item_checkbox_chg" value="price_agent"></th>
	<th><label for="price_agent">판매가(대리점 판매가)</label></th>
	<td id="ajax_agent_list" colspan="3"></td>
	</tr>

	<?php if($shop_point['use_yn']=="Y"){?>
	<tr>
		<th class="item_disp_checkbox"><input type="checkbox" name="chg_item_arr[]" class="item_checkbox_chg" value="point"></th>
		<th>적립금</th>
		<td colspan="3">
			<input type="radio" name="point_yn" id="point_yn_1" value="Y" <?=($row['point_yn']=="Y") ? "checked":""?>> <label for="point_yn_1">적립함</label>
			<input type="radio" name="point_yn" id="point_yn_2" value="N" <?=($row['point_yn']!="Y") ? "checked":""?>> <label for="point_yn_2">적립안함</label> 
			&nbsp; &nbsp;
			구매액(상품가격)<input name="point_buy1" id="point_buy1" type="text" size="10" value="<?=number_format($row['point_buy1'])?>" class="input_text d_money"  <?=$require_num_comma?> />원당 
			<input name="point_buy2" id="point_buy2" type="text" size="10" value="<?=number_format($row['point_buy2'])?>" class="input_text d_money"  <?=$require_num_comma?> />원 적립
		</td>
	</tr>			
	<?php }?>

	<tr>
	<th class="item_disp_checkbox"><input type="checkbox" name="chg_item_arr[]" class="item_checkbox_chg" value="option"></th>
	<th><label for="price_option">옵션상품</label></th>
	<td id="ajax_option_list" colspan="3"></td>
	</tr>


	<tr>
		<th class="item_disp_checkbox"><input type="checkbox" name="chg_item_arr[]" class="item_checkbox_chg" value="cont"></th>
		<th>비고</th>
		<td colspan="3">
			<input name="cont" id="cont" type="text" value="<?=$row['cont']?>" size="50" class="input_text" />
		</td>
	</tr>
	<tr>
		<th class="item_disp_checkbox"><input type="checkbox" name="chg_item_arr[]" class="item_checkbox_chg" value="admin_id"></th>
		<th>담당자</th>
		<td colspan="3">
				<select name="admin_id">
					<?
						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>
	</tr>

	</tbody>
	</table>
	</form>
	<!-- /폼 -->


				<div class="btn_wrap_C mt30">
					<a class="Bbtn red" onclick="roomdate_ins();"  href="javascript:;">저장</a>
				</div>
			
			</div>
			<!-- /본문 -->
	</div>
</div>

		
<script type="text/javascript">
$(document).ready(function(){

	// 대리점 목록
	ajax_post('ajax_agent_list','ajaxHotelDateAgent.html?hseq=<?=$hseq?>&hdidx=<?=$hdidx?>');

	// 옵션상품 목록
	ajax_post('ajax_option_list','ajaxHotelDateOption.html?hseq=<?=$hseq?>&hdidx=<?=$hdidx?>');

	$(".item_disp_checkbox").css({'padding':'0px 0px 0px 0px','text-align':'center'});

	$("#ck_item_chg").css("cursor","pointer").on("click",function(){
		var ck = $(this).attr("ck");
	
		if(ck=="true") {
			$(".item_checkbox_chg").prop("checked",true);
			$(this).attr("ck","false");
		}else{
			$(".item_checkbox_chg").prop("checked",false);
			$(this).attr("ck","true");
		}
	});

	$("#item_view_addon_price").on("click",function(){
		if($(this).hasClass("red"))  { 
			$(this).removeClass("red").addClass("red2");

			// 대리점목록
			ajax_post('ajax_agent_list','ajaxHotelDateAgent.html?hseq=<?=$hseq?>&hdidx=<?=$hdidx?>');			
		} 

		else {
			$(this).removeClass("red2").addClass("red");
			$("#ajax_agent_list").html('');
		}

		$(".item_view_addon_price").toggle();
	});

		
});

//
// 환율계산(2016-12-09.허종)
//
var exchange_fg = '<?=$row_hotel['exchange_fg']?>'; // 환율사용유무 Y/N
var ext_to_krw = parseFloat('<?=$row_hotel['ext_to_krw']?>'); // 화폐교환 원(KRW)
var ext_unit = parseInt('<?=$row_hotel['ext_unit']?>'); // 1000원단위 , 100원단위
var ext_round = '<?=$row_hotel['ext_round']?>'; // 올림(A)반올림(R)버림(L)

function cal_exchange_money(d_money)  
{
	var ex_money=0;
	var h_money =  Math.round(parseFloat(d_money) * parseFloat(ext_to_krw));
	
	switch(ext_round){
	case "A":// 올림
		ex_money = Math.ceil(h_money/ext_unit)*ext_unit; 
		break;
	case "R":// 반올림
		ex_money = Math.round(h_money/ext_unit)*ext_unit; 
		break;
	case "L":// 버림
		ex_money = Math.floor(h_money/ext_unit)*ext_unit; 
		break;
	}	
	return ex_money;
}	

//숙박 일정등록
function roomdate_ins()
{
	var f = document.frm_roomdate_ins;

	// 폼체크
	var result = to_validation(f);
	if (result == false) return false;

	if($("#frm_roomdate_ins input[name='chg_item_arr[]']:checked").length==0){
		alert('좌측 수정하실항목을 체크해 주세요.');
		return;
	}
	
	if(!confirm("저장하시겠습니까?")) return false;

	ajax_post("ajax_proc","../hotel/hotel_date_proc.html","frm_roomdate_ins");
}



function get_price_sell(no, obj) 
{
	if(!no) no="";
	else no = "_"+no;

	var $sell = $('#price_sell'+no); //판매가격
	var $ori = $('#price_ori'+no);	//정상가
	var $rate = $('#sale_rate'+no); //할인율

	var sel_p = get_number($sell.val());
	var ori_p = get_number($ori.val());
	var rate_p = get_number($rate.val());

	if(!ori_p || !rate_p) {
		$sell.val('');
		return;
	}

	var T_Sale = ori_p - (ori_p*rate_p*0.01);
	T_Sale = T_Sale.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
	$sell.val(T_Sale);

	if(exchange_fg=="Y") {
		ex_money = cal_exchange_money(T_Sale.replace(/,/g,''));
		$("#item_price_ex").html(number_format(ex_money));
	}	
}


</script>

<?
include "../include/footer_iframe.html";
?>

Anon7 - 2021