펜션/민박 - 예약하기 > 그누4 스킨

그누4 스킨

스킨의 저작권은 해당 스킨 제작자님께 있으며, 그누보드의 저작권과 다를 수 있습니다.
스킨 다운로드시 좋아요와 감사의 코멘트를 남기시면 제작자에게 큰 힘이됩니다. ^^y
그누보드와 관련이 있지만 스킨과 빌더가 아니면 플러그인 게시판에 올려주세요.

펜션/민박 - 예약하기 정보

게시판 펜션/민박 - 예약하기

첨부파일

pension_reserve.zip (118.0K) 1308회 다운로드 2007-05-24 00:00:09

본문

안녕하세요 요즘 다른직업을 하다보니 그누에는 눈팅만하고 간만에 나타났네요
일전에 했던 산채건강마을이라는 홈페이지를 리뉴얼해주면서 펜션예약하기게시판부분을 다시 만들었습니다.
필요하신분들이 있을거라는 생각에 올립니다.
참고는 시그너스님의 민박예약부분을 참고하였습니다.
입금통보하기는 불친절한아원씨님의것을 넣었습니다.
게시판리스트를 자세히 보시면 테스트과정에서 1동을 두번넣었는데요 사실은 예약불가생성전에 두번넣은것입니다. ㅎㅎ(버그아님을 밝히려고...)
또한 view.skin.php 파일 맨하단에 글쓰기목록보기 버튼들이 쭉 보이는데요 이것역시 관리자만 보이도록 되어있습니다.
리스트에서 객실정보는 별도의 링크되는 게시판을 만들고 그게시판에 순서에 맞게 객실보기를 넣으시길 바랍니다. 소스에서 객실정보의 링크버튼의 링크경로를 참고하시면 이해되실겁니다.

디자인만 바꾸었다고보시면되고요 몇가지 추가이미지가 있는데 하지않았습니다.
예를들면 list.skin.php소스에는 예약신정, 예약접수, 예약완료, 입실,퇴실 5가지인데 글쓰기등에서 미흡한점 등 입실,퇴실에 관한 설정과 이미지가 빠졌습니다. 굳이필요가없다고해서...
그리고 달력의 칸들이 정사각형이 아니고 세로가 긴 직사각형인데요 이것은 7동의 이미지를 다 넣으려니 세로가 길어진것입니다 자신의 홈피에 맞게 큰틀의 크기를 줄이시고 소스에서 높이수정하시면 됩니다.
또한 용량문제로 psd파일은 삭제했습니다.

삐끼의진수이니 그냥 쓰길 바랍니다.(저도 다 잊어먹어서 몰라유 답변이불가할듯..)
홈페이지 만드는데 너무많은것을 이곳에서 얻어가서 돌려드리는건 작은것 하나뿐 이해를...
참고사이트는 http://wellbeingtown.co.kr/myungam/bbs/board.php?bo_table=reservation 입니다.
참고사이트에서는 절대 펜션예약을 하지마시길 바랍니다. 감사합니다.
추천
14

댓글 전체

초기에 버튼이 안보인다는 분이 있어서 글 올립니다.

list.skin.php 파일에 보시면 75번째줄이 날짜검색을 하여 디비에서 불러오는건데요 (그아래로 쭉 소스들 연관.....)
초기에는 해당게시판 테이블에 아무것도 안 적혀있으니 검색을 해도 값이 없고
그래서 불러올 수없어서 좌측에 객실보기 버튼들이 안보입니다.
리스트로봐도글쓰기에서 날짜가 안나타납니다.
이부분은 저의경우는 그냥 디비에 접근해서 해당게시판테이블에 임시로 1번 값을 하나 넣었습니다.(디비접근부분은...)
넣을때 wr_3, wr_4 이부분에 20070101 이렇게 임시로 넣었는데요
그 후 이 값을 공지로 하거나 임시용으로 하거나... 아니면 수정해서 정식으로 사용하거나
새로운걸 추가한 후에 삭제를 하거나 그렇게 하면될듯 합니다. (좀 우격다짐으로 처리)

조금 번거롭지만 제가 짧아서 이부분을 초기에 검색하여 아무것도 없을경우 어떻게 보여지는게 좋을지 몰라서.......
이부분에 대해 개선점을 다른분이 대신 추가해주셨으면 좋겠습니다.
[75번째줄소스]
$query = "SELECT * FROM $write_table WHERE left(wr_3,6) <= '$year$sel_mon'  and left(wr_4,6) >= '$year$sel_mon'  ORDER BY wr_id ASC";

