<?php 
session_start ();

require_once($_SERVER['DOCUMENT_ROOT'] . "/sys/access.php");

if(!$access->CheckLogin()){
  $access->RedirectToURL("/login/login.php");
  exit;
}

define("PUBLIC_ACCESS", 1);

?>

<!DOCTYPE html>
<html lang="en">

<head>
  <meta http-equiv="Content-Language" content="en-us">
  <title>Run Procedure</title>
  <meta charset="utf-8">
  <link rel="stylesheet" href="/ext/bootstrap/bootstrap.min.css">
  <link rel="stylesheet" href="/ext/bootstrap/bootstrap-theme.min.css">
  <link rel="stylesheet" href="/site/css/stickythead.css">
  <link rel="stylesheet" href="/site/css/bootstrap.css">
  <link rel="stylesheet" href="/site/css/slider.css">
  <link rel="stylesheet" href="/site/css/style.css">

  <script src="/ext/jquery/jquery-3.1.1.min.js"></script>
  <script src="/ext/bootstrap/bootstrap.min.js"></script>
  <script src="/ext/jquery/jquery.stickytableheaders.min.js"></script>
  <script src="/site/js/main.js"></script>

<style>

body {
  font-size:16px;
  font-weight:500;
  color:#000;
}
  
label {
  margin-bottom:0px;
}

textarea {
  width: 100%;
}

.table>td { 
  vertical-align:bottom;    
}

select, input {
 height:28px;
 width:100%;
}

input[type=checkbox] {
  height:20px;
  width:20px;
  vertical-align:middle;
}

</style>

</head>
<body>

<?php 

  define("PUBLIC_ACCESS", 1);
  // Include the MVC class definitions
  $docRoot = $_SERVER['DOCUMENT_ROOT'];
  $toolkit = "$docRoot/toolkit";
  require_once ("$toolkit/clickcheckbox.php");
  require_once ("$toolkit/processreport.php");
  require_once ("$toolkit/inputhidden.php");
  require_once ("$toolkit/inputtext.php");
  require_once ("$toolkit/notetext.php");
  require_once ("$toolkit/putbutton.php");
  require_once ("$toolkit/selectoptionadd.php");
  require_once ("$toolkit/selectoption.php");
  require_once ("$toolkit/summarytable.php");
  require_once ("$toolkit/formdatahandler.php");
  require_once ("$toolkit/filtertable.php");
  require_once ("$toolkit/toggleslider.php");
  
  // Class definitions for the Controls instantiator and Menu generator 
  require_once ("$docRoot/sys/init.php");
  require_once ("$docRoot/sys/menu.php");

  require_once ("$docRoot/runprocedure/model.php");
  require_once ("$docRoot/runprocedure/view.php");

  // Initialize model
  $runProcedure = new modRunProcedure();

  $runProcedureView = new modRunProcedureView($runProcedure);
  echo $runProcedureView->output();

?>

</body>
</html>

