<?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->getImageInfo($_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 Image</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>'; 
$display .= '<figure>';
if(is_file(WEBSITE_ADDY.'/'.GALLERY_IMAGES.'/medium/'.$info['Name'])){
    
    $display .= '<img src="'.WEBSITE_ADDY.'/'.GALLERY_IMAGES.'/medium/'.$info['Name'].'"  class="thumb-img_large" id="Image"/>';
    
}else{
    
    $display .= '<img src="'.WEBSITE_ADDY.'/'.GALLERY_IMAGES.'/small/'.$info['Name'].'"  class="thumb-img_large" id="Image"/>';
    
}
$display .= '</figure>';  
$display .= '<p>Are you sure you want to permanently delete this image? ';
$display .= '<p>As an alternative to deleting this image, you may want to instead use the "Change Status" option and just hide the image from public view.</p>';
    
$display .= '<p>If you wish to continue deleting this image 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-Image\',\'PopUp_Form\');">';
$display .= '<input type="hidden" value="'.$_POST['Id'].'" id="ImageId" name="ImageId">';
$display .= '</div>';
$display .= '</form>';
$display .= '</div>';

echo $display;
exit;

?>

