diff --git a/app/streams/streams.php b/app/streams/streams.php index 69d923f8a6..a6fc14065e 100644 --- a/app/streams/streams.php +++ b/app/streams/streams.php @@ -133,7 +133,7 @@ $sql .= "limit $rows_per_page offset $offset "; $prep_statement = $db->prepare(check_sql($sql)); $prep_statement->execute(); - $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); + $streams = $prep_statement->fetchAll(PDO::FETCH_NAMED); unset ($prep_statement, $sql); //alternate the row style @@ -192,6 +192,9 @@ echo " \n"; echo " \n"; echo " \n"; + if ($_GET['show'] == "all" && permission_exists('stream_all')) { + echo th_order_by('domain_name', $text['label-domain'], $order_by, $order, $param); + } echo th_order_by('stream_name', $text['label-stream_name'], $order_by, $order); echo th_order_by('stream_location', $text['label-stream_location'], $order_by, $order); echo th_order_by('stream_enabled', $text['label-stream_enabled'], $order_by, $order); @@ -206,9 +209,9 @@ echo " \n"; echo "\n"; - if (is_array($result)) { + if (is_array($streams)) { $x = 0; - foreach($result as $row) { + foreach($streams as $row) { if (permission_exists('stream_edit')) { $tr_link = "href='stream_edit.php?id=".$row['stream_uuid']."'"; } @@ -217,6 +220,15 @@ echo " \n"; echo " \n"; echo " \n"; + if ($_GET['show'] == "all" && permission_exists('stream_all')) { + if (strlen($_SESSION['domains'][$row['domain_uuid']]['domain_name']) > 0) { + $domain = $_SESSION['domains'][$row['domain_uuid']]['domain_name']; + } + else { + $domain = $text['label-global']; + } + echo " ".$domain."\n"; + } echo " ".escape($row['stream_name'])." \n"; echo " ".escape($row['stream_location'])." \n"; echo " ".escape($row['stream_enabled'])." \n"; @@ -234,11 +246,11 @@ $x++; if ($c==0) { $c=1; } else { $c=0; } } //end foreach - unset($sql, $result, $row_count); + unset($sql, $streams, $row_count); } //end if results echo "\n"; - echo "\n"; + echo "\n"; echo " \n"; echo " \n"; echo " \n";