index 페이지에 최신글 불러오는 방법 부탁드려요...넘 오랫만에 하려니 생각이 안 납니다..
본문
index 페이지에 최신글 불러오는 방법 부탁드려요...넘 오랫만에 하려니 생각이 안 납니다..
게시판 최신글을 불러오는 방법...부탁드립니다.
답변 4
lib/latest.lib.php 내용을 보시면
latest 함수가 있습니다.
이 함수를 호출하면서 최신글을 가져오는데요.
아마 기존에 한번 해보셨으면 스킨경로등을 파악하시면서 금방 만드실수 있을것같네요.
<?php echo latest("스킨폴더", "게시판명", 5, 25); ?>
<html>
<head>
<title>아기사랑</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
body {
text-align: center;
background-image: url(bg_001.gif);
background-repeat: repeat;
margin-left: 25%;
}
.wrapper {
width: 800px;
margin: 0 auto;
text-align: left;
}
</style>
</head>
<body body scroll="no" bgcolor="#FFFFFF" topmargin="0" marginheight="0">
<!-- Save for Web Slices (main(1).psd) -->
<table id="Table_01" width="1025" height="801" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2" rowspan="9">
<img src="images/main(1)_01.gif" width="39" height="186" alt=""></td>
<td colspan="8" rowspan="7">
<a href="http://loantelecom.com/" target="_self"
onmouseover="window.status='홈으로'; return true;"
onmouseout="window.status=''; return true;">
<img src="images/main(1)_02.gif" width="282" height="89" border="0" alt=""></a></td>
<td colspan="29">
<img src="images/main(1)_03.gif" width="703" height="14" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="14" alt=""></td>
</tr>
<tr>
<td colspan="11" rowspan="2">
<img src="images/main(1)_04.gif" width="330" height="23" alt=""></td>
<td colspan="2">
<a href="http://loantelecom.com" target="_self"
onmouseover="window.status='홈으로'; return true;"
onmouseout="window.status=''; return true;">
<img src="images/main(1)_05.gif" width="35" height="16" border="0" alt=""></a></td>
<td rowspan="2">
<img src="images/main(1)_06.gif" width="6" height="23" alt=""></td>
<td colspan="3" rowspan="2">
<a href="http://loantelecom.com/bbs/login.php" target="_self"
onmouseover="window.status='로그인'; return true;"
onmouseout="window.status=''; return true;">
<img src="images/main(1)_07.gif" width="37" height="23" border="0" alt=""></a></td>
<td rowspan="2">
<img src="images/main(1)_08.gif" width="3" height="23" alt=""></td>
<td colspan="2" rowspan="2">
<a href="http://loantelecom.com/bbs/register.php" target="_self"
onmouseover="window.status='회원가입'; return true;"
onmouseout="window.status=''; return true;">
<img src="images/main(1)_09.gif" width="34" height="23" border="0" alt=""></a></td>
<td rowspan="2">
<img src="images/main(1)_10.gif" width="4" height="23" alt=""></td>
<td colspan="3" rowspan="2">
<a href="http://loantelecom.com/bbs/qalist.php" target="_self"
onmouseover="window.status='1:1상담문의'; return true;"
onmouseout="window.status=''; return true;">
<img src="images/main(1)_11.gif" width="59" height="23" border="0" alt=""></a></td>
<td colspan="5" rowspan="2">
<img src="images/main(1)_12.gif" width="195" height="23" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="16" alt=""></td>
</tr>
<tr>
<td colspan="2">
<img src="images/main(1)_13.gif" width="35" height="7" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="7" alt=""></td>
</tr>
<tr>
<td colspan="3" rowspan="2">
<img src="images/main(1)_14.gif" width="66" height="37" alt=""></td>
<td>
<a href="http://loantelecom.com/bbs/board.php?bo_table=01_introduction" target="_self"
onmouseover="window.status='회사소개'; return true;"
onmouseout="window.status=''; return true;">
<img src="images/main(1)_05-16.gif" width="76" height="36" border="0" alt=""></a></td>
<td colspan="2" rowspan="2">
<img src="images/main(1)_16.gif" width="8" height="37" alt=""></td>
<td colspan="2" rowspan="2">
<a href="http://loantelecom.com/bbs/board.php?bo_table=02_search_open" target="_self"
onmouseover="window.status='개통가능조'; return true;"
onmouseout="window.status=''; return true;">
<img src="images/main(1)_07-18.gif" width="110" height="37" border="0" alt=""></a></td>
<td rowspan="2">
<img src="images/main(1)_18.gif" width="19" height="37" alt=""></td>
<td colspan="6" rowspan="2">
<a href="http://loantelecom.com/bbs/board.php?bo_table=03_endopen_confirm" target="_self"
onmouseover="window.status='개통완료확인'; return true;"
onmouseout="window.status=''; return true;">
<img src="images/main(1)_09-20.gif" width="95" height="37" border="0" alt=""></a></td>
<td rowspan="2">
<img src="images/main(1)_20.gif" width="13" height="37" alt=""></td>
<td colspan="6" rowspan="2">
<a href="http://loantelecom.com/bbs/board.php?bo_table=04_used_phone" target="_self"
onmouseover="window.status='중고폰매입'; return true;"
onmouseout="window.status=''; return true;">
<img src="images/main(1)_11-22.gif" width="110" height="37" border="0" alt=""></a></td>
<td rowspan="2">
<img src="images/main(1)_22.gif" width="7" height="37" alt=""></td>
<td colspan="3" rowspan="3">
<a href="http://loantelecom.com/bbs/board.php?bo_table=05_callcenter" target="_self"
onmouseover="window.status='고객센터'; return true;"
onmouseout="window.status=''; return true;">
<img src="images/main(1)_13-24.gif" width="104" height="38" border="0" alt=""></a></td>
<td colspan="2" rowspan="2">
<img src="images/main(1)_24.gif" width="53" height="37" alt=""></td>
<td rowspan="18">
<img src="images/main(1)_25.gif" width="42" height="763" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="36" alt=""></td>
</tr>
<tr>
<td>
<img src="images/main(1)_26.gif" width="76" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="1" alt=""></td>
</tr>
<tr>
<td colspan="23" rowspan="3">
<img src="images/main(1)_27.gif" width="504" height="45" alt=""></td>
<td colspan="2" rowspan="4">
<img src="images/main(1)_28.gif" width="53" height="112" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="1" alt=""></td>
</tr>
<tr>
<td colspan="3" rowspan="3">
<img src="images/main(1)_29.gif" width="104" height="111" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="14" alt=""></td>
</tr>
<tr>
<td colspan="8">
<img src="images/main(1)_30.gif" width="282" height="30" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="30" alt=""></td>
</tr>
<tr>
<td colspan="3">
<img src="images/main(1)_31.gif" width="163" height="67" alt=""></td>
<td colspan="24" rowspan="4">
<img src="images/main(1)_32.gif" width="537" height="477" alt=""></td>
<td colspan="4" rowspan="5">
<img src="images/main(1)_33.gif" width="86" height="493" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="67" alt=""></td>
</tr>
<tr>
<td rowspan="12">
<img src="images/main(1)_34.gif" width="38" height="614" alt=""></td>
<td colspan="3" rowspan="2">
<a href="http://loantelecom.com/bbs/board.php?bo_table=05_callcenter" target="_self"
onmouseover="window.status='상담센터_콜센터'; return true;"
onmouseout="window.status=''; return true;">
<img src="images/main(1)_25-36.gif" width="140" height="214" border="0" alt=""></a></td>
<td rowspan="4">
<img src="images/main(1)_36.gif" width="24" height="426" alt=""></td>
<td colspan="2" rowspan="4">
<img src="images/main(1)_37.gif" width="19" height="426" alt=""></td>
<td colspan="2">
<a href="http://loantelecom.com/bbs/board.php?bo_table=04_used_phone" target="_self"
onmouseover="window.status='중고휴대폰매입'; return true;"
onmouseout="window.status=''; return true;">
<img src="images/main(1)_28-39.gif" width="134" height="188" border="0" alt=""></a></td>
<td rowspan="12">
<img src="images/main(1)_39.gif" width="4" height="614" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="188" alt=""></td>
</tr>
<tr>
<td colspan="2" rowspan="3">
<img src="images/main(1)_40.gif" width="134" height="238" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="26" alt=""></td>
</tr>
<tr>
<td colspan="3" rowspan="2">
<img src="images/main(1)_41.gif" width="140" height="212" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="196" alt=""></td>
</tr>
<tr>
<td colspan="24">
<img src="images/main(1)_42.gif" width="537" height="16" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="16" alt=""></td>
</tr>
<tr>
<td colspan="7" rowspan="2">
<a href="http://loantelecom.com/bbs/board.php?bo_table=02_search_open" target="_self"
onmouseover="window.status='즉시개통 가능 조회하러 가기'; return true;"
onmouseout="window.status=''; return true;">
<img src="images/main(1)_33-44.gif" width="281" height="95" border="0" alt=""></a></td>
<td rowspan="2">
<img src="images/main(1)_44.gif" width="1" height="95" alt=""></td>
<td colspan="2" rowspan="3">
<img src="images/main(1)_45.gif" width="33" height="106" alt=""></td>
<td colspan="9">
<a href="http://loantelecom.com/bbs/board.php?bo_table=04_used_phone" target="_self"
onmouseover="window.status='중고휴대폰 매입'; return true;"
onmouseout="window.status=''; return true;">
<img src="images/main(1)_36-47.gif" width="282" height="94" border="0" alt=""></a></td>
<td colspan="2" rowspan="3">
<img src="images/main(1)_47.gif" width="23" height="106" alt=""></td>
<td colspan="15" rowspan="2"><a href="http://loantelecom.com/bbs/board.php?bo_table=02_search_open" target="_self"><img src="images/main(1)_48.gif" width="320" height="95" alt=""></a></td>
<td>
<img src="images/spacer.gif" width="1" height="94" alt=""></td>
</tr>
<tr>
<td colspan="9">
<img src="images/main(1)_49.gif" width="282" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="1" alt=""></td>
</tr>
<tr>
<td colspan="8">
<img src="images/main(1)_50.gif" width="282" height="11" alt=""></td>
<td colspan="9">
<img src="images/main(1)_51.gif" width="282" height="11" alt=""></td>
<td colspan="15">
<img src="images/main(1)_52.gif" width="320" height="11" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="11" alt=""></td>
</tr>
<tr>
<td colspan="4">
<img src="images/main(1)_53.gif" width="164" height="17" alt=""></td>
<td rowspan="2">
<a href="http://loantelecom.com/adm/contentform.php?w=u&co_id=provision" target="_self"
onmouseover="window.status='서비스이용약관'; return true;"
onmouseout="window.status=''; return true;">
<img src="images/main(1)_44-55.gif" width="74" height="31" border="0" alt=""></a></td>
<td rowspan="3">
<img src="images/main(1)_55.gif" width="11" height="32" alt=""></td>
<td colspan="5" rowspan="3">
<a href="http://loantelecom.com/adm/contentform.php?w=u&co_id=privacy" target="_self"
onmouseover="window.status='개인정보 처리방침'; return true;"
onmouseout="window.status=''; return true;">
<img src="images/main(1)_46.gif" width="89" height="32" border="0" alt=""></a></td>
<td colspan="3" rowspan="3">
<img src="images/main(1)_57.gif" width="92" height="32" alt=""></td>
<td colspan="2" rowspan="2">
<a href="http://loantelecom.com/bbs/board.php?bo_table=01_introduction" target="_self"
onmouseover="window.status='오시는길'; return true;"
onmouseout="window.status=''; return true;">
<img src="images/main(1)_48-59.gif" width="55" height="31" border="0" alt=""></a></td>
<td colspan="3" rowspan="3">
<img src="images/main(1)_59.gif" width="112" height="32" alt=""></td>
<td colspan="12" rowspan="3">
<img src="images/main(1)_60.gif" width="183" height="32" alt=""></td>
<td colspan="5" rowspan="5">
<img src="images/main(1)_61.gif" width="160" height="82" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="17" alt=""></td>
</tr>
<tr>
<td colspan="2" rowspan="3">
<img src="images/main(1)_62.gif" width="31" height="51" alt=""></td>
<td colspan="2" rowspan="3">
<a href="http://loantelecom.com/" target="_self"
onmouseover="window.status='홈으로 가기'; return true;"
onmouseout="window.status=''; return true;">
<img src="images/main(1)_48-64.gif" width="133" height="51" border="0" alt=""></a></td>
<td>
<img src="images/spacer.gif" width="1" height="14" alt=""></td>
</tr>
<tr>
<td>
<img src="images/main(1)_64.gif" width="74" height="1" alt=""></td>
<td colspan="2">
<img src="images/main(1)_65.gif" width="55" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="1" alt=""></td>
</tr>
<tr>
<td colspan="27">
<img src="images/main(1)_66.gif" width="616" height="36" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="36" alt=""></td>
</tr>
<tr>
<td colspan="31">
<img src="images/main(1)_67.gif" width="780" height="14" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="14" alt=""></td>
</tr>
<tr>
<td>
<img src="images/spacer.gif" width="38" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="30" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="109" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="24" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="74" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="11" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="32" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="32" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="23" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="11" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="76" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="5" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="3" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="52" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="58" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="19" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="35" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="16" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="7" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="28" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="6" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="3" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="13" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="21" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="3" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="7" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="27" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="4" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="48" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="7" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="4" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="15" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="85" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="49" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="4" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="42" height="1" alt=""></td>
<td></td>
</tr>
</table>
<!-- End Save for Web Slices -->
</body>
</html>
이것이 메인 화면인데요....
<?php
define('_INDEX_', true);
include_once('./_common.php');
// 초기화면 파일 경로 지정 : 이 코드는 가능한 삭제하지 마십시오.
if ($config['cf_include_index'] && is_file(G5_PATH.'/'.$config['cf_include_index'])) {
include_once(G5_PATH.'/'.$config['cf_include_index']);
return; // 이 코드의 아래는 실행을 하지 않습니다.
}
if (G5_IS_MOBILE) {
include_once(G5_MOBILE_PATH.'/index.php');
return;
}
?>
<!doctype html>
<html>
<head>
<link href="index_css.css" rel="stylesheet" type="text/css">
</head>
<body>
<p><div style="position: absolute; top: 633px; left: 727px; width: 282px; height: 134px;"> <?php
// 이 함수가 바로 최신글을 추출하는 역할을 합니다.
// 사용방법 : latest(스킨, 게시판아이디, 출력라인, 글자수);
echo latest("basic", "04_consult", 6, 10);
?>
</div></p>
</body>
</html>
///////////////////////////////////////////////////////////
위와 같이 했는데...안되네요...왜 그러죠?
///////////////////////////////////////////////////////////