<?
include_once("./_common.php");
/* 기존의 DB에서 불러오는 방식
if ($addr1)
{
$zipfile = file("./zip.db");
$search_count = 0;
while ($zipcode = each($zipfile))
{
if(strstr(substr($zipcode[1],9,512), $addr1))
{
$list[$search_count][zip1] = substr($zipcode[1],0,3);
$list[$search_count][zip2] = substr($zipcode[1],4,3);
$addr = explode(" ", substr($zipcode[1],8));
if ($addr[sizeof($addr)-1])
{
$list[$search_count][addr] = str_replace($addr[sizeof($addr)-1], "", substr($zipcode[1],8));
$list[$search_count][bunji] = trim($addr[sizeof($addr)-1]);
}
else
$list[$search_count][addr] = substr($zipcode[1],8);
$list[$search_count][encode_addr] = urlencode($list[$search_count][addr]);
$search_count++;
}
}
if (!$search_count) alert("찾으시는 주소가 없습니다.");
}
*/
if ($addr1)
{
//$sql = " select * from zipcode where zp_dong like '%$addr1%' order by zp_sido, zp_gugun, zp_dong ";
$sql = " select * from $g4[zipcode] where zp_dong like '%$addr1%' order by zp_sido, zp_gugun, zp_dong ";
echo $sql;
//echo '<xmp>';
//print_r($g4);
//echo '</xmp>';
$result = mysql_query($sql);
$search_count = 0;
for ($i=0; $row=sql_fetch_array($result); $i++)
{
$list[$i][zip1] = substr($row[zp_code], 0, 3);
$list[$i][zip2] = substr($row[zp_code], 3, 3);
$list[$i][addr] = "$row[zp_sido] $row[zp_gugun] $row[zp_dong]";
$list[$i][bunji] = $row[zp_bunji];
$list[$i][encode_addr] = urlencode($list[$i][addr1]);
$search_count++;
}
if (!$search_count)
alert("찾으시는 주소가 없습니다.");
}
$g4[title] = "우편번호 검색";
include_once("$g4[path]/ahead.sub.php");
$member_skin_path = "$g4[path]/skin/member/$config[cf_member_skin]";
include_once("$member_skin_path/zip.skin.php");
include_once("$g4[path]/tail.sub.php");
?>
include_once("./_common.php");
/* 기존의 DB에서 불러오는 방식
if ($addr1)
{
$zipfile = file("./zip.db");
$search_count = 0;
while ($zipcode = each($zipfile))
{
if(strstr(substr($zipcode[1],9,512), $addr1))
{
$list[$search_count][zip1] = substr($zipcode[1],0,3);
$list[$search_count][zip2] = substr($zipcode[1],4,3);
$addr = explode(" ", substr($zipcode[1],8));
if ($addr[sizeof($addr)-1])
{
$list[$search_count][addr] = str_replace($addr[sizeof($addr)-1], "", substr($zipcode[1],8));
$list[$search_count][bunji] = trim($addr[sizeof($addr)-1]);
}
else
$list[$search_count][addr] = substr($zipcode[1],8);
$list[$search_count][encode_addr] = urlencode($list[$search_count][addr]);
$search_count++;
}
}
if (!$search_count) alert("찾으시는 주소가 없습니다.");
}
*/
if ($addr1)
{
//$sql = " select * from zipcode where zp_dong like '%$addr1%' order by zp_sido, zp_gugun, zp_dong ";
$sql = " select * from $g4[zipcode] where zp_dong like '%$addr1%' order by zp_sido, zp_gugun, zp_dong ";
echo $sql;
//echo '<xmp>';
//print_r($g4);
//echo '</xmp>';
$result = mysql_query($sql);
$search_count = 0;
for ($i=0; $row=sql_fetch_array($result); $i++)
{
$list[$i][zip1] = substr($row[zp_code], 0, 3);
$list[$i][zip2] = substr($row[zp_code], 3, 3);
$list[$i][addr] = "$row[zp_sido] $row[zp_gugun] $row[zp_dong]";
$list[$i][bunji] = $row[zp_bunji];
$list[$i][encode_addr] = urlencode($list[$i][addr1]);
$search_count++;
}
if (!$search_count)
alert("찾으시는 주소가 없습니다.");
}
$g4[title] = "우편번호 검색";
include_once("$g4[path]/ahead.sub.php");
$member_skin_path = "$g4[path]/skin/member/$config[cf_member_skin]";
include_once("$member_skin_path/zip.skin.php");
include_once("$g4[path]/tail.sub.php");
?>
댓글 3개
게시글 목록
| 번호 | 제목 |
|---|---|
| 1456 | |
| 1447 | |
| 1443 |
디자이너
웹디자이너 구합니다
3
|
| 1434 | |
| 1429 |
개발자
개발의뢰 관련
4
|
| 1424 |
디자이너
손그림 스캔시..
4
|
| 1413 |
개발자
아름다운 코드란....
10
|
| 1406 |
디자이너
디자이너분께 문의 드려봅니다
6
|
| 1403 | |
| 1398 |
기획자
안녕하세요 첨뵙겟습니다^^
4
|
| 1389 | |
| 1386 |
기획자
간만에 출석 1등~
2
|
| 1381 |
기획자
패턴의 다각화
4
|
| 1374 | |
| 1372 |
디자이너
자야되는데~
1
|
| 1370 | |
| 1349 | |
| 1341 |
디자이너
저도 여기에 글남겨봅니다~ㅋ
7
|
| 1336 | |
| 1333 |
개발자
롤오버활성화 도움주실분..
2
|
| 1325 |
개발자
에디트 플러스 업데이트
7
|
| 1309 |
개발자
이런 미친..
15
|
| 1305 |
기획자
조용하네요....ㅋㅋㅋ
3
|
| 1293 | |
| 1292 | |
| 1290 |
개발자
스팸 차단
1
|
| 1286 |
디자이너
이러면 문제가 되는 건가요?
3
|
| 1280 |
디자이너
MS CS6?
5
|
| 1277 | |
| 1272 |
개발자
키워드 필터링
4
|
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기