보

latest 함수 수정했는데 작동이 안되네요 ㅡㅡ;(급해서 ..죄송)

· 2010-03-29 (월) 15:35:33 · 1389

아래와 같이 쓰는데 무조건wr_num으로 뽑아오네요..그것도 게시물번호 1,2,3,4번만 ㅡㅡ;
뭐가문제죠. ,,

//  =latest_category("최신글스킨", "게시판이름", 게시물수, 제목글자수, "옵션", "카테고리이름", "뽑아오는종류결정");

function latest_category ($skin_dir="", $bo_table, $rows=10, $subject_len=40, $options="", $category="", $sunseo="wr_num")
{
    global $g4;

    if ($skin_dir)
        $latest_skin_path = "$g4[path]/skin/latest/$skin_dir";
    else
        $latest_skin_path = "$g4[path]/skin/latest/basic";

    $list = array();

    $sql = " select * from $g4[board_table] where bo_table = '$bo_table'";
    $board = sql_fetch($sql);

    $tmp_write_table = $g4['write_prefix'] . $bo_table; // 게시판 테이블 전체이름
    $sql = " select * from $tmp_write_table where wr_is_comment = 0 and ca_name = '$category' order by '$sunseo' limit 0, $rows ";

    // explain($sql);
    $result = sql_query($sql);
    for ($i=0; $row = sql_fetch_array($result); $i++)
        $list[$i] = get_list($row, $board, $latest_skin_path, $subject_len);
   
    ob_start();
    include "$latest_skin_path/latest.skin.php";
    $content = ob_get_contents();
    ob_end_clean();

    return $content;
}

|
댓글을 작성하시려면 로그인이 필요합니다.

자유게시판

203,120건
+
제목 글쓴이 날짜 조회
10-03-29 조회 1,916
10-03-29 조회 1,739
10-03-29 조회 1,788
10-03-29 조회 1,809
10-03-29 조회 1,932
10-03-29 조회 1,792
10-03-29 조회 1,536
10-03-29 조회 2,076
10-03-29 조회 1,883
10-03-29 조회 1,950
10-03-29 조회 1,952
10-03-29 조회 1,390
10-03-29 조회 1,699
10-03-29 조회 1,904
10-03-29 조회 1,895
10-03-29 조회 1,734
10-03-29 조회 1,775
10-03-29 조회 1,875
10-03-29 조회 8,498
10-03-29 조회 1,789