Skip to content

Commit

Permalink
add virtual info to proof reports
Browse files Browse the repository at this point in the history
  • Loading branch information
pjaudiomv committed Oct 5, 2021
1 parent 9ce1889 commit a18c17d
Showing 1 changed file with 28 additions and 11 deletions.
39 changes: 28 additions & 11 deletions proofs.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
$current_url = $protocol . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
// Remove parameter from query string

function filter_url($pattern, $url) {
function filter_url($pattern, $url)
{
return rtrim(preg_replace('~(\?|&)'.$pattern.'=[^&]*~', '$1', $url), "&");
}

Expand Down Expand Up @@ -90,8 +91,11 @@ function filter_url($pattern, $url) {
";


function sortBySubkey(&$array, $subkey, $sortType = SORT_ASC) {
if ( empty( $array ) ) { return; }
function sortBySubkey(&$array, $subkey, $sortType = SORT_ASC)
{
if (empty($array)) {
return;
}
foreach ($array as $subarray) {
$keys[] = $subarray[$subkey];
}
Expand All @@ -103,8 +107,8 @@ function sortBySubkey(&$array, $subkey, $sortType = SORT_ASC) {
sortBySubkey($formats, 'key_string');

$data_formats = "<table width=\"70%\"><tr><td colspan=\"2\">MEETING FORMATS</td></tr>";
$countmax = count ( $formats );
for ( $count = 0; $count < $countmax; $count++ ) {
$countmax = count($formats);
for ($count = 0; $count < $countmax; $count++) {
$data_formats .= '<tr>';
$data_formats .= "<td>".$formats[$count]['key_string']."</td>";
$data_formats .= "<td>".$formats[$count]['name_string']."</td>";
Expand All @@ -125,9 +129,7 @@ function sortBySubkey(&$array, $subkey, $sortType = SORT_ASC) {
$xml = simplexml_load_file($url);

// loop begins
foreach($xml->row as $row)
{

foreach ($xml->row as $row) {
// begin new paragraph
echo "<div class=\"list-row\">
<div class=\"list-left\">
Expand Down Expand Up @@ -184,9 +186,24 @@ function sortBySubkey(&$array, $subkey, $sortType = SORT_ASC) {

// Published formats
$formats = $row->formats;
$formats = str_replace(",",", ",$formats);
$formats = str_replace(",", ", ", $formats);
echo "Published Formats: <strong>".$formats."</strong> ]</small><br>";

// Virtual Meeting Additional Info
if (isset($row->phone_meeting_number) || isset($row->virtual_meeting_link) || isset($row->virtual_meeting_additional_info)) {
echo "Virtual Info: ";
if (isset($row->phone_meeting_number)) {
echo "[Phone: <strong> ".$row->phone_meeting_number."</strong>] ";
}
if (isset($row->virtual_meeting_link)) {
echo "[Link: <strong> ".$row->virtual_meeting_link."</strong>] ";
}
if (isset($row->virtual_meeting_additional_info)) {
echo "[Additional Info: <strong> ".$row->virtual_meeting_additional_info."</strong>]";
}
echo "<br>";
}

//Address
echo "
Address:<strong> ".$row->location_text.", ";
Expand All @@ -205,8 +222,8 @@ function sortBySubkey(&$array, $subkey, $sortType = SORT_ASC) {
CHANGES:<br><br><br><br>";

//echo "
// </div>
// <div class=\"list-right\">";
// </div>
// <div class=\"list-right\">";
// End Paragraph
echo " </div>
</div>";
Expand Down

0 comments on commit a18c17d

Please sign in to comment.