= 1) { // Check to see if there is a message to decode
$output = "[Skyper Index Rubric:$skyperRubric] ".un_rot(implode($messageTextArray));
}
else {
$output = "[Skyper Index Rubric:$skyperRubric] No Name";
}
return $output;
}
if ($pocsagric == "0004520") { // Skyper Message
if (isset($messageTextArray[0])) { // Rubric Number
$skyperRubric = ord($messageTextArray[0]) - 31;
unset($messageTextArray[0]);
}
if (isset($messageTextArray[1])) { // Message number
$skyperMsgNr = ord($messageTextArray[1]) - 32;
unset($messageTextArray[1]);
}
if (count($messageTextArray) >= 1) { // Check to see if there is a message to decode
$output = "[Skyper Rubric:$skyperRubric Msg:$skyperMsgNr] ".un_rot(implode($messageTextArray));
}
else {
$output = "[Skyper Rubric:$skyperRubric] No Message";
}
return $output;
}
}
?>
| ()Time in time zone |
Message Mode |
RIC / CapCode of the receiving Pager |
Message contents |
setTimeZone($local_tz);
$local_time = $dt->format('H:i:s M jS');
$pocsag_timeslot = $dapnetMessageArr["6"];
$pocsag_ric = str_replace(',', '', $dapnetMessageArr["8"]);
// Fix incorrectly truncated strings containing double quotes
unset($dapnetMessageTxtArr[0]);
if (count($dapnetMessageTxtArr) > 2) {
unset($dapnetMessageTxtArr[count($dapnetMessageTxtArr)]);
$pocsag_msg = implode('"', $dapnetMessageTxtArr);
} else {
$pocsag_msg = $dapnetMessageTxtArr[1];
}
// Decode Skyper Messages
if ( ($pocsag_ric == "0004520") || ($pocsag_ric == "0004512") || ($pocsag_ric == "0002504") ) {
$pocsag_msg = skyper($pocsag_msg, $pocsag_ric);
}
// Formatting long messages without spaces
if (strpos($pocsag_msg, ' ') == 0 && strlen($pocsag_msg) >= 45) {
$pocsag_msg = wordwrap($pocsag_msg, 45, ' ', true);
}
// Sanitise the data before displaying the HTML
if (isset($local_time)) { $local_time = htmlspecialchars($local_time, ENT_QUOTES, 'UTF-8'); }
if (isset($pocsag_timeslot)) { $pocsag_timeslot = htmlspecialchars($pocsag_timeslot, ENT_QUOTES, 'UTF-8'); }
if (isset($pocsag_ric)) { $pocsag_ric = htmlspecialchars($pocsag_ric, ENT_QUOTES, 'UTF-8'); }
if (isset($pocsag_msg)) { $pocsag_msg = htmlspecialchars($pocsag_msg, ENT_QUOTES, 'UTF-8'); }
?>
|
|
|
|