<?php 

class modParcelFopView {
  
  public function __construct(modParcelFop $parcelFop) {
    if (isset($parcelFop)) {

      $this->loginName = $parcelFop->login_name;
      $this->pw_id = $parcelFop->pw_id;
  
      $menu = new MainMenu('parcelfop', $parcelFop->lo_id);
      $this->beforeMenu = $menu->before();
      $this->afterMenu  = $menu->after();
        
      $controlsControls = new EntryInit('parcelfop');
      $entryInit = $controlsControls->get("entryInit");
      foreach ($entryInit as $control) {
//print_r ($control);
//print_r ("<br>");        
        eval ($control);
      }
    }  
  }
  
  public function output() {

  $layout = "

$this->beforeMenu 

<div id='divparcelfop' style='border:1px solid black;border-bottom:none;'>

  <div class='container'>	
    <div class='row'>
      <div class='col-md-12'>
        <table class='table table-condensed'>
          <tbody>
            <tr>
              <td colspan='5' style='width:56%;'>
    $this->selFopNameLayout
              </td>
              <td colspan='2' style='width:22%;'>          
    $this->selFopTypeLayout
              </td>
              <td colspan='2' style='width:22%;'>          
    $this->inpFopMapidLayout
              </td>
            </tr>
            <tr>
              <td colspan='3' style='width:33%;'>
    $this->inpFopResearchDescrLayout
              </td>
              <td colspan='3' style='width:33%;'>
    $this->inpFopFieldDescrLayout
              </td>
              <td colspan='3' style='width:34%;'> 
    $this->inpFopNoteLayout
              </td>
            </tr>
            <tr>
              <td colspan='3' style='width:34%;'>  

              </td>
              <td colspan='3' style='vertical-align:middle;'>          
    $this->chkConfirmDescrLayout
              </td>
              <td colspan='3' style='width:33%;'>
    $this->frmParcelFopLayout
              </td>
            </tr>
            <tr>
              <td colspan='6'>
                <div id='valmsgfrmParcelFop' style='color:red'></div>
              </td>
            </tr>
            <tr>          
              <td colspan='9'>
    $this->togParcelFopImagesLayout
              </td>
            </tr>  
          </tbody>
        </table>

    $this->sumParcelFopsLayout
    $this->delParcelFopLayout
      </div>
    </div>
  </div>
</div>

$this->afterMenu     
  
<script>

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

if ($this->pw_id == 0) {
  document.getElementById('divparcelfop').style.display='none';
  document.getElementById('hdrmsgparcelfop').innerHTML=
    'Pre-select a Project Work Event';    
}

$this->frmParcelFopScript
$this->selFopNameScript
$this->inpfopLocationScript
$this->inpFopResearchDescrScript
$this->inpFopFieldDescrScript
$this->selFopTypeScript
$this->inpFopNoteScript
$this->inpFopMapidScript
$this->chkConfirmDescrScript
$this->togParcelFopImagesScript
$this->sumParcelFopsScript
$this->delParcelFopScript

</script>
    ";
	
    return $layout;
 
  }
}

?>