<?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->getAlbumInfo($_POST['Id']);
$categories = $gallery->getAlbumCategories();


$display = '';

$display .= '<div class="popup_form">';
$display .= '<form class="a-r-form" id="PopUp_Form">';
$display .= '<h1 style="text-align:center;">Change Album Catgegory<br/><em>"'.$info['Name'].'"</em></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($info['Category'] == $categories[$i]['Nbr']){

            $display .= 'selected="selected"';

        }
        $display .= '>'.$categories[$i]['Name'].'</option>';

    }

}
$display .= '</select>';
$display .= '</div>';  
$display .= '<div class="form-group" id="Submit_Paragraph">';
$display .= '<input type="button" value="submit" onclick="imageProcessing(\'Change-Album-Category\',\'PopUp_Form\');">';
$display .= '<input type="hidden" value="'.$_POST['Id'].'" id="AlbumId" name="AlbumId">';
$display .= '</div>';
$display .= '</form>';

$display .= '</div>';

echo $display;
exit;

?>

