<?php
    include "config.php";
    include "../admin/models/GalleryImage.php";
    include "../admin/models/Image.php";

    include "../admin/services/GalleryImageService.php";
    include "../admin/services/ImageService.php";

    $gallery_image_service = new GalleryImageService($db);
    $image_service = new ImageService($db);

    /* Gallery Section */

    $gallery_result = $gallery_image_service->list();

    $gallery = array();

    foreach($gallery_result as $gallery_image) {
        $gallery_image = new GalleryImage(
            $gallery_image["id"],
            $gallery_image["caption"],
            $gallery_image["image"]
        );
        array_push($gallery, $gallery_image);
    }

    /* Gallery Section */

?>