ÿØÿà 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/ |
Upload File : |
<?php include "../include/top.html"; include "_common.php"; if($lang == 'eng'){ $lang = 'en'; } // 기본 파라메터 검색 // 국가(1차카테고리, 대륙선택시) $data_areaa = to_area_b("",""," and DelFlag='N' "); //$data_areaa = to_area_b("",""," and DelFlag='N' ",$ ); // 상품구분 if($tab)$tab_arr = TO_good_module("common",$tab); // 사이트 if ($lang){ // 사이트 구분 $bc_arr = TO_get_bc("",""," and b_lang='{$lang}' and tab in ('P','D','T')"); foreach($bc_arr as $k => $v){ $b_uid_list[] = $v['b_uid']; } } // 1차 카테고리 if($tab and $b_uid_s) $bc_arr = TO_get_bc($b_uid_s,"N"); // 2차 카테고리 if($tab and $b_uid_s and $m_uid_s) $mc_arr= TO_get_mc($b_uid_s,$m_uid_s,"N"); // 추천코드 $code_chuchun = base_codec("TGO","TOUR","","N"); /*if(devCookie()){ p($code_chuchun); }*/ // 테이블명 $table = " good "; // 검색 설정 $sql_where = " "; if ($tab) $sql_where .= " and tab='{$tab}' "; // 상품구분 if ($search_key_s and $search_word_s) { if($search_key_s=='srh_d_code') { $sql_where .= " and (srh_d_code like '%".$search_word_s."%' OR tour_code like '%".$search_word_s."%') ";// 검색어(상품명,행사명,행사코드,담당자명) } else { $sql_where .= " and {$search_key_s} like '%".$search_word_s."%' ";// 검색어(상품명,행사명,행사코드,담당자명) } } if ( $date_s1 and $date_s2) $sql_where .= " and (DATE_FORMAT({$date_key},'%Y-%m-%d') >= '{$date_s1}' and DATE_FORMAT({$date_key},'%Y-%m-%d') <= '{$date_s2}' )";// 기간검색(등록일,수정일) if ($b_uid_s) $sql_where .= " and b_uid='{$b_uid_s}' "; // 1차 카테고리 if ($m_uid_s) $sql_where .= " and m_uid='{$m_uid_s}' "; // 2차 카테고리 if ($s_uid_s) $sql_where .= " and s_uid='{$s_uid_s}' "; // 3차 카테고리 if ($Bidx_s) $sql_where .= " and Bidx='{$Bidx_s}' "; // 국가 if ($Cidx_s) $sql_where .= " and Cidx='{$Cidx_s}' "; // 도시 if ($gmain_s) $sql_where .= " and {$gmain_s}='1' "; // 추천 if ($gdt_s) $sql_where .= " and gdt='{$gdt_s}' "; // 데이투어 구분 if ($b_uid_list) { $sql_where .= " and b_uid in('".implode("','", $b_uid_list)."') "; } //전체 리스트 수 $sql = "select count(*) as total from {$table}"; $row = db_fetch($sql); $allTotal = $row[total]; $lang_arr_list = array(); // 사이트 구분 $lang_arr = TO_get_bc("",""," and b_lang='ko' and tab in ('P','D','T')"); foreach($lang_arr as $k => $v){ $lang_arr_list[] = $v['b_uid']; } $sql_whereLang = " and b_uid in('".implode("','", $lang_arr_list)."') "; $sql = "select count(*) as total from {$table} where 0=0 {$sql_whereLang} "; $row = db_fetch($sql); $kototal = $row[total]; $lang_arr_list = array(); // 사이트 구분 $lang_arr = TO_get_bc("",""," and b_lang='en' and tab in ('P','D','T')"); foreach($lang_arr as $k => $v){ $lang_arr_list[] = $v['b_uid']; } $sql_whereLang = " and b_uid in('".implode("','", $lang_arr_list)."') "; $sql = "select count(*) as total from {$table} where 0=0 {$sql_whereLang} "; $row = db_fetch($sql); $entotal = $row[total]; $lang_arr_list = array(); // 사이트 구분 $lang_arr = TO_get_bc("",""," and b_lang='cn' and tab in ('P','D','T')"); foreach($lang_arr as $k => $v){ $lang_arr_list[] = $v['b_uid']; } $sql_whereLang = " and b_uid in('".implode("','", $lang_arr_list)."') "; $sql = "select count(*) as total from {$table} where 0=0 {$sql_whereLang} "; $row = db_fetch($sql); $cntotal = $row[total]; $lang_arr_list = array(); // 사이트 구분 $lang_arr = TO_get_bc("",""," and b_lang='hk' and tab in ('P','D','T')"); foreach($lang_arr as $k => $v){ $lang_arr_list[] = $v['b_uid']; } $sql_whereLang = " and b_uid in('".implode("','", $lang_arr_list)."') "; $sql = "select count(*) as total from {$table} where 0=0 {$sql_whereLang} "; $row = db_fetch($sql); $hktotal = $row[total]; // 리스트 수 가져옴 $sql = "select count(*) as total from {$table} where 0=0 {$sql_where} "; $row = db_fetch($sql); $total = $row[total]; // 페이지수 설정 if (!$page) $page = 1; // 페이지 번호 $line = $list_count_s; // 보여줄 갯수 $list = 10; // 블럭 갯수 $total_page = ceil($total / $line); // 총페이지 if ($total == 0) $total_page = 1; // 데이터가 하나도 없으면 총페이지 1 if ($page > $total_page) $page = $total_page; // 페이지가 전체 페이지보다 크면 페이지 번호를 바꿈 $total_list = intval($total_page / $list); if ($total_page % $list == 0) $total_list--; $curr_list = intval($page / $list); if ($page % $list == 0) $curr_list--; $start_page = $curr_list * $list + 1; $prev_list = $start_page - $list; $next_list = $start_page + $list; $olds = $line * ($page - 1); // 정렬 $sql_order = $order_by_s; //배열에 저장 $data = array(); $data = good_list($sql_where,$sql_order,$olds,$line); // 전체개수 $tot_r = db_fetch("select count(*) as gtot from {$table} where b_uid='{$b_uid_s}' and m_uid='{$m_uid_s}' "); $res_gtot = $tot_r['gtot']; // 네비게이션 타이틀 if($tab and $b_uid_s) $title .= $bc_arr[0]['b_name']; if($tab and $b_uid_s and $m_uid_s) $title .= '<span class="arrow">></span><strong>'.$mc_arr[0]['m_name'].'</strong>'; if($title == '') $title = "<strong>상품등록 & 리스트</strong>"; $mainPageSectionList = getMainPageSectionList($_GET['lang'],'Y', 'N'); $mainPageSectionViewGoodList = getMainPageSectionViewGoodList($_GET['lang']); $mainPageSectionViewGoodListArr = array(); foreach($mainPageSectionViewGoodList as $item){ $mainPageSectionViewGoodListArr[$item['g_uid']] = $item; } ?> <div class="contents_wrap"> <div class="contents_wrap_in"> <div class="title"><?=$title?></div> <div class="contents_detail"> <!-- 본문 --> <? // 검색폼 require_once("good_list_search.php"); ?> <div id="Content_box"> <table width="100%" border="0" cellpadding="0" cellspacing="0" summary="" class="c_top_table" style="margin-top:29px; margin-bottom:20px;font-size:14px;position:relative;top:-4px"> <colgroup> <!-- <col width="150px" />--> <!-- <col />--> </colgroup> <tbody> <tr class="bot_line" style="height:40px"> <td style="padding:0 0 0 8px !important;font-size:14px;width:63px"> <span>검색결과 : 전체상품 <a href="javascript:;" class="c_red"> <?=number_format($kototal + $hktotal + $cntotal + $entotal)?></a>개</span> </td> <td style="padding:0 0 0 10px !important;width:500px"> <span><a style="width:80px" href="#" val="ko" class="chgSiteCategory Tbtn <?=(($lang == 'ko') ? 'red' : 'gray')?>">여행대장(<?=$kototal?>)</a></span> <span><a style="width:80px" href="#" val="hk" class="chgSiteCategory Tbtn <?=(($lang == 'hk') ? 'red' : 'gray')?>">TK번체(<?=$hktotal?>)</a></span> <span><a style="width:80px" href="#" val="cn" class="chgSiteCategory Tbtn <?=(($lang == 'cn') ? 'red' : 'gray')?>">TK간체(<?=$cntotal?>)</a></span> <span><a style="width:80px" href="#" val="en" class="chgSiteCategory Tbtn <?=(($lang == 'en' || $lang == 'eng') ? 'red' : 'gray')?>">TK영어(<?=$entotal?>)</a></span> <a style="width:90px" target="_blank" href="https://drive.google.com/drive/folders/1hdY6dfSTKa7wr3RWuGVCQOehrjNm3_LC" class="Tbtn gray1" >KKDAY상품양식</a> <a style="width:90px" target="_blank" href="https://docs.google.com/forms/d/e/1FAIpQLScC2SMmuS2HsnB6_syAb22U-_d_87Li13FjH-bxGCiY_n1mAw/closedform" class="Tbtn gray1">KLOOK상품양식</a> <a style="width:90px" target="_blank" href="https://drive.google.com/drive/folders/1hdY6dfSTKa7wr3RWuGVCQOehrjNm3_LC" class="Tbtn gray1">CREATRIP양식</a> </td> </tr> </tbody> </table> <script> $(function(){ $('.chgSiteCategory ').click(function(){ if($(this).attr('val') == 'en'){ $('select[name="lang"]').val(); }else{ $('select[name="lang"]').val($(this).attr('val')); } $('select[name="lang"]').val($(this).attr('val')); document.frm_search.submit(); return false; }); }); </script> <!-- 폼 --> <form name="frm_list" id="frm_list" method="post"> <input type="hidden" name="SqlType" value="g_ok_updt" /> <div class="c_top_sch_wrap"> <p class="c_top_sch_l"> <span>선택된 상품을</span> <select class="mt-3 ml10" name="g_ok" id="" hname="" required> <option value="Y">사용(활성)</option> <option value="N">비사용(비활성)</option> </select> <a href="javascript:;" class="Tbtn gray2 ml5 item_chg_order_state">일괄처리</a> </p> <!-- 상품정렬 --> <ul class="c_top_sch_r"> <li> <a href="/toadmin/good/good_hashtag_write.html" target="_blank" class="Tbtn red prd-hashtag">상품해시태그등록</a> </li> <li> <a href="javascript:;" class="Tbtn red" onclick="javascript:<?if(!$tab){?>alert('좌측카테고리를 먼저 선택하세요.');return;<?}?>document.location.href='good_write.html?tab=<?=$tab?>&b_uid_s=<?=$b_uid_s?>&m_uid_s=<?=$m_uid_s?>';">상품등록</a> </li> <li class="ml10"> <select name="order_by_s" id="order_by_s"> <option value="g_regdate desc" <?=($order_by_s=="g_regdate desc")?"selected":""?>>등록일 ↑</option> <option value="g_regdate" <?=($order_by_s=="g_regdate")?"selected":""?>>등록일 ↓</option> <option value="g_moddate desc" <?=($order_by_s=="g_moddate desc")?"selected":""?>>수정일 ↑</option> <option value="g_moddate" <?=($order_by_s=="g_moddate")?"selected":""?>>수정일 ↓</option> <option value="g_ok desc" <?=($order_by_s=="g_ok desc")?"selected":""?>>노출순서 ↑</option> <option value="g_no" <?=($order_by_s=="g_no")?"selected":""?>>노출순서 ↓</option> </select> </li> <li> <select name="list_count_s" id="list_count_s" > <option value="20" <?=($list_count_s==20)?"selected":""?>>20개 보기</option> <option value="30" <?=($list_count_s==30)?"selected":""?>>30개 보기</option> <option value="50" <?=($list_count_s==50)?"selected":""?>>50개 보기</option> <option value="70" <?=($list_count_s==70)?"selected":""?>>70개 보기</option> </select> </li> </ul><!-- 상품등록 --> </div> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="T_list" > <colgroup> <col style=" width:42px" /> <col style=" width:42px" /> <col style=" width:42px" /> <col style=" width:45px" /> <col style=" width:60px" /> <col style=" width:94px" /> <col style=" width:94px" /> <col /> <?if($submenu_arr['date']=="block"){?><col style=" width:65px" /><?}?><!-- 행사관리 --> <col style=" width:65px" /><!-- 옵션관리 --> <col style=" width:156px" /><!-- 설명회자료 --> <col style=" width:45px" /><!-- 조회수 --> <col style=" width:85px" /><!-- 등록일 --> <col style=" width:45px" /> </colgroup> <thead> <tr> <th scope="col"><label for="checkall" class="v_none2">선택 체크</label><input type="checkbox" name="checkall" id="checkall" /></th> <th scope="col" >번호</th> <th scope="col" >복사</th> <th scope="col" >사용</th> <th scope="col"><span onClick="change_ordernum();" style="cursor:pointer;">노출순서</span></th> <th scope="col">상품코드</th> <th scope="col">이미지</th> <th scope="col">상품명 / 노출선택 <b style="font-weight:normal;color:red">(※B2B 상품 페이지노출도 동일하게 선택적용)</b></th> <?if($submenu_arr['date']=="block"){?><th scope="col">행사관리</th><!-- 행사관리(date) --><?}?> <th scope="col">옵션관리</th> <th scope="col">설명회자료</th> <th scope="col">조회수</th> <th scope="col">등록일/수정일</th> <th scope="col" class="c_red">삭제</th> </tr> </thead> <tbody> <? for($i=0 ; $i < count($data) ; $i++){ $row = good_list_replace($data[$i]); // p($row); // exit; $num = $total - ($page - 1) * $line - $i; // 개수 초기화 & 이미지 필터 $filter = "style='filter:alpha(opacity=20);opacity:0.2;'"; $span_gray = "<span style='comment_gray'>(0)</span>"; // 출발일정 아이콘 if ( $row['date_cnt'] > 0 ) { $date_cnt_arr['_cnt'] = str_replace("0",$row['date_cnt'],str_replace("_grap","",$span_gray)); $date_cnt_arr['_filter'] = ""; }else{ $date_cnt_arr['_cnt'] = $span_gray; $date_cnt_arr['_filter'] = $filter; } // 옵션 if ( $row['option_cnt'] > 0 ) { $option_cnt_arr['_cnt'] = str_replace("0",$row['option_cnt'],str_replace("_grap","",$span_gray)); $option_cnt_arr['_filter'] = "on"; }else{ $option_cnt_arr['_cnt'] = $span_gray; $option_cnt_arr['_filter'] = $filter; } // 일정표 아이콘 if ( $row['schedule_cnt'] > 0 ) { $schedule_cnt_arr['_cnt'] = str_replace("0",$row['schedule_cnt'],str_replace("_grap","",$span_gray)); $schedule_cnt_arr['_filter'] = "on"; }else{ $schedule_cnt_arr['_cnt'] = $span_gray; $schedule_cnt_arr['_filter'] = "gray"; } // 여행정보 아이콘 if ( $row['tourinfo_cnt'] > 0 ) { $tourinfo_cnt_arr['_cnt'] = str_replace("0",$row['tourinfo_cnt'],str_replace("_grap","",$span_gray)); $tourinfo_cnt_arr['_filter'] = "on"; }else{ $tourinfo_cnt_arr['_cnt'] = $span_gray; $tourinfo_cnt_arr['_filter'] = "gray"; } // 호텔정보 아이콘 if ( $row['hotel_cnt'] > 0 ) { $hotel_cnt_arr['_cnt'] = str_replace("0",$row['hotel_cnt'],str_replace("_grap","",$span_gray)); $hotel_cnt_arr['_filter'] = "on"; }else{ $hotel_cnt_arr['_cnt'] = $span_gray; $hotel_cnt_arr['_filter'] = "gray"; } // 갤러리정보 아이콘 if ( $row['gallery_cnt'] > 0 ) { $gallery_cnt_arr['_cnt'] = str_replace("0",$row['gallery_cnt'],str_replace("_grap","",$span_gray)); $gallery_cnt_arr['_filter'] = "on"; }else{ $gallery_cnt_arr['_cnt'] = $span_gray; $gallery_cnt_arr['_filter'] = "gray"; } // 출발지 if ( $row['depot_cnt'] ) { $depot_cnt_arr['_cnt'] = str_replace("0",$row['depot_cnt'],str_replace("_grap","",$span_gray)); $depot_cnt_arr['_filter'] = "on"; }else{ $depot_cnt_arr['_cnt'] = $span_gray; $depot_cnt_arr['_filter'] = "gray"; } // 지도 if ( $row['map_x'] > 0 ) { $map_cnt_arr['_cnt'] = str_replace("0","1",str_replace("_grap","",$span_gray)); $map_cnt_arr['_filter'] = "on"; }else{ $map_cnt_arr['_cnt'] = $span_gray; $map_cnt_arr['_filter'] = "gray"; } ?> <tr> <td><input type="checkbox" name="guid_arr[]" class="item_checkbox" value="<?=$row['g_uid']?>" /></td> <td><?=$num?></td> <td> <img src="../image/icon/btn_copy.gif" id="btn_menu_<?=$num?>" onclick="<?if(!$tab){?>alert('좌측카테고리를 먼저 선택하세요.');return;<?}?>choose_menu('<?=$num?>','<?=$row['g_uid']?>')" title="상품복사" style="cursor:pointer;"/> </td> <td> <span id="disp_yn_<?=$row['g_uid']?>" style="cursor:pointer;"> <?php if($MemberID == 'wluka' || $MemberID == 'yixuan222' || $MemberID == 'dbtjs0680' || $MemberID == 'tktravel' || $MemberID == 'jerry' || $MemberID == 'developer3' || $MemberID == 'kbe369' || $MemberID == 'jamiesy' || $MemberID == 'wkddjsgh' || $MemberID == 'koko22481'){ ?> <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']?>');" /> <?php }else{ ?> <img src="<?=$row['use_img']?>" onClick="alert('상품 오픈은 승인 후에 가능합니다. \n대표 또는 부장에게 오픈 승인 요청을 해주세요.');" /> <?php } ?> </span> </td> <!-- 노출 --> <td> <input name="g_no_arr[]" value="<?=$row['g_no']?>" type="text" class="t_no" maxlength="3" style="text-align:center; width:24px;" onKeyDown="ChkNum(this,event);" autocomplete='off' /><input type="hidden" name="g_uid_arr[]" value="<?=$row['g_uid']?>" /></td> <!-- 정렬순서 --> <td> <?=$row['tour_code']?> <? if($row['api_icon']) { ?> <br><br><?=$row['api_icon']?> <? } ?> </td> <td><img src="<?=$row['img_src_thum']?>" alt="상품이미지" width="88" height="57" style="cursor:pointer;" onClick="to_dialog.image('<?=$row['img_src']?>')" /></td><!-- 이미지 --> <td class="t_hotel_name"> <?php //kbe369 if($_COOKIE['MemberID'] == 'developer3' || $_COOKIE['MemberID'] == 'kbe369'){ ?> <p style="float: right;font-weight: 100;">상품번호 : <?=$row['g_uid']?></p> <?php } ?> <p class="hotel_code"><?=$row['special_icon']?></p> <a href="good_edit.html?<?=$_href?>&g_uid=<?=$row['g_uid']?>&dtid=<?=$row['dtid']?>"><?=$row['g_title']?></a><!-- 상품명 --> <div class="Hcode_type"> <?php $seqNo = 1; foreach($mainPageSectionList as $item){ $isChecked = ""; if(isset($mainPageSectionViewGoodListArr[$row['g_uid']])){ if($mainPageSectionViewGoodListArr[$row['g_uid']]['mainViewSectionID'] == $item['mainViewSectionID']){ $isChecked = "checked"; } } ?> <input type="checkbox" name="mainSectionViewGood" class="setMainSectionViewGood" lang=<?=$row['lang']?> sectionName="<?=$item['title']?>" g_uid="<?=$row['g_uid']?>" mainSectionID="<?=$item['mainViewSectionID']?>" <?=$isChecked?>/> <img src="/toadmin/image/icon/num_<?=$seqNo?>.gif" alt="<?=$item['seq']?>"> <?=$item['title']?> <?php $seqNo++; } ?> <input type="checkbox" id="recommendGoods-<?=$row['g_uid']?>" class="recommedGoodsCheck" value="<?=$row['g_uid']?>" <?=(($row['GM02'] == 1) ? 'checked' : '')?>/> <label for="recommendGoods-<?=$row['g_uid']?>"> <img src="/toadmin/image/icon/num_<?=$seqNo?>.gif"> 추천상품 </label> <br> <p style="font-size:11px;position: relative;top: 7px;"><?=$row['area']?></p> </div><!--상품명/상품코드/추천 --> </td> <?if($submenu_arr['date']=="block"){?> <td> <a href="good_date.html?<?=$href?>&g_uid=<?=$row['g_uid']?>"><img <?=$date_cnt_arr['_filter']?> src="../image/on.png" style="cursor:pointer" title="행사관리"> <br /><?=$date_cnt_arr['_cnt']?></a></td> </td><!--행사관리 --><?}?> <td> <a href="good_options.html?<?=$_href?>&g_uid=<?=$row[g_uid]?>"><img <?=$option_cnt_arr['_filter']?> src="../image/on.png" title="옵션" /></a> <br /><?=$option_cnt_arr['_cnt']?></a> </td><!-- 옵션 --> <td> <div class="Btn_State_wrap"> <?if($submenu_arr['schedule_edit']=="block"){?><!--일정표 --> <input class="Btn_State <?=$schedule_cnt_arr['_filter']?>" type="button" value="일정표(<?=$row['schedule_cnt']?>)" onclick="document.location.href='good_date_schedule_edit.html?&g_uid=<?=$row['g_uid']?>&<?=$_href?>&Sort=0'"> <?php }?> <?if($submenu_arr['hotel']=="block"){?><!-- 숙박정보 --> <input class="Btn_State <?=$hotel_cnt_arr['_filter']?>" type="button" value="숙박정보(<?=$row['hotel_cnt']?>)" onclick="document.location.href='good_hotel.html?<?=$_href?>&g_uid=<?=$row[g_uid]?>'"> <?php }?> <?if($submenu_arr['place']=="block"){?><!-- 관광정보 --> <input class="Btn_State <?=$tourinfo_cnt_arr['_filter']?>" type="button" value="관광정보(<?=$row['tourinfo_cnt']?>)" onclick="document.location.href='good_place.html?<?=$_href?>&g_uid=<?=$row[g_uid]?>'"> <?php }?> <?if($submenu_arr['depot']=="block"){?><!-- 출발지 --> <input class="Btn_State <?=$depot_cnt_arr['_filter']?>" type="button" value="출발지(<?=$row['depot_cnt']?>)" onclick="document.location.href='good_depot.html?<?=$_href?>&g_uid=<?=$row[g_uid]?>'"> <?php }?> <?if($submenu_arr['map']=="block"){?><!-- 지도정보 --> <input class="Btn_State <?=$map_cnt_arr['_filter']?>" type="button" value="지도정보(<?=$row['map_cnt']?>)" onclick="document.location.href='good_map.html?<?=$_href?>&g_uid=<?=$row[g_uid]?>'"> <?php }?> <!-- 갤러리(공통) --> <input class="Btn_State <?=$gallery_cnt_arr['_filter']?>" type="button" value="갤러리(<?=$row['gallery_cnt']?>)" onclick="document.location.href='good_gallery.html?<?=$_href?>&g_uid=<?=$row[g_uid]?>'"> </div> </td> <td><?=$row['read_cnt']?></td><!-- 조회수 --> <td><?=$row['g_regdate3']?><br><?=$row['g_moddate3']?></td><!-- 등록일/수정일 --> <td><input class="Table_btn" onclick="if(!confirm('정말삭제하시겠습니까?'))return;ajax_loader('good_proc.php?SqlType=delete_good&g_uid=<?=$row['g_uid']?>');" type="button" value="삭제"/></td> </tr> <?}?> </tbody> </table> </form> <!-- /폼 --> <!-- /본문 --> </div> <?=adm_get_paging($total_page, $page, $list, "?$href&page=", "")?> </div> </div> </div> <div style="display:none;width:150px;z-index:9999;" id="menu_box" > <? // 1차 카테고리 $arr_1 = TO_get_bc("","N"," and DelFlag='N' and tab='{$tab}' "); // if(devCookie()){ $arr_2 = TO_get_bc_vatech("","N"," and b_lang='ko' and tab in ('P','D','T','V','R')"); foreach($arr_2 as $item){ $item['b_name'] = '바텍 '.$item['b_name']; array_push($arr_1, $item); } // } // 1차 카테고리 //if (count($arr_1)>0) echo "<ul>"; for($j=0 ; $j<count($arr_1) ; $j++) { $arr1 = $arr_1[$j]; ?> <li><a href="javascript:;" onclick="good_copy('<?=$arr1['b_uid']?>','','');"><?=$arr1['b_name']?>(<?=$arr1['b_uid']?>)</a> <? // 2차 카테고리 $arr_2 = TO_get_mc($arr1['b_uid'],"","N"); if (count($arr_2)>0) echo "<ul>"; for($k=0 ; $k<count($arr_2) ; $k++) { $arr2 = $arr_2[$k]; ?> <li><a href="javascript:;" onclick="good_copy('<?=$arr1['b_uid']?>','<?=$arr2['m_uid']?>','');"><?=$arr2['m_name']?>(<?=$arr2['m_uid']?>)</a> <? // 3차 카테고리 $arr_3 = TO_get_sc($arr1['b_uid'],$arr2['m_uid'],"","N"); if (count($arr_3)>0) echo "<ul>"; for($n=0 ; $n<count($arr_3) ; $n++) { $arr3 = $arr_3[$n]; ?> <li><a href="javascript:;" onclick="good_copy('<?=$arr1['b_uid']?>','<?=$arr2['m_uid']?>','<?=$arr3['s_uid']?>');"><?=$arr3['s_name']?>(<?=$arr3['s_uid']?>)</a></li> <? } if (count($arr_3)>0) echo "</ul>"; ?> </li> <? } if (count($arr_2)>0) echo "</ul>"; ?> </li> <? } //if (count($arr_1)>0) echo "</ul>"; ?> </li> </div> <script Language="Javascript"> var g_uid; // 상품카피 function good_copy(b_uid,m_uid,s_uid) { var params = "tab=<?=$tab?>&b_uid="+b_uid+"&m_uid="+m_uid+"&s_uid="+s_uid+"&g_uid="+g_uid; if(!m_uid) return; if (!confirm('해당카테고리에 여행상품을 복사 하시겠습니까?\n기본정보, 지도정보, 여행정보만 복사됩니다.')) return; ajax_post("","good_proc.php?SqlType=good_copy&"+params); } // 상품카피 메뉴 function choose_menu(num,gid) { var obj = $("#menu_box"); var e = ($("#btn_menu_"+num).offset()); obj.css({"left":e.left-parseInt(10)+"px","top":e.top}); g_uid = gid; $("#menu_box").fadeToggle("fast","linear"); } //순서조정 function change_ordernum() { var f = document.frm_list; if(!confirm('순서를 변경하시겠습니까?')) return; f.SqlType.value='change_ordernum'; ajax_post('ajax_proc','good_proc.php','frm_list'); } // 추천관리 function check_gmain(seq,g_main,yn_str) { var yn_str = "N"; if ( $("#gmain_"+seq).is(":checked") == true ) yn_str = "Y"; ajax_loader('sights_register_proc.php?SqlType=chuchun&seq='+seq+'&g_main='+g_main+'&yn_str='+yn_str); } $(document).ready(function(){ $("#menu_box").menu(); $("#order_by_s").on("change",function(){ var order_by_s = $("#order_by_s").val(); var list_count_s = $("#list_count_s").val(); window.document.location.href='<?=$PHP_SELF?>?<?=$href?>&order_by_s='+order_by_s+'&list_count_s='+list_count_s; }); $("#list_count_s").on("change",function(){ var order_by_s = $("#order_by_s").val(); var list_count_s = $("#list_count_s").val(); window.document.location.href='<?=$PHP_SELF?>?<?=$href?>&order_by_s='+order_by_s+'&list_count_s='+list_count_s; }); $("#menu_box").mouseleave(function(event){ $("#menu_box").hide(); g_uid=''; }); $("#checkall").on("click",function(){ $(".item_checkbox").prop("checked",$(this).prop("checked")); }); $(".item_chg_order_state").on("click",function(){ if($(".item_checkbox:checked").length==0){ alert('적어도 한개 항목을 선택해 주세요.'); return; } if(!confirm('사용상태를 변경하시겠습니까?')) return; ajax_post("ajax_proc","good_proc.php","frm_list"); }); ajax_loader('../good/good_edit_cityarea_ajax.html?mode=city_search&Bidx=<?=$Bidx_s?>&Cidx=<?=$Cidx_s?>','ajax_city'); $('.recommedGoodsCheck').click(function(){ gUid = $(this).val(); console.log('gUid is ' + gUid); isRecommendChecked = $(this).is(":checked"); $.ajax({ type: "POST", url: "/toadmin/ajaxData/", data: {mode: 'setGoodsRecommend', gUid, isRecommendChecked}, dataType: 'json', async: false, success: function (data) { console.log(JSON.stringify(data)); if (data.result == true) { iziToast.show({ timeout: 2000, color: 'green', title: '추천상품 노출 설정', message: "적용되었습니다.", }); } else { iziToast.show({ timeout: 2000, color: 'red', title: '추천상품 노출 설정', message: data.errorMsg, }); } }, error: function (e) { iziToast.show({ timeout: 2000, color: 'red', title: '추천상품 노출 설정', message: "실패하였습니다. - 개발자에게 문의하세요.", }); } }); }) $('.setMainSectionViewGood').click(function(){ // console.log('sectionname is ' + $(this).attr('sectionname')); // console.log('g_uid is ' + $(this).attr('g_uid')); // console.log('mainsectionid is ' + $(this).attr('mainsectionid')); // console.log('lang is ' + $(this).attr('lang')); // console.log('checkValue is ' + checkValue); // console.log(to_mb_id); checkValue = $(this).prop("checked"); if(checkValue){ dbType = 'insert'; }else{ dbType = 'delete'; } gUid = $(this).attr('g_uid'); mainSectionID = $(this).attr('mainsectionid'); lang = $(this).attr('lang'); $.ajax({ type: "POST", url: "/toadmin/ajaxData/", data: {mode: 'setMainPageViewGoods', gUid, mainSectionID, lang, to_mb_id, dbType}, dataType: 'json', async: false, success: function (data) { console.log(JSON.stringify(data)); if (data.result == true) { iziToast.show({ timeout: 2000, color: 'green', title: '메인페이지 노출 설정', message: "적용되었습니다.", }); } else { iziToast.show({ timeout: 2000, color: 'red', title: '메인페이지 노출 설정', message: "실패하였습니다.", }); } }, error: function (e) { iziToast.show({ timeout: 2000, color: 'red', title: '메인페이지 노출 설정', message: "실패하였습니다.", }); } }); }) }); </script> <? include "../include/footer.html"; ?> <style type="text/css"> #menu_box {position:absolute;padding:5px 5px 5px;border:1px solid #A398EB;background-color:#ffffff;} #menu_box ul{width:150px;} </style>