Размер файла: 2.16Kb
<?php
//////////////////////////////////
include('func/format.php');
include('verh.php');
include('conf.php');
//////////////////////////////////
if(!IsSet($pg) || $pg<1) $pg=1;
$pg=$pg+0;
$page['end'] = $page_kol*$pg;
$page['men'] = $page_kol-1;
$page['begin'] = $page['end']-$page['men'];
$page['next'] = $pg+1;
$page['back'] = $pg-1;
if(IsSet($f) && (file_exists($f)) && !IsSet($new))
{
if($ver=='html') print '<div class="header">Комментарии</div>';
if($ver=='wml') print 'Комментарии<br/>';
print '<a href="new_com.php?f='.$f.'&ver='.$ver.'">Добавить</a><br/><br/>';
$file = fopen(str_replace('.jad','.jar',$f).'.cmt',"a+");
fclose($file);
$str = file(str_replace('.jad','.jar',$f).'.cmt');
$str = array_reverse($str);
$count = count($str);
$pp=0;
for($i=($page['begin']-1);$i<$page['end'];$i++)
{
if($count>$i)
{
$vms = explode('[:>]',$str[$i]);
$st[$pp] = '<b>'.(htmlspecialchars($vms[0])).'</b>'.'<br/>'.(htmlspecialchars($vms[1])).'<br/>--------<br/>';
$pp++;
}
}
print @implode('',$st);
print '<br/>';
if($pg>1) { $niz1 = '<a href="'.$SCRIPT_NAME.'?f='.str_replace('.jad','.jar',$f).'&pg='.$page['back'].'&ver='.$ver.'">Назад</a>'; $nazad=1; } else { $niz1=''; }
if($count>$page['end']) { $pered = 1; $niz2 = '<a href="'.$SCRIPT_NAME.'?f='.str_replace('.jad','.jar',$f).'&pg='.$page['next'].'&ver='.$ver.'">Дальше</a>'; }
if(IsSet($nazad) && IsSet($pered)) $niz3 = '|'; else $niz3='';
if(!ISSet($niz2)) $niz2='';
print $niz1.$niz3.$niz2;
print "<br/><a href=\"info.php?f=".(basename($f))."&d=".(dirname($f))."&ver=$ver\">В info</a><br/>";
}
print '---<br/><a href="index.php">Загрузки</a><br/>';
if($ver=='wml') print '<br/>wml|<a href="'.$SCRIPT_NAME."?f=$f&ver=html".'">html</a><br/>';
if($ver=='html') print '<div class="footers"><a href="'.$SCRIPT_NAME."?f=$f&ver=wml".'">wml</a>|html</div>';
if($ver=='html') print '<div class="news"><a href="http://'.$main.'">'.$main_title.'</a></div>';
if($ver=='wml') print '<a href="http://wap.wabx.ru">WabX.Ru</a>';
include('niz.php');
?>