<?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/serviceClass.php");
$s = new serviceClass;
$categories = $s->getServiceCategories();

?>
<section>
<div class="container-fluid">
    <div class="container">
        <div class="col-md-4">
            <div class="col-md-12 result-heading">
                <div class="rh-form">
                    <div class="col-md-10">
                        <form id="Search_Form" name="Search_Form">                          
                            <div class="form-group">
                                <input type="button" value="Categories" onclick="contentChanger('services/manage-categories.php','','','services/manage-services.php');">
                                <input type="button" value="Add Service" onclick="contentChanger('services/add-service.php','','','services/manage-services.php');">
                            </div>
                            <div class="form-group">
							<label>Categories</label>
							<select  class="col-md-12" id="Category" name="Category" onchange="processSearch('Services','No_Clear','1');">
								<option value="" selected="selected">All Categories</option>
                                <?php
                                for($i=0;$i<count($categories);$i++){
                                    
                                    echo '<option value="'.$categories[$i]['Nbr'].'">'.$categories[$i]['Name'].'</option>';

                                }
                                ?>
							</select>
						    </div> 
                        </form>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-md-8">
            <div class="col-md-12 result-heading">
                <h1>Service Pages</h1>&nbsp;
              <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" style="margin-bottom:25px;"></div>                 
            </div>
            <div id="RowContainer">
            
        </div>
        </div>
    </div>
</div>
</section>
<script>
$(document).ready(function(){
    processSearch('Services','No_Clear','1');
});
</script>