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

require_once("../../../php/defines.php");
require_once("../../../php/classes/mainClass.php");
require_once("../../../php/classes/galleryClass.php");
$pic = new galleryClass;

switch($_POST['Option']){

	case "Add-Photos":
	
    $result = $pic->addImages();
	
	break;
	case "Change-Album-Name":
	
    $result = $pic->changeAlbumName();
	
	break;
	case "Change-Album-Category-Name":
	
		$result = $pic->changeAlbumCategoryName();

break;	
	case "Change-Album-Status":
	
      $result = $pic->changeAlbumStatus();
	
	break;
	case "Change-Album-Category-Status":
	
		$result = $pic->changeAlbumCategoryStatus();

break;	
case "Change-Album-Category":
	
	$result = $pic->changeAlbumCategory();

break;
	case "Change-Image-Status":
	
    $result = $pic->changeImageStatus();
	
	break;
	case "Set-Display-Image":
	
    $result = $pic->setDisplayImage();
	
	break;
	case "Set-Album-Category-Display-Image":
	
		$result = $pic->setAlbumCategoryDisplayImage();

break;
	case "Delete-Album":
	
    $result = $pic->deleteAlbum();
	
	break;
	case "Delete-Album-Category":
	
		$result = $pic->deleteAlbumCategory();

break;	
	case "Delete-Image":
	
    $result = $pic->deleteImage();
	
	break;
	case "Add-Album":
	
    $result = $pic->addAlbum();
	
	break;
	case "Add-Album-Category":
	
		$result = $pic->addAlbumCategory();

break;
	case "Change-Album":
	
    $result = $pic->changeAlbum();
	
	break;
	case "Image-Edit-Desc":
	
    $result = $pic->editImageDesc();
	
	break;

}

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

echo json_encode($response);
exit;

?>