<?php 

class modRunProgramView {
    
  public function __construct(modRunProgram $runProgram) {
    if (isset($runProgram)) {

//      $menu = new MainMenu('runprogram');
//      $this->beforeMenu = $menu->before();
//      $this->afterMenu  = $menu->after();
//$sum = $runProgram->get('prog_test');
//print_r ("here1 ");
//print_r ($sum);
      $controlsControl = new EntryInit('runprogram'); 
      $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'>
            <td style='width:10%'>
    $this->putRunProgramLayout
            </td>
          </tr>     
        </table>
      </div>		
    </div>

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

  </div>
</div>

$this->afterMenu 

<script>  
$this->sumRunProgramsScript
</script>
  ";

  return $layout;
  }	

}

?>