$st="select id,subject,img,file from ".$table_prefix."data where offline=0 and subject<>'' and parent_id=$id and lang_id=$lid order by date desc"; $result=$db->sql_query($st); while ($row=$db->sql_fetchrow($result)) { $row[n]=count($loop)+1; $loop[$row[id]]=$row; } $smarty=install_smarty(); $smarty->assign('menuname',$menuname); $smarty->assign('loop',$loop); $smarty->assign('lang',$lang); $out= $smarty->fetch('bulletin.tpl.php'); ?>