이슈 173 처리

This commit is contained in:
chicpro
2013-01-24 09:16:10 +09:00
parent 0ee477d8d0
commit 2cb8b47c96
2 changed files with 37 additions and 41 deletions

View File

@ -9,7 +9,7 @@ include_once('./_head.php');
<!-- 메인화면 최신글 시작 --> <!-- 메인화면 최신글 시작 -->
<? <?
// 최신글 // 최신글
$sql = " select bo_table from $g4[board_table] order by gr_id, bo_table "; $sql = " select bo_table from {$g4['board_table']} order by gr_id, bo_table ";
$result = sql_query($sql); $result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++) { for ($i=0; $row=sql_fetch_array($result); $i++) {
// 이 함수가 바로 최신글을 추출하는 역할을 합니다. // 이 함수가 바로 최신글을 추출하는 역할을 합니다.
@ -17,16 +17,15 @@ for ($i=0; $row=sql_fetch_array($result); $i++) {
// 사용방법 // 사용방법
// latest(스킨, 게시판아이디, 출력라인, 글자수); // latest(스킨, 게시판아이디, 출력라인, 글자수);
if(($i % 2 == 1))
echo "<div class=\"lt\" style=\"margin-left: 20px;\">";
else
echo "<div class=\"lt\">";
echo latest("neo", $row['bo_table'], 5, 25); echo latest("neo", $row['bo_table'], 5, 25);
echo "</div>";
} }
?> ?>
<script>
$(function(){
var $lts = $('.lt:nth-child(odd)');
$lts.css("margin-left","20px");
});
</script>
<!-- 메인화면 최신글 끝 --> <!-- 메인화면 최신글 끝 -->
<? <?

View File

@ -2,39 +2,36 @@
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가 if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
?> ?>
<div class="lt"> <strong class="lt_title"><a href="<?=$g4['bbs_path']?>/board.php?bo_table=<?=$bo_table?>"><?=$board['bo_subject']?></a></strong>
<?=$lt_margin?> <ul>
<strong class="lt_title"><a href="<?=$g4['bbs_path']?>/board.php?bo_table=<?=$bo_table?>"><?=$board['bo_subject']?></a></strong> <? for ($i=0; $i<count($list); $i++) { ?>
<ul> <li>
<? for ($i=0; $i<count($list); $i++) { ?> <?
<li> echo $list[$i]['icon_reply']." ";
<? echo "<a href=\"".$list[$i]['href']."\">";
echo $list[$i]['icon_reply']." "; if ($list[$i]['is_notice'])
echo "<a href=\"".$list[$i]['href']."\">"; echo "<strong>".$list[$i]['subject']."</strong>";
if ($list[$i]['is_notice']) else
echo "<strong>".$list[$i]['subject']."</strong>"; echo $list[$i]['subject'];
else
echo $list[$i]['subject'];
if ($list[$i]['comment_cnt']) if ($list[$i]['comment_cnt'])
echo " <span class=\"cnt_cmt\">".$list[$i]['comment_cnt']."</span>"; echo " <span class=\"cnt_cmt\">".$list[$i]['comment_cnt']."</span>";
echo "</a>"; echo "</a>";
// if ($list[$i]['link']['count']) { echo "[{$list[$i]['link']['count']}]"; } // if ($list[$i]['link']['count']) { echo "[{$list[$i]['link']['count']}]"; }
// if ($list[$i]['file']['count']) { echo "<{$list[$i]['file']['count']}>"; } // if ($list[$i]['file']['count']) { echo "<{$list[$i]['file']['count']}>"; }
if (isset($list[$i]['icon_new'])) echo " " . $list[$i]['icon_new']; if (isset($list[$i]['icon_new'])) echo " " . $list[$i]['icon_new'];
if (isset($list[$i]['icon_hot'])) echo " " . $list[$i]['icon_hot']; if (isset($list[$i]['icon_hot'])) echo " " . $list[$i]['icon_hot'];
if (isset($list[$i]['icon_file'])) echo " " . $list[$i]['icon_file']; if (isset($list[$i]['icon_file'])) echo " " . $list[$i]['icon_file'];
if (isset($list[$i]['icon_link'])) echo " " . $list[$i]['icon_link']; if (isset($list[$i]['icon_link'])) echo " " . $list[$i]['icon_link'];
if (isset($list[$i]['icon_secret'])) echo " " . $list[$i]['icon_secret']; if (isset($list[$i]['icon_secret'])) echo " " . $list[$i]['icon_secret'];
?> ?>
</li> </li>
<? } ?> <? } ?>
</ul> </ul>
<? if (count($list) == 0) { //게시물이 없을 때 ?> <? if (count($list) == 0) { //게시물이 없을 때 ?>
<p>게시물이 없습니다.</p> <p>게시물이 없습니다.</p>
<? } ?> <? } ?>
<div class="lt_more"><a href="<?=$g4['bbs_path']?>/board.php?bo_table=<?=$bo_table?>"><img src="<?=$latest_skin_path?>/img/icon_more.gif" alt=""></a></div> <div class="lt_more"><a href="<?=$g4['bbs_path']?>/board.php?bo_table=<?=$bo_table?>"><img src="<?=$latest_skin_path?>/img/icon_more.gif" alt=""></a></div>
</div>