<?php 

class modProjectView {
  private $pw_id;
  private $searchProjectLayout;
  private $searchProjectScript;
  private $selectParcelLayout;
  private $selectParcelScript;
  private $selectDateLayout;
  private $selectDateScript;
  private $status;

  
  public function __construct(modProject $project) {
    if (isset($project)) {
      $this->pw_id = $project->get("pw_id"); 
      $this->status = $project->get("status"); 

      $menu = new MainMenu('project');
      $this->beforeMenu = $menu->before();
      $this->afterMenu  = $menu->after();

      $controlsControls = new EntryInit('project');
      $entryInit = $controlsControls->get("entryInit");
      foreach ($entryInit as $control) {
//print_r ($control);
//print_r ("<br>");        
        eval ($control);
      }
    }  
  }
  
  public function output() {

    $panel = "

$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-md-12'>
        <table class='table table-condensed'>
    $this->pw_idKeyLayout
          <tr>
            <td>
    $this->searchProjectLayout
            </td>
            <td colspan='3'>
    $this->selectParcelLayout
            </td>
            <td>
            </td>
          </tr>
          <tr>
            <td>
    $this->selectDateLayout
            </td>
            <td>
    $this->selectStartTimeLayout
            </td>
            <td>
    $this->selectEndTimeLayout
            </td>
            <td>
    $this->selectBreakDurLayout
            </td>
            <td>
    $this->putProjectLayout
            </td>
          </tr>
        </table>
      </div>
    </div>
    
    <div class='row' style='margin-bottom:10px'>
      <div class='col-md-12'>
    $this->summProjectsLayout
      </div>
    </div>
  </div>
</div>
$this->afterMenu  

<script>

$this->summProjectsScript

$this->searchProjectScript 

$this->selectParcelScript 

$this->selectStartTimeScript

$this->selectEndTimeScript

$this->selectBreakDurScript

$this->putProjectScript

$this->selectDateScript 

</script>
    ";
	
    return $panel;
 
  }
}

?>