<?php 

class modInstancesView {
  private $scope;
    
  public function __construct(modInstances $instances) {
    if (isset($instances)) {
      $this->scope = $instances->get("scope");
	}

    $controlsInstances = new EntryInit('instances');
    $entryInit = $controlsInstances->get("entryInit");
    foreach ($entryInit as $instance) {
//print_r ($instance);
//print_r ("<br>");        
      eval ($instance);
    }
  }

  public function output() {

    $layout = "
<div class='container'>	
  <div class='row'>
    <div class='col-md-12'>
      <table class='table table-bordered'>
        <tr>
          <td>
            $this->ci_idInputLayout
            $this->inputInstanceLayout
          </td>
          <td>
            $this->inputLocationLayout
          </td>
        </tr>
        <tr>
          <td>
            $this->selectControlLayout
          </td>
          <td>
            $this->putInstancesLayout
          </td>
        </tr>
      </table>
    </div> 
 </div>
</div> 
 
<div class='container'>	
  <div class='row'>
    <div class='col-md-12'>
        $this->togEntriesLayout
      <div class='slide-panel'>		  
        <table class='table table-bordered'>
          $this->controlinit_fkLayout
          $this->ce_idKeyLayout
          <tr>
            <td>
              $this->inputPropertyLayout
            </td>
            <td>
              $this->inputValueLayout
            </td>
          </tr>  
          <tr>
            <td>
            </td>
            <td>
               $this->putEntriesLayout
            </td>
          </tr>     
        </table>
      </div>
    </div>  
  </div>
</div>  
  
<div class='container'>	
  <div class='row'>
    <div class='col-md-12'>
      <div class='slide-panel'>	
        $this->summEntriesLayout
        $this->delEntriesLayout
      </div>  
      <br>$this->filterLocationLayout
      $this->summInstancesLayout
      $this->delInstancesLayout
	  </div>
  </div>
</div>	


<script>

$(document).ready(function(){
  $('#togcontrolinit').click(function(){
    $('.slide-panel').toggle('slow');
  });
});
  
$this->summInstancesScript
$this->summEntriesScript
$this->filterLocationScript

</script>
  ";
 
  return $layout;
  }	

}

?>