고민하다가 글 올렸는데 더 해보니까... 이거거더군요...^^;;;

new.JPG
팁앤테크에 없는거 같은데... 있나요?...;;;
위와같은 형태의 소스입니다...^^

              <table width=100% cellpadding=0 cellspacing=0>
              <tr><td height=1 background='./bbs/line.gif' colspan=2></td></tr>
              <tr class='subject subjectbg ht'><td colspan=2 align=center>최 신 글</td></tr>
              <tr><td height=1 background='./bbs/line.gif'colspan=2></td></tr>
              <?
              $max_i = 7; // 출력갯수
              $wtime = date("Y-m-d H:i:s", time()-86400*14);
              $arr_series = array("board", "111", "222", "333", "555", "pds");
              for ($i=0; $i<count($arr_series); $i++) {
                  $sql = " select wr_id, wr_subject, wr_datetime, wr_commentcnt from $cfg[write_table_prefix]{$arr_series[$i]} where wr_comment = 0 and wr_datetime > '$wtime' ";
                  $result = sql_query($sql);
                  while ($row=mysql_fetch_array($result)) {
                      $aseries[$row[wr_datetime].$arr_series[$i]][table]    = $arr_series[$i];
                      $aseries[$row[wr_datetime].$arr_series[$i]][datetime] = $row[wr_datetime];
                      $aseries[$row[wr_datetime].$arr_series[$i]][id]       = $row[wr_id];
  $aseries[$row[wr_datetime].$arr_series[$i]][subject]  = $row[wr_subject];
                      $aseries[$row[wr_datetime].$arr_series[$i]][cnt]      = $row[wr_commentcnt];
                  }
              }

              @krsort($aseries);
              $xtime = date("Y-m-d H:i:s", time()-86400*3);
              $i=0;
              foreach ($aseries as $key=>$value) {
                  if ($i++ >= $max_i) break;
                  $subject = conv_subject($value[subject], 60,"…");
  $bo_table = conv_subject($value[table], 60,"…"); //<- 이거 추가하니까 되던데... 이거 맞는지...^^;;;;;위에꺼복사한건뎅...ㅋ
                  $new = "";
                  if ($value[datetime] > $xtime) {
                      $new = "<img src='$latest_skin/icon_new.gif' align=absmiddle> ";
                  }

                  $cnt = "";
                  if ($value[cnt]) {
                      $cnt = " <span style=font-size:7pt;>($value[cnt])</span>";
                  }
  echo "<tr><td height=22 width=80 align=center> [<a href='./?doc=$cfg[bbs_dir]/gnuboard.php&bo_table=$value[table]'> $bo_table </a>] </td> <td><a href='./?doc=$cfg[bbs_dir]/gnuboard.php&bo_table=$value[table]&wr_id=$value[id]'>$subject$cnt</a></td></tr>";
                  echo "<tr><td height=1 bgcolor=#000000 colspan=2></td></tr>";  
              }
              ?>
              </table>

첨부파일

new.JPG (33.3 KB)
1회 2004-02-18 22:21
|

댓글 6개

^^:;; 안되는데요...^^;;;

예전에 쓰던 최신글하구 어딘가 틀리더군요...;;
[<a href='./?doc=$cfg[bbs_dir]/gnuboard.php&bo_table=".$value->bo_table."'>".$value->bo_subject."</a>]

요렇게 해 보세요.
지니아빠님...
제가 한거는 게시판의 table 이 나오는데요...
게시판의 제목이 나오게 하려면 어케...^^;;;
타이틀과 제목 이였군요. 제목만 나오는 ....
이전에 메인의 연재 게시물 뽑아오는 ....
관리자님이 올리신 거랍니다.
지니아빠 님이 링크걸어주신거는 게시판의 타이틀이 안나오던데....
저만 그런가?...

게시글의 제목만 나와서...
게시판의 타이들은 안나와서...;;
댓글을 작성하시려면 로그인이 필요합니다.

그누3질답

+
제목 글쓴이 날짜 조회
22년 전 조회 473
22년 전 조회 1,077
22년 전 조회 528
22년 전 조회 732
22년 전 조회 481
22년 전 조회 642
22년 전 조회 706
22년 전 조회 534
22년 전 조회 897
22년 전 조회 559
22년 전 조회 381
22년 전 조회 726
22년 전 조회 527
22년 전 조회 805
22년 전 조회 450
22년 전 조회 348
22년 전 조회 456
22년 전 조회 404
22년 전 조회 596
22년 전 조회 447