==================================================== 리스트보기를 추가할경우 ===================================
상단 또는 하단에 링크경로를 하나만드세요
<a http://해당게시판경로&view_mode ==list>[리스트보기]</a> 이렇게 링크를 넣으면 리스트보기가 됩니다.
[달력으로보기]부분에서는 링크경로에 &view_mode ==list을 추가안하고 일반적으로 링크경로를 만드시면 됩니다.

list.skin.php 파일추가소스
if ($view_mode =="list"){
 include_once ("$board_skin_path/list.view.php");
 exit;
}

list.view.php 파일명을 정하시고 아래의것을 넣어서 하나만드세요
그냥 일반리스트스킨인데 소스가 너무 기네요 혹 바로적용하실분을 위해 지저분하게 긴소스를 모두 올립니다.
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
// 선택옵션으로 인해 셀합치기가 가변적으로 변함
$colspan = 5;
if ($is_category) $colspan++;
if ($is_checkbox) $colspan++;
if ($is_good) $colspan++;
if ($is_nogood) $colspan++;
// 제목이 두줄로 표시되는 경우 이 코드를 사용해 보세요.
// <nobr style='display:block; overflow:hidden; width:000px;'>제목</nobr>
?>
<link rel="stylesheet" type="text/css" href="<?=$board_skin_path?>/mstyle.css">

<!-- 게시판 목록 시작 -->
<table width="<?=$width?>" align=center cellpadding=0 cellspacing=0>
<tr>
<td valign=top>

    <!-- 분류 셀렉트 박스, 게시물 몇건, 관리자화면 링크 -->
<? if ($admin_href) { ?>
    <table width="100%" cellspacing="0" cellpadding="0">
    <tr>
    <td align="right" valign="bottom">
<span class="m_total">Total : <?=number_format($total_count)?></span>&nbsp;&nbsp;
        <a href="<?=$admin_href?>" target="_blank"><img src="<?=$board_skin_path?>/img/admin.gif" title="관리자" width="63" height="22" border="0" align="absmiddle"></a>
    </td>
    </tr>
    <tr><td height="5"></td></tr>
    </table><?}?>

    <!-- 제목 -->
    <form name="fboardlist" method="post" style="margin:0px;">
    <input type="hidden" name="bo_table" value="<?=$bo_table?>">
    <input type="hidden" name="sfl"  value="<?=$sfl?>">
    <input type="hidden" name="stx"  value="<?=$stx?>">
    <input type="hidden" name="spt"  value="<?=$spt?>">
    <input type="hidden" name="page" value="<?=$page?>">
    <input type="hidden" name="sw"  value="">
   
    <table width="100%" cellpadding="0" cellspacing="0">
    <tr><td colspan="30" height="1" bgcolor="#dddddd"></td></tr>
    <tr>
    <td colspan="30">
        <table width="100%" height="26" border="0" cellpadding="0" cellspacing="0">
        <tr>
<td width="50" rowspan="2" align="center"><img src="<?=$board_skin_path?>/img/list_no.gif" title="번호" alt="번호" border="0"></td>
<td width="1"></td>

<? if ($is_checkbox) { ?>
<td width="40" rowspan="2" align="center"><INPUT onclick="if (this.checked) all_checked(true); else all_checked(false);" type=checkbox></td>
<td width="1"></td>
<?}?>

<? if ($is_category) { ?><td width="50" rowspan="2" align="center"><img src="<?=$board_skin_path?>/img/list_room.gif" title="객실" alt="객실" border="0"></td>
<td width="1"></td>
<?}?>

<td width="" rowspan="2" align="center"><img src="<?=$board_skin_path?>/img/list_date.gif" title="예약기간" alt="예약기간" border="0"></td>
<td width="1"></td>

<td width="110" rowspan="2" align="center"><img src="<?=$board_skin_path?>/img/list_writer.gif" title="예약자명" alt="예약자" border="0"></td>
<td width="1"></td>


<td width="80" rowspan="2" align="center"><img src="<?=$board_skin_path?>/img/list_time.gif" title="날짜" alt="날짜" border="0" width="35" height="15"></td>
<td width="1"></td>

