<?php 
	require "models/rivermedia.php";
	$rivermedia = new RIVERMEDIA;
	$rivermedia->auth();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<?php include_once('includes/head.php'); ?>
</head>
<body>
<!-- Navigation -->
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<?php include_once('includes/nav.php'); ?>
</nav>
<!-- Page Content -->
<div class="container"> 
  <!-- Section -->
  <div class="row">
    <div class="col-lg-12">
      <h1 class="page-header"> <i class="fa fa-file-text-o" aria-hidden="true"></i> Invoices </h1>
      <div class="clearfix"></div>
      <span class="col-md-6 col-sm-6 col-lg-6">Click on an entry to download an invoice PDF&nbsp;&nbsp;&nbsp;&nbsp;<i class="fa fa-check-circle" aria-hidden="true" style="color:#009900;"></i> = PDF available&nbsp;&nbsp;&nbsp;&nbsp;<i class="fa fa-times-circle" aria-hidden="true" style="color:#ff0000;"></i> = Missing PDF</span>
      <span class="col-md-6 col-sm-6 col-lg-6 pull-right" style="text-align:right;"><a href="https://get.adobe.com/reader/" target="_blank"><img src="public/media/img/GetAdobe.png" alt="Get Adobe Reader" /></a></span>
      <div class="clearfix"></div>
      <hr />
    </div>
<?php $rivermedia->list_invoices(); ?>
  </div>
  <!-- /.row --> 
  <iframe name="load_invoice" id="load_invoice"></iframe>
  <br />
  <hr>
  <!-- Footer -->
  <footer>
<?php include_once('includes/footer.php'); ?>
  </footer>
</div>
<!-- /.container --> 
<?php include_once('includes/javascript.php'); ?>
<?php include_once('includes/modals.php'); ?>
<?php 
$arrUrl = explode("/", $_SERVER['REQUEST_URI']);
$pageName = array_pop($arrUrl);
?>
<div id="page_name" class="hidden"><?php echo $pageName; ?></div> 
<?php include_once('includes/mask.php'); ?>
</body>
</html>
