<?php

use yii\helpers\Html;
if (Yii::$app->controller->action->id == 'pdf' || Yii::$app->controller->action->id == 'apdfview') {?>
	<style>

		.DarkerBlue{
			font-size: 5pt;
		}
		.LighterBlue{
			font-size: 5pt;
		}
	</style>
<?php }

?>
<div class="dt204-pdf">
 
<table class="Table notbb nolb norb">
	<tr>
		<td class="notbb nolb norb">NR/LE/TRK/0053 <br /> Switch Inspection Form</td>
		<td class="notbb nolb norb">TEF 3029A (1 of 4)<br /> Issue 11 - March 2018</td>
		<td class="notbb nolb norb" align="right"><img src='/images/logo.jpg' height='25px' /></td>
	</tr>
</table>
    <table class="Table  notbb nolb norb">
    	<tr>
    		<th class="DarkerBlue" colspan="8">Site Information</th>
    	</tr>
    	<tr>
    		<th class="DarkerBlue" width="150px">Site Location</th>
    		<td colspan="3"><?=  $model->location ?></td>
    		<th class="DarkerBlue">Point Number</th>
    		<td><?=  $model->pointno ?></td>
    		<th class="DarkerBlue">Date Inspected</th>
    		<td><?php if ($model->dateinspected) {echo date('d/m/Y', $model->dateinspected);} ?></td>
    	</tr>
    	<tr>
    		<th class="DarkerBlue">NR4 Sidewear Gauge No:</th>
    		<td><?=  $model->nr4swgno ?></td>
    		<th class="DarkerBlue" width="75px">ELR:</th>
    		<td><?=  $model->elr ?></td>
    		<th class="DarkerBlue">Track ID</th>
    		<td><?=  $model->trackid ?></td>
    		<th class="DarkerBlue">Mileage as toes</th>
    		<td><?=  $model->mileageattoes ?></td>
    		
    	</tr>
      	<tr>
    		<th class="DarkerBlue">Switch Rail Radius Gauge No:</th>
    		<td><?=  $model->switchrailradius ?></td>
    		<th class="DarkerBlue" colspan="2" >Switch size A - H:</th>
    		<td><?=  $model->switchsize ?></td>
    		<td colspan="3" class="text-center">** Denote as Appropiate</td>
    		
    	</tr>
    	<tr>
    		<th class="DarkerBlue">TGP8 No:</th>
    		<td><?=  $model->tp8no ?></td>
			<th colspan="3">&nbsp;</th>
    		<td colspan="3"><?php switch($model->risk) {case 1: echo 'Non high risk switch'; break;case 0: echo  'High risk switch'; break; default: echo 'Non High Risk Switch';break;} ?></td>
    
    
    		
    	</tr>
    	<tr>
    		<th class="DarkerBlue">Switch Wear Gauge No:</th>
    		<td><?=  $model->switchweargaugeno ?></td>
    		<th rowspan="2" colspan="2" class="DarkerBlue">Switch Design</th>
    		<td rowspan="2" colspan="4"><?=  $model->swtichdesign ?></td>
    	</tr>
    	<tr>
    		<th colspan="" class="DarkerBlue">Premium Rail</th>
    		<td><?=  $model->premiumrail == 1 ? 'YES' : 'NO' ?></td>
    	</tr>
    	
		
    </table>
<table class="Table  notbb nolb norb">
	<tr>
		<th class="DarkerBlue" colspan="21">Seating Gap (mm) Gap between underside of switchblade and slide baseplate.</th>
	</tr>
	<tr>
		<td>&nbsp;</td>
		<th colspan="10">LH</th>
		<th colspan="10">RH</th>
	</tr>
	<tr>
		<td>Bearer No:</td>
		<th>Toe</th>
		<th>2</th>
		<th>3</th>
		<th>4</th>
		<th>5</th>
		<th>6</th>
		<th>7</th>
		<th>8</th>
		<th>9</th>
		<th>10</th>
		<th>Toe</th>
		<th>2</th>
		<th>3</th>
		<th>4</th>
		<th>5</th>
		<th>6</th>
		<th>7</th>
		<th>8</th>
		<th>9</th>
		<th>10</th>
	</tr>
	<tr>
		<td>Gap No (mm):</td>
		<td><?=  $model->lhgaptoe ?></td>
		<td><?=  $model->lhgap2 ?></td>
		<td><?=  $model->lhgap3 ?></td>
		<td><?=  $model->lhgap4 ?></td>
		<td><?=  $model->lhgap5 ?></td>
		<td><?=  $model->lhgap6 ?></td>
		<td><?=  $model->lhgap7 ?></td>
		<td><?=  $model->lhgap8 ?></td>
		<td><?=  $model->lhgap9 ?></td>
		<td><?=  $model->lhgap10 ?></td>
		<td><?=  $model->rhgaptoe ?></td>
		<td><?=  $model->rhgap2 ?></td>
		<td><?=  $model->rhgap3 ?></td>
		<td><?=  $model->rhgap4 ?></td>
		<td><?=  $model->rhgap5 ?></td>
		<td><?=  $model->rhgap6 ?></td>
		<td><?=  $model->rhgap7 ?></td>
		<td><?=  $model->rhgap8 ?></td>
		<td><?=  $model->rhgap9 ?></td>
		<td><?=  $model->rhgap10 ?></td>
		
	</tr>
</table>
<table class="Table notbb norb nolb">
	<tr>
		<th colspan="6" class="DarkerBlue">Inspection Type</th>
	</tr>
	<tr>
		<td width="16.6%" class="DarkerBlue">Initial Inspection</td>
		<td width="16.6%" align="center"><?= $model->itii == 1 ? '&#10003;' : null ?></td>
		<td width="16.6%" class="DarkerBlue">Post Work Independent Inspection</td>
		<td width="16.6%" align="center"><?= $model->itpwii == 1 ? '&#10003;' : null ?></td>
		<td width="16.6%" class="DarkerBlue">Follow up Inspection</td>
		<td width="16.6%" align="center"><?= $model->itfui == 1 ? '&#10003;' : null ?></td>

	</tr>
