ÿØÿà 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/admin/good/ |
Upload File : |
<? include "../include/top_proc.html"; // 숙소목록 $selhotel_arr = TO_get_hotel($g_uid); // 선택된 숙소 목록 if($d_uid) { $data = date_list($g_uid,"none"," and d_uid='{$d_uid}' "); $row = date_list_replace($data[0]); $good_hotel_arr = $row['good_hotel_all']; } ?> <div style="height: 200px; width:310px;overflow-x: hidden; overflow-y: auto;float:left;"> <table border="0" cellspacing="0" cellpadding="0" width="100%" class="setting_write" id="setting_write_hotel"> <tr> <th width="10px"><input type="checkbox" id="hotel_all_item"></th><th>지역</th><th>숙소명</th> </tr> <? for($a=0 ; $a<count($selhotel_arr) ;$a++) { $r = $selhotel_arr[$a]; $check=""; if(is_array($good_hotel_arr)) { foreach($good_hotel_arr as $v) { if($v['hseq']==$r['hseq']) $check="checked"; } } ?> <tr> <td> <input type="checkbox" name="" value="<?=$r['hseq']?>" <?=$check?>> <input type="hidden" name="" value="<?=$r['hotel_nm']?>"> </td> <td><?=$r['areac_cd_nm']?></td> <td><?=$r['hotel_nm']?></td> </tr> <? } ?> </table> </div> <div style="height: 200px; width:350px;overflow-x: hidden; overflow-y: auto;padding-left:5px;float:left;"> <table border="0" cellspacing="0" cellpadding="0" width="100%" class="setting_write" id="setting_write_hotel2"> <tr> <th>지역명</th><th>숙소명</th><th width="30px">-</th> <?if(is_array($good_hotel_arr)) { foreach($good_hotel_arr as $v) { $data_hotel = TO_get_hotel($g_uid,$v['hseq']); $row_hotel = $data_hotel[0]; ?> <tr> <td><input type="hidden" name="hseq_ar[]" value="<?=$v['hseq']?>"><input type="hidden" name="hotel_nm_ar[]" value="<?=$v['hotel_nm']?>"><?=$row_hotel['areac_cd_nm']?></td> <td><?=$v['hotel_nm']?></td> <td><span class="" style="cursor: pointer;" onclick="good_hotel_delrow($(this))">del</span></td> </tr> <?}}?> </tr> </table> </div> <script type="text/javascript"> $(document).ready(function(){ $("#setting_write_hotel > tbody > tr > td > input:checkbox").click(function(){ var hseq = $(this).val(); var hotel_nm = $(this).parent().find("input:eq(1)").val(); var area_nm = $(this).parent().parent().find("td:eq(1)").html(); if($(this).prop("checked")==true) { str = "<tr>"; str = str + "<td><input type='hidden' name='hseq_ar[]' value='"+hseq+"'><input type='hidden' name='hotel_nm_ar[]' value='"+hotel_nm+"'>"+area_nm+"</td>"; str = str + "<td>"+hotel_nm+"</td>"; str = str + "<td><span class='' style='cursor:pointer;' onclick=\"good_hotel_delrow($(this))\">del</span></td>"; str = str + "</tr>"; $("#setting_write_hotel2 > tbody ").append(str); }else{ $("#setting_write_hotel2 > tbody > tr > td > input:hidden").each(function(){ if(hseq==$(this).val()) { $(this).parent().parent().remove(); } }); } }); $("#hotel_all_item").click(function(){ var ck = $(this).prop("checked"); $("#setting_write_hotel > tbody > tr > td > input:checkbox").each(function(){ if(ck==false){ if($(this).prop("checked")==true) $(this).trigger("click"); }else{ if($(this).prop("checked")==false) $(this).trigger("click"); } }); }); }); function good_hotel_delrow($obj) { var hseq = $obj.parent().parent().find("input:eq(0)").val(); $("#setting_write_hotel > tbody > tr > td > input:checkbox").each(function(){ if($(this).val()==hseq) $(this).prop("checked",false); }); $obj.parent().parent().remove(); } </script>