<?php
session_start();
if(!isset($_SESSION['adm1n']) || $_SESSION['adm1n']['Nbr'] == ''){
  
       header("Location: ../misc/default.php");
       exit;
       
}
require_once("../../includes/php/defines.php");
require_once("../../includes/php/classes/mainClass.php");
require_once("../../includes/php/classes/bannersClass.php");

$b = new bannerClass;
$info = $b->getBannerInfo($_GET['Id']);

?>
<section>
	<div class="container-fluid">
		<div class="container">
			<div class="col-md-12 result-heading">
				<div class="rh-form">		
				<?php
				if(isset($_GET['ReturnPage']) && $_GET['ReturnPage'] != ''){                                        

						echo '<form>';
						echo '<div class="form-group">';
						echo '<div class="return-div"><span onclick="contentChanger(\''.$_GET['ReturnPage'].'\');"><< RETURN TO BANNERS MANAGER</span></div>';
						echo '</div>';       
						echo '</form>';  

				}             
				?>		
					<h1>Edit Banner Text</h1>					
					<form class="a-r-form" id="Admin_Form">
						<div id="Animation">
							<div class="blockG" id="rotateG_01"></div>
							<div class="blockG" id="rotateG_02"></div>
							<div class="blockG" id="rotateG_03"></div>
							<div class="blockG" id="rotateG_04"></div>
							<div class="blockG" id="rotateG_05"></div>
							<div class="blockG" id="rotateG_06"></div>
							<div class="blockG" id="rotateG_07"></div>
							<div class="blockG" id="rotateG_08"></div>                                            
						</div>
						<div id="Result"></div> 
            <div class="form-group">
            <?php
            if($info[$i]['File'] != '' && is_file(THIS_DOMAIN.'/images/banners/'.$info['File'])){

              echo '<img src="'.WEBSITE_ADDY.'/images/banners/'.$info['File'].'" style="max-width:100%;"/>';
              
            }
           ?>
            </div>                        												
						<div class="form-group">
              <p class="label-p">Overlayed Text</p>
							<textarea class="col-md-12" rows="5" id="Text" name="Text"><?php echo $info['Text']; ?></textarea>
						</div>						
						<div id="PreviewContainer" name="PreviewContainer" class="dropzone-previews"></div>
						<div class="form-group" id="Submit_Paragraph">
              <input type="hidden" id="Id" name="Id" value="<?php echo $info['Nbr']; ?>"/>
							<input type="button" value="submit" onclick="processForm('Edit_Banner_Text','No_Clear');">
						</div>
					</form>
				</div>
			</div>
		</div>
	</div>
</section>