최신글 스킨에 날짜 넣으려면 어떻게 해야 하나요

그냥 코드만 넣으면 되는줄 알았는데..않되네요

검색해봤는데 먼소리인줄잘..모르겠네요


아래소스는 다른거 하고 짜깁기 해봤는데..잘 모르겟습니다
======================================================================================
<?

$_gnu_url = "http://".$_SERVER['HTTP_HOST']."/gnuboard4";
$g4_path = $_SERVER['DOCUMENT_ROOT']."/gnuboard4";
include_once("$g4_path/common.php");



$aj_bdid = "notice";
$aj_con = "3";
$auc_result=mysql_query("select * from g4_write_$aj_bdid where wr_is_comment='0' and wr_option!='secret' order by wr_id desc limit $aj_con");
?>

<div id="rollD_r">
<div id="rollD">
<ul>
<li id="li01">
<?
$j = '1';
while($auc_data=mysql_fetch_array($auc_result)) {
$auc_no = $auc_data[wr_id];
$auc_data[wr_subject] = trim(strip_tags(stripslashes($auc_data[wr_subject])));
$auc_subject=cut_str($auc_data[wr_subject], 60, '');
?>
<span id="rollTextMenu<?=$j?>" class="dsBlock">ㆍ<a href="<?=$g4[url]?>/<?=$g4[bbs]?>/board.php?bo_table=<?=$aj_bdid?>&wr_id=<?=$auc_no?>"><?=$auc_subject?></a></span>
<?
$j++;
}// end while
?> </li>
<?
$sql = " select *
from {$g4[write_prefix]}{$bo_table}
where wr_comment >= 0
order by wr_id desc limit 0, $rows ";
$result = sql_query($sql);

$i = 0;$j = 0;

while($row = mysql_fetch_array($result)) {

$date1 = substr($list[$i][datetime],0,10); //날짜표시형식변경

$date = explode("-", $date1);

$year = $date[0];

$month = $date[1];

$day = $date[2];

$latest_date = $month."월".$day."일";

if($i==0) {
echo "scroll_content[".$j."]=\"";
}
echo "<li id="notice_date"><?=$list[$i][datetime]?>여기에 날짜넣을거라서요</li>";
$i++;
if($i==1) {
echo "\";\n\t";
$i = 0; $j++;
}
}
?>
<li id="pageShow">1/<?=$aj_con?></li>
<li id="li02" onclick="rollText(-1);" title="이전"><</li>
<li id="li03" onclick="rollText(1);" title="다음">></li>
</ul></div></div>
<script type="text/javascript" language="JavaScript">
//<![CDATA]
var rollText_k=<?=$aj_con?>; // total
var rollText_i=1; // start
var rollTime = 3000; // roll time
rollText_tt=setInterval("rollText(1)", rollTime);

function rollText(a){
clearInterval(rollText_tt);
rollText_tt=setInterval("rollText(1)", rollTime);
rollText_i+=a;
if (rollText_i>rollText_k){rollText_i=1;}
if (rollText_i==0){rollText_i=rollText_k;}

for (var j=1; j<=rollText_k; j++){
document.getElementById("rollTextMenu"+j).style.display="none";
}

document.getElementById("rollTextMenu"+rollText_i).style.display="block";
document.getElementById("pageShow").innerHTML = rollText_i+"/"+rollText_k;
}
//]]>
</script>


어떻게 해야 하나요..
날짜는 00.00.00 이렇게 하고싶은데요
|

댓글 1개

$latest_date = $month."월".$day."일"; 이 아래에 다음의 소스를 넣어 주고요.

$new_ymd = $year.".".$month.".".$day;

날짜 넣을 곳에 지금 있는 <?=$list[$i][datetime]?>여기에 날짜넣을거라서요 이 부분을 빼고

<?=$new_ymd;?> 를 넣어 주세요.
댓글을 작성하시려면 로그인이 필요합니다.

그누4 질문답변

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

+
제목 글쓴이 날짜 조회
12년 전 조회 1,527
12년 전 조회 749
12년 전 조회 1,231
12년 전 조회 784
12년 전 조회 1,182
12년 전 조회 759
12년 전 조회 1,674
12년 전 조회 1,522
12년 전 조회 784
12년 전 조회 724
12년 전 조회 6,518
12년 전 조회 729
12년 전 조회 1,056
12년 전 조회 825
12년 전 조회 1,209
12년 전 조회 811
12년 전 조회 1,527
12년 전 조회 933
12년 전 조회 2,689
12년 전 조회 846