assign('bread', 'Клеопа.ru »

Сонники

'); $smarty->assign('pagename', $pagename); $smarty->assign('keywords', $keywords); $smarty->assign('description', $description); // ПОПУЛЯРНЫЕ СТАТЬИ $query= "Select * from se_art ORDER BY view DESC LIMIT 15"; $qresult = $database->database_query($query); $pop_array = Array(); $pop_count=0; while($popdata = $database->database_fetch_assoc($qresult)) { if ($popdata[id]<846) {$arturl='article.php?id='.$popdata[id];} else {$arturl=$popdata[id].'-'.$popdata[url];} $pop_array[$pop_count] = Array('ddate' => $popdata[ddate], 'id' => $popdata[id], 'img' => $popdata[img], 'arturl' => $arturl, 'artname' => $popdata[artname]); $pop_count++; } shuffle($pop_array); array_splice($pop_array, 3); $smarty->assign('popdata', $pop_array); include "footer.php"; ?>