<?php require_once 'includes/main.php'; logged_in('user_id'); ?>
<?php require_once 'elements/head.php'; ?>

<?php $section = isset($_GET['section']) ? $_GET['section'] : 'listings'; ?>

<!-- META: TITLE -->
<title><?php echo $set['dashboard_title']; ?> - <?php echo $set['website_name']; ?></title>

</head>

<body>

<?php include_once 'elements/header.php'; ?>

<?php include_once 'elements/sidebar/dashboard.php'; ?>

<?php 

switch($section){

   case 'listings':
      include_once 'sections/dashboard/listings.php';
      break;

   case 'stats':
      include_once 'sections/dashboard/stats.php';
      break;

   case 'orders':
      include_once 'sections/dashboard/orders.php';
      break;

   case 'place-order':
      include_once 'sections/dashboard/place-order.php';
      break;

   case 'edit-account':
      include_once 'sections/dashboard/edit-account.php';
      break;
         
   default:
      include_once 'sections/dashboard/listings.php';
      break;

}

?>

<?php include_once 'elements/footer.php'; ?>

</body>
</html>
