최신글 이미지 없으면 글씨만 나오게 하려면...? 정보
최신글 이미지 없으면 글씨만 나오게 하려면...?본문
최신글을 썸네일 이미지와 본문내용이 나오게끔 하고싶은데요 이미지 없으면 그냥 글씨만 나오게 하는 것이 원하는 바인데... 이미지가 없으면 생기는 저 넓은 공백을 치우고 글씨가 나오게 하려면 어찌해야 되나요...? noimage 같은 대체 이미지 말고...첨부한 두번째 이미지처럼 나오게끔하고 싶은데...가르침을 주세요!
<?
for ($i=0; $i<count($list); $i++) {
$list[$i]['content']=eregi_replace(" "," ",$list[$i]['content']);
if($list[$i][file][0][file]) {
$file = "<img src='".$list[$i][file][0][path] .'/'. $list[$i][file][0][file]."' align=absmiddle width=\"160\" height=\"90\" style='border:1 solid #cccccc;'>";
} else {
$file="<img src='$latest_skin_path/img/noimg.gif'>";
}
$time_arr=explode(" ",$list[$i]["datetime3"]);
$time_arr1=explode("-",$time_arr[0]);
$year=$time_arr1[0];
$month=$time_arr1[1];
$day=$time_arr1[2];
?>
<tr>
<td width="160" height="90" rowspan="3"><?=$file?></td>
<td style="padding:0 10px 0 10px">
<a href='<?=$list[$i]['href']?>' style='color:#285386;font-size:10pt;font-weight:bold;'><B><?=$list[$i]['subject']?></B></a></td>
</tr>
<tr>
<td style="padding:0 10px 0 10px"><?=$list[$i]["name"]?><span style="color:#dddddd">|</span>
<span style="font-size:9pt;"><?=substr($list[$i][wr_datetime],0,10)." (".get_yoil($list[$i][wr_datetime]).") ".substr($list[$i][wr_datetime],11,5)?></span>
<span style="color:#dddddd">|</span> <?=$list[$i][bo_subject]?> <span style="color:#dddddd">|</span> <?=$group[gr_subject]?></td>
</tr>
<tr>
<td style="padding:0 10px 0 10px"><a href="<?=$list[$i]['href']?>">
<span style="color:#666666;"><?=conv_subject($list[$i]['content'], 230, $cutopt='...')?></span></a></td>
</tr>
<?if($i!=count($list)-1) { ?>
<? } ?>
<? } ?>
<?
for ($i=0; $i<count($list); $i++) {
$list[$i]['content']=eregi_replace(" "," ",$list[$i]['content']);
if($list[$i][file][0][file]) {
$file = "<img src='".$list[$i][file][0][path] .'/'. $list[$i][file][0][file]."' align=absmiddle width=\"160\" height=\"90\" style='border:1 solid #cccccc;'>";
} else {
$file="<img src='$latest_skin_path/img/noimg.gif'>";
}
$time_arr=explode(" ",$list[$i]["datetime3"]);
$time_arr1=explode("-",$time_arr[0]);
$year=$time_arr1[0];
$month=$time_arr1[1];
$day=$time_arr1[2];
?>
<tr>
<td width="160" height="90" rowspan="3"><?=$file?></td>
<td style="padding:0 10px 0 10px">
<a href='<?=$list[$i]['href']?>' style='color:#285386;font-size:10pt;font-weight:bold;'><B><?=$list[$i]['subject']?></B></a></td>
</tr>
<tr>
<td style="padding:0 10px 0 10px"><?=$list[$i]["name"]?><span style="color:#dddddd">|</span>
<span style="font-size:9pt;"><?=substr($list[$i][wr_datetime],0,10)." (".get_yoil($list[$i][wr_datetime]).") ".substr($list[$i][wr_datetime],11,5)?></span>
<span style="color:#dddddd">|</span> <?=$list[$i][bo_subject]?> <span style="color:#dddddd">|</span> <?=$group[gr_subject]?></td>
</tr>
<tr>
<td style="padding:0 10px 0 10px"><a href="<?=$list[$i]['href']?>">
<span style="color:#666666;"><?=conv_subject($list[$i]['content'], 230, $cutopt='...')?></span></a></td>
</tr>
<?if($i!=count($list)-1) { ?>
<? } ?>
<? } ?>
댓글 전체
<? if ($file) { ?>
<tr>
<td width="160" height="90" rowspan="3"><?=$file?></td>
<td style="padding:0 10px 0 10px">
<a href='<?=$list[$i]['href']?>' style='color:#285386;font-size:10pt;font-weight:bold;'><B><?=$list[$i]['subject']?></B></a></td>
</tr>
<tr>
<td style="padding:0 10px 0 10px"><?=$list[$i]["name"]?><span style="color:#dddddd">|</span>
<span style="font-size:9pt;"><?=substr($list[$i][wr_datetime],0,10)." (".get_yoil($list[$i][wr_datetime]).") ".substr($list[$i][wr_datetime],11,5)?></span>
<span style="color:#dddddd">|</span> <?=$list[$i][bo_subject]?> <span style="color:#dddddd">|</span> <?=$group[gr_subject]?></td>
</tr>
<tr>
<td style="padding:0 10px 0 10px"><a href="<?=$list[$i]['href']?>">
<span style="color:#666666;"><?=conv_subject($list[$i]['content'], 230, $cutopt='...')?></span></a></td>
</tr>
<tr>
<td colspan="2" style="padding:0 10px 0 10px">
<a href='<?=$list[$i]['href']?>' style='color:#285386;font-size:10pt;font-weight:bold;'><B><?=$list[$i]['subject']?></B></a></td>
</tr>
<? } else { ?>
<tr>
<td colspan="2" style="padding:0 10px 0 10px"><?=$list[$i]["name"]?><span style="color:#dddddd">|</span>
<span style="font-size:9pt;"><?=substr($list[$i][wr_datetime],0,10)." (".get_yoil($list[$i][wr_datetime]).") ".substr($list[$i][wr_datetime],11,5)?></span>
<span style="color:#dddddd">|</span> <?=$list[$i][bo_subject]?> <span style="color:#dddddd">|</span> <?=$group[gr_subject]?></td>
</tr>
<tr>
<td colspan="2" style="padding:0 10px 0 10px"><a href="<?=$list[$i]['href']?>">
<span style="color:#666666;"><?=conv_subject($list[$i]['content'], 230, $cutopt='...')?></span></a></td>
</tr>
<? } ?>
<tr>
<td width="160" height="90" rowspan="3"><?=$file?></td>
<td style="padding:0 10px 0 10px">
<a href='<?=$list[$i]['href']?>' style='color:#285386;font-size:10pt;font-weight:bold;'><B><?=$list[$i]['subject']?></B></a></td>
</tr>
<tr>
<td style="padding:0 10px 0 10px"><?=$list[$i]["name"]?><span style="color:#dddddd">|</span>
<span style="font-size:9pt;"><?=substr($list[$i][wr_datetime],0,10)." (".get_yoil($list[$i][wr_datetime]).") ".substr($list[$i][wr_datetime],11,5)?></span>
<span style="color:#dddddd">|</span> <?=$list[$i][bo_subject]?> <span style="color:#dddddd">|</span> <?=$group[gr_subject]?></td>
</tr>
<tr>
<td style="padding:0 10px 0 10px"><a href="<?=$list[$i]['href']?>">
<span style="color:#666666;"><?=conv_subject($list[$i]['content'], 230, $cutopt='...')?></span></a></td>
</tr>
<tr>
<td colspan="2" style="padding:0 10px 0 10px">
<a href='<?=$list[$i]['href']?>' style='color:#285386;font-size:10pt;font-weight:bold;'><B><?=$list[$i]['subject']?></B></a></td>
</tr>
<? } else { ?>
<tr>
<td colspan="2" style="padding:0 10px 0 10px"><?=$list[$i]["name"]?><span style="color:#dddddd">|</span>
<span style="font-size:9pt;"><?=substr($list[$i][wr_datetime],0,10)." (".get_yoil($list[$i][wr_datetime]).") ".substr($list[$i][wr_datetime],11,5)?></span>
<span style="color:#dddddd">|</span> <?=$list[$i][bo_subject]?> <span style="color:#dddddd">|</span> <?=$group[gr_subject]?></td>
</tr>
<tr>
<td colspan="2" style="padding:0 10px 0 10px"><a href="<?=$list[$i]['href']?>">
<span style="color:#666666;"><?=conv_subject($list[$i]['content'], 230, $cutopt='...')?></span></a></td>
</tr>
<? } ?>
멋지군님 감사해요~ ^^