<?php 
ini_set('display_errors',1);
ini_set('display_startup_errors',1);
error_reporting(-1);

	require "models/rivermedia.php";
	$rivermedia = new RIVERMEDIA;
	$rivermedia->auth();
?>

        <div class="row">
          <div class="col-xs-12">
            <div class="x_panel">
              <div class="x_title">
                <h2>Quantity History <small>[Last 5 DESC]</small></h2>
                <div class="clearfix"></div>
              </div>
              <div class="x_content">
                <table class="table table-hover" id="list_quantities">
                  <thead>
                    <tr>
                      <th>#</th>
                      <th><div class="pull-right">Quantity</div></th>
                      <th>Transaction</th>
                      <th>Timestamp</th>
                    </tr>
                  </thead>
                  <tbody id="table_list_quantities">
                  <?php $rivermedia->list_quantities(); ?>
                  </tbody>
                </table>
              </div>
            </div>
          </div>
        </div>

       <form name="form_quantity" id="form_quantity" action="javascript:void(0);" method="post">
          <div class="form-group">
            <div class="col-md-6 col-sm-6 col-xs-12">
              <label class="control-label" for="product">New quantity </label>
              <input type="text" id="quantity" name="quantity" required placeholder="0" class="form-control col-md-7 col-xs-12" ><div id="quantity_error" class="col-md-6 col-sm-6 col-xs-12 errors" data-toggle="popover" title="Field Error" data-content="Please&nbsp;enter&nbsp;a&nbsp;valid&nbsp;quantity"></div>
            </div>
            <div class="hidden" id="ajax_update_quantity"></div>
          </div>
       </form>
