コード例 #1
0
ファイル: page.php プロジェクト: jambik/elenaburgon
             }
             $smarty->assign("articleItem", $articleItem);
         } else {
             $page["title"] = "Статьи";
             $smarty->assign("allarticles", $articles->GetItems(false, false, "", "", "", "", true));
         }
     }
     // Gallery
     if ($pageItem[0]["page_module"] == 2) {
         require_once $rootPath . INC_DIR . "class.gallery.php";
         require_once $rootPath . INC_DIR . "class.photos.php";
         $gallery = new Gallery();
         $photos = new Photos();
         if (isset($_GET["gallery"])) {
             $galleryId = intval($_GET["gallery"]);
             $smarty->assign("photos", $photos->GetItems(false, false, "", "", "", " AND {$photos->DbAlias}.gallery_id = {$galleryId} ", true));
             $selectedGallery = $gallery->GetItem($galleryId);
             $page["title"] = $selectedGallery["gallery_name"] . " - Фотогалерея - " . $config["site_name"];
             $smarty->assign("selectedGallery", $selectedGallery);
         } else {
             $galleryItems = $gallery->GetItems(false, false, "", "", "", "", true);
             if ($galleryItems) {
                 foreach ($galleryItems as $key => $value) {
                     $galleryItems[$key]["photos"] = $photos->GetItems(1, 7, "", "", "", " AND {$photos->DbAlias}.gallery_id = {$value['gallery_id']} ", true);
                 }
                 $smarty->assign("galleries", $galleryItems);
             }
         }
     }
 } else {
     header("HTTP/1.1 404 Not Found");