Размер файла: 3.1Kb
<?
include "../ini.php";
print '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>'.$title.'</title>
<link href="../css.css" rel="stylesheet" type="text/css">
</head>
<body><div class="ablockin">
<div class="bblockin"><center><a href="say.php?papka='.$papka.'&kat='.$kat.'&file='.$file2.'">Добавить</a></center></div>';
$f=file("data/$file2.komm");
$c=count($f);
$tot=$c-1;
if($tot==0){
print 'Коментариев нету!<br/>
Будь первым!<br/>
<a href="index.php?papka='.$papka.'&kat='.$kat.'">Назад</a><br/>
<a href="../index.php">К категориям</a><br/>
<div class="bblock"><div class="bblockin">
<a href="http://'.$sait.'/?random='.$rand.'">На главную</a><br/>
© '.$sait.'<br/>
</div></div></body>
</html>';exit();}
$file = @file("data/$file2.komm");
$file = array_reverse($file);
$total = count($file);
if (empty($_GET['start'])) $start = 0;
else $start = $_GET['start'];
if ($total < $start + $bookpost){ $end = $total; }
else {$end = $start + $bookpost; }
for ($i = $start; $i < $end; $i++){
$data = explode("|",$file[$i]);
//////////////////////////////////////////////////////////////
$statwho='';
$sublines=file("");
$subcount=count($sublines);
for ($b=0; $b<$subcount; $b++) {$dt=explode("#",$sublines[$b]); if ($data[1]==$dt[2])
{$statwho='';}}
$i2=round($i+1);
$data[6]=str_replace("\r\n", "", $data[6]);
if(!empty($data[1])){
echo'<b>'.$data[1].'</b>';
echo'<small> ('.$data[2].' / '.$data[3].')</small><br/>
'.$data[0].'<br>';
echo'<br>';}
}
if ($start != 0) {echo '<a href="komm.php?start='.($start - $bookpost).'&papka='.$papka.'&kat='.$kat.'&file='.$file2.'">Назад |</a> ';}else{}
if ($total > $start + $bookpost) {echo ' <a href="komm.php?start='.($start + $bookpost).'&papka='.$papka.'&kat='.$kat.'&file='.$file2.'">| Далее</a>';}
$ba=ceil($total/$bookpost);
$ba2=$ba*$bookpost-$bookpost;
echo "<br>";
$f=file("data/$file2.komm");
$c=count($f);
print "Коментариев: $c<br/>";
echo"Страницы:";
$asd=$start-($bookpost*3);
$asd2=$start+($bookpost*4);
if($asd<$total && $asd>0){echo " <a href=\"komm.php?start=0&papka=$papka&kat=$kat&file=$file2\">1</a> ... ";}
for($i=$asd; $i<$asd2;)
{
if($i<$total && $i>=0){
$ii=floor(1+$i/$bookpost);
if ($start==$i) {
echo " <b>$ii</b>";
}
else {
echo " <a href=\"komm.php?start=$i&papka=$papka&kat=$kat&file=$file2\">$ii</a>";
}}
$i=$i+$bookpost;}
if($asd2<$total){echo " ... <a href=\"komm.php?start=$ba2&papka=$papka&kat=$kat&file=$file2\">$ba</a>";}
print '
<br/><a href="index.php?papka='.$papka.'&kat='.$kat.'">Назад</a><br/>
<a href="../index.php">К категориям</a><br/>
<div class="bblock"><div class="bblockin">
<a href="http://'.$sait.'/?random='.$rand.'">На главную</a><br/>
© '.$sait.'<br/>
</div></div></body>
</html>';
?>