<td width="49" rowspan="2" align="center"><img src="<?=$board_skin_path?>/img/list_hit.gif" title="조회수" alt="조회수" border="0"></td>
        </tr>

        <tr>
<td height="13" bgcolor="#D8D8D8"></td>
<? if ($is_checkbox) { ?><td height="13" bgcolor="#D8D8D8"></td><? } ?>
<? if ($is_category) { ?><td height="13" bgcolor="#D8D8D8"></td><? } ?>
<td height="13" bgcolor="#D8D8D8"></td>
<td height="13" bgcolor="#D8D8D8"></td>
<td height="13" bgcolor="#D8D8D8"></td>
        </tr>
        <tr><td height="1" colspan="20" bgcolor="#D8D8D8"></td></tr>
        </table>
    </td>
</tr>

    <!-- 목록 -->
    <? for ($i=0; $i<count($list); $i++) { ?>
    <tr height="25">
<td width="50" align=center>
        <?
        if ($list[$i][is_notice]) // 공지사항
            echo "<img src=\"$board_skin_path/img/notice_icon.gif\" width=30 height=16>";
        else if ($wr_id == $list[$i][wr_id]) // 현재위치
            echo "<font color='#2C8CB9'><strong>{$list[$i][num]}</strong>";
        else
            echo "<span class=m_num>{$list[$i][num]}</span>";
        ?>
</td>
<td width="1"></td>
<? if ($is_checkbox) { ?>
<td width="40" align=center><input type=checkbox name=chk_wr_id[] value="<?=$list[$i][wr_id]?>"></td>
<td width="1"></td>
<? } ?>
<? if ($is_category) { ?>
<td width="50" align=center><a href="<?=$list[$i][ca_name_href]?>"><font color=blue><span class=small><?=$list[$i][ca_name]?></span></font></a></td>
<td width="1"></td>
<? } ?>

<td style="padding-left:5px;word-break:break-all;">&nbsp;&nbsp;
        <?
$start_date_y = substr($list[$i][wr_3],0,4);
$start_date_m = substr($list[$i][wr_3],4,2);
$start_date_d = substr($list[$i][wr_3],6,2);
$end_date_y = substr($list[$i][wr_4],0,4);
$end_date_m = substr($list[$i][wr_4],4,2);
$end_date_d = substr($list[$i][wr_4],6,2);
?>
        <?
        echo $nobr_begin;
        echo $list[$i][reply];
        echo $list[$i][icon_reply];

        if ($list[$i][is_notice]) {
            echo "<a href='{$list[$i][href]}' class='m_sub_notice'>{$start_date_m}월{$start_date_d}일~{$end_date_m}월{$end_date_d}일 ({$list[$i][wr_5]})</a>";
        } else {
            echo "<a href='{$list[$i][href]}' class='m_sub'>{$start_date_m}월{$start_date_d}일~{$end_date_m}월{$end_date_d}일 ({$list[$i][wr_5]})</a>";
        }
echo "&nbsp;&nbsp;";

$cklist = $list[$i][wr_1];
if($cklist == 1){echo"<img src={$board_skin_path}/img/order1.gif border=0>";
}else if($cklist == 2){echo"<img src={$board_skin_path}/img/order2.gif border=0>";
}else if($cklist == 3){echo"<img src={$board_skin_path}/img/order3.gif border=0>";
}else if($cklist == 4){echo"<img src={$board_skin_path}/img/order4.gif border=0>";
}else if($cklist == 5){echo"<img src={$board_skin_path}/img/order5.gif border=0>";
}

        echo " " . $list[$i][icon_new];
        echo " " . $list[$i][icon_link];
        echo $nobr_end;
        ?>
</td>
<td width="1"></td>

<td width="110" class="m2_name">&nbsp;&nbsp;<?=$list[$i][subject]?></td>
<td width="1"></td>

<td width="80" align=center class="m2"><?=$list[$i][datetime]?></td>
<td width="1"></td>

<td width="49" align=center class="m2"><?=$list[$i][wr_hit]?></td>
<tr><td colspan="30" height="1" bgcolor="#E7E7E7"></td></tr>
<?}?>

