Размер файла: 2.82Kb
<?php
if (!is_file('user/'.$_SESSION['user_login'].'/profile.php'))
if ($bl_p_dost == 1)
{
echo '
<span class="ramka">
Блог доступен только для зарегистрированых!
</span>
<META HTTP-EQUIV="Refresh" CONTENT="2; URL=/?page=blog">
';
$dost_stop = 'yes';
}
?>
<head>
<style>
.r11, .r22, .r33 {
display: block; height: 1px; background: <?php echo $bl_c_back?>; overflow: hidden;
}
.r11 { margin: 0 4px; }
.r22 { margin: 0 2px; }
.r33 { margin: 0 1px; height: 2px; }
.block-round-content2 {
background: <?php echo $bl_c_back?>;
color: <?php echo $bl_back?>;
padding: 10px;
}
.blog_ex a
{
color:<?php echo $bl_c_link?>;
}
</style>
</head>
<br>
<span class="r11"></span><span class="r22"></span><span class="r33"></span>
<div class="block-round-content2">
<?php
if (is_file('moduls/blog/base/'.$blog.'.txt') and $dost_stop != 'yes')
{
echo '<div style="color:'.$bl_c_t_z.'; background-color: '.$bl_c_zag.';" align="center">Тема: '.$bl_name.'</div>';
echo '<div style="color:'.$bl_c_t_z.'; background-color: '.$bl_c_zag.';" align="center">Описание: '.$bl_opis.'</div><br>';
echo '<span class="mess2">';
$post = @file('moduls/blog/base/'.$blog.'.txt');
$st_r = $cgf_bl_post;
if (is_file('moduls/blog/base/'.$blog.'.txt')) $post = @file('moduls/blog/base/'.$blog.'.txt'); else echo 'Ошибка';
$count_post = count($post);
if (empty($_GET['pages'])) {
$pages = 1;
} else {
$pages = (int) $_GET['pages'];
}
$j = ($count_post-1)-(($pages-1)*$st_r);
$i = $j-$st_r;
for(; $i<$j && $j>=0; $j--)
{
$fn = explode("|",$post[$j]);
echo
'
<span class="blog_ex">
<div style="color:'.$bl_c_t_z.'; background-color: '.$bl_c_zag.';" align="right"><font size="'.$bl_s_zag.'">'.$fn[0].' - '.$fn[2].' - '.$fn[3].'</font></div>
<div style="color:'.$bl_c_t_m.'; background-color: '.$bl_c_mes.';" align="center"><font size="'.$bl_s_mes.'">'.$fn[1].'</font></div>
</span>
<br>
';
}
echo 'Страницы: '."\n";
$all = ceil($count_post/$st_r);
for ($i=1;$i<=$all;$i++) {
if ($pages==$i) {
echo '<b>'.$i.'</b> ';
} else {
echo '<a href="/?page='.$_GET['page'].'&blog='.trim($_GET['blog']).'&pages='.$i.'">'.$i.'</a> '."";
}
}
echo '<hr><span class="mess2">';
if (is_file('user/'.$_SESSION['user_login'].'/profile.php'))
{
include('moduls/blog/add_com.php');
}
echo '<span class="ramka">
Комментарии к блогу.<br>
<span class="ramka">
';
include('moduls/blog/read_com.php');
echo'
</span>
</span>
</span></span>';
}
else
{
echo '<span class="error">Файл баз двнных модуля не найден..</span>';
}
echo '</div>
<span class="r33"></span><span class="r22"></span><span class="r11"></span>
';
?>