<?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/resourceClass.php");
$r = new resourcesClass;
$categories = $r->getCategories();

?>
<section>
	<div class="container-fluid">
		<div class="container">
			<div class="col-md-12 result-heading">
				<div class="rh-form">		
				<?php
					echo '<form>';
					echo '<div class="form-group">';
					echo '<div class="return-div"><span onclick="contentChanger(\'resources/manage-resources.php\');"><< RETURN TO resource pages MANAGER</span></div>';
					echo '</div>';       
					echo '</form>';            
					?>		
					<h1>Add Resource Page</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">
							<label>Categories</label>
							<?php 
                  for($i=0;$i<count($categories);$i++){
										
										echo '<div class="col-md-4">';
										echo '<input type="checkbox" id="Category_'.$categories[$i]['Nbr'].'" name="Category_'.$categories[$i]['Nbr'].'" value="'.$categories[$i]['Nbr'].'"> <span class="cbox">'.$categories[$i]['Name'].'</span>';
										echo '</div>';

									}
									?>
						</div>                        
						<div class="form-group">
							<label>Page Name</label>
							<input type="text" class="col-md-12" id="Name" name="Name">
						</div>												
						<div class="form-group">
							<label>Keywords Tag</label>
							<input type="text" class="col-md-12" id="Keywords_Tag" name="Keywords_Tag">
						</div>
            <div class="form-group">
							<label>Description Tag</label>
							<input type="text" class="col-md-12" id="Description_Tag" name="Description_Tag">
						</div>		            			
						<div class="form-group">
              <p class="label-p">Content</p>
							<textarea class="col-md-12" rows="5" id="Content" name="Content"></textarea>
						</div>            
						<div class="form-group">
							<label>Page Status</label>
							<div class="col-md-4">
								<input type="radio" id="Status_Yes" value="1" name="Status"> <span class="cbox">Visible</span>
							</div>
							<div class="col-md-4">
								<input type="radio" id="Status_No" value="0" name="Status"> <span class="cbox">Hidden</span>
							</div>
						</div>  						
						<div class="form-group" id="Submit_Paragraph">
							<input type="hidden" id="Option" name="Option" value="Add_Resource"/>
							<input type="hidden" id="Clear" name="Clear" value=""/>
							<input type="button" value="submit" onclick="processForm('Add_Resource','');">
						</div>
					</form>
				</div>
			</div>
		</div>
	</div>
</section>