웹프로그래밍

Global It Leader!!


그누보드


 
 

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

페이지 정보

작성자 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 댓글 0건 조회 6,888회 작성일 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에 값이 있을때만 보이기 ?>
 

댓글목록

등록된 댓글이 없습니다.

전체 59
게시물 검색
그누보드 목록
번호 제목 글쓴이 조회 날짜
59 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 11054 04-28
58 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 7728 04-28
57 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 15909 04-28
56 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 9209 05-04
55 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 7291 09-29
54 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 11834 05-11
53 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 16757 03-15
52 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 3948 11-15
51 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 3917 11-29
50 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 3965 01-31
49 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 3762 02-21
48 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4071 02-25
47 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 3629 03-13
46 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4087 03-20
45 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 3988 03-26
44 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4195 03-27
43 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4056 06-24
42 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 3713 08-20
41 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4292 01-30
열람중 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 6889 02-14