$postcards_info = file('postcard.dat');
$count = count($postcards_info);
$title1 = 'Моя коллекция открыток';
$title2 = 'Моя коллекция открыток с видами Оулу';
require('../common/template1.inc');
define('NUMBER_OF_COLUMNS', 4);
echo '
';
$crlf = chr(13) . chr(10);
$id = 0;
for ($row = 0; $row <= floor($count / NUMBER_OF_COLUMNS); $row++)
{
echo '' . $crlf;
for ($column = 0; $column < NUMBER_OF_COLUMNS; $column++)
{
$id++;
if ($id > $count)
{
$img = ' ';
}
else
{
$postcard_info = explode(chr(9), $postcards_info[$id - 1]);
$img = sprintf('',
$id, $postcard_info[4], $postcard_info[6], $postcard_info[7], $postcard_info[2], $postcard_info[3], $postcard_info[1] / 1024);
}
echo sprintf('%s | %s', $img, $crlf);
}
echo '
' . $crlf;
if ($id >= $count)
break;
}
echo '
';
require('../common/template2.inc'); ?>