달력 날짜를 가로 한줄로 뿌리는 방법이 없나요?
본문
달력형태가 아닌 가로 한줄로 날짜를 뿌리고 싶은데 어느부분을 수정해야하나요?
<ul class="list-body">
<?php
$cday = 1;
$sel_mon = sprintf("%02d",$month);
$now_month = $year.$sel_mon;
$sca_sql = ($sca) ? "and ca_name = '".$sca."'" : "";
$result = sql_query("select * from {$write_table} where wr_is_comment = '0' and left(wr_1,6) <= '{$now_month}' and left(wr_2,6) >= '{$now_month}' $sca_sql order by wr_id asc");
while ($row = sql_fetch_array($result)) {
$start_day = (substr($row['wr_1'],0,6) < $now_month) ? 1 : substr($row['wr_1'],6,2);
$start_day = sprintf("%2.0f" , $start_day);
$end_day = (substr($row['wr_2'],0,6) > $now_month) ? $lastday[$month] : substr($row['wr_2'],6,2);
$end_day = sprintf("%2.0f" , $end_day);
$row2 = get_list($row, $board, $board_skin_url, G5_IS_MOBILE ? $board['bo_mobile_subject_len'] : $board['bo_subject_len']);
for ($s = (int)$start_day; $s <= (int)$end_day; $s++) {
$list[$s][] = $row2;
}
}
$temp = 7 - (($lastday[$month]+$dayoftheweek)%7);
if($temp == 7) $temp = 0;
$lastcount = $lastday[$month]+$dayoftheweek + $temp;
for ($iz = 1; $iz <= $lastcount; $iz++) {
$is_today = ($b_year == $year && $b_mon == $month && $b_day == $cday) ? true : false;
$daycolor = ' black';
$dayweek = $iz%7;
if($dayweek == 1) {
echo '<li class="list-item">'.PHP_EOL;
$daycolor = ' red';
} else if($dayweek == 0) {
$daycolor = ' blue';
}
//음력날짜
$myarray = soltolun($year,$month,$cday);
$daytext = ($is_today) ? '<span class="font-14 orangered"><i class="fa fa-calendar-check-o fa-lg"></i></span>' : $cday;
$do_cnt = count($list[$cday]);
if($dayoftheweek < $iz && $iz <= $lastday[$month]+$dayoftheweek) {
$fr_date = $year.sprintf("%02d",$month).sprintf("%02d",$cday);
?>
<div class="media<?php echo ($is_today) ? ' bg-today' : '';?>">
<a <?php echo ($write_href) ? ' href="'.$write_href.'&fr_date='.$fr_date.'&to_date='.$fr_date.$sca_qstr.'"' : '';?>>
<span class="font-13 pull-left<?php echo $daycolor;?>">
<?php echo $daytext;?>
</span>
<?php if($is_lunar && ($is_today || $do_cnt > 0)){?>
<span class="font-10 pull-right">
<?php echo $myarray['month'].'.'.$myarray['day'];?>
</span>
<?php } ?>
</a>
<?php if($do_cnt > 0) { ?>
<div class="do-list font-11" style="margin-top:20px;">
<ul>
<?php
for($i = 0; $i < $do_cnt; $i++) {
// 링크이동
$list[$cday][$i]['target'] = '';
if($is_target && $list[$cday][$i]['wr_link1']) {
$list[$cday][$i]['target'] = $is_target;
$list[$cday][$i]['href'] = $list[$cday][$i]['link_href'][1];
}
if($list[$cday][$i]['subject']){
?>
<li>
<a href="<?php echo $list[$cday][$i]['href'];?>"<?php echo $list[$cday][$i]['target'];?> class="red">
<?php echo $list[$cday][$i]['subject'] ;?>
</a>
</li>
<?php
} //if
}
?>
</ul>
</div>
<?php } ?>
</div>
<?php
$cday++;
} else {
echo '<div></div>'.PHP_EOL;
}
if($iz%7 == 0) echo '</li>'.PHP_EOL;
}
?>
</ul>