날짜 표시에 "년" "월" "일" 을 넣고 싶습니다. ㅠㅠ
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if(!$options) $options=5;
$cols = $options; // 이미지 가로갯수 // 이미지 세로 갯수는 메인에서 지정(총 이미지 수)
$image_h = 10; // 이미지 상하 간격
$col_width = (int)(99 / $cols);
$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb';
?>
<link rel="stylesheet" href="<?=$latest_skin_path?>/style.css" type="text/css" />
<table width=100% border=0 align="center" cellpadding=0 cellspacing=0>
<tr>
<td valign="top">
<table width=100% border=0 align="center" cellpadding=0 cellspacing=0>
<tr>
<td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<!-- 이미지보이는 부분 시작 -->
<table align="center" cellpadding="0" cellspacing="0" width="100%" border="0">
<tr><td align='center'>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td height='2'></td></tr>
<tr>
<td align='center'>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<? for ($i=0; $i<count($list); $i++) {
if ($i>0 && $i%$cols==0) { echo "</tr><tr><td colspan='$cols' height='$image_h'></td></tr><tr>"; }
?>
<td width="<?=$col_width?>%" align="center" valign='top'>
<?
$image = $list[$i][file][0][file]; //원본
$img=$data_path. "/".$image; //썸네일이 없을경우 원본출력
$thumb = $thumb_path. "/". $list[$i][wr_id];
if ( file_exists($thumb) )
$img = $thumb;
$style = "style='font-family:돋움; font-size:9pt; color:#686695;' ";
if ($list[$i][icon_new]) {
$style = "style='font-family:돋움; font-size:9pt; color:#134980;' "; }
$subject = "<span $style>".$list[$i][wr_1]."</span>"; //제목 글자수 자르기
$subject2 = "<span $style>".$list[$i][wr_2]."</span>"; //제목 글자수 자르기
$wr_hit = $list[$i]['wr_hit'];
$wr_id = $list[$i]['wr_id'];
if ($list[$i]['comment_cnt']) //코
$cmt = "({$list[$i]['comment_cnt']})";
$bg = ""; //새글?
if ($list[$i][icon_new])
$bg="la_top_2.gif";
else
$bg="la_top_1.gif";
echo $list[$i][icon_reply] . " ";
echo "<table cellpadding='0' cellspacing='0' border='0'>";
echo " <tr><td background='{$latest_skin_path}/img/la_bg.gif' valign='top' align='center'>
<a href=\"$g4[bbs_path]/board.php?bo_table=$bo_table&wr_id=$wr_id\" onFocus=\"this.blur();\" title=\"{$list[$i][subject]}\">
<img src='{$img}' width='140' height='210' border='0' style='border:1 solid #CCCCCC'>
</a></td></tr>";
echo "<tr><td width='140' height='30' align='center' style='font-family:돋움; font-size:9pt; color:#134980;'>{$subject} ~ {$subject2}</td></tr>";
echo "</table>";
?>
</td>
<!--이미지 간격조절-->
<!-- <? if ($i%$cols != $cols - 1 ) {?><td width='30'></td><?}?> -->
<!--추가되는 부분 끝-->
<? } ?>
<?
$cnt = ($i%$cols);
for ($k=$cnt; $k<$cols && $cnt; $k++) {
echo "<td width=$col_width%> </td>";
//추가된 부분 시작
//if ($i%$cols != $cols - 1 ) {echo "<td width='30'></td>";}
//추가된 부분 끝
}
?>
<? if ($i+1 < count($list)) { echo "</tr><tr><td colspan='$cols' height='$image_h'></td></tr><tr>"; } ?>
<? if (count($list) == 0) { echo "<td height=80 align=center>게시물이 없습니다.</td>"; } ?>
</tr>
</table>
</td>
</tr>
</table>
</td></tr>
</table>
<!-- 이미지보이는 부분 끝 -->
</td>
</tr>
</table></td>
</tr>
</table>
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if(!$options) $options=5;
$cols = $options; // 이미지 가로갯수 // 이미지 세로 갯수는 메인에서 지정(총 이미지 수)
$image_h = 10; // 이미지 상하 간격
$col_width = (int)(99 / $cols);
$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb';
?>
<link rel="stylesheet" href="<?=$latest_skin_path?>/style.css" type="text/css" />
<table width=100% border=0 align="center" cellpadding=0 cellspacing=0>
<tr>
<td valign="top">
<table width=100% border=0 align="center" cellpadding=0 cellspacing=0>
<tr>
<td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<!-- 이미지보이는 부분 시작 -->
<table align="center" cellpadding="0" cellspacing="0" width="100%" border="0">
<tr><td align='center'>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td height='2'></td></tr>
<tr>
<td align='center'>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<? for ($i=0; $i<count($list); $i++) {
if ($i>0 && $i%$cols==0) { echo "</tr><tr><td colspan='$cols' height='$image_h'></td></tr><tr>"; }
?>
<td width="<?=$col_width?>%" align="center" valign='top'>
<?
$image = $list[$i][file][0][file]; //원본
$img=$data_path. "/".$image; //썸네일이 없을경우 원본출력
$thumb = $thumb_path. "/". $list[$i][wr_id];
if ( file_exists($thumb) )
$img = $thumb;
$style = "style='font-family:돋움; font-size:9pt; color:#686695;' ";
if ($list[$i][icon_new]) {
$style = "style='font-family:돋움; font-size:9pt; color:#134980;' "; }
$subject = "<span $style>".$list[$i][wr_1]."</span>"; //제목 글자수 자르기
$subject2 = "<span $style>".$list[$i][wr_2]."</span>"; //제목 글자수 자르기
$wr_hit = $list[$i]['wr_hit'];
$wr_id = $list[$i]['wr_id'];
if ($list[$i]['comment_cnt']) //코
$cmt = "({$list[$i]['comment_cnt']})";
$bg = ""; //새글?
if ($list[$i][icon_new])
$bg="la_top_2.gif";
else
$bg="la_top_1.gif";
echo $list[$i][icon_reply] . " ";
echo "<table cellpadding='0' cellspacing='0' border='0'>";
echo " <tr><td background='{$latest_skin_path}/img/la_bg.gif' valign='top' align='center'>
<a href=\"$g4[bbs_path]/board.php?bo_table=$bo_table&wr_id=$wr_id\" onFocus=\"this.blur();\" title=\"{$list[$i][subject]}\">
<img src='{$img}' width='140' height='210' border='0' style='border:1 solid #CCCCCC'>
</a></td></tr>";
echo "<tr><td width='140' height='30' align='center' style='font-family:돋움; font-size:9pt; color:#134980;'>{$subject} ~ {$subject2}</td></tr>";
echo "</table>";
?>
</td>
<!--이미지 간격조절-->
<!-- <? if ($i%$cols != $cols - 1 ) {?><td width='30'></td><?}?> -->
<!--추가되는 부분 끝-->
<? } ?>
<?
$cnt = ($i%$cols);
for ($k=$cnt; $k<$cols && $cnt; $k++) {
echo "<td width=$col_width%> </td>";
//추가된 부분 시작
//if ($i%$cols != $cols - 1 ) {echo "<td width='30'></td>";}
//추가된 부분 끝
}
?>
<? if ($i+1 < count($list)) { echo "</tr><tr><td colspan='$cols' height='$image_h'></td></tr><tr>"; } ?>
<? if (count($list) == 0) { echo "<td height=80 align=center>게시물이 없습니다.</td>"; } ?>
</tr>
</table>
</td>
</tr>
</table>
</td></tr>
</table>
<!-- 이미지보이는 부분 끝 -->
</td>
</tr>
</table></td>
</tr>
</table>
첨부파일
|
댓글을 작성하시려면 로그인이 필요합니다.
댓글 5개
지금 이부분이 날짜 출력 부분인것 같은데 글쓰기할때 년월일을 구별하면 되지 않을까요?
다른게시판에서는
<?php echo preg_replace('/([0-9]{4})([0-9]{2})([0-9]{2})/', '\1년 \2월 \3일', $view['wr_1']); ?> ~ <?php echo preg_replace('/([0-9]{4})([0-9]{2})([0-9]{2})/', '\1년 \2월 \3일', $view['wr_2']); ?>
이런식으로 년월일이 보이는데요
위에 스킨에서 보여주게 하고싶습니다.
어떻게 해야할까요?
$date1 = date('Y년m월d일', strtotime($subject2);
echo $date ~ $date1;
?>
요런식 아닐까용~~
<td>
<?$name=explode(".", $list[$i][subject]);
echo $name[0]."년".$name[0]."월".$name[1]."일"?> </td>