2026, 새로운 도약을 시작합니다.

예약관리에서 예약일 검색 추가 부분입니다.

· 1년 전 · 4407 · 2

여기 현재 예약리스트에서 예약자명으로만 검색들어가 있는데 예약일로도 검색할 수있게 넣으려는데 막혀서 잘 모르겠네요.. 혹시라도 도움을 받을 수 있을까 해서 이렇게 글 올려봅니다.

참고로 db서버에는 rr_start 이거는 테이블 : reserve_room 안에 들어있구요..

3536640699_1713070581.3206.jpg

----------------------------------------------------

<?php
require_once ('./_common.php');

$g5['title'] = $g5['title'].'예약목록';

$page = Request::both('page', 1);
$mth = Request::both('mth', false);
$sts = Request::both('sts', false);
$ph = Request::both('ph', false);
$cname = Request::both('cname', false);

$ReserveController = &Loader::instance()->loadController('reserve_ReserveManager');
$ReserveController->setUrl();

$Page = $ReserveController->doListPage($page, $mth, $sts, $ph, $cname);
$list = $Page->list;
$pay_arr = $ReserveController->pay_method;
$status_arr = $ReserveController->status_cd;

$page_query_string = "mth={$mth}&sts={$sts}&ph={$ph}&cname={$cname}";
?>
<?include_once $_SERVER['DOCUMENT_ROOT'].'/include/adm/admin.head.php';?>
<link rel="stylesheet" href="./css/style.css">

<div id="mng-reserve-list">
    <div class="search-area tbl_frm01 tbl_wrap">
        <form method="get" action="<?=$_SERVER['PHP_SELF']?>" >
            <table class="" summary="검색 및 분류">
                <caption>검색 및 분류 폼</caption>            
                <tbody>
                    <tr>
                        <th style="width:80px;">결제방식</th>
                        <td>
                            <select name="mth" title="결제방식 선택">
                                <option value="">전체</option>                            
                                <?foreach($pay_arr as $k => $row):?>
                                <option value="<?=$k?>" <?if($mth && $mth == $k):?>selected="selected"<?endif;?>><?=$row?></option>
                                <?endforeach;?>
                            </select>
                        </td>
                        <th style="width:60px;">
                            상태
                        </th>
                        <td>
                            <select name="sts" title="상태 선택">
                                <option value="">전체</option>
                                <?foreach($status_arr as $k => $row):?>
                                <option value="<?=$k?>" <?if($sts && $sts == $k):?>selected="selected"<?endif;?>><?=$row?></option>
                                <?endforeach;?>
                            </select>
                        </td>
                        <!--<th style="width:80px;">연락처</th>
                        <td>
                            <input type="text" name="ph" title="연락처검색" value="<?=$ph?>" class="frm_input"/>
                            <input type="submit" value="검색" class="btn btn_02"/>
                        </td>-->
                        <th style="width:80px;">예약자명</th>
                        <td>
                            <input type="text" name="cname" title="예약자명검색" value="<?=$cname?>" class="frm_input"/>
                            <input type="submit" value="검색" class="btn btn_02"/>
                        </td>                       
                    </tr>
                </tbody>
            </table>
        </form>
    </div>

    <div class="tbl_head01 tbl_wrap">
        <table class="room-list-table reserve-list" summary="예약된 정보 목록">
            <caption>예약목록</caption>
            <colgroup>
                <col width="120px" />
                <col width="100px" />
                <col width="100px" />
                <col width="100px" />
                <col width="100px" />
                <col width="100px" />
                <col width="100px" />
                <col width="60px" />
                <col width="100px" />
                <col width="50px" />
                <col width="150px" />
                <col width="50px" />
                <col width="100px" />
            </colgroup>
            <thead>
                <tr>                
                    <th>등록일</th>
                    <th>예약자명</th>
                    <th>연락처</th>
                    <th>총금액</th>                
                    <th>결제금액</th>
                    <th>미결제금액</th>
                    <th>결제방식</th>
                    <th>상태</th>
                    <th>예약일</th>
                    <th>기간</th>
                    <th>객실유형</th>
                    <th>성인/소아</th>
                    <th>총액</th>                
                </tr>
            </thead>
            <tbody>
                <?if(!is_array($list) || count($list) < 1):?>
                <tr>
                    <td colspan="9">※ 검색된 예약정보가 없습니다.</td>
                </tr>
                <?else:?>
                <?foreach($list as $k => $row):?>
                <tr <?if(mktime(0,0,0, date('m'), date('d'), date('Y')) <= $row['r_ctime']):?>class="today"<?endif;?>>
                    <td class="center">
                        <a href="./form.php?seq=<?=$row['r_seq']?>">
                        <?=date('Y.m.d H:i', $row['r_ctime']);?>
                        </a>
                    </td>
                    <td class="center">
                        <?=$row['r_cname']?>
                    </td>
                    <td class="center">
                        <?=$row['r_ph']?>
                    </td>
                    <td class="center">
                        <?=number_format($row['r_total']);?>원
                    </td>
                    <td class="center">
                        <?=number_format($row['r_paied'])?>원
                    </td>
                    <td class="center <?if($row['left'] > 0):?>danger<?endif;?>">                    
                        <?=number_format($row['left'])?>원
                    </td>
                    <td class="center">
                        <?=$row['pay_type_kr']?>
                    </td>
                    <td class="center">
                        <?=$row['status_kr']?>
                    </td>
                    <td colspan="5" style="padding-left:5px; padding-right:5px;">
                        <table class="" summary="예약된 객실 정보">
                            <caption>객실정보 목록</caption>
                            <colgroup>
                                <col width="100px" />
                                <col width="50px" />
                                <col width="150px" />
                                <col width="50px" />
                                <col width="100px" />
                            </colgroup>
                            <tbody class="center">
                                <?if(is_array($row['rooms']) && count($row['rooms']) > 0):?>
                                <?foreach($row['rooms'] as $k => $detail):?>
                                <tr>
                                    <td><?=date('Y.m.d', $detail['rr_start'])?></td>
                                    <td><?=$detail['rr_range']?>박</td>
                                    <td><?=$detail['ri_name']?></td>
                                    <td>
                                        <?=$detail['rr_adult']?> /  <?=$detail['rr_child']?>
                                    </td>
                                    <td>
                                        <?=number_format($detail['rr_total'])?>원
                                    </td>
                                </tr>
                                <?endforeach;?>
                                <?else:?>
                                <tr>
                                    <td colspan="5" class="danger">
                                    ※ 등록된 객실 정보가 없습니다. 
                                    </td>
                                </tr>
                                <?endif;?>
                            </tbody>
                        </table>
                    </td>
                </tr>
                <?endforeach;?>
                <?endif;?>
            </tbody>
        </table>

        <?if(is_array($Page->page_list) && count($Page->page_list) > 0):?>
        <div class="btn-area-center">
            <ul class="page-list">
                <?if($Page->page_prev):?>
                <li>
                    <a href="<?=$_SERVER['PHP_SELF']?>?page=<?=$Page->page_prev?>&<?=$page_query_string?>"><</a>
                </li>
                <?endif;?>
                <?foreach($Page->page_list as $v):?>
                <li <?if($page == $v):?>class="active"<?endif;?>>
                    <a href="<?=$_SERVER['PHP_SELF']?>?page=<?=$v?>&<?=$page_query_string?>"><?=$v?></a>
                </li>
                <?endforeach;?>
                <?if($Page->page_next):?>
                <li>
                    <a href="<?=$_SERVER['PHP_SELF']?>?page=<?=$Page->page_next?>&<?=$page_query_string?>">></a>
                </li>
                <?endif;?>
            </ul>
        </div>
        <?endif;?>        
        
    </div>
