ÿØÿà 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_proc.html"; // 관광지 목록 $selplace_arr = TO_get_info($g_uid); // 선택된 관광지 목록 if($d_uid) { $data = date_list($g_uid,"none"," and d_uid='{$d_uid}' "); $row = date_list_replace($data[0]); $good_place_arr = $row['good_place_all']; } ?> <div style="height: 200px; width:400px;overflow-x: hidden; overflow-y: auto;float:left;"> <table border="0" cellspacing="0" cellpadding="0" width="100%" class="setting_write" id="setting_write_place"> <tr> <th width="10px"><input type="checkbox" id="place_all_item"></th><th>지역</th><th>구분</th><th>여행지명</th> </tr> <? for($a=0 ; $a<count($selplace_arr) ;$a++) { $r = $selplace_arr[$a]; $check=""; if(is_array($good_place_arr)) { foreach($good_place_arr as $v) { if($v['Iidx']==$r['Iidx']) $check="checked"; } } ?> <tr> <td> <input type="checkbox" name="" value="<?=$r['Iidx']?>" <?=$check?>> <input type="hidden" name="" value="<?=$r['place_nm']?>"> </td> <td><?=$r['CityName']?></td> <td><?=$r['place_cd_nm']?></td> <td><?=$r['place_nm']?></td> </tr> <? } ?> </table> </div> <div style="height: 200px; width:400px;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_place2"> <tr> <th>지역</th><th>구분</th><th>여행지명</th><th width="30px">-</th> <?if(is_array($good_place_arr)) { foreach($good_place_arr as $v) { ?> <tr> <td><input type="hidden" name="Iidx_ar[]" value="<?=$v['Iidx']?>"><input type="hidden" name="place_nm_ar[]" value="<?=$v['place_nm']?>"><?=$v['area_nm']?></td> <td><?=$v['place_cd_nm']?></td> <td><?=$v['place_nm']?></td> <td><span class="" style="cursor: pointer;" onclick="good_place_delrow($(this))">del</span></td> </tr> <?}}?> </tr> </table> </div> <script type="text/javascript"> $(document).ready(function(){ $("#setting_write_place > tbody > tr > td > input:checkbox").click(function(){ var Iidx = $(this).val(); var place_nm = $(this).parent().find("input:eq(1)").val(); var area_nm = $(this).parent().parent().find("td:eq(1)").html(); var place_cd_nm = $(this).parent().parent().find("td:eq(2)").html(); if($(this).prop("checked")==true) { str = "<tr>"; str = str + "<td><input type='hidden' name='Iidx_ar[]' value='"+Iidx+"'><input type='hidden' name='place_nm_ar[]' value='"+place_nm+"'>"+area_nm+"</td>"; str = str + "<td>"+place_cd_nm+"</td>"; str = str + "<td>"+place_nm+"</td>"; str = str + "<td><span class='' style='cursor:pointer;' onclick=\"good_place_delrow($(this))\">del</span></td>"; str = str + "</tr>"; $("#setting_write_place2 > tbody ").append(str); }else{ $("#setting_write_place2 > tbody > tr > td > input:hidden").each(function(){ if(Iidx==$(this).val()) { $(this).parent().parent().remove(); } }); } }); $("#place_all_item").click(function(){ var ck = $(this).prop("checked"); $("#setting_write_place > 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_place_delrow($obj) { var Iidx = $obj.parent().parent().find("input:eq(0)").val(); $("#setting_write_place > tbody > tr > td > input:checkbox").each(function(){ if($(this).val()==Iidx) $(this).prop("checked",false); }); $obj.parent().parent().remove(); } </script>