<?php
session_start();
define('Admin_USER', true);

require_once "../../../php/defines.php";
require_once "../../../php/classes/mainClass.php";

switch ($_POST['Option']) {

    ############################################################
    /*
    Photo Gallery Options
     */
    ############################################################
    case "Add-Photos":

        require_once "../../../php/classes/galleryClass.php";
        $pic = new galleryClass;
        $result = $pic->addImages();

        break;
    case "Change-Album-Name":

        require_once "../../../php/classes/galleryClass.php";
        $pic = new galleryClass;
        $result = $pic->changeAlbumName();

        break;
    case "Change-Album-Status":

        require_once "../../../php/classes/galleryClass.php";
        $pic = new galleryClass;
        $result = $pic->changeAlbumStatus();

        break;
    case "Change-Image-Status":

        require_once "../../../php/classes/galleryClass.php";
        $pic = new galleryClass;
        $result = $pic->changeImageStatus();

        break;
    case "Set-Display-Image":

        require_once "../../../php/classes/galleryClass.php";
        $pic = new galleryClass;
        $result = $pic->setDisplayImage();

        break;
    case "Delete-Album":

        require_once "../../../php/classes/galleryClass.php";
        $pic = new galleryClass;
        $result = $pic->deleteAlbum();

        break;
    case "Delete-Image":

        require_once "../../../php/classes/galleryClass.php";
        $pic = new galleryClass;
        $result = $pic->deleteImage();

        break;
    case "Add-Album":

        require_once "../../../php/classes/galleryClass.php";
        $pic = new galleryClass;
        $result = $pic->addAlbum();

        break;
    case "Change-Album":

        require_once "../../../php/classes/galleryClass.php";
        $pic = new galleryClass;
        $result = $pic->changeAlbum();

        break;
    case "Image-Edit-Desc":

        require_once "../../../php/classes/galleryClass.php";
        $pic = new galleryClass;
        $result = $pic->editImageDesc();

        break;
    ############################################################
    /*
    End Photo Gallery Options
     */
    ############################################################

}

$response = array();
$response['Status'] = $result['Status'];
$response['Msg'] = $result['Msg'];
$response['Class'] = $result['Class'];
$response['AlbumId'] = $result['AlbumId'];
$response['AlbumName'] = $result['AlbumName'];
$response['Id'] = $result['Id'];

echo json_encode($response);
exit;
