File size: 2.3Kb
<?
/////////// Powered by Giga!!! /////////
/////////// http://gwap.net.ru /////////
/////////// [email protected] /////////
Error_Reporting(E_ALL & ~E_NOTICE);
include "set.php"; //включаем файл с настройками
include "header.php"; //добавляем шапку
$dir_rec = dir("rec");
$i = 0;
while($entry = $dir_rec->read())
{
if (substr($entry,0,3)=="rec")
{
$names[$i]=substr($entry,4);
$i++;
}
}
$dir_rec->close();
@rsort($names);
$count = $i;
$count1 = $count;
if (empty($start))
{
$start = 0;
}
$start = intval($start);
if ($start < 0)
{
$start = 0;
}
echo "<p class=\"class1\">$title<br />$site</p>";
echo "<p class=\"class1\">";
if ($count > $start + $pp) $count = $start + $pp;
if ($start != 0)
{
echo "<a href=\"index.php?start=".($start - $pp)."\">назад</a>:";
}
echo "<a href=\"add.php\">добавить</a>";
if ($count1 > $start + $pp)
{
echo ":<a href=\"index.php?start=".($start + $pp)."\">далее</a> \n";
}
echo "</p>";
for ($i = $start; $i < $count; $i++)
{
$entry = $names[$i];
$data = file("rec/rec.".$entry);
$date = $entry;
$name = trim($data[0]);
$time = trim($data[1]);
$email = trim($data[2]);
$url = trim($data[3]);
$msg = trim($data[4]);
$answer = trim($data[5]);
echo "<p class=\"class2\">$name<br />";
if (!empty($time)) echo " $time<br />";
if (!empty($email)) echo "<a href=\"mailto:$email\">$email</a><br />";
if (!empty($url)) echo "<a href=\"http://$url\">$url</a><br />";
echo "</p>";
echo "<p class=\"class3\">";
echo "$msg";
if (!empty($answer))
{
echo "<br /><span class=\"red\">Админ: $answer</span><br />";
}
echo "</p>";
}
echo "<p class=\"class1\">";
if ($count > $start + $pp) $count = $start + $pp;
if ($start != 0)
{
echo "<a href=\"index.php?start=".($start - $pp)."\">назад</a>:";
}
echo "<a href=\"add.php\">добавить</a>";
if ($count1 > $start + $pp)
{
echo ":<a href=\"index.php?start=".($start + $pp)."\">далее</a>";
}
echo "</p>";
echo "<p class=\"class1\"><a href=\"http://$site\">$site</a></p>";
echo '</body></html>';
?>