<?php 

class modCrewTimesheetView {

public function __construct(modCrewTimesheet $crewTimesheet) {
    if (isset($crewTimesheet)) {
 
      $lo_id = (isset($_SESSION['login'])) ? $_SESSION['login'] : 0;
 
      $menu = new MainMenu('crewtimesheet', $lo_id);
      $this->beforeMenu = $menu->before();
      $this->afterMenu  = $menu->after();

      $crewControls = new EntryInit('crewtimesheet');
      $entryInit = $crewControls->get("entryInit");
      foreach ($entryInit as $control) {
//print_r ("$control<br>");          
        eval ($control);
      }
    }
  }

  public function output() {
  
    $layout = "
  $this->beforeMenu
  
    <div style='border:1px solid black;border-bottom:0px;'>  
      <div class='container'>
        <div class='row' style='margin-top:10px;margin-bottom:10px;'>
          <div class='col-sm-12'>
    $this->crewTimesheetLayout
          </div> 
        </div>
      </div>
    </div> 
 
   $this->afterMenu

  <script>

document.getElementById('tagcrewtimesheet').click();

$this->crewTimesheetScript

  </script>


    ";
	
  return $layout;
  } 
}

?>