</table>
<table class="Table notbb" autosize="1">
	<tr>
		<th class="notbb norb nolb">&nbsp;</th>
		<th colspan="5" class="text-right">Action required if any shaded box is ticked</th>
		<th class="text-center LighterBlue" colspan="2">LH</th>
		<th class="text-center LighterBlue" colspan="2">RH</th>
	</tr>
	<tr>
		<td width="2%" class="notbb nolb norb">&nbsp;</td>
		<th colspan="5" class="DarkerBlue">Visual Inspection</th>
		<th class="text-center">Y</th>
		<th class="text-center">N</th>
		<th class="text-center">Y</th>
		<th class="text-center">N</th>
	</tr>
	<tr>
	<?php if (yii::$app->controller->action->id == 'pdf') { ?>
		<td width="2%" rowspan="10" class="DarkerBlueRotate">Closed Switch</td>
		
	<?php } else { ?>
		<td width="2%" height="2%" rowspan="10" class="DarkerBlueC"><p class="rotate">Closed Switch</p></td>
		
	<?php } ?>	
	
		<th width="5%" rowspan="6" class="text-center">3.5</th>
		<th width="3%">&#8627;</th>
		<td colspan="3">Any signs of switch tip being struck or damaged</td>
		<td class="text-center LighterBlue">
			<?= $model->vi1lh == 1 ? "&#10004;" : false ?>
		</td>
		<td class="text-center">
			<?= $model->vi1lh == 0  &&  $model->vi1lh !== null    ? "&#10004;" : false ?>
		</td>
		<td class="text-center LighterBlue">
			<?= $model->vi1rh == 1 ? "&#10004;" : false ?>
		</td>
		<td class="text-center">
			<?= $model->vi1rh == 0  &&  $model->vi1rh !== null    ? "&#10004;" : false ?>
		</td>
	</tr>
	<tr>
		<th>&#8627;</th>
		<td colspan="3">Required front stretcher bar kicking strap clearance present (See note 1)</td>
		<td class="text-center">
			<?= $model->vi2lh == 1 ? "&#10004;" : false ?>
		</td>
		<td class="text-center LighterBlue">
			<?= $model->vi2lh == 0  &&  $model->vi2lh !== null    ? "&#10004;" : false ?>
		</td>
		<td class="text-center">
			<?= $model->vi2rh == 1 ? "&#10004;" : false ?>
		</td>
		<td class="text-center LighterBlue">
			<?= $model->vi2rh == 0  &&  $model->vi2rh !== null     ? "&#10004;" : false ?>
		</td>	
	</tr>
	<tr>
		<th>&#8627;</th>
		<td colspan="3">Any signs of flange climb throughout the switch planed length ?</td>
			<td class="text-center LighterBlue">
			<?= $model->vi3lh == 1 ? "&#10004;" : false ?>
		</td>
		<td class="text-center">
			<?= $model->vi3lh == 0  &&  $model->vi3lh !== null    ? "&#10004;" : false ?>
		</td>
		<td class="text-center LighterBlue">
			<?= $model->vi3rh == 1 ? "&#10004;" : false ?>
		</td>
		<td class="text-center">
			<?= $model->vi3rh == 0  &&  $model->vi3rh !== null     ? "&#10004;" : false ?>
		</td>
	</tr>
	<tr>
		<th>&#8627;</th>
		<td colspan="3">Is any damage visible throughout the planed length of the switch ?</td>
			<td class="text-center LighterBlue">
			<?= $model->vi4lh == 1 ? "&#10004;" : false ?>
		</td>
		<td class="text-center">
			<?= $model->vi4lh == 0  &&  $model->vi4lh !== null    ? "&#10004;" : false ?>
		</td>
		<td class="text-center LighterBlue">
			<?= $model->vi4rh == 1 ? "&#10004;" : false ?>
		</td>
		<td class="text-center">
			<?= $model->vi4rh == 0  &&  $model->vi4rh !== null     ? "&#10004;" : false ?>
		</td>
	</tr>
	<tr>
		<th>&#8627;</th>
		<td colspan="3">Is damage visible at more than one location?</td>
			<td class="text-center LighterBlue">
			<?= $model->vi5lh == 1 ? "&#10004;" : false ?>
		</td>
		<td class="text-center">
			<?= $model->vi5lh == 0  &&  $model->vi5lh !== null    ? "&#10004;" : false ?>
		</td>
		<td class="text-center LighterBlue">
			<?= $model->vi5rh == 1 ? "&#10004;" : false ?>
		</td>
		<td class="text-center">
			<?= $model->vi5rh == 0  &&  $model->vi5rh !== null     ? "&#10004;" : false ?>
		</td>
	</tr>
	<tr>
		<th>&#8627;</th>
		<td colspan="3">Any sharp corner or faceted edge present on the running edge of switch.</td>
			<td class="text-center LighterBlue">
			<?= $model->vi6lh == 1 ? "&#10004;" : false ?>
		</td>
		<td class="text-center">
			<?= $model->vi6lh == 0  &&  $model->vi6lh !== null   ? "&#10004;" : false ?>
		</td>
		<td class="text-center LighterBlue">
			<?= $model->vi6rh == 1 ? "&#10004;" : false ?>
		</td>
		<td class="text-center">
			<?= $model->vi6rh == 0  &&  $model->vi6rh !== null   ? "&#10004;" : false ?>
		</td>
	</tr>
	<tr>
		<th colspan="5">Switch rail height relative to stock rail sidewear scar through dimension B from switch toes.</th>
		<td colspan="4" class="DarkerBlue"></td>
		
		
	</tr>
	<tr>
		<th>3.7.1</th>
		<th>&#8627;</th>
		<td colspan="3">Is the switch rail level with or projecting above the stock rail sidewear scar?</td>
			<td class="text-center LighterBlue">
			<?= $model->vi7lh == 1 ? "&#10004;" : false ?>
		</td>
		<td class="text-center">
			<?= $model->vi7lh == 0  &&  $model->vi7lh !== null  ? "&#10004;" : false ?>
		</td>
		<td class="text-center LighterBlue">
			<?= $model->vi7rh == 1 ? "&#10004;" : false ?>
		</td>
		<td class="text-center">
			<?= $model->vi7rh == 0  &&  $model->vi7rh !== null  ? "&#10004;" : false ?>
		</td>	
	</tr>
	<tr>
		<th>3.7.2</th>
		<th>&#8627;</th>
		<td colspan="3">Is the switch rail within 2mm below the stock rail sidewear scar?</td>
		<td class="text-center LighterBlue">
			<?= $model->vi8lh == 1 ? "&#10004;" : false ?>
		</td>
		<td class="text-center">
			<?= $model->vi8lh == 0  &&  $model->vi8lh !== null  ? "&#10004;" : false ?>
		</td>
		<td class="text-center LighterBlue">
			<?= $model->vi8rh == 1 ? "&#10004;" : false ?>
		</td>
		<td class="text-center">
			<?= $model->vi8rh == 0  &&  $model->vi8rh !== null  ? "&#10004;" : false ?>
		</td>
	</tr>
	<tr>
		<th>3.7.3</th>
		<th>&#8627;</th>
		<td colspan="3">Has the switch rail top been forced onto the sidewear on the stock rail ?</td>
				<td class="text-center LighterBlue">
			<?= $model->vi9lh == 1 ? "&#10004;" : false ?>
		</td>
		<td class="text-center">
			<?= $model->vi9lh == 0  &&  $model->vi9lh !== null  ? "&#10004;" : false ?>
		</td>
		<td class="text-center LighterBlue">
			<?= $model->vi9rh == 1 ? "&#10004;" : false ?>
		</td>
		<td class="text-center">
			<?= $model->vi9rh == 0  &&  $model->vi9rh !== null ? "&#10004;" : false ?>
		</td>
	</tr>
	<tr>
		<?php if (yii::$app->controller->action->id == 'pdf') { ?>
			<td rowspan="8" class="DarkerBlueRotate">Open Switch</td>
		<?php } else { ?>
			<td rowspan="8" class="DarkerBlueC"><p class="rotate">Open Switch</p></td>
		<?php } ?>
		<th colspan="5">Cracking of the open switch rail within machined length</th>
		<td colspan="4" class="DarkerBlue"></td>
		
	</tr>
	<tr>
		<th rowspan="3">3.5</th>
		<th>&#8627;</th>
		<td colspan="3">Is there horizontal cracking or damage visible ?</td>
			<td class="text-center LighterBlue">
			<?= $model->i10lh == 1 ? "&#10004;" : false ?>
		</td>
		<td class="text-center">
			<?= $model->i10lh == 0  &&  $model->i10lh !== null  ? "&#10004;" : false ?>
		</td>
		<td class="text-center LighterBlue">
			<?= $model->vi10rh == 1 ? "&#10004;" : false ?>
		</td>
		<td class="text-center">
			<?= $model->vi10rh == 0  &&  $model->vi10rh !== null  ? "&#10004;" : false ?>
		</td></tr>
	<tr>
		<th>&#8627;</th>
		<td colspan="3">Is there horizontal cracking or damage visible at more than one location?</td>
			<td class="text-center LighterBlue">
			<?= $model->vi11lh == 1 ? "&#10004;" : false ?>
		</td>
		<td class="text-center">
			<?= $model->vi11lh == 0  &&  $model->vi11lh !== null  ? "&#10004;" : false ?>
		</td>
		<td class="text-center LighterBlue">
			<?= $model->vi11rh == 1 ? "&#10004;" : false ?>
		</td>
		<td class="text-center">
			<?= $model->vi11rh == 0  &&  $model->vi11rh !== null  ? "&#10004;" : false ?>
		</td></tr>
	<tr>
		<th>&#8627;</th>
		<td colspan="3">Is there vertical cracking on the switch rail?</td>
			<td class="text-center LighterBlue">
			<?= $model->vi12lh == 1 ? "&#10004;" : false ?>
		</td>
		<td class="text-center">
			<?= $model->vi12lh == 0  &&  $model->vi12lh !== null  ? "&#10004;" : false ?>
		</td>
		<td class="text-center LighterBlue">
			<?= $model->vi12rh == 1 ? "&#10004;" : false ?>
		</td>
		<td class="text-center">
			<?= $model->vi12rh == 0  &&  $model->vi12rh !== null  ? "&#10004;" : false ?>
		</td></tr>
	<tr>
		<th colspan="5">Lipping in the machined length of the open switch</th>
		<td colspan="4" class="DarkerBlue"></td>
		
	</tr>
	<tr>
		<th rowspan="3">3.5</th>
		<th>&#8627;</th>
		<td colspan="3">Lipping present on the stock rail running edge ?</td>
			<td class="text-center LighterBlue">
			<?= $model->vi13lh == 1 ? "&#10004;" : false ?>
		</td>
		<td class="text-center">
			<?= $model->vi13lh == 0  &&  $model->vi13lh !== null  ? "&#10004;" : false ?>
		</td>
		<td class="text-center LighterBlue">
			<?= $model->vi13rh == 1 ? "&#10004;" : false ?>
		</td>
		<td class="text-center">
			<?= $model->vi13rh == 0  &&  $model->vi13rh !== null  ? "&#10004;" : false ?>
		</td></tr>
	<tr>
		<th>&#8627;</th>
		<td colspan="3">Lipping on rear face of switch rail ?</td>
			<td class="text-center LighterBlue">
			<?= $model->vi14lh == 1 ? "&#10004;" : false ?>
		</td>
		<td class="text-center">
			<?= $model->vi14lh == 0  &&  $model->vi14lh !== null  ? "&#10004;" : false ?>
		</td>
		<td class="text-center LighterBlue">
			<?= $model->vi14rh == 1 ? "&#10004;" : false ?>
		</td>
		<td class="text-center">
			<?= $model->vi14rh == 0  &&  $model->vi14rh !== null  ? "&#10004;" : false ?>
		</td></tr>
	<tr>
		<th>&#8627;</th>
		<td colspan="3">Lipping elsewhere on switch or stock rail ?</td>
		<td class="text-center LighterBlue">
			<?= $model->vi15lh == 1 ? "&#10004;" : false ?>
		</td>
		<td class="text-center">
			<?= $model->vi15lh == 0  &&  $model->vi15lh !== null  ? "&#10004;" : false ?>
		</td>
		<td class="text-center LighterBlue">
			<?= $model->vi15rh == 1 ? "&#10004;" : false ?>
		</td>
		<td class="text-center">
			<?= $model->vi15rh == 0  &&  $model->vi15rh !== null  ? "&#10004;" : false ?>
		</td></tr>
	
	<tr>
		<th class="notbb norb nolb">&nbsp;</th>
		<th colspan="5">Lubrication</th>
		<td colspan="4" class="DarkerBlue"></td>
		
	</tr>
	<tr>
		<th class="notbb norb nolb">&nbsp;</th>
		<th rowspan="2">3.5</th>
		<th>&#8627;</th>
		<td colspan="3">Is lubrication present on the switch rail ?</td>
			<td class="text-center">
			<?= $model->vi16lh == 1 ? "&#10004;" : false ?>
		</td>
		<td class="text-center LighterBlue">
			<?= $model->vi16lh == 0  &&  $model->vi16lh !== null  ? "&#10004;" : false ?>
		</td>
		<td class="text-center">
			<?= $model->vi16rh == 1 ? "&#10004;" : false ?>
		</td>
		<td class="text-center LighterBlue">
			<?= $model->vi16rh == 0  &&  $model->vi16rh !== null  ? "&#10004;" : false ?>
		</td>
	</tr>
	<tr>
		<th class="notbb norb nolb">&nbsp;</th>
		<th>&#8627;</th>
		<td colspan="3">If a fixed lubricator is installed is it functioning correctly ?</td>
			<td class="text-center">
			<?= $model->vi17lh == 1 ? "&#10004;" : false ?>
		</td>
		<td class="text-center LighterBlue">
			<?= $model->vi17lh == 0 &&  $model->vi17lh !== null  ? "&#10004;" : false ?>
		</td>
		<td class="text-center">
			<?= $model->vi17rh == 1 ? "&#10004;" : false ?>
		</td>
		<td class="text-center LighterBlue">
			<?= $model->vi17rh == 0  &&  $model->vi17rh !== null  ? "&#10004;" : false ?>
		</td>
	</tr>	
	<tr>
		<th class="notbb norb nolb">&nbsp;</th>
		<th colspan="3" class="DarkerBlue">Stock rail sidewear Inspection (using NR4 plain rail sidewear gauge)</th>
		<th class="text-center DarkerBlue" colspan="3">LH</th>
		<th class="text-center DarkerBlue" colspan="3">RH</th>
	</tr>	
	<tr>
		<?php if (yii::$app->controller->action->id == 'pdf') { ?>
			<td rowspan="12" class="DarkerBlueRotate">Open Switch</td>
		<?php } else { ?>
			<td rowspan="12" class="DarkerBlueC"><p class="rotate">Open Switch</p></td>
		<?php } ?>
	
		<th colspan="3">Measure sidewear of open stock rail front over dimension A at 500mm increments.</th>
		<th width="6%">Y</th>
		<th width="6%">N</th>
		<th width="6%">Reading</th>
		<th width="6%">Y</th>
		<th width="6%">N</th>
		<th width="6%">Reading</th>
	</tr>
	<tr>
		<th rowspan="3">3.6.1</th>
		<th>&#8627;</th>
		<td>Is worst sidewear reading 6 or less</td>
		<td class="text-center LighterBlue">
			<?= $model->srwilh1 == 1 ? "&#10004;" : false ?>
		</td>
		<td class="text-center">
			<?= $model->srwilh1 == 0 && $model->srwilh1 !== null ? "&#10004;" : false ?>
		</td>
		<td><?=  $model->srwilh1reading ?></td>
		<td class="text-center LighterBlue">
			<?= $model->srwirh1 == 1 ? "&#10004;" : false ?>
		</td>
		<td class="text-center">
			<?= $model->srwirh1 == 0 && $model->srwirh1 !== null ? "&#10004;" : false ?>
		</td>
		<td><?=  $model->srwirh1reading ?></td>
	</tr>
	<tr>
		<th>&#8627;</th>
		<td >Is worst sidewear reading between 7 - 9</td>
		<td class="text-center LighterBlue">
			<?= $model->srwilh2 == 1 ? "&#10004;" : false ?>
		</td>
		<td class="text-center">
			<?= $model->srwilh2 == 0 && $model->srwilh2  !== null ? "&#10004;" : false ?>
		</td>
		<td><?=  $model->srwilh2reading ?></td>
		<td class="text-center LighterBlue">
			<?= $model->srwirh2 == 1 ? "&#10004;" : false ?>
		</td>
		<td class="text-center">
			<?= $model->srwirh2 == 0 && $model->srwirh2 !== null ? "&#10004;" : false ?>
		</td>
		<td><?=  $model->srwirh2reading ?></td>
	</tr>
	<tr>
		<th>&#8627;</th>
		<td>Is worst sidewear reading between 10 - 12</td>
		<td class="text-center LighterBlue">
			<?= $model->srwilh3 == 1 ? "&#10004;" : false ?>
		</td>
		<td class="text-center">
			<?= $model->srwilh3 == 0 && $model->srwilh3  !== null ? "&#10004;" : false ?>
		</td>
		<td><?=  $model->srwilh3reading ?></td>
		<td class="text-center LighterBlue">
			<?= $model->srwirh3 == 1 ? "&#10004;" : false ?>
		</td>
		<td class="text-center">
			<?= $model->srwirh3 == 0 && $model->srwirh3  !== null ? "&#10004;" : false ?>
		</td>
		<td><?=  $model->srwirh3reading ?></td>
	</tr>
	<tr>
		<th colspan="3">Measure sidewear of open stock rail behind the switch tip throughout dimension B at 500mm increments.</th>
		<th>Y</th>
		<th>N</th>
		<th>Reading</th>
		<th>Y</th>
		<th>N</th>
		<th>Reading</th>
	</tr>
	<tr>
		<th rowspan="3">3.6.2</th>
		<th>&#8627;</th>
		<td>Is worst sidewear reading 6 or less</td>
		<td class="text-center LighterBlue">
			<?= $model->srwilh4 == 1 ? "&#10004;" : false ?>
		</td>
		<td class="text-center">
			<?= $model->srwilh4 == 0 && $model->srwilh4 !== null ? "&#10004;" : false ?>
		</td>
		<td><?=  $model->srwilh4reading ?></td>
		<td class="text-center LighterBlue">
			<?= $model->srwirh4 == 1 ? "&#10004;" : false ?>
		</td>
		<td class="text-center">
			<?= $model->srwirh4 == 0 && $model->srwirh4 !== null ? "&#10004;" : false ?>
		</td>
		<td><?=  $model->srwirh4reading ?></td>
	</tr>
	<tr>
		<th>&#8627;</th>
		<td>Is worst sidewear reading between 7 - 9</td>
