['name'=>'Federal','title'=>'FEDERAL COORDINATION BRIEF','focus'=>'Interagency coordination / reported circumstances','icon'=>'fa-landmark','order'=>[1,4,5,3,6,2,7]], 'fbi'=>['name'=>'FBI','title'=>'MISSING PERSON CASE BRIEF','focus'=>'Identification / missing-person case information','icon'=>'fa-fingerprint','order'=>[1,2,3,5,6,4,7]], 'international'=>['name'=>'International','title'=>'INTERNATIONAL COORDINATION BRIEF','focus'=>'Person identification / cross-border information','icon'=>'fa-globe','order'=>[1,6,2,3,5,4,7]], 'state'=>['name'=>'State','title'=>'STATE LAW-ENFORCEMENT BRIEF','focus'=>'Device alerts / vehicle and location information','icon'=>'fa-map','order'=>[1,5,2,3,6,4,7]], 'city'=>['name'=>'City','title'=>'LOCAL POLICE INCIDENT BRIEF','focus'=>'Last person contact / local investigative leads','icon'=>'fa-building','order'=>[1,3,2,6,5,4,7]], '911'=>['name'=>'911','title'=>'911 EMERGENCY INTAKE BRIEF','focus'=>'Location / callback / reported emergency','icon'=>'fa-phone','order'=>[1,6,4,2,5,3,7]], ]; } function PA_WEB_BRIEF_REPORT_PROFILE($key): ?array { if ($key==='') return null; if (!is_string($key) || !isset(PA_WEB_BRIEF_REPORT_PROFILES()[$key])) throw new DomainException('Invalid report designation.'); return PA_WEB_BRIEF_REPORT_PROFILES()[$key]+['key'=>$key]; } function PA_WEB_BRIEF_REPORT_SECTIONS(array $profile): array { $titles=[1=>'Case overview',2=>'Safety & missing facts',3=>'Findings & source accounts',4=>'Coordination actions',5=>'Case timeline',6=>'Contacts & resources',7=>'Preparation & provenance']; $titles[1]=$profile['name']==='911' ? 'Emergency intake' : $profile['name'].' case overview'; $sections=[];foreach ($profile['order'] as $id) $sections[$id]=$titles[$id]; return $sections; } function PA_WEB_BRIEF_REPORT_FIELDS(array $brief,array $profile): array { $answer=static fn($key)=>PA_WEB_BRIEF_TEXT($brief['answers'][$key]['AnswerText'] ?? '') ?: 'Not recorded'; $person=$brief['person'];$point=$brief['positions'][0] ?? null; [$birth,$age]=PA_WEB_BRIEF_BIRTH($person['BirthDate'] ?? '',$brief['case']['Insert_DateTime']); $identity=$person ? trim($person['FirstName'].' '.$person['LastName']).' | DOB: '.($birth ?: 'Not recorded').($age ? ' | '.$age : '') : 'Tracker user not uniquely identified'; $location=$point ? sprintf('%.7f, %.7f',$point['latitude'],$point['longitude']).' | '.PA_WEB_BRIEF_TIME($point['at']).' | '.$point['timeBasis'].' | Accuracy: '.($point['accuracy']!==null ? $point['accuracy'].' m' : 'Not recorded') : 'No valid device coordinates recorded'; $rows=[ 'person'=>['Person identification',$identity,null], 'last'=>['Last reported person sighting / direct contact',$answer('MP_LAST_CONTACT'),'MP_LAST_CONTACT'], 'circumstances'=>['Reported circumstances / urgent concerns',$answer('MP_CIRCUMSTANCES'),'MP_CIRCUMSTANCES'], 'appearance'=>['Appearance / clothing / distinguishing features',$answer('MP_IDENTIFICATION'),'MP_IDENTIFICATION'], 'source'=>['Main information source',$answer('FINDING_SOURCE'),'FINDING_SOURCE'], 'witness'=>['Witnesses / time-sensitive records',$answer('MP_WITNESSES_EVIDENCE'),'MP_WITNESSES_EVIDENCE'], 'checked'=>['Locations checked / outstanding leads',$answer('MP_LOCATIONS_CHECKED'),'MP_LOCATIONS_CHECKED'], 'device'=>['Device location - not a confirmed person sighting',$location,null], 'vehicle'=>['Registered vehicle description',PA_WEB_BRIEF_TEXT($person['VehicleDESC'] ?? '') ?: 'Not recorded; plate/state may be supplied in narrative findings',null], 'handoff'=>['Receiving agency / agency case number / acknowledgement','Not captured by this briefing',null], 'country'=>['Nationality / languages / destination country','Not captured as structured fields; any reported details remain in the source accounts',null], 'border'=>['Confirmed border crossing / international agency reference','Not captured; device coordinates alone do not establish cross-border travel',null], 'emergency'=>['Reported emergency',$brief['case']['AlertSource'].' alert. '.$answer('MP_CIRCUMSTANCES'),'MP_CIRCUMSTANCES'], 'dispatch'=>['911 call / dispatch receipt','Not captured. This document is not a 911 submission or CAD incident record.',null], ]; $keys=[ 'federal'=>['circumstances','source','handoff'], 'fbi'=>['person','appearance','last','circumstances'], 'international'=>['person','country','border','last'], 'state'=>['device','vehicle','last','handoff'], 'city'=>['last','circumstances','witness','checked'], '911'=>['last','device','emergency','dispatch'], ][$profile['key']]; return array_map(static fn($key)=>$rows[$key],$keys); } function PA_WEB_BRIEF_REPORT_ORDER(string $html,array $profile): string { $document=new DOMDocument();$previous=libxml_use_internal_errors(true); try { if (!$document->loadHTML($html,LIBXML_NONET)) throw new RuntimeException('Report formatting failed.'); $xpath=new DOMXPath($document);$pages=$xpath->query('//article[@data-brief-page]');$byID=[]; foreach ($pages as $page) $byID[(int)$page->getAttribute('data-brief-page')]=$page; if (count($byID)!==7) throw new RuntimeException('Seven report subjects are required.'); $parent=$byID[1]->parentNode; foreach ($profile['order'] as $index=>$id) { $page=$byID[$id];$page->setAttribute('data-brief-subject',(string)$id); $page->setAttribute('data-brief-page',(string)($index+1)); $page->setAttribute('class',$index===0 ? 'brief-page is-active' : 'brief-page'); $parent->appendChild($page); } return $document->saveHTML(); } finally {libxml_clear_errors();libxml_use_internal_errors($previous);} } function PA_WEB_BRIEF_REPORT_MENU(array $case): void { $escape=static fn($value)=>htmlspecialchars((string)$value,ENT_QUOTES|ENT_SUBSTITUTE,'UTF-8'); header('Content-Type: text/html; charset=UTF-8');header('Cache-Control: private, no-store, max-age=0'); header('X-Content-Type-Options: nosniff');header('Referrer-Policy: no-referrer'); header("Content-Security-Policy: default-src 'none'; style-src 'self'; font-src 'self'; img-src 'self'; base-uri 'none'; form-action 'none'; frame-ancestors 'self'"); if (ob_get_level()) ob_clean(); ?>Incident Brief Reports - <?php echo $escape($case['CaseName']); ?>
PINK ANGELS RESCUE TEAM

Incident Brief Reports

|

Select Report Designation

Prepared by Pink Angels. Not an official agency form, INTERPOL notice, or 911 dispatch record. No report has been transmitted.