ÿØÿà 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/board/ |
Upload File : |
<?include_once "../include/top_iframe.html"; //공통파일 인클루드?> <? /** * 배너용 상품 검색해오기 * 작성자 : 박건호 * 작성일 : 20141216. * 당장 사용하려고 하는 숙소를 제외하고는 하다가 말았음..다음에 꼭 할것... */ $href = "&search_key={$search_key}&search_word={$search_word}"; $href .= "&tmp_layer_id={$tmp_layer_id}&mb_level={$mb_level}&tab_s={$tab_s}"; $_href = $href."&page={$page}"; if($tab_s=='L'){ $table = "TB_HOTEL"; $title_nm = "hotel_nm"; $goodidx_nm = "hseq"; $sql_where = "and disp_yn='Y' "; $sql_order=" order_num "; }else if($tab_s=='A'){ $table = "TB_AIR_TICKET"; $title_nm = "air_nm"; $goodidx_nm = "ti_uid"; $sql_where = "and delflag='N' "; $sql_order=" order_num "; }else if($tab_s=='R'){ $table = "TB_RENTCAR"; $title_nm = "car_nm"; $goodidx_nm = "carid"; $sql_where = "and delflag='N' "; $sql_order=" order_num "; }else if($tab_s=='P' || $tab_s=='D'){ $table = "good"; $title_nm = "g_title"; $goodidx_nm = "g_uid"; $sql_where = "and g_ok='Y' "; $sql_order=" g_no "; } //테이블명 // 검색 설정 if($search_key and $search_word){ if($search_key=='title'){ $search_key_new = $title_nm; } $sql_where .= " and {$search_key_new} like '%{$search_word}%' "; } // 리스트 수 가져옴 $sql = "select count(*) as total from {$table} where 0=0 {$sql_where}"; $row = db_fetch($sql); $total = $row[total]; // 페이지수 설정 if (!$page) $page = 1; // 페이지 번호 $line = 7; // 보여줄 갯수 $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); //배열에 저장 $data = array(); if($tab_s=='L'){ // 정렬 설정 $data = hotel_fetch($sql_where,$sql_order,$olds,$line); }else if($tab_s=='A'){ } #print_r2($data); ?> <div class="iframe"> <!-- 본문 --> <!-- 폼 --> <form name="frm_agent_search" id="frm_agent_search" onsubmit="return check_search();"> <input type="hidden" name="tmp_layer_id" value="<?=$tmp_layer_id?>"><!-- 레이어ID --> <input type="hidden" name="tab_s" value="<?=$tab_s?>"> <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td height="10" align="center"> </td> </tr> <tr> <td height="40" align="center" class="pop_search_border"> <select name="search_key" id="search_key" style="height:18px;"> <option value="title" <?=($search_key=="title")?"selected":""?>>이름</option> </select> <input name="search_word" id="search_word" type="text" value="<?=$search_word?>" size="20" class="input_text" hname="검색어" required /> <input type="button" value="검 색" class="btn_green_left" onClick="check_search();" /><span class="btn_green_right"></span> </td> </tr> <tr> <td height="10" align="center"></td> </tr> <tr> <td> <div style="width:100%;height:340px;overflow-y:auto;overflow-x:hidden;"> <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" summary="상품조회 결과" id="tbl_member_list"> <caption>상품조회</caption> <tr height="30"> <th>이름</td> <th width="80" >최저가격</td> <th width="60" >조회수</td> <th width="60" >-</td> </tr> <? If(count($data)>0){ for($i=0 ; $i<count($data) ; $i++) { $row = $data[$i]; ?> <!-- 반복 --> <tbody> <tr height="25"> <td><?=$row[$title_nm]?></td> <td><?=number_format($row['price_low'])?></td> <td><?=$row['read_cnt']?></td> <td align="center"> <input type="button" value="확인" class="btn_red_left" onClick="insert_good('<?=$row[$goodidx_nm]?>','<?=$tab_s?>','<?=$row[$title_nm]?>');" /><span class="btn_red_right"></span> </td> </tr> <?} }else{?> <tr> <td colspan="6" height="50" align="center">:: 검색된 자료가 없습니다. ::</td> </tr> </tbody> <?}?> <!-- /반복 --> </table> <?=adm_get_paging($total_page, $page, $list, "?$href&page=", "")?> </div> </td> </tr> <tr> </table> </form> <!-- /폼 --> </div> <!-- /본문 --> <style type="text/css"> #tbl_member_list {border:1px solid #CFCFD1;} #tbl_member_list th{border:1px solid #CFCFD1; background-color:#F9F9F9} #tbl_member_list td{border:1px solid #CFCFD1; padding:3px 3px 3px 3px;} </style> <script type="text/javascript"> function check_search() { document.frm_agent_search.submit(); } function insert_good(hseq,tab,good_name) { var f = parent.document; var str = $("#goodidx",f).val(hseq); $("#goodtab",f).val(tab); $("#title",f).val(good_name); //창닫기 parent.to_dialog.close('<?=$tmp_layer_id?>'); } </script> <? include "../include/footer_iframe.html"; ?>