<td class="text-center LighterBlue">
			<?= $model->srwilh5 == 1 ? "&#10004;" : false ?>
		</td>
		<td class="text-center">
			<?= $model->srwilh5 == 0 && $model->srwilh5  !== null ? "&#10004;" : false ?>
		</td>
		<td><?=  $model->srwilh5reading ?></td>
		<td class="text-center LighterBlue">
			<?= $model->srwirh5 == 1 ? "&#10004;" : false ?>
		</td>
		<td class="text-center">
			<?= $model->srwirh5 == 0 && $model->srwirh5  !== null ? "&#10004;" : false ?>
		</td>
		<td><?=  $model->srwirh5reading ?></td>
	</tr>
	<tr>
		<th>&#8627;</th>
		<td>Is worst sidewear reading between 10 - 12</td>
<td class="text-center LighterBlue">
			<?= $model->srwilh6 == 1 ? "&#10004;" : false ?>
		</td>
		<td class="text-center">
			<?= $model->srwilh6 == 0 && $model->srwilh6  !== null ? "&#10004;" : false ?>
		</td>
		<td><?=  $model->srwilh2reading ?></td>
		<td class="text-center LighterBlue">
			<?= $model->srwirh6 == 1  ? "&#10004;" : false ?>
		</td>
		<td class="text-center">
			<?= $model->srwirh6 == 0  && $model->srwirh6  !== null ? "&#10004;" : false ?>
		</td>
		<td><?=  $model->srwirh6reading ?></td>
	</tr>
	<tr>
		<th class="DarkerBlue" colspan="5">Switch rail running edge radius inspection (using Switch Rail Radius Gauge)</th>
		<th class="DarkerBlue text-center" colspan="2">LH</th>
		<th class="DarkerBlue text-center" colspan="2">RH</th>
	</tr>
	<tr>
		<th class="" colspan="5">Check switch running edge on open switch over dimension C at maximum intervals of 100mm increments</th>
		<th class="text-center">Y</th>
		<th class="text-center">N</th>
		<th class="text-center">Y</th>
		<th class="text-center">N</th>
	</tr>
	<tr>
		<th rowspan="2">3.8</th>
		<th>&#8627;</th>
		<td colspan="3">Is the blade in contact with sections A and B with a gap at C ?</td>
		<td class="text-center">
			<?= $model->srrelh1 == 1 ? "&#10004;" : false ?>
		</td>
		<td class="text-center LighterBlue">
			<?= $model->srrelh1 == 0 && $model->srrelh1  !== null ? "&#10004;" : false ?>
		</td>
		<td class="text-center">
			<?= $model->srrerh1 == 1 ? "&#10004;" : false ?>
		</td>
		<td class="text-center LighterBlue">
			<?= $model->srrerh1 == 0 && $model->srrerh1  !== null ? "&#10004;" : false ?>
		</td>
	</tr>
	<tr>
		<th>&#8627;</th>
		<td colspan="3">For thin switch blades, is contact made throughout section A and C to the top of the switch rail ?</td>
		<td class="text-center">
			<?= $model->srrelh2 == 1 ? "&#10004;" : false ?>
		</td>
		<td class="text-center LighterBlue">
			<?= $model->srrelh2 == 0 &&  $model->srrelh2 !== null ? "&#10004;" : false ?>
		</td>
		<td class="text-center">
			<?= $model->srrerh3 == 1 ? "&#10004;" : false ?>
		</td>
		<td class="text-center LighterBlue">
			<?= $model->srrerh3 == 0 && $model->srrerh3  !== null ? "&#10004;" : false ?>
		</td>
	</tr>
	
	<tr>
		<th class="notbb norb nolb">&nbsp;</th>
		<th class="DarkerBlue" colspan="5">Flange Contact Angle Inspection (using TGP8 and 0.2mm feeler gauge, allowing for any seating gap)</th>
		<th class="DarkerBlue text-center" colspan="2">LH</th>
		<th class="DarkerBlue text-center" colspan="2">RH</th>
	</tr>
	<tr>
		<?php if (yii::$app->controller->action->id == 'pdf') { ?>
			<td rowspan="21" class="DarkerBlueRotate">Closed Switch</td>
		<?php } else { ?>
			<td rowspan="21" class="DarkerBlueC"><p class="rotate">Closed Switch</p></td>
		<?php } ?>
		<th class="" colspan="5">Check point of contact throughout dimension D at 100mm increments.</th>
		<th class="text-center">Y</th>
		<th class="text-center">N</th>
		<th class="text-center">Y</th>
		<th class="text-center">N</th>
	</tr>
	<tr>
		<th rowspan="3">3.9</th>
		<th>&#8627;</th>
		<td colspan="3">Is there any contact at or below the (55°) red marker for ≥50mm ?</td>
				<td class="text-center">
			<?= $model->fcailh1 == 1 ? "&#10004;" : false ?>
		</td>
		<td class="text-center LighterBlue">
			<?= $model->fcailh1 == 0 && $model->fcailh1   !== null ? "&#10004;" : false ?>
		</td>
		<td class="text-center">
			<?= $model->fcairh1 == 1 ? "&#10004;" : false ?>
		</td>
		<td class="text-center LighterBlue">
			<?= $model->fcairh1 == 0 && $model->fcairh1  !== null? "&#10004;" : false ?>
		</td>
	</tr>
	<tr>
		<th>&#8627;</th>
		<td colspan="3">Is there any contact at or below the (60°) white marker for ≥200mm ?</td>
		<td class="text-center LighterBlue"><?php if ($model->fcailh2 == 1) {echo "&#10004;";} ?></td>
		<td class="text-center"><?php if ($model->fcailh2 == 0 && $model->fcailh2 !== null) {echo "&#10004;";} ?></td>
		<td class="text-center LighterBlue"><?php if ($model->fcairh2 == 1) {echo "&#10004;";} ?></td>
		<td class="text-center"><?php if ($model->fcairh2 == 0 && $model->fcairh2  !== null) {echo "&#10004;";} ?></td>
	</tr>
	<tr>
		<th>&#8627;</th>
		<td colspan="3">Is there any contact below the (65°) green marker for ≥200mm ?</td>
		<td class="text-center LighterBlue"><?php if ($model->fcailh3 == 1) {echo "&#10004;";} ?></td>
		<td class="text-center"><?php if ($model->fcailh3 == 0 && $model->fcailh3 !== null) {echo "&#10004;";} ?></td>
		<td class="text-center LighterBlue"><?php if ($model->fcairh3 == 1) {echo "&#10004;";} ?></td>
		<td class="text-center"><?php if ($model->fcairh3 == 0 && $model->fcairh3 !== null) {echo "&#10004;";} ?></td>
	</tr>
	<tr>
		<th class="DarkerBlue" colspan="5">Switch and stock rail; wear and damage inspection (using switch wear gauge, allowing for any seating gap)</th>
		<th class="DarkerBlue text-center" colspan="2">LH</th>
		<th class="DarkerBlue text-center" colspan="2">RH</th>
	</tr>
	<tr>
		<th class="text-center" colspan="5">* Not applicable for straight cut switches and NR/RT60 switches *</th>
		<th class="text-center" rowspan="2">Y</th>
		<th class="text-center" rowspan="2">N</th>
		<th class="text-center" rowspan="2">Y</th>
		<th class="text-center" rowspan="2">N</th>
	</tr>
	<tr>
		<th colspan="3">Pass Gauge 1 over the the closed switch, from the switch toe to 40mm</th>
	</tr>
	<tr>
		<th rowspan="2">3.10.1</th>
		<th>&#8627;</th>
		<td colspan="3">Does Gauge 1 pass over the switch rail?</td>
		<td class="text-center "><?php if ($model->ssrwdilh1 == 1) {echo "&#10004;";} ?></td>
		<td class="text-center LighterBlue"><?php if ($model->ssrwdilh1 == 0 && $model->ssrwdilh1 !== null) {echo "&#10004;";} ?></td>
		<td class="text-center"><?php if ($model->ssrwdirh1 == 1) {echo "&#10004;";} ?></td>
		<td class="text-center LighterBlue"><?php if ($model->ssrwdirh1 == 0 && $model->ssrwdirh1 !== null) {echo "&#10004;";} ?></td>
	</tr>
	<tr>
		<th>&#8627;</th>
		<td colspan="3">is there a gap of 1mm or less between bottom of gauge 1 and top of switch rail ?</td>
		<td class="text-center LighterBlue"><?php if ($model->ssrwdilh2 == 1) {echo "&#10004;";} ?></td>
		<td class="text-center"><?php if ($model->ssrwdilh2 == 0 && $model->ssrwdilh2 !== null) {echo "&#10004;";} ?></td>
		<td class="text-center LighterBlue"><?php if ($model->ssrwdirh3 == 1) {echo "&#10004;";} ?></td>
		<td class="text-center"><?php if ($model->ssrwdirh3 == 0 && $model->ssrwdirh3 !== null) {echo "&#10004;";} ?></td>
		
	</tr>
	<tr>
		<th class="text-center" colspan="5">Applicable for all switches</th>
		<th class="DarkerBlue text-center" colspan="2">LH</th>
		<th class="DarkerBlue text-center" colspan="2">RH</th>
	</tr>
	<tr>
		<th class="text-left" colspan="5">Pass Gauge 2 over the closed switch throughout the machined length.</th>
		<th class="text-center" rowspan="">Y</th>
		<th class="text-center" rowspan="">N</th>
		<th class="text-center" rowspan="">Y</th>
		<th class="text-center" rowspan="">N</th>
	</tr>
	<tr>
		<th rowspan="7">3.10.4</th>
		<th class="text-left" colspan="4">Does Gauge 2 pass over the switch rail? If YES undertake the following additional checks:</th>
		<td class="text-center LighterBlue"><?php if ($model->allswlh1 == 1) {echo "&#10004;";} ?></td>
		<td class="text-center"><?php if ($model->allswlh1 == 0 && $model->allswlh1  !== null) {echo "&#10004;";} ?></td>
		<td class="text-center LighterBlue"><?php if ($model->allswrh1 == 1) {echo "&#10004;";} ?></td>
		<td class="text-center"><?php if ($model->allswrh1 == 0 && $model->allswrh1  !== null) {echo "&#10004;";} ?></td>
	</tr>
	<tr>
		<th>&#8627;</th>
		<td colspan="3">Is the switch rail damaged for ≥ 200mm ?</td>
		<td class="text-center LighterBlue"><?php if ($model->allswlh2 == 1) {echo "&#10004;";} ?></td>
		<td class="text-center"><?php if ($model->allswlh2 == 0 && $model->allswlh2 !== null) {echo "&#10004;";} ?></td>
		<td class="text-center LighterBlue"><?php if ($model->allswrh2 == 1) {echo "&#10004;";} ?></td>
		<td class="text-center"><?php if ($model->allswrh2 == 0 && $model->allswrh2 !== null) {echo "&#10004;";} ?></td>
	</tr>
	<tr>
		<th>&#8627;</th>
		<td colspan="3">Is the switch rail damaged for < 200mm ?</td>
		<td class="text-center LighterBlue"><?php if ($model->allswrh3 == 1) {echo "&#10004;";} ?></td>
		<td class="text-center"><?php if ($model->allswrh3 == 0 && $model->allswrh3 !== null) {echo "&#10004;";} ?></td>
		<td class="text-center LighterBlue"><?php if ($model->allswrh3 == 1) {echo "&#10004;";} ?></td>
		<td class="text-center"><?php if ($model->allswrh3 == 0 && $model->allswrh3 !== null) {echo "&#10004;";} ?></td>
	</tr>
	<tr>
		<th>&#8627;</th>
		<td colspan="3">Is the damage in more than one location ?</td>
		<td class="text-center LighterBlue"><?php if ($model->allswlh4 == 1) {echo "&#10004;";} ?></td>
		<td class="text-center"><?php if ($model->allswlh4 == 0 && $model->allswlh4 !== null) {echo "&#10004;";} ?></td>
		<td class="text-center LighterBlue"><?php if ($model->allswrh4 == 1) {echo "&#10004;";} ?></td>
		<td class="text-center"><?php if ($model->allswrh4 == 0 && $model->allswrh4 !== null) {echo "&#10004;";} ?></td>
	</tr>
	<tr>
		<th>&#8627;</th>
		<td colspan="3">Is the damage in the switch tip area ?</td>
		<td class="text-center LighterBlue"><?php if ($model->allswlh5 == 1) {echo "&#10004;";} ?></td>
		<td class="text-center"><?php if ($model->allswlh5 == 0 && $model->allswlh5 !== null) {echo "&#10004;";} ?></td>
		<td class="text-center LighterBlue"><?php if ($model->allswrh5 == 1) {echo "&#10004;";} ?></td>
		<td class="text-center"><?php if ($model->allswrh5 == 0 && $model->allswrh5   !== null) {echo "&#10004;";} ?></td>
	</tr>
	<tr>
		<th>&#8627;</th>
		<td colspan="3">Are there any signs of flange contact at or preceding the point of gauge 2 contact ?</td>
		<td class="text-center LighterBlue"><?php if ($model->allswlh6 == 1) {echo "&#10004;";} ?></td>
		<td class="text-center"><?php if ($model->allswlh6 == 0 && $model->allswlh6  !== null) {echo "&#10004;";} ?></td>
		<td class="text-center LighterBlue"><?php if ($model->allswrh6 == 1) {echo "&#10004;";} ?></td>
		<td class="text-center"><?php if ($model->allswrh6 == 0 && $model->allswrh6 !== null) {echo "&#10004;";} ?></td>
	</tr>
	<tr>
		<th>&#8627;</th>
		<td colspan="3">Are there any signs of flange climb at this point ?</td>
		<td class="text-center LighterBlue"><?php if ($model->allswlh7 == 1) {echo "&#10004;";} ?></td>
		<td class="text-center"><?php if ($model->allswlh7 == 0 && $model->allswlh7  !== null) {echo "&#10004;";} ?></td>
		<td class="text-center LighterBlue"><?php if ($model->allswrh7 == 1) {echo "&#10004;";} ?></td>
		<td class="text-center"><?php if ($model->allswrh7 == 0 && $model->allswrh7 !== null) {echo "&#10004;";} ?></td>
	</tr>

	<tr>
		<th rowspan="3">3.10.6</th>
		<th>&#8627;</th>
		<td colspan="3">Are there any signs of wheel strike at the switch tip ?</td>
		<td class="text-center LighterBlue"><?php if ($model->allswlh9 == 1) {echo "&#10004;";} ?></td>
		<td class="text-center"><?php if ($model->allswlh9 == 0 && $model->allswlh9 !== null) {echo "&#10004;";} ?></td>
		<td class="text-center LighterBlue"><?php if ($model->allswrh9 == 1) {echo "&#10004;";} ?></td>
		<td class="text-center"><?php if ($model->allswrh9 == 0 && $model->allswrh9  !== null) {echo "&#10004;";} ?></td>
	</tr>
	<tr>
		<th>&#8627;</th>
		<td colspan="3">Is the switch rail stood off the stock rail due to lipping at the toe ?</td>
		<td class="text-center LighterBlue"><?php if ($model->allswlh10 == 1) {echo "&#10004;";} ?></td>
		<td class="text-center"><?php if ($model->allswlh10 == 0 && $model->allswlh10 !== null) {echo "&#10004;";} ?></td>
		<td class="text-center LighterBlue"><?php if ($model->allswrh10 == 1) {echo "&#10004;";} ?></td>
		<td class="text-center"><?php if ($model->allswrh10 == 0 && $model->allswrh10  !== null) {echo "&#10004;";} ?></td>
	</tr>	<tr>
		<th>&#8627;</th>
		<td colspan="3">Is the switch rail stood off the stock rail at the toe > 4mm</td>
		<td class="text-center LighterBlue"><?php if ($model->allswlh11 == 1) {echo "&#10004;";} ?></td>
		<td class="text-center"><?php if ($model->allswlh11 == 0 && $model->allswlh11 !== null) {echo "&#10004;";} ?></td>
		<td class="text-center LighterBlue"><?php if ($model->allswrh11 == 1) {echo "&#10004;";} ?></td>
		<td class="text-center"><?php if ($model->allswrh11 == 0 && $model->allswrh11  !== null) {echo "&#10004;";} ?></td>
	</tr>
	<tr>
		<th colspan="10" class="text-center h4">ASK THE SIGNALLER TO SWING THE SWITCH AND REPEAT ALL ACTIONS ABOVE FOR THE OPPOSITE HALF SET</th>
	</tr>
	<tr>
		<th colspan="10" class="DarkerBlue">Notes</th>
	</tr>
	<tr>
		<td colspan="10">
			1. Stretcher bar kicking strap clearance: 3 - 9mm (slideplates without rollers installed), 6 - 9mm (slideplates with rollers installed)
			
			<style>
				#innertable{
					border-collapse: collapse;
				}
				#innertable td{
					border:0 none 0 0;
				}
				#innertable th{
					border:0 none 0 0;
				}
			</style>
			<table class="no-borders" id="innertable">
				<tr>
					<th class="" rowspan="3" valign="top">2. Dimensions :</th>	
					<th class="text-left"></th>	
					<th class="text-center">A</th>	
					<th class="text-center">B</th>	
					<th class="text-center">C</th>	
					<th class="text-center">D</th>	
				</tr>
				<tr>
					<td>RT60/NR60</td>
					<td>1000</td>
					<td>2000</td>
					<td>2000</td>
					<td>6000</td>
				</tr>
				<tr>
					<td>All Other Switches</td>
					<td>1000</td>
					<td>500</td>
					<td>1000</td>
					<td>3000</td>
				</tr>
			</table>
			
		</td>
	</tr>
