<?php 

class modCrewTimesheetView {

public function __construct(modCrewTimesheet $crewTimesheet) {
    if (isset($crewTimesheet)) {
      $this->pp_id = $crewTimesheet->get("pp_id"); 
      $this->status = $crewTimesheet->get("status"); 

      $menu = new MainMenu('crewtimesheet');
      $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>

   $this->crewTimesheetScript

  </script>

    ";
	
  return $layout;
  } 
}

?>