<?php 

class modSelTableCellView {
  private $scope;
    
  public function __construct(modSelTableCell $selTableCell) {
    if (isset($selTableCell)) {

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

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

  public function output() {

    $layout = "
    $this->beforeMenu

<div class='container'>	
  <div id='divseltablecell' style='border:1px solid black;border-bottom:none;'>
    <div class='row'>
      <div class='col-md-12'>
        <table class='table table-condensed'>
          <tr>
            <td style='width:20%'>
    $this->selSelectElementLayout
            </td>
            <td style='width:20%'>
    $this->selTableCellLayout
            </td>
            <td style='width:60%'>
            </td>
          </tr>
          <tr>
            <td colspan='3'>
            <div id='valmsgfrmSelTableCell' style='color:red'></div>
            </td>
          </tr>
        </table>
      </div> 
    </div>

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


<script src='js/panel.js'></script>

<script>

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

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


$this->selSelectElementScript
$this->selTableCellScript

</script>
  ";
 
  return $layout;
  }	

}

?>