</table>
<table class="Table notbb">
	
	<tr>
		<th class="DarkerBlue" colspan="3">Track Condition</th>
	</tr>
	<tr>
		<td class="" colspan="3">Observe the condition of the track (geometry and components) immediately on the approach to the switches and throughout the S&C unit in accordance with</td>
	</tr>
	<tr>
		<td class="" colspan="">Note and report any defects to SM(T).</td>
		<th width="12%" class="text-center">Y</th>
		<th width="12%" class="text-center">N</th>
	</tr>
	<tr>
		<td class="text-center" colspan="">Track condition irregularities have been identified during this detailed inspection</td>
		<td class="text-center LighterBlue"><?php if ($model->tconditions == 1) {echo "&#10004;";} ?></td>
		<td class="text-center"><?php if ($model->tconditions == 0 && $model->tconditions !== null) {echo "&#10004;";} ?></td>
	</tr>
</table>
<table class="Table notbb">
<tr>
	<th class="DarkerBlue" colspan="6">Inspection Complete</th>
</tr>
<tr>
	<th width="12%" class="DarkerBlue" colspan="">Inspector Name (Print):</th>
	<td width="26%"><?=  $model->icinspectorname ?></td>
	<th width="12%" class="DarkerBlue" colspan="">Signed:</th>
	<td width="26%"><img src="<?= $model->icinspectorsign ?>"  height='25px' /></td>
	<th width="12%" class="DarkerBlue" colspan="">Date:</th>
	<td width="12%"><?php if ($model->icinspectordate) {echo   date('d/m/Y', $model->icinspectordate);} ?></td>