<? if (count($list) == 0) { echo "<tr><td colspan='$colspan' height=100 align=center>게시물이 없습니다.</td></tr>"; } ?>
    </table>
    </form>

    <!-- 페이지 -->
    <table width="100%" border="0" cellpadding="0" cellspacing="0">
    <tr>
    <td width="100%" height="30" align="center" valign=bottom>
        <? if ($prev_part_href) { echo "<a href='$prev_part_href'><img src='$board_skin_path/img/btn_search_prev.gif' border=0 align=absmiddle title='이전검색'></a>"; } ?>
        <?
        // 기본으로 넘어오는 페이지를 아래와 같이 변환하여 이미지로도 출력할 수 있습니다.
        //echo $write_pages;
        $write_pages = str_replace("처음", "<img src='$board_skin_path/img/begin.gif' border='0' align='absmiddle' title='처음'>", $write_pages);
        $write_pages = str_replace("이전", "<img src='$board_skin_path/img/prev.gif' border='0' align='absmiddle' title='이전'>", $write_pages);
        $write_pages = str_replace("다음", "<img src='$board_skin_path/img/next.gif' border='0' align='absmiddle' title='다음'>", $write_pages);
        $write_pages = str_replace("맨끝", "<img src='$board_skin_path/img/end.gif' border='0' align='absmiddle' title='맨끝'>", $write_pages);
        $write_pages = preg_replace("/<span>([0-9]*)<\/span>/", "<b><font style=\"font-family:돋움; font-size:9pt; color:#797979\">$1</font></b>", $write_pages);
        $write_pages = preg_replace("/<b>([0-9]*)<\/b>/", "<b><font style=\"font-family:돋움; font-size:9pt; color:orange;\">$1</font></b>", $write_pages);
        ?>
        <?=$write_pages?>
        <? if ($next_part_href) { echo "<a href='$next_part_href'><img src='$board_skin_path/img/btn_search_next.gif' border=0 align=absmiddle title='다음검색'></a>"; } ?>
    </td>
    </tr>
    </table>

    <!-- 버튼 링크 -->
    <form name=fsearch method=get style="margin:0px;">
    <input type=hidden name=bo_table value="<?=$bo_table?>">
    <input type=hidden name=sca      value="<?=$sca?>">
   
    <table width="100%" border="0" cellpadding="0" cellspacing="0">
    <tr>
    <td width="50%" height="40">
        <? if ($list_href) { ?><a href="<?=$list_href?>"><img src="<?=$board_skin_path?>/img/btn_list.gif" border="0"></a><? } ?>
        <? if ($write_href) { ?><a href="<?=$write_href?>"><img src="<?=$board_skin_path?>/img/btn_write.gif" border="0"></a><? } ?>
        <? if ($is_checkbox) { ?>
            <a href="javascript:select_delete();"><img src="<?=$board_skin_path?>/img/btn_select_delete.gif" border="0"></a>
            <a href="javascript:select_copy('copy');"><img src="<?=$board_skin_path?>/img/btn_select_copy.gif" border="0"></a>
            <a href="javascript:select_copy('move');"><img src="<?=$board_skin_path?>/img/btn_select_move.gif" border="0"></a>
        <? } ?>
    </td>
    <td width="50%" align="right">
        <select name=sfl>
            <option value='wr_subject||wr_content'>제목+내용</option>
            <option value='wr_subject'>제목</option>
            <option value='wr_content'>내용</option>
            <option value='mb_id'>회원아이디</option>
            <option value='wr_name'>이름</option>
        </select>
        <input name=stx maxlength=15 size=10 itemname="검색어" required value="<?=$stx?>"><select name=sop>
            <option value=and>and</option>
            <option value=or>or</option>
        </select>
        <input type=image src="<?=$board_skin_path?>/img/search_btn.gif" border=0 align=absmiddle>
    </td>
    </tr>
    </table>
    </form>
</td>
</tr>
</table>

<script language="JavaScript">
if ("<?=$sca?>") document.fcategory.sca.value = "<?=$sca?>";
if ("<?=$stx?>") {
    document.fsearch.sfl.value = "<?=$sfl?>";
    document.fsearch.sop.value = "<?=$sop?>";
}
</script>

