sql_query("select value from text where id='welcome'"); $text = $db->fetch_item('value'); $smarty->assign("text",$text); $db->sql_query("select * from slides order by position LIMIT 4"); $slides = $db->fetched_array(); $smarty->assign("slides",$slides); $db->sql_query("SELECT * FROM images ORDER BY position desc LIMIT 4"); $cats = $db->fetched_array(); $smarty->assign("cats",$cats); $smarty->display("index.html"); ?>