if ($cat == "") $cat="all";
$filename = "gallery/".$cat.".xml";
$xml = simplexml_load_file($filename);
$pagetitle = $xml['title'];
$pagetitle = mb_convert_encoding($pagetitle, "windows-1251", "UTF-8");
$keywords = $xml['keywords'];
$keywords = mb_convert_encoding($keywords, "windows-1251", "UTF-8");
$description = $xml['description'];
$description = mb_convert_encoding($description, "windows-1251", "UTF-8");
?>
echo $pagetitle ?>
Фото ремонта
$foto = $xml->children();
$count_pages = ceil(count($foto)/12);
if($page == "") $page=1;
if($page != 1)
{
?>
← назад
}
for($i=1; $i <= $count_pages; $i++)
{
if ($i==$page) echo $i, ' ';
else
{
?>
echo $i ?>
}
}
if($page != $count_pages)
{
?>
вперёд →
}
?>
$first = 12*$page-12;
$last = 12*$page;
for($i=$first; ($i < $last)&&($i < count($foto)); $i++)
{
$small = $foto[$i]->small;
$big = $foto[$i]->big;
$title = $foto[$i]->title;
$title = mb_convert_encoding($title, "windows-1251", "UTF-8");
?>
}
?>
|