- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
$out="<table valign=top>";
for($k = 0; $k <= 6; $k += 1){
$sql="SELECT * FROM user_news1 ORDER BY date DESC LIMIT ".$k.",1";
$query=mysql_query($sql);
$out.="<tr>";
while ($res=mysql_fetch_assoc($query)){
$out.="<td style='vertical-align:top'>
<div class=newsblock>
<div class=newsdate>".date("d.m.Y G:i",strtotime($res['date']))."</div>
<div class=newschapter><a href='/news/".$res['id'].".html'>".$res['header']."</a></div>
".($res['photo']!= '' ? " <a href='/news/".$res['id']."'><img src=/".str_replace(".", "_small.", $res['photo'])." class=imgnews border=0 align=left></a> " : "")."
<div>".$res['announce']."</div></td>";
}
$out.="</tr>";
}
$out.="</table>";
echo $out;