웹프로그래밍

Global It Leader!!


그누보드


 
 

그누보드5 게시판에 우편번호/주소 기록하기

페이지 정보

작성자 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 댓글 0건 조회 6,954회 작성일 14-02-14 00:48

본문

게시판 여분필드중 사용하고자 하는 것에 우편번호, 주소를 모두 삽입해서 관리합니다.
wr_1 에 우편번호를 삽입하는 것으로 내용을 정리합니다.


1. 그누보드5 / skin / basic /write.skin.php  상단에 아래 코드 삽입

<?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가

// 우편번호
$wr_addr    = explode("|",$write[wr_1]);
$zip1  = $wr_addr[0];
$zip2  = $wr_addr[1];
$addr1  = $wr_addr[2];
$addr2  = $wr_addr[3];
$addr3  = $wr_addr[4];
$jibeon = $wr_addr[5];


2. 우편번호를 삽입할 위치에 아래 내용 추가

<tr>
    <td style='padding-left:20px; height:30px;'>· 주소</td>
    <td><input type="text" name="zip1" value="<?php echo $zip1; ?>" id="zip1" title="우편번호 앞자리" class="frm_input readonly" size="3" maxlength="3"> -
            <input type="text" name="zip2" value="<?php echo $zip2; ?>" id="zip2" title="우편번호 뒷자리" class="frm_input readonly" size="3" maxlength="3">
            <span id="win_zip" style="display:block"></span>
            <input type="text" name="addr1" value="<?php echo $addr1 ?>" id="addr1" title="행정기본주소" class="frm_input readonly" style="width:49%" />
            <input type="text" name="addr2" value="<?php echo $addr2; ?>" id="addr2" title="상세주소" class="frm_input" style="width:49%" /></td>
</tr>
<tr>
    <td style='padding-left:20px; height:30px;'>· 참고항목</td>
    <td><input type="text" name="addr3" value="<?php echo $addr3; ?>" id="addr3" title="참고항목" class="frm_input" style="width:99%" / /></td>
</tr>
<tr>
    <td style='padding-left:20px; height:30px;'>· 지번주소</td>
    <td><input type="text" name="jibeon" value="<?php echo $jibeon; ?>" id="frm_jibeon" title="지번주소" class="frm_input" style="width:99%" / /></td>
</tr>
<script type="text/javascript">
<!--
            // 우편번호 자바스크립트 비활성화 대응을 위한 코드
            $('<a href="<?php echo G5_BBS_URL ?>/zip.php?frm_name=fwrite&amp;frm_zip1=zip1&amp;frm_zip2=zip2&amp;frm_addr1=addr1&amp;frm_addr2=addr2&amp;frm_addr3=addr3&amp;frm_jibeon=jibeon" id="win_zip" class="win_zip_find btn_frmline" target="_blank">우편번호 검색</a><br>').appendTo('#win_zip');
            $('#win_zip').css('display','inline');
            $('#zip1,#zip2,#addr1').attr('readonly','readonly');
//-->
</script>
<tr><td colspan="2" height="1" bgcolor="#e7e7e7"></td></tr>


3. 그누보드5 / skin / basic / write_update.skin.php 에 아래 코드 추가
<?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가

// 우편번호 추가
$wr_1 = "$$zip1|$zip2|$addr1|$addr2|$addr3|$jibeon";
$sql1  = " update $write_table set wr_1 = '$wr_1' where wr_id = '$wr_id' ";
sql_query($sql1);
?>


4. 그누보드5 / skin / basic / view.skin.php 에 아래 코드 추가
<?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
include_once(G5_LIB_PATH.'/thumbnail.lib.php');

// 우편번호
$wr_addr = explode("|",$view[wr_1]);
$zip1    = $wr_addr[0];
$zip2    = $wr_addr[1];
$addr1  = $wr_addr[2];
$addr2  = $wr_addr[3];
$addr3  = $wr_addr[4];
$jibeon  = $wr_addr[5];


5. 그누보드5 / skin / basic / view.skin.php 의 주소를 보이고자 하는 위치에 아래 코드를 추가

    <?php if ($addr1) {  // 주소1에 값이 있을때만 보이기 ?>
    <tr>
      <td class="board_list_td1">주소</td>
      <td class="board_list_td2"><?php echo "(". $zip1 ."-". $zip2 .") ". $addr1 ." ". $addr2 ." ". $addr3; ?></td>
    </tr>
    <tr>
      <td class="board_list_td1">지번주소</td>
      <td class="board_list_td2"><?php echo $jibeon; ?></td>
    </tr>
    <?php } // 주소1에 값이 있을때만 보이기 ?>
 

댓글목록

등록된 댓글이 없습니다.

전체 63
게시물 검색
그누보드 목록
번호 제목 글쓴이 조회 날짜
23 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4026 01-31
22 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4065 03-26
21 no_profile 운영자 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4099 07-16
20 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4112 06-24
19 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4134 02-25
18 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4152 03-20
17 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4246 05-06
16 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4259 03-27
15 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4298 02-14
14 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4301 03-21
13 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4365 01-30
12 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4486 09-12
11 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4603 07-22
10 no_profile 운영자 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4790 08-09
9 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 5298 08-08
열람중 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 6955 02-14
7 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 7343 09-29
6 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 7790 04-28
5 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 9266 05-04
4 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 11131 04-28