Индекс
include_once('core/properties.php');//Подключение к базе
session_start();//Начало сессии
$header = include_once('tmp/header.php');//Head
echo $header;
$news = include_once('tmp/news.php');//News
echo $news;
$footer = file_get_contents('tmp/footer.php');//Footer
echo $footer;
Header
<?
if (empty($_SESSION['login']) or empty($_SESSION['id'])){
echo '
<form class="head_cont" method="post" action="/core/modules/logon.php">
<input type="login" name="login" placeholder="'.$lang['login_title'].'" />
<input type="password" name="password" placeholder="'.$lang['login_pass'].'" />
<input type="submit" value="'.$lang['login_button'].'" /><br />
<a href="/join.php">'.$lang['join_title'].'</a>
</form>
';
}
else{
$id=$_SESSION['id'];
$login=$_SESSION['login'];
$name=$_SESSION['name'];
echo '
<div class="head_cont">
Добро пожаловать, <a href="/ip192.168.10.'.$id.'">'.$name.'</a>!
<br /><a href="/logout.php">Выйти</a>
</div>';
}
echo '<html><head><title>'.$lang['site_name'].'</title><link rel="stylesheet" href="tmp/css/style.css" /></head><body>';
echo '<div class="header"><p><a href="/">'.$lang['site_name'].'</a></p></div>';
?>
А на странице выводит под $header и $news 1