</tr>
<tr>
	<th class="DarkerBlue" colspan="">SM[T] Name (Print):</th>
	<td><?=  $model->icsmtname ?></td>
	<th class="DarkerBlue" colspan="">Signed:</th>
	<td><img src="<?= $model->icsmtsign ?>"  height='25px' /></td>
	<th class="DarkerBlue" colspan="">Date:</th>
	<td><?php if ($model->icsmtdate) {echo   date('d/m/Y', $model->icsmtdate);} ?></td>
</tr>
</table>
      
<table class="Table notbb">
<tr>
	<th class="DarkerBlue" colspan="6">Remedial work identified</th>
</tr>
	<tr>
		<td rowspan="3" colspan="4">Minimum Action Taken & Work Arising <br /> If the minimum actions cannot be complied with consider banning the switch blade in question to all facing movements</td>
		<td colspan="2" class="text-center">Ellipse</td>
	</tr>
	<tr>
		<td colspan="1">STD Job</td>
		<td colspan="1">&nbsp;</td>
	</tr>
	<tr>
		<td colspan="1">W/O</td>
		<td colspan="1">&nbsp;</td>
	</tr>
	<tr>
	<td rowspan="2" colspan="3"><?=  $model->rwiactions ?></td>
		<td colspan="1">Defect RDMS No.</td>
		<td colspan="1">PTY</td>
		<td colspan="1">&nbsp;</td>
	</tr>
	<tr>
		<td colspan="1"><?=  $model->defectrdms ?></td>
		<td colspan="1">QTY</td>
		<td colspan="1">&nbsp;</td>
	</tr>
