<?php 

class modExcavationRecordView {
  
  public function __construct(modExcavationRecord $excavationRecord) {
    if (isset($excavationUnit)) {

      $this->loginName = $excavationUnit->login_name;
      $this->pw_id = $excavationUnit->pw_id;

      $menu = new MainMenu('excavationrecord', $excavationUnit->lo_id);
      $this->beforeMenu = $menu->before();
      $this->afterMenu  = $menu->after();

      $controlsControls = new EntryInit('excavationrecord');
      $entryInit = $controlsControls->get("entryInit");
      foreach ($entryInit as $control) {
//print_r ($control);
//print_r ("<br>");        
        eval ($control);
      }
    }  
  }
  
  public function output() {

  $layout = "

  $this->beforeMenu 

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

  <div class='container'>	
    <div class='row'>
      <div class='col-md-12'>
        <table class='table table-bordered'>
          <tbody>
    $this->cu_idKeyLayout
            <tr>
              <td  colspan='3'>
    $this->selUnitSiteNameLayout
              </td>
              <td rowspan='3'>
    $this->selUnitParentLayout
             </td>
              <td rowspan='3'>
    $this->colUnitPointPosLayout
              </td>
              <td  rowspan='3'> 
    $this->putExcacationUnitLayout
              </td>
            </tr>
            <tr>          
              <td colspan='3'>
    $this->selUnitTypeLayout
              </td>
              <td rowspan='3'>
    $this->inpUnitNameLayout
             </td>
            </tr>
            <tr>
              <td style='width:13%;'>          
    $this->inpUnitMapIdLayout
              </td>
              <td style='width:33%;'>          
    $this->inpUnitDimension1Layout
              </td>
              <td  style='width:34%;'>          
    $this->inpUnitDimension2Layout
              </td>
              <td style='width:34%;'>          
    $this->selUnitLongAxisLayout
              </td>
            </tr>
          <tr>
            <td colspan='10'>
              <div id='valmsgfrmExcavationUnit' style='color:red'></div>
            </td>
          </tr>    
          </tbody>
        </table>

        <div>		  
    $this->togExcavationImagesLayout
        </div>
      
        <div id='slide-exunitimg' class='slide-panel'>		  
    $this->colExcavationImagesLayout
        </div>

        <div>		  
    $this->togExcavatorsLayout
        </div>
      
        <div id='slide-excavators' class='slide-panel'>
          <table class='table table-bordered'>
            <tbody>
              <tr>
                <td>
    $this->selExcavatorNameLayout
                </td>
                <td>
    $this->selExStartTimeLayout
                </td>
                <td>
    $this->selExEndTimeLayout
                </td>
                <td>
                </td>
                <td>
    $this->putLinkToUnitLayout
                </td>
             </tr>
          </tbody>
        </table>

    
        <div>       
            
    $this->sumUnitExcavatorsLayout
    $this->delLinkToUnitLayout
        </div>

        <div>		  
    $this->togUnitLotsLayout
        </div>

        <div id='slide-unitlots' class='slide-panel'>
          <table class='table table-bordered'>
            <tbody>
              <tr>
                <td>
    $this->selUnitLotNameLayout
                </td>
                <td>
    $this->inpUnitLotTopPlanLayout
                </td>
                <td>
    $this->selUnitExcavateMethodLayout
                </td>
                <td>
    $this->selUnitScreenSizeLayout
                </td>
                <td>
    $this->inpMethodNoteLayout
                </td>
                <td>
    $this->selFeatureNumLayout
                </td>
             </tr>
             <tr>
               <td>
    $this->setUnitDepthsLayout
               </td>
               <td>
    $this->setUnitRelatedLotsLayout
               </td>
               <td>
    $this->UnitElevationsLayout
               </td>
               <td>
    $this->putAddLotLayout
               </td>
             </tr>
          </tbody>
        </table>
            
    $this->togUnitLotImagesLayout

       <div id='slide-lotphoto' class='slide-panel slide-lotphoto'>	
    $this->colUnitLotImagesLayout
       </div>

    $this->togUnitArtifactBagLayout

     <!-- BAG FORM -->
       <div id='slide-ptpbag1' class='slide-panel slide-ptpbag'>	
          <table>
            <tr>
              <td style='width:25%'>
    $this->inpUnitBagRefLayout
              </td>
              <td style='width:25%'>
    $this->inpUnitBagTitleLayout
              </td>
              <td colspan='2' style='width:50%' >
    $this->putUnitLayout
              </td>
            </tr>
            <tr>
              <td colspan='4'>
    $this->togUnitArtifactsLayout
              </td>
            </tr>
          </table>
        </div>

      <!-- ARTIFACT FORM -->
        <div id='slide-artifact1' class='slide-panel panel-artifact'>
          <table class='table table-condensed'>
            <tr>
              <td colspan='2' style='width:40%'>
    $this->selArtAffiliationLayout
              </td>
              <td style='width:20%'>
    $this->selArtMaterialLayout
              </td>
              <td style='width:20%'>
    $this->selArtFormLayout
              </td>
              <td style='width:15%'>
    $this->selArtCompleteLayout
              </td>
              <td style='width:5%'>
    $this->chkArtDiagnosticLayout
              </td>
              <td style='width:5%'>
              </td>
            </tr>
            <tr>          
              <td style='width:10%'>
    $this->inpCollectedCountLayout
              </td>
              <td style='width:10%'>
    $this->inpDocumentedCountLayout        
              </td>
              <td style='width:20%'>
    $this->selSampleRationaleLayout
              </td>
              <td colspan='3' style='width:55%'>
    $this->inpUnitMethodNoteLayout
              </td>
              <td style='width:5%'>
    $this->putUnitArtifactsLayout
              </td>
            </tr>
          </table>
        </div>

        <!-- ARTIFACT SUMMARY -->
        <div id='slide-unitartifacts' class='slide-panel slide-unitartifacts'>	
    $this->sumUnitArtifactsLayout  
        </div>

        <!-- BAG SUMMARY -->
        <div id='slide-unitbags' class='slide-panel slide-unitbags'>	
    $this->sumUnitBagsLayout  
        </div>
        <!-- LOT SUMMARY -->
        <div id='slide-unitlots' class='slide-panel slide-unitlots'>	
    $this->sumUnitLotsLayout  
        </div>
      
      $this->togUnitProfileImagesLayout
        <div id='slide-unitprofile' class='slide-panel slide-unitprofile'>
    $this->setUnitDrawingFaceLayout      
    $this->colUnitProfileImagesLayout  
        </div>

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

<script>

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

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

$this->selUnitSiteNameScript
$this->selUnitParentScript
$this->colUnitPointPosScript
$this->selUnitTypeScript
$this->selUnitLongAxisScript
$this->colExcavationImagesScript
$this->selExcavatorNameScript
$this->selExStartTimeScript
$this->selExEndTimeScript
$this->sumUnitExcavatorsScript
$this->selUnitLotNameScript
$this->selUnitExcavateMethodScript
$this->selUnitScreenSizeScript
$this->selFeatureNumScript
$this->setUnitDepthsScript
$this->setUnitRelatedLotsScript
$this->setUnitElevationsScript
$this->colUnitLotImagesScript
$this->selArtAffiliationScript
$this->selArtMaterialScript
$this->selArtFormScript
$this->selArtCompleteScript
$this->chkArtDiagnosticScript
$this->selSampleRationaleScript
$this->sumUnitArtifactsScript  
$this->sumUnitBagsScript  
$this->sumUnitLotsScript  
$this->setUnitDrawingFaceScript      
$this->colUnitProfileImagesScript  
$this->sumExcavationUnitsScript


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

?>