<?php 
if (isset($_SESSION['company_id'])) {
    ?>
	<ul class="breadcrumb">
	    <li><a href="#">Home</a></li>
	    <li><a class="active" href="#">Branches Categories</a></li>
	</ul>

<div class="page-heading">
	<h1>View Categories</h1>
</div>

	<div class="table-responsive custom-table">
		<?php 
    $branch = new branch();
    $branch_category = new branch_category();
    $results = $branch_category->get_branch_category();
    ?>
		<table id="myTable">  
	        <thead>  
	          <tr>  
	            <th>Name</th>  
	            <th>Status</th> 
	            <th></th>  
	          </tr>  
	        </thead>  
	        <tbody>  

	        <?php 
    foreach ($results as $res) {
        if ($res->branch_category_company == $_SESSION['company_id']) {
	
	<ul class="breadcrumb">
	    <li><a href="#">Home</a></li>
	    <li><a href="view_branch_item.php">Items</a></li>
	    <li><a class="active" href="#" >Add</a></li>
	</ul>

<div class="page-heading">
	<h1>Add Item</h1>
</div>

<div class="form-container">
<?php 
    $branch = new branch();
    $all_branch = $branch->get_branches();
    $branch_category = new branch_category();
    $all_branch_category = $branch_category->get_branch_category();
    $branch_menu_type = new branch_menu_type();
    $all_branch_menu_type = $branch_menu_type->get_branch_menu_type();
    $branch_spice = new branch_spice();
    $all_branch_spice = $branch_spice->get_branch_spice();
    $branch_item = new branch_item();
    $ID = isset($_GET['id']) ? $_GET['id'] : NULL;
    if (isset($_POST['add_branch_item'])) {
        // Update old record
        if (isset($ID)) {
            $results = $branch_item->update_branch_item($_POST, $ID);
        } else {
            // Insert new
            $results = $branch_item->insert_branch_item($_POST);
        }
	
	<ul class="breadcrumb">
	    <li><a href="#">Home</a></li>
	    <li><a href="view_branch_category.php">Categories</a></li>
	    <li><a class="active" href="#" >Add</a></li>
	</ul>

<div class="page-heading">
	<h1>Add Category</h1>
</div>

<div class="form-container">
<?php 
    $branch = new branch();
    $all_branch = $branch->get_branches();
    $branch_category = new branch_category();
    $ID = isset($_GET['id']) ? $_GET['id'] : NULL;
    if (isset($_POST['add_branch_category'])) {
        // Update old record
        if (isset($ID)) {
            $results = $branch_category->update_branch_category($_POST, $ID);
        } else {
            // Insert new
            $results = $branch_category->insert_branch_category($_POST);
        }
        if ($results) {
            echo '<div class="alert alert-success" role="alert">';
            echo isset($_GET['id']) ? 'Updated ' : 'Added ';
            echo 'branch category Sucessfully </div>';
        } else {
            echo '<div class="alert alert-danger" role="alert"> Error </div>';