query("SELECT content FROM EditorialContent WHERE name='HomePage'"); if ($q->fetchInto($row, DB_FETCHMODE_ASSOC)) { $welcome = $row['content']; $q->free(); } $db->disconnect(); // make content substitutions $smarty->assign('FeaturedVehicle', getFeaturedVehicle()); $smarty->assign('WelcomeText', $welcome); // display the page $smarty->display('index.tpl'); ?>