<?php 

class modMultiSelect3View {
  private $scope;
    
  public function __construct(modMultiSelect3 $multiSelect3) {
    if (isset($multiSelect3)) {

      $this->loginName = $multiSelect3->login_name;
      $this->lo_id = $multiSelect3->lo_id;

      $menu = new MainMenu('multiselect3', $multiSelect3->lo_id);
      $this->beforeMenu = $menu->before();
      $this->afterMenu  = $menu->after();
      
      $panelFields = new FieldInit('multiselect3'); 
      $fields = $panelFields->get("fieldInit");
      foreach ($fields as $field) {
//print_r ($field);
//print_r ("<br>");        
        eval ($field);
      }
    }
  }  

  public function output() {

    $layout = "

<div class='container'>	
    $this->beforeMenu
  <div id='divmultiselect3' style='border:1px solid black;border-bottom:none;'>
    <div class='row'>
      <div class='col-md-12'>
        <table class='table table-condensed'>
          <tr>
            <td>
    $this->selWorkdayLayout
            </td>
          </tr>
          <tr>
            <td>
    $this->mulMultiSelect3Layout
            </td>
          </tr>
          <tr>
            <td>
    $this->rerMultiSelect3Layout
            </td>
          </tr>
        </table>
      </div> 
    </div>

  </div>
$this->afterMenu
</div>	


<script>

document.getElementById('tagmultiselect3').click();
document.getElementById('loginmultiselect3').innerHTML='Login: $this->loginName'

if ($this->lo_id == 0) {
  document.getElementById('divmultiselect3').style.display='none';
  document.getElementById('hdrmsgmultiselect3').innerHTML='Login';    
}

  
$this->mulMultiSelect3Script
$this->selWorkdayScript

</script>
  ";
 
  return $layout;
  }	

}

?>