ÿØÿà 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.html"; include "_common.php"; // 기본 파라메터 검색 // 상품이 있는 카테고리 검색 /*if(!$b_uid_s) { // 1차 카테고리 $b_uid_s = $data_bc[0]['b_uid']; // 2차 카테고리 //$data_mc = TO_get_mc($b_uid_s,"","N"); //$m_uid_s = $data_mc[0]['m_uid']; // 상품구분 $tab = $data_bc[0]['tab']; if ($b_uid_s) movepage("index.html?tab={$tab}&b_uid_s={$b_uid_s}"); }*/ // 국가 //카테고리를 언어별로 $lang = "en"; //$data_areaa = to_area_b("",""," and DelFlag='N' "); $data_areaa = to_area_b("",""," and DelFlag='N' ",$lang); // 상품구분 if($tab)$tab_arr = TO_good_module("common",$tab); // 1차 카테고리 //if($tab and $b_uid_s) $bc_arr = TO_get_bc($b_uid_s,"N"); if($tab and $b_uid_s) $bc_arr = TO_get_bc($b_uid_s,"N"," and b_lang='{$lang}' "); // 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"); // 테이블명 $table = " good "; // 검색 설정 $sql_where = " "; if ($tab) $sql_where .= " and tab='{$tab}' "; // 상품구분 if ($search_key_s and $search_word_s) $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}' "; // 데이투어 구분 // 리스트 수 가져옴 $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']; // 네비게이션 타이틀 $title = '<strong>여행</strong>'; if($tab) $title = '<span class="tit_eng">'.$tab_arr['name_en'].'.</span> '; 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>'.$mc_arr[0]['m_name'].'<strong></strong>'; ?> <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"> <div class="c_top_sch_wrap"> <p class="c_top_sch_l"> <span><a href="javascript:;" class="c_red">검색 <?=$total?>개</a> / <a href="javascript:;" class="c_blue">전체 <?=$res_gtot?>개</a></span> </p> </div> <!-- 폼 --> <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="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 /> <col style=" width:54px" /><!-- 행사관리 --> <?if($tab!="T"){?><col style=" width:54px" /><!-- 일정표 --><?}?> <col style=" width:156px" /><!-- 설명회자료 --> <col style=" width:42px" /><!-- 조회수 --> <col style=" width:80px" /><!-- 등록일 --> <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> <?if($submenu_arr['date']=="block"){?><th scope="col">행사관리</th><!-- 행사관리(date) --><?}?> <?if($submenu_arr['options']=="block"){?><th scope="col">옵션관리</th><!-- 옵션관리(options) --><?}?> <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]); $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="choose_menu('<?=$num?>','<?=$row['g_uid']?>')" title="상품복사" style="cursor:pointer;"/></td> <td><span id="disp_yn_<?=$row['g_uid']?>" style="cursor:pointer;"><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']?>');" /></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><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"> <p class="hotel_code"><?=$row['special_icon']?></p> <a href="good_edit.html?<?=$_href?>&g_uid=<?=$row['g_uid']?>"><?=$row['g_title']?></a><!-- 상품명 --> <p class="Hcode_type"> <? for($k=0 ; $k<count($code_chuchun) ; $k++){ $code_arr = $code_chuchun[$k]; $check = ""; if($row[$code_arr['cd_memo']]=="1") $check = "checked"; ?> <img src="<?=$code_arr['cd_img']?>"> <input type="checkbox" name="<?=$row['cd_memo']?>" onclick="ajax_loader('good_proc.php?SqlType=chgrecomm&g_uid=<?=$row['g_uid']?>&gmain=<?=$code_arr['cd_memo']?>');" <?=$check?>><?=$code_arr['CdName']?> <?}?> <?=$row['area']?> </p><!--상품명/상품코드/추천 --> </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><!--행사관리 --><?}?> <?if($submenu_arr['options']=="block"){?> <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> <!-- /폼 --> <?=adm_get_paging($total_page, $page, $list, "?$href&page=", "")?> <!-- /본문 --> </div> </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}' "); // 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'); }); </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>