<?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();
$categories = $gallery->getAlbumCategories();

$display = '';

$display .= '<div class="popup_form">';
$display .= '<form class="a-r-form" id="PopUp_Form">';
$display .= '<h1 style="text-align:center;">Add New Album</h1>';
$display .= '<div id="Result"></div>';
$display .= '<div class="form-group">';
$display .= '<label>Album Category</label>';
$display .= '<select  class="col-md-12" id="Category" name="Category">';
$display .= '<option value="">Choose Album Category</option>';
for($i=0;$i<count($categories);$i++){

    if($categories[$i]['Name'] != ''){

    $display .= '<option value="'.$categories[$i]['Nbr'].'"';
    if($_POST['Id'] == $categories[$i]['Nbr']){
        
        $display .= ' selected="selected"';
        
    }
    $display .= '>'.$categories[$i]['Name'].'</option>';

    }

}
$display .= '</select>';
$display .= '</div>';
$display .= '<div class="form-group">';
$display .= '<label>New Album Name</label>';
$display .= '<input type="text" class="col-md-12" name="AlbumName" id="AlbumName">';
$display .= '</div>';
$display .= '<div class="form-group" id="Submit_Paragraph">';
$display .= '<input type="button" value="submit" onclick="imageProcessing(\'Add-Album\',\'PopUp_Form\');">';
$display .= '</div>';
$display .= '</form>';

$display .= '</div>';

echo $display;
exit;

?>

