Здравейте искам да попитам как да направя това с новините на главната ми страница:
Ето така искам да ми се разпределят новините на главната страница.
Ето ми кода:
Код:
All | Коли | Обяви
|___________________________
|
gjhgkjbmnbm,bm,b |
kljl;jkl |
lkhl;jh;l |
|
|
|
|
_______________________________|
All | Коли | Обяви
___| |______________________
|
gjhgkjbmnbm,bm,b |
kljl;jkl |
lkhl;jh;l |
|
|
|
|
_______________________________|
Ето така искам да ми се разпределят новините на главната страница.
Ето ми кода:
Код:
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td style="width: 6px;"></td>
<td>
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td></td>
</tr>
<tr>
<td>
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td style="border-left: 1px solid #B6B6B6; border-right: 1px solid #B6B6B6;"></a></td>
</tr>
</table>
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td >
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="33" align="center" style="padding-left: 1px;"><SPAN id="_Ath_FileName" style="padding: 0px;"></td>
<td width="277" style="padding-left: 10px;"><SPAN class="featured" id="_Ath_Console" style="padding: 0px;"></td>
<td width="167" align="center">
<table cellpadding="0" cellspacing="0" border="0" align="right">
<td></td>
<td></td>
<td></td>
</table>
<? // <a href="#"><img src="images/1.jpg" hspace="1" border="0"></a><a href="#"><img src="images/2.jpg" hspace="1" border="0"></a><a href="#"><img src="images/3.jpg" hspace="1" border="0"></a> ?>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td><img src="images/spacer.jpg"></td>
</tr>
<tr>
<td></td>
</tr>
<?php
$featured_news = mysql_query("SELECT * from ccms_news where featured='1' order by id desc limit 15");
$c = 1;
while ($row = mysql_fetch_assoc($featured_news)) {
// <span class=\"contentlight\"> - "; echo days_ago($row[timestamp]); echo "</SPAN>
$title_start = preg_replace('/[^a-zA-Z0-9 *]/', '', $row[title]);
$title_seo = str_replace(' ', '-', $title_start);
if($odd = $c%2 ) {
$style = "featured_bg1.jpg";
} else {
$style = "";
}
echo " <tr style='margin-top:20px'>
<td >
<table cellpadding=\"5\" cellspacing=\"5\" border=\"0\" width=\"100%\" align=\"center\">
<tr>
<td width=\"1%\"><a href=\"story-$row[id]-$title_seo.html\"><img alt=\"$row[title]\" align=\"left\" src=\"thumbnailer.php?type=featured_news&image=$row[image]\" style=\"border: 1px solid #B6B6B6;\" width=\"130\" height=\"85\"></a></td>
<td width=\"99%\" valign=\"top\" style=\"padding: 5px;\">\n";
if ($row[platform]) {
echo " <img src=\"images/consoles/$row[platform].gif\" align=\"right\">";
}
echo " <a href=\"story-$row[id]-$title_seo.html\" class=\"latest_news\">$row[title]</a><br />
<SPAN class=\"latest_news\">$row[prev_news]</SPAN></td>
</tr>
</table>
</td>
</tr>\n\n";
$c++;
}
?>