*TITLE* "; if(isset($_REQUEST['page'])) $page=$_REQUEST['page']; else $page=$index; if(file_exists('content/'.$page.'.php')) include('content/'.$page.'.php'); else $content='Ошибка. Страница не найдена'; $menu_out=''; $file=file('menu.txt'); foreach($file as $str) { $el=explode('|',$str); $out=$menu; $out=str_replace('*URL*',$el[0],$out); $out=str_replace('*TITLE*',$el[1],$out); $menu_out=$menu_out.$out; } $link_out=''; $link_data=file('admin/data/anons_data'); $n=count($link_data); if($n!=0){ list($id,$dt,$link_text)=explode('::',$link_data[$n-1]); $link_text=substr($link_text,0,40); $link_out="Последняя
новость:
$dt
$link_text...
Подробнее

"; } $ff=file('template/index.php'); foreach($ff as $str) $template=$template.$str; $output=str_replace('*MENU*',$menu_out,$template); $output=str_replace('*CONT*',$content,$output); $output=str_replace('*LINK*',$link_out,$output); echo $output; ?>