예약리스트 나올 때 버튼별로 방 예약 시간을 나오게 하고 싶습니다.

예약리스트 나올 때 버튼별로 방 예약 시간을 나오게 하고 싶습니다.

QA

예약리스트 나올 때 버튼별로 방 예약 시간을 나오게 하고 싶습니다.

답변 1

본문

현재 예약 리스트가 나올 때 예를 들어 1,2,3... 번방으로 되어있다면

 

1번방 9시부터 저녁 9시까지, 2번방 9시부터 저녁 9시까지 쭉 나열되어 있습니다.

 

첫 화면 들어갈 때는 전체 리스트가 출력되고

 

상단에 방 번호별로 버튼을 만들어 눌리면 각 방에 대한 리스트만 나오고 다른 방 예약은 숨기도록 수정을 하고 싶습니다.

 

아래는 소스인데 너무 길어서 중간방부터 짤라서 넣어보았습니다. 확인 한번 해주시고 각 방별로 버튼을 클릭해서 다른 방은 숨길 수 있는 방법이 있는지 댓글 달아주시면 감사드리겠습니다

 


           <?php
            }
///10~12번방//////////////////////////////////////
  for ($z = 108; $z < 120; $z++) {
    $zz = $z + 12;
    $zzz = $z + 24;
////여기 넣을라고함
            $max_day = $wzpconfig['pn_max_booking_day']; // 관리자에서 정해진 최대 예약일수.
            if (isset($arr_status[$arr_room[$z]['rm_ix']]))
                $max_day = $arr_status[$arr_room[$z]['rm_ix']]['max_day'];
            $max_day1 = $wzpconfig['pn_max_booking_day']; // 관리자에서 정해진 최대 예약일수.
            if (isset($arr_status[$arr_room[$zz]['rm_ix']]))
                $max_day1 = $arr_status[$arr_room[$zz]['rm_ix']]['max_day'];
   $max_day2 = $wzpconfig['pn_max_booking_day']; // 관리자에서 정해진 최대 예약일수.
            if (isset($arr_status[$arr_room[$zzz]['rm_ix']]))
                $max_day2 = $arr_status[$arr_room[$zzz]['rm_ix']]['max_day'];
            ?>
            <tr style = background:#FEFBE5;>
                <td>
                    <?php if ($max_day) { ?>
                    <input type="hidden" name="rm_ix[<?php echo $z;?>]" id="rm_ix_<?php echo $z;?>" value="<?php echo $arr_room[$z]['rm_ix'];?>" />
                    <input type="checkbox" name="chk[]" id="chk_<?php echo $z;?>" value="<?php echo $z;?>" <?php echo $arr_room[$z]['rm_ix'] == $rm_ix ? 'checked' : '';?> />
                    <?php } else { ?>
                    -
                    <?php } ?>
                </td>
                <td><?php echo $arr_room[$z]['rm_subject'];?>
         
    <input type="hidden" name="bk_day[<?php echo $z;?>]" id="bk_day_<?php echo $z;?>" value="1" />
    
    </td>
                <!--<td><?php echo $arr_room[$z]['rm_person_min'].'~'.$arr_room[$z]['rm_person_max'].'명';?></td>
                <td>
                    <?php if ($max_day) { ?>
                    <select name="bk_day[<?php echo $z;?>]" id="bk_day_<?php echo $z;?>">
                        <?php
                        for ($i=1;$i<=$max_day;$i++) {
                            echo '<option value="'.$i.'" '.$selected.'>'.$i.'일</option>';
                        }
                        ?>
                    </select>
                    <?php } else { ?>
                    -
                    <?php } ?>
                </td>-->
                <td>
                    <?php if ($max_day) { ?>
                    <select name="bk_cnt_adult[<?php echo $z;?>]" id="bk_cnt_adult_<?php echo $z;?>" data-price="<?php echo $arr_room[$z]['rm_price_adult'];?>" data-min="<?php echo $arr_room[$z]['rm_person_min'];?>">
                        <?php
                        for ($i=$arr_room[$z]['rm_person_min'];$i<=$arr_room[$z]['rm_person_max'];$i++) {
                            $selected = '';
                            if ($i == $arr_room[$z]['rm_person_min'])
                                $selected = 'selected';
                            echo '<option value="'.$i.'" '.$selected.'>'.$i.'명</option>';
                        }
                        ?>
                    </select>
                    <?php } else { ?>
                    -
                    <?php } ?>
                </td>
 
    <td>
                    <?php if ($max_day1) { ?>
                    <input type="hidden" name="rm_ix[<?php echo $zz;?>]" id="rm_ix_<?php echo $zz;?>" value="<?php echo $arr_room[$zz]['rm_ix'];?>" />
                    <input type="checkbox" name="chk[]" id="chk_<?php echo $zz;?>" value="<?php echo $zz;?>" <?php echo $arr_room[$zz]['rm_ix'] == $rm_ix ? 'checked' : '';?> />
                    <?php } else { ?>
                    -
                    <?php } ?>
                </td>
                <td><?php echo $arr_room[$zz]['rm_subject'];?>
    <input type="hidden" name="bk_day[<?php echo $zz;?>]" id="bk_day_<?php echo $zz;?>" value="1" />
    </td>
                <!--<td><?php echo $arr_room[$z]['rm_person_min'].'~'.$arr_room[$z]['rm_person_max'].'명';?></td>
                <td>
                    <?php if ($max_day) { ?>
                    <select name="bk_day[<?php echo $zz;?>]" id="bk_day_<?php echo $zz;?>">
                        <?php
                        for ($i=1;$i<=$max_day;$i++) {
                            echo '<option value="'.$i.'" '.$selected.'>'.$i.'일</option>';
                        }
                        ?>
                    </select>
                    <?php } else { ?>
                    -
                    <?php } ?>
                </td>-->
                <td>
                    <?php if ($max_day1) { ?>
                    <select name="bk_cnt_adult[<?php echo $zz;?>]" id="bk_cnt_adult_<?php echo $zz;?>" data-price="<?php echo $arr_room[$zz]['rm_price_adult'];?>" data-min="<?php echo $arr_room[$zz]['rm_person_min'];?>">
                        <?php
                        for ($i=$arr_room[$zz]['rm_person_min'];$i<=$arr_room[$zz]['rm_person_max'];$i++) {
                            $selected = '';
                            if ($i == $arr_room[$zz]['rm_person_min'])
                                $selected = 'selected';
                            echo '<option value="'.$i.'" '.$selected.'>'.$i.'명</option>';
                        }
                        ?>
                    </select>
                    <?php } else { ?>
                    -
                    <?php } ?>
                </td>

    <td>
                    <?php if ($max_day2) { ?>
                    <input type="hidden" name="rm_ix[<?php echo $zzz;?>]" id="rm_ix_<?php echo $zzz;?>" value="<?php echo $arr_room[$zzz]['rm_ix'];?>" />
                    <input type="checkbox" name="chk[]" id="chk_<?php echo $zzz;?>" value="<?php echo $zzz;?>" <?php echo $arr_room[$zzz]['rm_ix'] == $rm_ix ? 'checked' : '';?> />
                    <?php } else { ?>
                    -
                    <?php } ?>
                </td>
                <td><?php echo $arr_room[$zzz]['rm_subject'];?>
         
    <input type="hidden" name="bk_day[<?php echo $zzz;?>]" id="bk_day_<?php echo $zzz;?>" value="1" />
    
    </td>
                <!--<td><?php echo $arr_room[$z]['rm_person_min'].'~'.$arr_room[$z]['rm_person_max'].'명';?></td>
                <td>
                    <?php if ($max_day) { ?>
                    <select name="bk_day[<?php echo $z;?>]" id="bk_day_<?php echo $z;?>">
                        <?php
                        for ($i=1;$i<=$max_day;$i++) {
                            echo '<option value="'.$i.'" '.$selected.'>'.$i.'일</option>';
                        }
                        ?>
                    </select>
                    <?php } else { ?>
                    -
                    <?php } ?>
                </td>-->
                <td>
                    <?php if ($max_day2) { ?>
                    <select name="bk_cnt_adult[<?php echo $zzz;?>]" id="bk_cnt_adult_<?php echo $zzz;?>" data-price="<?php echo $arr_room[$zzz]['rm_price_adult'];?>" data-min="<?php echo $arr_room[$zzz]['rm_person_min'];?>">
                        <?php
                        for ($i=$arr_room[$zzz]['rm_person_min'];$i<=$arr_room[$zzz]['rm_person_max'];$i++) {
                            $selected = '';
                            if ($i == $arr_room[$zzz]['rm_person_min'])
                                $selected = 'selected';
                            echo '<option value="'.$i.'" '.$selected.'>'.$i.'명</option>';
                        }
                        ?>
                    </select>
                    <?php } else { ?>
                    -
                    <?php } ?>
                </td>
 
            </tr>
            <?php
            }
