<?php 

class modDailyJournalView {
    
  public function __construct(modDailyJournal $dailyJournal) {
    if (isset($dailyJournal)) {

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

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

    $layout = "
    
$this->beforeMenu 
<div style='border:1px solid black;border-bottom:none;'>
  <div class='container'>	
    <div class='row' style='margin-top:10px;'>
      <div class='col-md-12'>
        <table class='table table-condensed'>
    $this->we_idKeyLayout
          <tr>
            <td style='width:12%'>
    $this->logTimeLayout
            </td>
            <td style='width:13%'>
    $this->selCloudLayout
            </td>
            <td style='width:13%'>
    $this->selAtmosphereLayout
            </td>
            <td style='width:13%'>
    $this->inpTemperatureLayout
            </td>
            <td style='width:13%'>
    $this->inpHumidityLayout
            </td>
            <td style='width:13%'>
    $this->selLightingLayout
            </td>
            <td style='width:13%'>
    $this->selPrecipLayout
            </td>
            <td style='width:10%'>
    $this->putWeatherLayout
            </td>
          </tr>     
        </table>
      </div>		
    </div>

    <div class='row' style='margin-top:10px;'>
      <div class='col-md-12'>
    $this->sumWeatherLayout
      </div>
    </div>

    <div class='row'>
      <div class='col-md-12'>
    $this->delWeatherLayout  
      </div>
    </div>

    <div class='row' style='margin-top:10px;margin-bottom:10px;'>
      <div class='col-md-12'>
        <table>
          <tr>
            <td>
    $this->putJournalReqLayout
    $this->inpDailyJournalLayout
            </td>
            <td style='width:10%;vertical-align:top;'>
    $this->putJournalLayout
            </td>
          <tr> 
        </table> 
      </div>    
    </div>
  </div>
</div>

$this->afterMenu 

<script>  
  $this->logTimeScript
  $this->selCloudScript
  $this->selAtmosphereScript
  $this->selTempScript
  $this->selHumidScript
  $this->selLightScript
  $this->selPrecipScript
  $this->sumWeatherScript
  $this->putJournalReqScript
</script>
  ";

  return $layout;
  }	

}

?>