<tr>
	<th class="DarkerBlue" colspan="">SM[T] Name (Print):</th>
	<td><?=  $model->rwismtname ?></td>
	<th class="DarkerBlue" colspan="">Signed:</th>
	<td><img src="<?= $model->rwismtsign ?>" height="25px" /></td>
	<th class="DarkerBlue" colspan="">Date:</th>
	<td colspan=""><?php if ($model->rwismtdate) {echo   date('d/m/Y', $model->rwismtdate);} ?></td>
</tr>
<tr>
	<th class="DarkerBlue" colspan="">TME Name (Print):</th>
	<td><?=  $model->rwitmename ?></td>
	<th class="DarkerBlue" colspan="">Signed:</th>
	<td><img src="<?= $model->rwitmesign ?>"  height='25px' /></td>
	<th class="DarkerBlue" colspan="">Date:</th>
	<td colspan=""><?php if ($model->rwitmedate) {echo   date('d/m/Y', $model->rwitmedate);} ?></td>
</tr>
<tr>
	<th width="12%" class="DarkerBlue" colspan="">Scheduler Name (Print):</th>
	<td width="26%"><?=  $model->rwischname ?></td>
	<th width="12%" class="DarkerBlue" colspan="">Signed:</th>
	<td width="26%"><img src="<?= $model->rwischsign ?>"  height='25px' /></td>
	<th width="12%" class="DarkerBlue" colspan="">Date:</th>
	<td width="12%" colspan=""><?php if ($model->rwischdate) {echo   date('d/m/Y', $model->rwischdate);} ?></td>
</tr>
</table>
</div>