버튼을 눌러서 1,2,3중 하나의 데이터만 들고오게 할 수 있나요??

버튼을 눌러서 1,2,3중 하나의 데이터만 들고오게 할 수 있나요??

QA

버튼을 눌러서 1,2,3중 하나의 데이터만 들고오게 할 수 있나요??

본문

아래 이런 소스에서 버튼창을 추가하여 만약 버튼에 1,2,3의 값 중 1의 값을 클릭하게 되면 1~8의 데이터가

 

2의 값은 9~ 16 이런식으로 버튼을 클릭하는거에 따라서 데이터가 추출되어오게 하고 싶은데 혹시

 

소스한번 봐주시고 어떻게 추가하면될지 알려주실 분 계신가요 ㅜㅜ

 

 

<code>

<div class="st1-list">
   
    <form method="post" name="wzfrm" id="wzfrm">
    <input type="hidden" name="mode" id="mode" value="step2" />
    <input type="hidden" name="sch_day" id="sch_day" value="<?php echo $sch_day;?>" />
    <table cellpadding="0" cellspacing="0" border="0" class="tbl_type">
        <caption></caption>
        <colgroup>
            <col>
        </colgroup>
        <tbody>
        <tr>
            <th scope="col">선택</th>
            <th scope="col">소회의실 시간</th>
            <th scope="col">기준인원</th>
      <th scope="col">기간</th>
            <th scope="col">인원선택</th>
        </tr>
        <?php
        if ($cnt_room > 0) {
            for ($z = 0; $z < 8; $z++) {

            $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'];
            ?>
            <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'];?></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>
            </tr>
            <?php
            }

//////////////////////////////
   for ($z = 8; $z < 16; $z++) {

            $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'];
            ?>
            <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'];?></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>
            </tr>
            <?php
            }


///////////////////////
for ($z = 16; $z < $cnt_room; $z++) {

            $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'];
            ?>
            <tr style = background:#FDEBF3;>
                <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'];?></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>
            </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>

</code>

이 질문에 댓글 쓰기 :

답변 1

답변을 작성하시기 전에 로그인 해주세요.
전체 98
QA 내용 검색
filter #if ×

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT