define (array ('body' => 'read.tpl')); // *** Эпиграф $q_epi = mysql_query ('SELECT id FROM g_epigrafs ORDER BY id'); while ($epi = mysql_fetch_array ($q_epi)) { $epis[] = $epi ['id']; } mt_srand (DATE('mj')); $rand_id = mt_rand (0, count ($epis)-1); // новый - раз в сутки $epi = mysql_fetch_array (mysql_query ("SELECT text,author FROM g_epigrafs WHERE id='$epis[$rand_id]'")); // *** Эпиграф $about = mysql_fetch_array (mysql_query ("SELECT title,text FROM g_texts WHERE value='read_about'")); $tpl->assign( array( "PAGE_TITLE" => 'Читаем', "KEY_WORDS" => 'проза поэзия всех форм книги рецензии', "EPIGRAF_TEXT" => nl2br ($epi ['text']), "EPIGRAF_AUTHOR"=> $epi ['author'], "ABOUT_TEXT" => nl2br ($about ['text']), "ABOUT_TITLE" => $about ['title'], "NEW_LINK" => $rootpath.'new/', "HITS_LINK" => $rootpath.'hits/', "INCOMING_LINK" => $rootpath.'incoming/', "YES_LINK" => $rootpath.'award/', "NO_LINK" => $rootpath.'lofts/', "POETRY" => 'poetry/', "PROSE" => 'prose/', "BIBLIO_LINK" => $rootpath.'biblio/', "RANDOM_LINK" => $rootpath.'random/', "GARIKI_LINK" => $rootpath.'gariki/', "CHINA_LINK" => $rootpath.'china/' ) ); $tpl->parse('ft_head', 'head'); $tpl->FastPrint('ft_head'); $tpl->parse('ft_body', 'body'); $tpl->FastPrint('ft_body'); $tpl->parse('ft_foot', 'foot'); $tpl->FastPrint('ft_foot'); ?>