<? if ($is_checkbox) { ?>
<script language="JavaScript">
function all_checked(sw) {
    var f = document.fboardlist;

    for (var i=0; i<f.length; i++) {
        if (f.elements[i].name == "chk_wr_id[]")
            f.elements[i].checked = sw;
    }
}

function check_confirm(str) {
    var f = document.fboardlist;
    var chk_count = 0;

    for (var i=0; i<f.length; i++) {
        if (f.elements[i].name == "chk_wr_id[]" && f.elements[i].checked)
            chk_count++;
    }

    if (!chk_count) {
        alert(str + "할 게시물을 하나 이상 선택하세요.");
        return false;
    }
    return true;
}

// 선택한 게시물 삭제
function select_delete() {
    var f = document.fboardlist;

    str = "삭제";
    if (!check_confirm(str))
        return;

    if (!confirm("선택한 게시물을 정말 "+str+" 하시겠습니까?\n\n한번 "+str+"한 자료는 복구할 수 없습니다"))
        return;

    f.action = "./delete_all.php";
    f.submit();
}

// 선택한 게시물 복사 및 이동
function select_copy(sw) {
    var f = document.fboardlist;

    if (sw == "copy")
        str = "복사";
    else
        str = "이동";

    if (!check_confirm(str))
        return;

    var sub_win = window.open("", "move", "left=50, top=50, width=396, height=550, scrollbars=1");

    f.sw.value = sw;
    f.target = "move";
    f.action = "./move.php";
    f.submit();
}
</script>
<? } ?>
<!-- 게시판 목록 끝 -->
댓글달려수정안되고 새로 수정판을 올릴려니 수정판치고는 너무 빈약해서(이미지몇개와 리스트보기파일뿐이라)
그냥 이미지는 안올리고 이곳에 리스트보기 파일소스만 적습니다.
아참 예약처리부분에서 추가하실려면
1.예약신청 2.예약접수 3.예약완료 4.입실 5퇴실 등 예약처리부분은 이런식으로 정하시면 될 것입니다.
숫자표기로 지정하는 것이므로 나름대로 규칙을 정해서 적용을...
그리고 객실은 분류로 만들은것이니 분류에 객실명을 넣어주세요
위에 우격다짐으로 디비에 하나의값을 넣어라고 했는데요
그렇게하니까 해당달에만 보이고 다음달이나 이전달에는 안보이는경우가 있더군요
그래서 아래에 추가소스를 임시로 넣었습니다. 이소스도 답이 아닌듯하나 우선......
귀찮은스킨하나 드려서 죄송...

list.skin.php 페이지 소스에 보시면
// 달력의 틀을 보여주는 부분 이란 글자가 보이는 위에부분에 아래의소스를 넣으세요(알아서 정렬을 하시길)

if($cnt_now == 1){
$cnt_room    = explode("|", $board[bo_category_list]); // 카테고리에 넣은 객실명을 배열처리
for ($i=0; $i<count($cnt_room); $i++) {
for ($j = $day ; $j <= $day;  $j++) {
if($j == $day){
if($cnt_room[$i] == $row[ca_name]){
$room_arr .= $row[ca_name] .",";
$total_no1 = $total_no1 + 1;
}
}
}
}
$total_no = $total_no1;
$room_no = count($cnt_room);
$room_reserve = $room_no - $total_no; // 예약가능한 객실 수
$r_arr = explode(",", $room_arr);
}
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/hosting_users/krbtv2/www/skin/board/pension_reserve/room.skin.php on line 105

 
제      목 : 
 
트랙백 주소 : http://dumanddum.com/bbs/tb.php/pension/ 
 

 
 
 

select * from where wr_parent = '' and wr_comment < 0 order by wr_comment desc, wr_comment_reply

1064 : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'where wr_parent = '' and wr_comment < 0 order by wr_comment desc, wr_comment_re' at line 1

error file : /skin/board/pension_reserve/room.skin.php

이런 에러가 납니다
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/hosting_users/tnt_test/www/admin/skin/board/pension_reserve/room.skin.php on line 105
 
제      목 : 
 
트랙백 주소 : http://test.homepizone.co.kr/admin/bbs/tb.php/pension/ 
 

 
 
 

select * from where wr_parent = '' and wr_comment < 0 order by wr_comment desc, wr_comment_reply

1064 : You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'where wr_parent = '' and wr_comment < 0 order by wr_comment de

error file : /admin/skin/board/pension_reserve/room.skin.php

이런에러가 나는데 도움좀 주세요^^
전체 5,850 |RSS
그누4 스킨 내용 검색

회원로그인

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