示例#1
0
<?php

require_once 'header.php';
?>
<section>
	<hr/>
	<div class="container">
		<div class="row">
			<div class="tableHeading">
				<p class="nomargin alignCenter">View Product in Warehouse</p>
			</div>
			<div class="col-md-12">	
				<?php 
$warehouse = new warehouse();
$results = $warehouse->get_products();
if ($results) {
    ?>
				<table border="1" cellpadding="5" cellspacing="0" class="table table-hover tableView">
					<tr>
						<th>Product Name</th>
						<th>Product Cost</th>
						<th>Product Price</th>
						<th>Product Quantity</th>
						<th>Action</th>
					</tr>
						<?php 
    foreach ($results as $res) {
        ?>
						<tr>
						<td><?php 
        echo $res->p_name;
示例#2
0
		</ol>

		<div class="panel panel-info">
		  <div class="panel-heading">
			<h3><?php 
echo isset($_GET['id']) ? 'Update' : 'Add';
?>
 Inventory Products</h3>
		  </div>
		  <div class="panel-body">
			<!-- BEGIN DATA TABLE -->
			<?php 
$product = new product();
$all_product = $product->get_product();
$warehouse = new warehouse();
$all_product_warehouse = $warehouse->get_products();
$inventory = new inventory();
$ID = isset($_GET['id']) ? $_GET['id'] : NULL;
if (isset($_POST['add_inventory'])) {
    // Update old record
    if (isset($ID)) {
        $results = $inventory->inv_update($_POST, $ID);
    } else {
        // Insert new
        $results = $inventory->inv_insert($_POST);
    }
    if ($results) {
        echo '<div class="alert alert-success alert-block fade in alert-dismissable">
				  <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
				  <strong>Add Inventory Sucessfully</strong> in Unit
				</div>';
示例#3
0
        $results = $warehouse->insert_product_warehouse($_POST);
    }
    if ($results) {
        echo '<div class="alert alert-success alert-block fade in alert-dismissable">
				  <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
				  <strong>Add Product Sucessfully</strong> in Warehouse
				</div>';
    } else {
        echo '<div class="alert alert-danger alert-block fade in alert-dismissable">
				  <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
				  <strong>Error</strong>
				</div>';
    }
}
if (isset($ID)) {
    $product_result = $warehouse->get_products($ID);
}
?>
		<!-- End breadcrumb -->
			<div class="the-box">
				<form id="ExampleBootstrapValidationForm" method="post" action="" class="form-horizontal">
					<fieldset>
						<legend>Product Detail:</legend>
						
						<div class="form-group">
							<label class="col-lg-3 control-label">Product Name:</label>
							<div class="col-lg-5">
								<?php 
if (isset($ID)) {
    foreach ($all_product as $all_product => $product) {
        if ($product->p_id == $product_result->product_id) {