| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337 |
- <?php
- /**
- * @var Template $template
- * @var Test $test
- * @var array $values
- * @var string $location_text
- * @var Customer $customer
- * @var Location $location
- * @var User $tester
- * @var string $date_start
- * @var string $time_start
- * @var string $time_end
- * @var string $duration_text
- */
- $pass_image = $test->pass ? "pass.png" : "fail.png";
- // COVID-19
- $covid_19 = in_array("COVID-19", $template->getKeys());
- ?>
- <h3 class="section">Test Result</h3>
- <div align="center" style="margin: auto; width: 75%;">
- <img src="/img/<?=htmlspecialchars($pass_image)?>" alt="" />
- </div>
- <div style="float: left; width: 70%; position: relative;">
- <h3 class="section"><?=htmlspecialchars($location_text)?></h3>
- <div class="bl">
- <div class="field"><?=htmlspecialchars($customer->region_field_name)?> / <?=htmlspecialchars($customer->area_manager_field_name)?>:</div>
- <div class="value">
- <?=TestPDF::getValueHtml($location->region)?> / <?=TestPDF::getValueHtml($location->area_manager)?>
- </div>
- </div>
- <div class="bl">
- <div class="field">Address:</div>
- <div class="value">
- <?=htmlspecialchars($location->address_1)?><br />
- <?php
- if($location->address_2) {
- ?>
- <?=htmlspecialchars($location->address_2)?><br />
- <?php
- }
- ?>
- <?=htmlspecialchars($location->city)?>
- </div>
- </div>
- <div class="bl">
- <div class="field">Postcode:</div>
- <div class="value"><?=htmlspecialchars($location->postal_code)?></div>
- </div>
- <div class="bl">
- <div class="field">Shop Name - Left:</div>
- <div class="value"><?=htmlspecialchars($test->shop_left)?></div>
- </div>
- <div class="bl">
- <div class="field">Shop Name - Right:</div>
- <div class="value"><?=htmlspecialchars($test->shop_right)?></div>
- </div>
- <div>
- <div class="field">Door Sensor:</div>
- <div class="value"><?=TestPDF::getBooleanHtml($values["door_sensor_alert"] ?? false)?></div>
- </div>
- </div>
- <div style="float: right; width: 29%">
- <h3 class="section">Tester</h3>
- <div class="bl">
- <div class="field">Gender:</div>
- <div class="value"><?=htmlspecialchars($tester->getGenderText())?></div>
- </div>
- <div>
- <strong>Attire:</strong><br />
- <?=htmlspecialchars($test->attire)?>
- </div>
- </div>
- <div style="clear: both;"></div>
- <h3 class="section">Test Details</h3>
- <div class="wide-field-names" style="float: left; width: 49.5%">
- <div class="subheader">
- <strong>Date & Time</strong>
- </div>
- <div style="float: left; width: 24%">
- <strong>Date:</strong><br />
- <?=htmlspecialchars($date_start)?>
- </div>
- <div style="float: left; width: 24%">
- <strong>Entry:</strong><br />
- <?=htmlspecialchars($time_start)?>
- </div>
- <div style="float: left; width: 24%">
- <strong>Exit:</strong><br />
- <?=htmlspecialchars($time_end)?>
- </div>
- <div style="float: left; width: 24%">
- <strong>Duration:</strong><br />
- <?=htmlspecialchars($duration_text)?>
- </div>
- <div style="clear: both;"></div><br />
- <?php
- if($covid_19) {
- ?>
- <div class="subheader">
- <strong>COVID-19</strong>
- </div>
- <div class="bl">
- <div class="field">Social Distancing Signage:</div>
- <div class="value"><?=TestPDF::getBooleanHtml($values["social_distancing_signage"] ?? false)?></div>
- </div>
- <div class="bl">
- <div class="field">Entrance Hand Sanitiser:</div>
- <div class="value"><?=TestPDF::getBooleanHtml($values["entrance_hand_sanitiser"] ?? false)?></div>
- </div>
- <div>
- <div class="field">Social Distancing Measures:</div>
- <div class="value"><?=TestPDF::getBooleanHtml($values["social_distancing_measures"] ?? false)?></div>
- </div>
- <?php
- }
- ?>
- <div style="clear: both;"></div><br />
- <div class="subheader">
- <strong>Staff</strong>
- </div>
- <div class="bl">
- <div class="field">Name:</div>
- <div class="value"><?=TestPDF::getValueHtml($test->challenger_name)?></div>
- </div>
- <div class="bl">
- <div class="field">Gender:</div>
- <div class="value"><?=TestPDF::getValueHtml(Util::getGenderText($test->challenger_gender))?></div>
- </div>
- <strong>Description:</strong><br />
- <?=TestPDF::getValueHtml($test->challenger_description)?><br />
- </div>
- <div style="float: right; width: 49.5%">
- <div class="subheader">
- <strong>ID Request</strong>
- </div>
- <?php
- $pass_colour = $test->pass ? "green" : "red";
- switch($test->challenge_stage) {
- case 1:
- $challenge_colour = "green";
- break;
- case 2:
- case 3:
- $challenge_colour = "orange";
- break;
- case 4:
- case 5:
- default:
- $challenge_colour = "red";
- break;
- }
- ?>
- <div class="bl">
- <div class="field">Result:</div>
- <div class="value" style="color: <?=$pass_colour?>">
- <strong><?=htmlspecialchars($test->getPassText())?></strong>
- </div>
- </div>
- <div>
- <div class="field">ID Stage:</div>
- <div class="value" style="color: <?=$challenge_colour?>">
- <strong><?=htmlspecialchars($test->challenge_stage . " - " . $test->getChallengeStageText())?></strong>
- </div>
- </div>
- <br />
- <div>
- <div style="color: green;">1: Challenge on entry</div>
- <div style="color: orange;">2: Challenge while browsing</div>
- <div style="color: orange;">3: Challenge during play</div>
- <div style="color: red;">4: Challenge on exit</div>
- <div style="color: red;">5: No challenge</div>
- </div>
- <br />
- <div class="bl">
- <div class="field">Eye Contact:</div>
- <div class="value"><?=($test->challenger_eye_contact ? "Yes" : "No")?></div>
- </div>
- <div>
- <strong>Description:</strong><br />
- <?=TestPDF::getValueHtml($test->challenge_description)?>
- </div>
- </div>
- <div class="clear"></div>
- <br />
- <div style="float: left; width: 49.5%">
- <div class="subheader">
- <strong>Play Details</strong>
- </div>
- <div class="wide-field-names">
- <div class="bl">
- <div class="field">Machine Played:</div>
- <div class="value"><?=TestPDF::getValueHtml($values["play_machine"] ?? "")?></div>
- </div>
- <?php
- $play_jackpot = $values["play_jackpot"] ?? "";
- if(!empty($play_jackpot)) {
- $play_jackpot = "£" . number_format($play_jackpot, 2);
- }
- ?>
- <div class="bl">
- <div class="field">Jackpot Value:</div>
- <div class="value"><?=TestPDF::getValueHtml($play_jackpot)?></div>
- </div>
- <?php
- $play_machine_stake = $values["play_machine_stake"] ?? "";
- if(!empty($play_machine_stake)) {
- $play_machine_stake = "£" . number_format($play_machine_stake, 2);
- }
- ?>
- <div class="bl">
- <div class="field">Stake Played:</div>
- <div class="value"><?=TestPDF::getValueHtml($play_machine_stake)?></div>
- </div>
- <div class="bl">
- <div class="field">Minutes Played:</div>
- <div class="value"><?=TestPDF::getValueHtml($values["play_minutes"] ?? "")?></div>
- </div>
- <?php
- $play_spent = $values["play_spent"] ?? "";
- if(!empty($play_spent)) $play_spent = "£" . number_format($play_spent, 2);
- ?>
- <div>
- <div class="field">Amount Spent:</div>
- <div class="value"><?=TestPDF::getValueHtml($play_spent)?></div>
- </div>
- </div>
- </div>
- <div style="float: right; width: 49.5%">
- <div class="subheader">
- <strong>Signage</strong>
- </div>
- <div class="wide-field-names">
- <div class="bl">
- <div class="field">Think 21/25:</div>
- <div class="value"><?=TestPDF::getValueHtml($values["think_21_25"] ?? "")?></div>
- </div>
- <?php
- $value = $values["citizen_card_brochure_displayed"] ?? "";
- if(strlen($value)) $value = $value ? "Yes" : "No";
- ?>
- <div class="bl">
- <div class="field">Citizen Card Brochure Displayed:</div>
- <div class="value"><?=TestPDF::getValueHtml($value)?></div>
- </div>
- <?php
- $value = $values["think_21_badge"] ?? "";
- if(strlen($value)) $value = $value ? "Yes" : "No";
- ?>
- <div class="bl">
- <div class="field">Think 21/25 Badge Worn by Staff:</div>
- <div class="value"><?=TestPDF::getValueHtml($value)?></div>
- </div>
- <?php
- $value = $values["think_21_poster"] ?? "";
- if(strlen($value)) $value = $value ? "Yes" : "No";
- ?>
- <div class="bl">
- <div class="field">Think 21/25 Posters Displayed:</div>
- <div class="value"><?=TestPDF::getValueHtml($value)?></div>
- </div>
- <strong>Think 21/25 Poster Notes:</strong><br />
- <?=TestPDF::getValueHtml($values["think_21_poster_notes"] ?? "")?>
- </div>
- </div>
- <div class="clear"></div>
- <br />
- <div>
- <div class="subheader">
- <strong>Tester's Notes</strong>
- </div>
- <?=TestPDF::getValueHtml($test->additional_notes)?>
- </div>
|