////13~14번방//////////////////////////////////////
for ($z = 144; $z < 156; $z++) {
    $zz = $z + 12;
////여기 넣을라고함
           $max_day = $wzpconfig['pn_max_booking_day']; // 관리자에서 정해진 최대 예약일수.
            if (isset($arr_status[$arr_room[$z]['rm_ix']]))
                $max_day = $arr_status[$arr_room[$z]['rm_ix']]['max_day'];
            $max_day1 = $wzpconfig['pn_max_booking_day']; // 관리자에서 정해진 최대 예약일수.
            if (isset($arr_status[$arr_room[$zz]['rm_ix']]))
                $max_day1 = $arr_status[$arr_room[$zz]['rm_ix']]['max_day'];
            ?>
            <tr style = background:#EAFAF8;>
                <td>
                    <?php if ($max_day) { ?>
                    <input type="hidden" name="rm_ix[<?php echo $z;?>]" id="rm_ix_<?php echo $z;?>" value="<?php echo $arr_room[$z]['rm_ix'];?>" />
                    <input type="checkbox" name="chk[]" id="chk_<?php echo $z;?>" value="<?php echo $z;?>" <?php echo $arr_room[$z]['rm_ix'] == $rm_ix ? 'checked' : '';?> />
                    <?php } else { ?>
                    -
                    <?php } ?>
                </td>
                <td><?php echo $arr_room[$z]['rm_subject'];?>
         
    <input type="hidden" name="bk_day[<?php echo $z;?>]" id="bk_day_<?php echo $z;?>" value="1" />
    
    </td>
                <!--<td><?php echo $arr_room[$z]['rm_person_min'].'~'.$arr_room[$z]['rm_person_max'].'명';?></td>
                <td>
                    <?php if ($max_day) { ?>
                    <select name="bk_day[<?php echo $z;?>]" id="bk_day_<?php echo $z;?>">
                        <?php
                        for ($i=1;$i<=$max_day;$i++) {
                            echo '<option value="'.$i.'" '.$selected.'>'.$i.'일</option>';
                        }
                        ?>
                    </select>
                    <?php } else { ?>
                    -
                    <?php } ?>
                </td>-->
                <td>
                    <?php if ($max_day) { ?>
                    <select name="bk_cnt_adult[<?php echo $z;?>]" id="bk_cnt_adult_<?php echo $z;?>" data-price="<?php echo $arr_room[$z]['rm_price_adult'];?>" data-min="<?php echo $arr_room[$z]['rm_person_min'];?>">
                        <?php
                        for ($i=$arr_room[$z]['rm_person_min'];$i<=$arr_room[$z]['rm_person_max'];$i++) {
                            $selected = '';
                            if ($i == $arr_room[$z]['rm_person_min'])
                                $selected = 'selected';
                            echo '<option value="'.$i.'" '.$selected.'>'.$i.'명</option>';
                        }
                        ?>
                    </select>
                    <?php } else { ?>
                    -
                    <?php } ?>
                </td>
 
    <td>
                    <?php if ($max_day1) { ?>
                    <input type="hidden" name="rm_ix[<?php echo $zz;?>]" id="rm_ix_<?php echo $zz;?>" value="<?php echo $arr_room[$zz]['rm_ix'];?>" />
                    <input type="checkbox" name="chk[]" id="chk_<?php echo $zz;?>" value="<?php echo $zz;?>" <?php echo $arr_room[$zz]['rm_ix'] == $rm_ix ? 'checked' : '';?> />
                    <?php } else { ?>
                    -
                    <?php } ?>
                </td>
                <td><?php echo $arr_room[$zz]['rm_subject'];?>
    <input type="hidden" name="bk_day[<?php echo $zz;?>]" id="bk_day_<?php echo $zz;?>" value="1" />
    </td>
                <!--<td><?php echo $arr_room[$z]['rm_person_min'].'~'.$arr_room[$z]['rm_person_max'].'명';?></td>
                <td>
                    <?php if ($max_day) { ?>
                    <select name="bk_day[<?php echo $zz;?>]" id="bk_day_<?php echo $zz;?>">
                        <?php
                        for ($i=1;$i<=$max_day;$i++) {
                            echo '<option value="'.$i.'" '.$selected.'>'.$i.'일</option>';
                        }
                        ?>
                    </select>
                    <?php } else { ?>
                    -
                    <?php } ?>
                </td>-->
                <td>
                    <?php if ($max_day1) { ?>
                    <select name="bk_cnt_adult[<?php echo $zz;?>]" id="bk_cnt_adult_<?php echo $zz;?>" data-price="<?php echo $arr_room[$zz]['rm_price_adult'];?>" data-min="<?php echo $arr_room[$zz]['rm_person_min'];?>">
                        <?php
                        for ($i=$arr_room[$zz]['rm_person_min'];$i<=$arr_room[$zz]['rm_person_max'];$i++) {
                            $selected = '';
                            if ($i == $arr_room[$zz]['rm_person_min'])
                                $selected = 'selected';
                            echo '<option value="'.$i.'" '.$selected.'>'.$i.'명</option>';
                        }
                        ?>
                    </select>
                    <?php } else { ?>
                    -
                    <?php } ?>
                </td>
            </tr>
            <?php
            }
//////////////////////////////////////
        }
        else {
            ?>
            <tr>
                <td colspan="7">예약할 수 있는 소회의실이 존재하지 않습니다.</td>
            </tr>
            <?php
        }
        ?>
        </tbody>
    </table>
    </form>
   
    <div class="action">
        <a href="<?php echo WZP_STATUS_URL;?>" class="btn_submit before">< 이전단계</a> 
        <!--<a href="javascript:getNext();" class="btn_submit next">다음단계 ></a>-->
  <a href="<?=($is_member)?"javascript:getNext();":"javascript:alert('로그인후 이용해 주십시요'); "?>" class="btn_submit next">다음단계</a>
    </div>
</div>

이 질문에 댓글 쓰기 :

답변 1

답변을 작성하시기 전에 로그인 해주세요.
QA 내용 검색
질문등록
전체 71
© SIRSOFT
현재 페이지 제일 처음으로