ÿØÿà JFIF ` ` ÿþ
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 : |
<? include "../include/top_iframe.html"; include "_common.php"; // 상품정보 $arr = good_list(" and g_uid='{$g_uid}' "); $row = good_list_replace($arr[0]); // 최근 출발일 1개 가져옴. $arr = date_list($g_uid,"none"," AND d_start=(SELECT MIN(d_start) FROM `date` WHERE g_uid='{$g_uid}' )","","1"); $data_recent = $arr[0]; // 최근 출발일 정보가 없음 if ( !$data_recent['d_start'] ) { $data_recent['d_start'] = date("Y-m-d"); // 출발일 $data_recent['period'] = 3; // 일수 $data_recent['periodStr'] = 2; // 박수 } // 도착일 세팅 $d_arr = date_pre_next(date("Y-m-d")); $data_recent['d_end'] = $d_arr[1]['next_date']; // 도착일 if ($tab=="D") { $data_recent['periodStr'] = '0'; $data_recent['period'] = '1'; } // 항공사 $airplane_arr = TO_get_airline(" and delflag='N' "); // 기타 $require_num_comma = " maxlength=\"10\" style=\"ime-mode:inactive;ime-mode:disabled;text-align:right\" onblur=\"this.value=comma(this.value)\" onKeyDown=\"ChkNum(this,event);\" "; // 가격입력시에 콤마+숫자필수 style+스크립트 $data = date_list($g_uid,$d_start_s,$sql_where); // 운송수단 코드 $data_trans = base_codec("HTL","ABTU","","N"); // 행사코드 헤더 $d_code_h = $row['Bidx'].$row['Cidx'].$row['b_uid'].$row['m_uid'].date("ymd"); // 관리자 목록 $admin_arr = member_fetch(" and mb_level <= 10 and del_flag='N' "); // 행사명 $data_date_type = good_date_type($g_uid,"","N","Y"); // 기본일정표 $base_sch_data = toad_schedule($g_uid," and Sort='0' "); // 적립금 $class_CommonTour = new CommonTour(); $shop_point = $class_CommonTour->shopPoint(); ?> <div class="popup_form"> <h2 class="mb5">[<?=$row['g_title']?>] 행사관리</h2> <!-- 본문 --> <!-- 폼 --> <form name="frmdate" id="frmdate" method="post"> <input type="hidden" name="SqlType" value="date_ins"> <input type="hidden" name="g_uid" value="<?=$g_uid?>"> <input type="hidden" name="tab" value="<?=$row['tab']?>"> <input type="hidden" name="gdt" value="<?=$row['gdt']?>"> <input type="hidden" name="d_tax" id="d_tax" value="N"><!-- TAX 불포함 --> <input type="hidden" name="d_oil" id="d_oil" value="N"><!-- 유류할증료 불포함 --> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="t_register"> <colgroup> <col style=" width:160px" /> <col /> </colgroup> <tr> <th>행사명</th> <td> <select name="dtid" style="width:250px;" hname="행사명" required> <option value="">==행사명==</option> <? for($i=0 ;$i<count($data_date_type) ; $i++) { $r = $data_date_type[$i]; ?> <option value="<?=$r['dtid']?>" <?=($r['dtid']==$dtid)?"selected":""?>><?=$r['date_type_nm']?></option> <? } ?> </select> </td> </tr> <tr> <th>행사코드</th> <td> <input type="text" class="input_text" name="d_code_h" value="<?=$d_code_h?>" style="width:126px;" readonly hname="행사코드" required><label for="" class="pl20"><input type="checkbox" value="" onclick="ck_d_code($(this));" checked> 자동입력 </label> <span class="c_red pl20">※입력하신 접두어와 시퀀스번호의 조합으로 행사코드가 완성됩니다.</span> </td> </tr> <tr> <th rowspan="2">행사생성조건</th> <td> <input type="radio" name="ins_cond" id="ins_cond_1" value="auto" checked="true" onclick="chk_input_box('auto');"><label for="ins_cond_1" class="pl5">요일별</label> <input type="radio" value="private" name="ins_cond" id="ins_cond_2" onclick="chk_input_box('private');"><label for="ins_cond_2" class="pl5">일자별</label> </td> </tr> <tr> <td> <div class="input_box_item"> <div class="lo_left"><input name="d_start" type="text" size="20" value="<?=$data_recent['d_start']?>" class="cal_input" onclick="AjaxCal(this,event);" readonly hname="행사시작일" required /> ~ <input name="d_end" type="text" size="20" class="cal_input" value="<?=$data_recent['d_end']?>" onclick="AjaxCal(this,event);" readonly hname="행사종료일" required /></div> <ul class="basic_ul lo_left ml20 mt5"> <li><input name="week_date[]" id="sun" type="checkbox" value="0" checked /> <label for="sun"><span class="c_red">일요일</span></label></li> <li><input name="week_date[]" id="mon" type="checkbox" value="1" checked /> <label for="mon">월요일</label></li> <li><input name="week_date[]" id="tue" type="checkbox" value="2" checked /> <label for="tue">화요일</label></li> <li><input name="week_date[]" id="wen" type="checkbox" value="3" checked /> <label for="wen">수요일</label></li> <li><input name="week_date[]" id="thu" type="checkbox" value="4" checked /> <label for="thu">목요일</label></li> <li><input name="week_date[]" id="fri" type="checkbox" value="5" checked /> <label for="fri">금요일</label></li> <li><input name="week_date[]" id="sat" type="checkbox" value="6" checked /> <label for="sat"><span class="c_blue">토요일</span></label></li> <li><input name="week_date_all" id="week_date_all" type="checkbox" value="" checked /> <label for="week_date_all"><span class="c_green">전체</span></label></li> </ul> </div> <div class="input_box_item" style="display:none;"></div> </td> </tr> <? ## 데이투어 if($row['tab']=="D") { ?> <tr> <th>투어일정</th> <td> <img src="../image/icon/date_s.gif"> 시작 <input name="d_starttime_1" type="text" size="3" value="<?=$data_recent['d_starttime_1']?>" class="input_text" maxlength="2" onKeyDown="ChkNum(this,event);" <?if($tab!="D"){?>hname="출발시" required<?}?> />: <input name="d_starttime_2" type="text" size="3" value="<?=$data_recent['d_starttime_2']?>" class="input_text" maxlength="2" onKeyDown="ChkNum(this,event);" hname="출발분" required /> → 마감 <input name="d_starttime2_1" type="text" size="3" value="<?=$data_recent['d_starttime2_1']?>" class="input_text" maxlength="2" onKeyDown="ChkNum(this,event);" hname="도착시" required />: <input name="d_starttime2_2" type="text" size="3" value="<?=$data_recent['d_starttime2_2']?>" class="input_text" maxlength="2" onKeyDown="ChkNum(this,event);" hname="도착분" required /> </td> </tr> <?php } ## 패키지 elseif($row['tab']=="P") { ?> <tr> <th rowspan="2">여행기간</th> <td> <input type="radio" value="ab" name="tour_cond" id="tour_cond_1" checked><label for="tour_cond_1" class="pl5">해외여행</label> <input type="radio" value="de" name="tour_cond" id="tour_cond_2" ><label for="tour_cond_2" class="pl5">국내여행</label> </td> </tr> <tr> <td> <span class="abroad_except_disp_item"> <input name="periodStr" type="text" size="3" value="<?=$data_recent['periodStr']?>" class="input_text" maxlength="3" onKeyDown="ChkNum(this,event);" hname="박수" required /> 박 <input name="period" type="text" size="3" value="<?=$data_recent['period']?>" class="input_text" style="background-color:#E0E2F8;" maxlength="3" onKeyDown="ChkNum(this,event);" hname="일수" required /> 일 </span> <span class="demo_disp_item" style="display:none;"> <input type="radio" name="d_kor_sch" id="d_kor_sch_1" value="A" checked><label for="d_kor_sch_1" class="pl5">당일</label> <input type="radio" name="d_kor_sch" id="d_kor_sch_2" value="B"><label for="d_kor_sch_2" class="pl5">무박</label> <input type="radio" name="d_kor_sch" id="d_kor_sch_3" value="C"><label for="d_kor_sch_3" class="pl5">숙박</label> </span> <HR style="border-top:1px solid #fff;width:500px;text-align:left;border-bottom:0px;" /> <img src="../image/icon/date_s.gif"> 출발시간 <input name="d_starttime_1" type="text" size="3" value="<?=$data_recent['d_starttime_1']?>" class="input_text ml10" maxlength="2" onKeyDown="ChkNum(this,event);" <?if($tab!="D"){?>hname="출발시" required<?}?> /> : <input name="d_starttime_2" type="text" size="3" value="<?=$data_recent['d_starttime_2']?>" class="input_text" maxlength="2" onKeyDown="ChkNum(this,event);" hname="출발분" required /> <select name="d_starttime_see" style="width:90px;" class="abroad_disp_item"> <option value="A" <?=($data_recent['d_starttime_see']=="A" OR !$data_recent['d_starttime_see'])?"selected":""?>>한국기준</option> <option value="B" <?=($data_recent['d_starttime_see']=="B")?"selected":""?>>현지기준</option> </select> → 도착시간 <input type="checkbox" name="d_starttime2_nx" value="Y" <?=($data_recent['d_starttime2_nx']=="Y")?"checked":""?>> 익일 <input name="d_starttime2_1" type="text" size="3" value="<?=$data_recent['d_starttime2_1']?>" class="input_text" maxlength="2" onKeyDown="ChkNum(this,event);" <?if($tab!="D"){?>hname="도착시" required<?}?> /> : <input name="d_starttime2_2" type="text" size="3" value="<?=$data_recent['d_starttime2_2']?>" class="input_text" maxlength="2" onKeyDown="ChkNum(this,event);" hname="도착분" required /> <select name="d_starttime2_see" style="width:90px;" class="abroad_disp_item"> <option value="A" <?=($data_recent['d_starttime2_see']=="A" OR !$data_recent['d_starttime2_see'])?"selected":""?>>한국기준</option> <option value="B" <?=($data_recent['d_starttime2_see']=="B")?"selected":""?>>현지기준</option> </select> <HR style="border-top:1px solid #fff;width:500px;text-align:left;border-bottom:0px;" /> <img src="../image/icon/date_e.gif"> 출발시간 <input name="d_endtime_1" type="text" size="3" class="input_text ml10" value="<?=$data_recent['d_endtime_1']?>" maxlength="2" onKeyDown="ChkNum(this,event);" <?if($tab!="D"){?>hname="도착시" required<?}?> /> : <input name="d_endtime_2" type="text" size="3" class="input_text" value="<?=$data_recent['d_endtime_2']?>" maxlength="2" onKeyDown="ChkNum(this,event);" hname="도착분" required /> <select name="d_endtime_see" style="width:90px;" class="abroad_disp_item"> <option value="A" <?=($data_recent['d_endtime_see']=="A" OR !$data_recent['d_endtime_see'])?"selected":""?>>한국기준</option> <option value="B" <?=($data_recent['d_endtime_see']=="B")?"selected":""?>>현지기준</option> </select> → 도착시간 <input type="checkbox" name="d_endtime2_nx" value="Y" <?=($data_recent['d_endtime2_nx']=="Y")?"checked":""?>> 익일 <input name="d_endtime2_1" type="text" size="3" class="input_text" value="<?=$data_recent['d_endtime2_1']?>" maxlength="2" onKeyDown="ChkNum(this,event);" <?if($tab!="D"){?>hname="도착시" required<?}?> /> : <input name="d_endtime2_2" type="text" size="3" class="input_text" value="<?=$data_recent['d_endtime2_2']?>" maxlength="2" onKeyDown="ChkNum(this,event);" hname="도착분" required /> <select name="d_endtime2_see" style="width:90px;" class="abroad_disp_item"> <option value="A" <?=($data_recent['d_endtime2_see']=="A" OR !$data_recent['d_endtime2_see'])?"selected":""?>>한국기준</option> <option value="B" <?=($data_recent['d_endtime2_see']=="B")?"selected":""?>>현지기준</option> </select> </td> </tr> <tr class="no_disp_item"> <th>교통편</th> <td> <!-- 항공편 출발 --> <div> <input type="radio" name="d_route" id="d_route_1" value="A" <?=($data_recent['d_route']=="A") ? "checked":""?>><label for="d_route_1" class="pl5 pr10"><strong>항공</strong></label> 출발편 <select name="d_plane1_cd" style="width:170px;" class="d_plane1 ml5 mr10"> <option value=""></option> <? for($i=0; $i<count($airplane_arr) ; $i++) { $arr= $airplane_arr[$i]; ?> <option value="<?=$arr['airline_code']?>" <?=($arr['airline_code']==$data_recent['air']['d_plane1_cd']) ? "selected":""?>><?=$arr['airnm_kor']?>[<?=$arr['airline_code']?>]</option> <?}?> </select> 출발편명<input name="d_plane1" type="text" size="8" value="<?=$data_recent['air']['d_plane1']?>" class="input_text d_plane1 ml5" style="text-align:center;text-transform:uppercase;ime-mode:inactive;ime-mode:disabled" onChange="javascript:this.value=this.value.toUpperCase();" <?if($tab!="D"){?> hname="출발비행편명" required<?}?> /> → 도착편 <select name="d_plane2_cd" style="width:170px;" class="d_plane1 ml5 mr10"> <option value=""></option> <?for($i=0; $i<count($airplane_arr) ; $i++) { $arr= $airplane_arr[$i]; ?> <option value="<?=$arr['airline_code']?>" <?=($arr['airline_code']==$data_recent['air']['d_plane2_cd']) ? "selected":""?>><?=$arr['airnm_kor']?>[<?=$arr['airline_code']?>]</option> <?}?> </select> 도착편명 <input name="d_plane2" type="text" size="8" value="<?=$data_recent['air']['d_plane2']?>" class="input_text d_plane1 ml5 mr10" style="text-align:center;text-transform:uppercase;ime-mode:inactive;ime-mode:disabled" onChange="javascript:this.value=this.value.toUpperCase();" <?if($tab!="D"){?> hname="도착비행편명" required<?}?> /> </div> <!-- /항공편 출발 --> <HR style="border-top:1px solid #fff;width:550px;text-align:left;border-bottom:0px;" /> <!-- 기타편 출발 --> <div class="lo_left"> <input type="radio" name="d_route" id="d_route_2" value="E" <?=($data_recent['d_route']=="E") ? "checked":""?>><label for="d_route_2" class="pl5 pr10"><strong>기타</strong></label> 출발편<!-- <input name="d_plane1_cd" type="text" size="15" value="<?=$data_recent['etc']['d_plane1_cd']?>" class="input_text d_plane2" maxlength="6" <?if($tab!="D"){?> hname="출발편" required<?}?>> --> <select name="d_plane1_cd" style="width:170px;" class="d_plane2 ml5 mr10"> <option value=""></option> <? for($i=0; $i<count($data_trans) ; $i++) { $arr= $data_trans[$i]; ?> <option value="<?=$arr['code']?>" <?=($arr['code']==$data_recent['etc']['d_plane1_cd']) ? "selected":""?>><?=$arr['cd_nm']?></option> <?}?> </select> 출발편명<input name="d_plane1" type="text" value="<?=$data_recent['etc']['d_plane1']?>" size="8" class="input_text d_plane2 ml5" <?if($tab!="D"){?> hname="출발명" required<?}?>> → 도착편<!-- <input name="d_plane2_cd" type="text" size="15" value="<?=$data_recent['etc']['d_place2_cd']?>" class="input_text d_plane2" maxlength="6" <?if($tab!="D"){?> hname="도착편" required<?}?>> --> <select name="d_plane2_cd" style="width:170px;" class="d_plane2 ml5 mr10"> <option value=""></option> <? for($i=0; $i<count($data_trans) ; $i++) { $arr= $data_trans[$i]; ?> <option value="<?=$arr['code']?>" <?=($arr['code']==$data_recent['etc']['d_plane2_cd']) ? "selected":""?>><?=$arr['cd_nm']?></option> <?}?> </select> 도착편명 <input name="d_plane2" type="text" value="<?=$data_recent['etc']['d_plane2']?>" size="8" class="input_text d_plane2 ml5 mr10" <?if($tab!="D"){?> hname="도착명" required<?}?>> </div> </td> </tr> <?}?> <? ## 데이투어 if($row['tab']=="D") { if($row['gdt']=="gr") { // 단체투어 ?> <tr> <th>기준인원</th> <td>1인</td> </tr> <tr> <th>모객정원/최소행사인원/상태</th> <td> <input name="d_people2" type="text" size="5" value="<?=$data_recent['d_people2']?>" class="input_text" maxlength="4" style="text-align:right" onKeyDown="ChkNum(this,event);" hname="모객정원" required /> 명 <input name="d_gr_people_min" type="text" size="5" value="<?=$data_recent['d_gr_people_min']?>" class="input_text" maxlength="4" style="text-align:right" onKeyDown="ChkNum(this,event);" hname="최소행사인원" required /> 명 <select name="d_ok" style="width:100px" class="ml10"> <option value="A" style="color:<?=$cf['d_ok_color_A']?>;">예약가능</option> <option value="B" style="color:<?=$cf['d_ok_color_B']?>;">대기</option> <option value="C" style="color:<?=$cf['d_ok_color_C']?>;">마감</option> </select> </td> </tr> <? }else{ // 단독투어 ?> <tr> <th>기준인원</th> <td><input name="d_pe_people_inwon" type="text" size="5" value="<?=$data_recent['d_pe_people_inwon']?>" class="input_text" maxlength="4" style="text-align:right" onKeyDown="ChkNum(this,event);" hname="기준인원" required /> 인</td> </tr> <tr> <th>모객정원(대/팀)/상태</th> <td> <input name="d_people2" type="text" size="5" value="<?=$data_recent['d_people2']?>" class="input_text" maxlength="4" style="text-align:right" onKeyDown="ChkNum(this,event);" hname="대수(팀수)" required /> <input type="radio" name="d_pe_people_unit" id="d_pe_people_unit_1" value="대" <?=($data_recent['d_pe_people_unit']=="대" or !$data_recent['d_pe_people_unit'])?"checked":""?>><label for="d_pe_people_unit_1"> 대</label> <input type="radio" name="d_pe_people_unit" id="d_pe_people_unit_2" value="팀" <?=($data_recent['d_pe_people_unit']=="팀")?"checked":""?>><label for="d_pe_people_unit_2">팀</label> <select name="d_ok" style="width:100px" class="ml10"> <option value="A" style="color:<?=$cf['d_ok_color_A']?>;">예약가능</option> <option value="B" style="color:<?=$cf['d_ok_color_B']?>;">대기</option> <option value="C" style="color:<?=$cf['d_ok_color_C']?>;">마감</option> </select> </td> </tr> <? } } ## 패키지 투어 else{ ?> <tr> <th>정원/최소출발인원/상태</th> <td> <input name="d_people2" type="text" size="5" value="<?=$data_recent['d_people2']?>" class="input_text" maxlength="4" style="text-align:right" onKeyDown="ChkNum(this,event);" hname="정원" required /> 명 <input name="d_people3" type="text" size="5" value="<?=$data_recent['d_people3']?>" class="input_text" maxlength="4" style="text-align:right" onKeyDown="ChkNum(this,event);" /> 명 <select name="d_ok" style="width:100px" class="ml10"> <option value="A" style="color:<?=$cf['d_ok_color_A']?>;">예약가능</option> <?php if($row['tab']!="T"){?> <option value="B" style="color:<?=$cf['d_ok_color_B']?>;">대기</option> <?php }?> <option value="C" style="color:<?=$cf['d_ok_color_C']?>;">마감</option> </select> </td> </tr> <?}?> <tr> <th>가격(기준 판매가)<br> <!-- <input type="button" value="가 격 추 가" class="Table_btn red help_tooltip" id="item_view_addon_price" title="추가개발협의후 사용하실수 있습니다."> --> </th> <td><div id="ajax_price_list"></div></td> </tr> <tr style="display:none;" class="item_view_addon_price"> <th>가격(정상 판매가)</th> <td><div id="ajax_normalprice_list"></div></td> </tr> <tr style="display:none;" class="item_view_addon_price"> <th>가격(대리점 판매가)</th> <td><span id="ajax_agent_list"></span></td> </tr> <?php if($shop_point['use_yn']=="Y") {?> <tr> <th>적립금</th> <td colspan="3"> <input type="radio" name="point_yn" id="point_yn_1" value="Y" checked> <label for="point_yn_1">적립함</label> <input type="radio" name="point_yn" id="point_yn_2" value="N" > <label for="point_yn_2">적립안함</label> 구매액(상품가격)<input name="point_buy1" id="point_buy1" type="text" size="10" value="<?=number_format($shop_point['point_buy1'])?>" class="input_text d_money" <?=$require_num_comma?> />원당 <input name="point_buy2" id="point_buy2" type="text" size="10" value="<?=number_format($shop_point['point_buy2'])?>" class="input_text d_money" <?=$require_num_comma?> />원 적립 </td> </tr> <?php }?> <?php if($row['tab']!="T") {?> <tr> <th>일정표</th> <td colspan="3"> <select name="" id="comm_dateform_list" class="mb20" style="width:812px;" onchange="common_base_dateform(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> <textarea name="d_content" id="d_content" class="ckeditor" ><?=$data_recent['d_content']?></textarea> </td> </tr> <tr> <th>이용특전 및 참조사항</th> <td colspan="3"> <textarea name="d_g_special" id="d_g_special" class="ckeditor" ><?=$row['g_special']?></textarea> </td> </tr> <tr> <th>포함내역</th> <td colspan="3"> <textarea name="d_g_inclusion" id="d_g_inclusion" class="ckeditor" ><?=$row['g_inclusion']?></textarea> </td> </tr> <tr> <th>불포함내역</th> <td colspan="3"> <textarea name="d_g_noinclusion" id="d_g_noinclusion" class="ckeditor" ><?=$row['g_noinclusion']?></textarea> </td> </tr> <tr> <th>유의사항 및 예약규정</th> <td colspan="3"> <textarea name="d_g_rule" id="d_g_rule" class="ckeditor" ><?=$row['g_rule']?></textarea> </td> </tr> <tr> <th>숙박정보</th> <td colspan="3"> <span id="ajax_hotel_list"></span> </td> </tr> <tr> <th>관광지정보</th> <td colspan="3"> <span id="ajax_place_list"></span> </td> </tr> <tr> <th>위치정보</th> <td colspan="3"> <input name="d_good_map_x" id="d_good_map_x" type="text" size="20" class="input_text" value="<?=$data_recent['d_good_map_x']?>" readonly /> / <input name="d_good_map_y" id="d_good_map_y" type="text" size="20" class="input_text" value="<?=$data_recent['d_good_map_y']?>" readonly /> <input type="button" value="위치검색" class="Table_btn gray" onclick="to_dialog.iframe('../good/pop_map.html?g_uid=<?=$g_uid?>&mode=goood_date_view','지도위치','800','600',true,true,'yes');" /> </td> </tr> <tr> <th>옵션상품</th> <td colspan="3"> <span id="ajax_option_list"></span> </td> </tr> <?php }?> <tr> <th>행사담당자</th> <td> <select name="admin_id"> <? for($i=0 ; $i < count($admin_arr) ; $i++){ $arr = $admin_arr[$i]; ?> <option value="<?=$arr['mb_id']?>" <?=($arr['mb_id']==$TO_MB['mb_id'])?"selected":""?>><?=$arr['mb_nm']?></option> <?}?> </select> </td> </tr> </table> <div class="btn_wrap_C mt30 mb30"> <a class="Bbtn red" href="javascript:;" onclick="check_date();">행사생성</a> </div> </form> <!-- /폼 --> </div> <script type="text/javascript"> function check_date() { var f = document.frmdate; if($("#frmdate input[name='ins_cond']:checked").val()=='private' && $(".d_start_item").length==0) { alert('적어도 1개이상 행사일자를 지정해주세요.'); return; } var result = to_validation(f); if ( result == false ) return false; if (!confirm('저장하시겠습니까?')) return false; <?php if($row['tab']!="T"){?> $("#d_content").val(CKEDITOR.instances.d_content.getData()); $("#d_g_special").val(CKEDITOR.instances.d_g_special.getData()); $("#d_g_inclusion").val(CKEDITOR.instances.d_g_inclusion.getData()); $("#d_g_noinclusion").val(CKEDITOR.instances.d_g_noinclusion.getData()); $("#d_g_rule").val(CKEDITOR.instances.d_g_rule.getData()); <?php }?> ajax_post("ajax_proc","good_date_proc.html","frmdate"); } function plane(route) { if(route=='A') // 항공 { $(".d_plane1").attr("disabled",false); $(".d_plane2").val(""); $(".d_plane2").attr("disabled",true); } else if(route=='E') // 기타 { $(".d_plane2").attr("disabled",false); $(".d_plane1").val(""); $(".d_plane1").attr("disabled",true); } } function chk_input_box(m_disp) { if(m_disp=="auto") { $(".input_box_item").first().show().siblings().hide(); $(".d_start_item").remove(); }else if(m_disp=="private") { $(".input_box_item").last().load('ajaxGoodDateCal.html?g_uid=<?=$g_uid?>',function(){ $(this).show(); }) .siblings().hide(); } } // 행사코드 function ck_d_code($ck) { var d_code = "<?=$d_code_h?>"; if($ck.prop("checked")==true){ $("#frmdate input[name='d_code_h']").val(d_code) .attr('readonly',true); }else{ $("#frmdate input[name='d_code_h']").val('') .attr('readonly',false).focus(); } } // 총판매가 계산 function cal_d_money() { $("#price_set_item > tbody > tr").each(function(){ var d_cost = $(this).find("input:eq(1)").val().replace(/,/g,''); try{var oil_money = $(this).children("td").first().next().next().find("input").val().replace(/,/g,'')}catch(e){ var oil_money=0;}; var d_money=0, ex_money=0; d_money = parseFloat(d_cost) + parseFloat(oil_money); $(this).find("input").last().val(number_format(d_money.toString())); // 환율계산(2016-12-09.허종) if(exchange_fg=="Y") { ex_money = cal_exchange_money(d_money); $(this).children("td").last().find("span").html(number_format(ex_money.toString())); } }); } // // 환율계산(2016-12-09.허종) // var exchange_fg = '<?=$row['exchange_fg']?>'; // 환율사용유무 Y/N var ext_to_krw = parseFloat('<?=$row['ext_to_krw']?>'); // 화폐교환 원(KRW) var ext_unit = parseInt('<?=$row['ext_unit']?>'); // 1000원단위,100원단위 var ext_round = '<?=$row['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 common_base_dateform(sidx) { ajax_post('','good_date_proc.html?SqlType=date_recv&SiDX='+sidx,'','fn_create_date_ckeditor'); // 기본일정표 } // 공통일정표 or 기본일정표 or 생성일정표 or 복사일정표를 data로 받음 function fn_create_date_ckeditor(data,status) { if ( status == "success" ) { // 에디터 instance 생성 var editor = eval('CKEDITOR.instances.d_content'); // 에디터로 data세팅 editor.setData(data); }else return; } $(document).ready(function(){ // 교통편 var d_route = "<?=$data_recent[d_route]?>"; plane(d_route); $("#week_date_all").click(function(){ var ck=$(this).is(":checked"); $("input[name='week_date[]']").each(function(){ this.checked = ck; }); }); // 행사생성기간 All checked or unchecked. $("#d_route_2").click(function(){plane('E');}); $("#d_route_1").click(function(){plane('A');}); // 대리점목록 ajax_post('ajax_agent_list','ajaxGoodDateAgent.html?g_uid=<?=$g_uid?>'); // 여행기간 선택 $("#frmdate input[name='tour_cond']").bind("click",function(){ var m_disp = $(this).val(); var periodStr='<?=$data_recent['periodStr']?>'; var period='<?=$data_recent['period']?>'; if(m_disp=="ab") { // 해외여행 $('.abroad_disp_item').show(); $('.demo_disp_item').hide() .children("input").first().prop("checked",true); $("#frmdate input[name='periodStr']").val(periodStr); $("#frmdate input[name='period']").val(period); $(".abroad_except_disp_item").show(); }else{ // 국내여행 $('.abroad_disp_item').hide() .find("option:eq(0)").attr("selected","selected"); $('.demo_disp_item').show(); $("#frmdate input[name='d_kor_sch']:eq(0)").trigger("click"); } }); // 행사구분 // ajax_loader('good_date_type_ajax.html?g_uid=<?=$g_uid?>','ajax_good_date_type',false); // 국내여행 박수 적용 $("#frmdate input[name='d_kor_sch']").bind("click",function(){ var v = $(this).val() var $periodStr = $("#frmdate input[name='periodStr']"); var $period = $("#frmdate input[name='period']"); switch(v){ case "A": // 당일 $(".abroad_except_disp_item").hide(); $periodStr.val('0'); $period.val('1'); break; case "B": // 무박 $(".abroad_except_disp_item").hide(); $periodStr.val('0'); $period.val('2'); break; case "C": // 숙박 $(".abroad_except_disp_item").show(); $periodStr.val('1').select(); $period.val('2'); break; } }); // 대(팀) 선택 $("#frmdate input[name='d_pe_people_unit']").change(function(){ $("#item_disp_pe_unit").html($(this).val()); }); // 가격목록 ajax_post('ajax_price_list','ajaxGoodDatePrice.html?g_uid=<?=$g_uid?>&d_uid=<?=$data_recent['d_uid']?>'); // 정상가격목록 //ajax_post('ajax_normalprice_list','ajaxGoodDateNormalPrice.html?g_uid=<?=$g_uid?>&d_uid=<?=$data_recent['d_uid']?>'); // 대리점목록 //ajax_post('ajax_agent_list','ajaxGoodDateAgent.html?g_uid=<?=$g_uid?>&d_uid=<?=$data_recent['d_uid']?>'); // 숙박정보 ajax_post('ajax_hotel_list','ajaxGoodDateHotel.html?g_uid=<?=$g_uid?>&d_uid=<?=$data_recent['d_uid']?>'); // 관광지 정보 ajax_post('ajax_place_list','ajaxGoodDatePlace.html?g_uid=<?=$g_uid?>&d_uid=<?=$data_recent['d_uid']?>'); // 옵션상품 ajax_post('ajax_option_list','ajaxGoodDateOption.html?g_uid=<?=$g_uid?>&d_uid=<?=$data_recent['d_uid']?>'); $("#item_view_addon_price").on("click",function(){ if($(this).hasClass("red")) { $(this).removeClass("red").addClass("red2"); // 정상가격목록 ajax_post('ajax_normalprice_list','ajaxGoodDateNormalPrice.html?g_uid=<?=$g_uid?>&d_uid=<?=$data_recent['d_uid']?>'); // 대리점목록 ajax_post('ajax_agent_list','ajaxGoodDateAgent.html?g_uid=<?=$g_uid?>&d_uid=<?=$data_recent['d_uid']?>'); } else { $(this).removeClass("red2").addClass("red"); $("#ajax_normalprice_list").html(''); $("#ajax_agent_list").html(''); } $(".item_view_addon_price").toggle(); }); // 에디터 <?php if($row['tab']!="T"){?> CKEDITOR.replace('d_content', {width:'100%',height:'350px'}); CKEDITOR.replace('d_g_special', {width:'100%',height:'350px'}); CKEDITOR.replace('d_g_inclusion', {width:'100%',height:'350px'}); CKEDITOR.replace('d_g_noinclusion', {width:'100%',height:'350px'}); CKEDITOR.replace('d_g_rule', {width:'100%',height:'350px'}); <?php }?> }); </script> <? include "../include/footer_iframe.html"; ?>