최신글 질문입니다. > 그누4 질문답변

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.

최신글 질문입니다. 정보

최신글 질문입니다.

첨부파일

index1.htm (3.0K) 2회 다운로드 2007-02-28 17:11:41

본문

그누보드를 처음 접해서 너무 어렵네요 ㅠ
 
최신글만 하면 될것 같은데
 
지금 거의 포기 직전입니다 ㅠㅠ
 
도와주세요!! ㅠ
 
나름대로 최신글만들고 적용시켰는데 결과물은 고작
 
 
....
 
네모칸안에 글이 들어가야 하는데 아무리 해도 들어가질 않아요 ㅠㅠ
 
 
 
head 파일
<html>
 
 
<body bgcolor="white" text="black" link="blue" vlink="purple" alink="red" leftmargin="0" marginwidth="0" topmargin="0" marginheight="0">
<table border="0" cellspacing="0" width="1152" background="index.gif" bordercolordark="white" bordercolorlight="black">
    <tr><head><body oncontextmenu="return false" ondragstart="return false" bgcolor="white" text="black" link="blue" vlink="purple" alink="red"><meta HTTP-EQUIV="imagetoolbar" CONTENT="no"><body style="overflow-x:hidden;" bgcolor="white" text="black" link="blue" vlink="purple" alink="red"> <meta http-equiv="content-type" content="text/html; charset=euc-kr">
        <td width="1152" height="95" valign="top" onfocus='blur()' colspan="3">
            <p><img src="EM.gif" width="1016" height="79" border="0" usemap="#ImageMap1">            <map name="ImageMap1">
            <area shape="rect" coords="6, 10, 147, 78" href="http://medikor.co.kr/bo/index.htm" onfocus='blur()'>
            <area shape="rect" coords="284, 33, 362, 78" href="http://medikor.co.kr/bo/bbs/PAGE2.htm" onfocus='blur()'>
            <area shape="rect" coords="410, 36, 486, 78" href="http://medikor.co.kr/bo/bbs/board.php?bo_table=med" onfocus='blur()'>
            <area shape="rect" coords="531, 34, 609, 78" href="http://medikor.co.kr/bo/bbs/board.php?bo_table=QA" onfocus='blur()'>
            <area shape="rect" coords="653, 35, 734, 78" href="http://medikor.co.kr/bo/bbs/board.php?bo_table=free" onfocus='blur()'>
            <area shape="rect" coords="961, 9, 1009, 22" href="http://medikor.co.kr/bo/index.htm" onfocus='blur()'>
            <area shape="rect" coords="964, 34, 1012, 43" href="http://medikor.co.kr/bo/bbs/PAGE12.htm" onfocus='blur()'>
            </map></p>
</td>
    </tr>
    <tr>
        <td width="580" height="311" valign="top" rowspan="2"> </td>
 
 
--------------------------------
 
tail 파일
 
</td>
        <td width="205" height="311" valign="top" rowspan="2"> </td>
    </tr>
    <tr>
        <td width="367" height="61" valign="top"> </td>
    </tr>
    <tr>
        <td width="1152" height="256" valign="top" colspan="3"><img src="EM.gif" width="1016" height="65" border="0" usemap="#ImageMap2">            <map name="ImageMap2">
            <area shape="rect" coords="136, 18, 179, 34" href="http://medikor.co.kr/bo/bbs/PAGE2.htm" onfocus='blur()'>
            <area shape="rect" coords="186, 18, 224, 34" href="http://medikor.co.kr/bo/bbs/board.php?bo_table=QA" onfocus='blur()'>
            <area shape="rect" coords="231, 16, 286, 35" href="http://medikor.co.kr/bo/index.htm" onfocus='blur()'>
            </map></td>
    </tr>
</table>
</body>
<title>메디텍코리아</title>
<meta name="generator" content="Namo WebEditor v6.0">
</html>
--------------------------------------
index 파일
 
<?
include_once("./_common.php");
include_once("$g4[path]/lib/latest.lib.php");
$g4['title'] = "";
include_once("./head14.php");
?>
<!-- 메인화면 최신글 시작 -->
<table td width="367" height="248" align="center"  valign=top>
<?
//  최신글
$sql = " select bo_table, bo_subject from $g4[board_table] where bo_table not in ('free', 'need', 'test2', 'sec', 'as', 'down', 'qa', 'emt', 'med') order by gr_id, bo_table ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++) {
    // 이 함수가 바로 최신글을 추출하는 역할을 합니다.
    // 스킨은 입력하지 않을 경우 관리자 > 환경설정의 최신글 스킨경로를 기본 스킨으로 합니다.
    // 사용방법
    // latest(스킨, 게시판아이디, 출력라인, 글자수);
    echo latest("elpis_basic2", "ami", 4, 30);
    echo "<p>\n";
}
?>
<!-- 메인화면 최신글 끝 -->
<?
include_once("./tail14.php");
?>
 
------------
 
이렇게 만들어놨어요 ㅠㅠ
 
도와주세요!!
 
index파일 첨부합니다 ㅠ

댓글 전체

우선...

<?
//  최신글
$sql = " select bo_table, bo_subject from $g4[board_table] where bo_table not in ('free', 'need', 'test2', 'sec', 'as', 'down', 'qa', 'emt', 'med') order by gr_id, bo_table ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++) {
    // 이 함수가 바로 최신글을 추출하는 역할을 합니다.
    // 스킨은 입력하지 않을 경우 관리자 > 환경설정의 최신글 스킨경로를 기본 스킨으로 합니다.
    // 사용방법
    // latest(스킨, 게시판아이디, 출력라인, 글자수);
    echo latest("elpis_basic2", "ami", 4, 30);
    echo "<p>\n";
}
?>

이 부분은 잘못된 거 같습니다. 저렇게 하실경우 쿼리 실행결과의 레코드의 수만큼
echo latest("elpis_basic2", "ami", 4, 30); 이 실행됩니다.
그냥 <?=latest("elpis_basic2", "ami", 4, 30);?> 하나만 적으시면 됩니다.

그리고 <table td width="367" height="248" align="center"  valign=top>뒤부터 태그가 이상합니다.
전체 66,554 |RSS
그누4 질문답변 내용 검색

회원로그인

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