<?php
session_start();
define('Admin_USER',true);
require_once("../../../php/defines.php");
require_once("../../../php/classes/mainClass.php");
require_once("../../../php/classes/galleryClass.php");

$gallery = new galleryClass();
$info = $gallery->getAlbumCategoryInfo($_POST['Id']);

$display = '';

$display .= '<div class="popup_form_delete">';
$display .= '<form class="a-r-form" id="PopUp_Form">';
$display .= '<h1 style="text-align:center;">Delete Album Category<br/><em>"'.$info['Name'].'"</em></h1>';
$display .= '<div id="AnimationPopUp">';
$display .= '<div class="blockG" id="rotateG_01"></div>';
$display .= '<div class="blockG" id="rotateG_02"></div>';
$display .= '<div class="blockG" id="rotateG_03"></div>';
$display .= '<div class="blockG" id="rotateG_04"></div>';
$display .= '<div class="blockG" id="rotateG_05"></div>';
$display .= '<div class="blockG" id="rotateG_06"></div>';
$display .= '<div class="blockG" id="rotateG_07"></div>';
$display .= '<div class="blockG" id="rotateG_08"></div>';                                          
$display .= '</div>';
$display .= '<div id="Result"></div>';
if($info['Total_Images'] > 0){
    
    $display .= '<p>Are you sure you want to permanently delete this album category? Doing so will also delete any and all of the '.$info['Total_Images'];
    if($info['Total_Images'] == 1){
        $display .= ' images ';
    }else{
        $display .= ' image ';
    }
    $display .= 'inside this album category and all associated albums.</p>';
    $display .= '<p>As an alternative to deleting this album category, you may want to instead use the "Change Status" option and just hide the album category from public view.</p>';
    
}
$display .= '<p>If you wish to continue deleting this album you may do so by clicking the "Delete" button below. If you do not wish to continue just click outside of the popup to close it.</p>';
$display .= '<div class="form-group" id="Submit_Paragraph">';
$display .= '<input type="button" value="Delete" onclick="processImage(\'Delete-Album-Category\',\'PopUp_Form\');">';
$display .= '<input type="hidden" value="'.$_POST['Id'].'" id="CategoryId" name="CategoryId">';
$display .= '</div>';
$display .= '</form>';
$display .= '</div>';

echo $display;
exit;

?>

