set_file('main', 'index.ihtml'); $t->set_block('main', 'new', 'new_'); $db->Query('select NewData, NewTitle, NewText from news where IsMain = \'1\' and NewData <= now() order by NewData desc'); while ($db->NextRecord()) { $t->set_var(array( 'DATE' => sql_to_date($db->F('NewData')), 'NEWTITLE' => $db->F('NewTitle'), 'NEWTEXT' => $db->F('NewText'), )); $t->parse('new_', 'new', true); } //require (PATH_TO_ROOT . 'inc/top_main.inc.php'); require (PATH_TO_ROOT . 'inc/top.inc.php'); $t->pparse('_', 'main'); require (PATH_TO_ROOT . 'inc/bottom.inc.php'); ?>