</div>

<iframe name="formReceiver" id="formReceiver" style="border:1px solid red; width:100%; height:400px; display:none;"></iframe>

<style>
    tr.hover > td{background-color:#9DCEF8;}
    table table tr td{background-color:#fff;}
</style>
<script>
$(document).ready(function(){
    var tr_list = $('.room-list-table > tbody > tr');
    $.each(tr_list, function(i, e){
        $(e).css('cursor', 'pointer');
        var $a = $(e).find('a');
        var href = $a.attr('href');

        $(e).on('mouseenter', function(){
            $(this).addClass('hover');
        }).on('mouseleave', function(){
            $(this).removeClass('hover');
        }).on('click', function(){
            document.location.href=href;
        });

    });
});
</script>
<?include_once $_SERVER['DOCUMENT_ROOT'].'/include/adm/admin.tail.php';;?>

|

댓글 2개

안녕하세요.
관련 작업 다수 처리 하였습니다.
견적 5만입니다.
ftp 및 관련 내용 주시면 처리하여 드리겠습니다.
카카오톡 onetiger123 입니다.
개발 24년차이며 작업관련해서 먼저 오픈톡으로 문의 주세요
문의전화 070-7613-7669
오픈톡 https://open.kakao.com/me/flyweb

댓글 작성

댓글을 작성하시려면 로그인이 필요합니다.

로그인하기

제작의뢰

SIR은 제작의뢰에 일체 관여하지 않습니다. SIR을 사칭하는 경우가 있으니 주의하세요. 

번호 제목 글쓴이 날짜 조회
20567 1주 전 조회 482
20566 2주 전 조회 491
20565 2주 전 조회 540
20564 3주 전 조회 562
20563 3주 전 조회 566
20562 3주 전 조회 452
20561 3주 전 조회 389
20560 4주 전 조회 387
20559 1개월 전 조회 408
20558 1개월 전 조회 379
20557 1개월 전 조회 452
20556 1개월 전 조회 414
20555 1개월 전 조회 439
20554 1개월 전 조회 530
20553 1개월 전 조회 484
20552 1개월 전 조회 467
20551 1개월 전 조회 397
20550 1개월 전 조회 448
20549 1개월 전 조회 363
20548 1개월 전 조회 455
20547 1개월 전 조회 435
20546 1개월 전 조회 379
20545 1개월 전 조회 387
20544 1개월 전 조회 464
20543 1개월 전 조회 471
20542 1개월 전 조회 392
20541 1개월 전 조회 354
20540 1개월 전 조회 441
20539 1개월 전 조회 494
20538 1개월 전 조회 393
🐛 버그신고