View file mod/post/frame.php

File size: 664B
<?php
// на страницу
$st_r = 10;
// столько выводим



if (is_file("p/post.txt")) $post = @file("p/post.txt"); else echo 'Ошибка';

$count_post = trim(file_get_contents("count.txt"));

if (empty($_GET['pages']))
    $pages = 1;


$j = ($count_post-1)-(($pages-1)*$st_r);
$i = $j-$st_r;

for(; $i<$j && $j>=0; $j--) {

   $post_read = explode("|",$post[$j]);
    echo '
    <b>'.$post_read[0].'</b>
    <small>'.$post_read[1].'</small>
    <table style="text-align: left; width: 100%;" border="0"cellpadding="0" cellspacing="0">

    <tr><td style="background-color: #D1D1D1;">
     '.$post_read[2].'
     </td></tr></table>';
}


?>