Пример #1
0
        if (isset($ID)) {
            $results = $branch_item->update_branch_item($_POST, $ID);
        } else {
            // Insert new
            $results = $branch_item->insert_branch_item($_POST);
        }
        if ($results) {
            echo '<div class="alert alert-success" role="alert">';
            echo isset($_GET['id']) ? 'Updated ' : 'Added ';
            echo 'branch item Sucessfully </div>';
        } else {
            echo '<div class="alert alert-danger" role="alert"> Error </div>';
        }
    }
    if (isset($ID)) {
        $branch_item_result = $branch_item->get_branch_item($ID);
    }
    ?>

<form class="form-horizontal" action="" method="post" enctype="multipart/form-data" >
	<div class="col-sm-6">

		
		 <input type="hidden" class="form-control" name="branch_item_company" id="branch_item_company" value="<?php 
    echo isset($ID) ? $branch_item_result->branch_item_company : $_SESSION["company_id"];
    ?>
" placeholder="Name" required>
		 

		 <div class="form-group">
		    <label for="branch_item_branch" class="col-sm-4 control-label">Select Branch</label>
Пример #2
0
if (isset($_SESSION['company_id'])) {
    ?>
	<ul class="breadcrumb">
	    <li><a href="#">Home</a></li>
	    <li><a class="active" href="#">Branches Items</a></li>
	</ul>

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

	<div class="table-responsive custom-table">
		<?php 
    $branch = new branch();
    $branch_item = new branch_item();
    $results = $branch_item->get_branch_item();
    ?>
		<table id="myTable">  
	        <thead>  
	          <tr>  
	            <th>Name</th>  
	            <th>Branch</th>  
	            <th>Category</th> 
	            <th>Menu Type</th> 
	            <th>Status</th> 
	            <th></th>  
	          </tr>  
	        </thead>  
	        <tbody>  

	        <?php