Public in black, Private Groups in yellow, Non-Published in red

\n"; } # build table headings $ths = array(); $showgroup = ""; if ($group != "") { $showgroup = "&group=$group"; } for ($i = 0; $i < count($headings); $i++) { if (!Viewable($view, $min_accesss[$i])) { continue; } if ($headings[$i] == $heading) { # us if ($direction == "up") { $ths[] = "$headings[$i]"; } else { $ths[] = "$headings[$i]"; } } else { $ths[] = "$headings[$i]"; } } if ($view == "mnet") { $ths[] = " "; # system $ths[] = " "; # device } $ths[] = " "; # info echo "\n" . join("", $ths) . "\n"; if ($group != "") { $where = " where VideoVisibilityGroup='" . CF_Quote_SQL($group, false) . "'"; } elseif ($view != "mnet") { $where = " where VideoVisibility='Courts' or VideoVisibility='HIPAA' or VideoVisibility='Public' or VideoVisibility=''"; } else { # view is mnet $where = ""; } $query = "select VideoSystemName,Room,City,VideoE164,VideoVisibility,IP,Device,DbUid from VideoSystems$where order by $order_by"; if ($direction == "down") { $query .= " desc"; } #CF_Print_Var("query", $query); $result = CF_DB_Select($db, $DB_DEVICES_TYPE, $query); $numrows = CF_DB_Num_Rows($db, $DB_DEVICES_TYPE, $result); if ($numrows <= 0) { echo "

No video systems available.

"; return; } for ($i = 0; $i < $numrows; $i++) { $VideoSystemName = htmlspecialchars(CF_DB_Get_Field($db, $DB_DEVICES_TYPE, $result, $i, 0)); $Room = htmlspecialchars(CF_DB_Get_Field($db, $DB_DEVICES_TYPE, $result, $i, 1)); $City = htmlspecialchars(CF_DB_Get_Field($db, $DB_DEVICES_TYPE, $result, $i, 2)); $VideoE164 = htmlspecialchars(CF_DB_Get_Field($db, $DB_DEVICES_TYPE, $result, $i, 3)); $VideoVisibility = htmlspecialchars(CF_DB_Get_Field($db, $DB_DEVICES_TYPE, $result, $i, 4)); $IP = htmlspecialchars(CF_DB_Get_Field($db, $DB_DEVICES_TYPE, $result, $i, 5)); $Device = htmlspecialchars(CF_DB_Get_Field($db, $DB_DEVICES_TYPE, $result, $i, 6)); $DbUid = htmlspecialchars(CF_DB_Get_Field($db, $DB_DEVICES_TYPE, $result, $i, 7)); $fields = array(); $fields[] = "$VideoSystemName"; $fields[] = "$Room"; $fields[] = "$City"; if ($view == "mnet") { if ($VideoVisibility == "Courts" || $VideoVisibility == "HIPAA" || $VideoVisibility == "Public" || $VideoVisibility == "") { $fields[] = "$VideoE164"; } elseif ($VideoVisibility == "Non-Published") { $fields[] = "$VideoE164"; } else { $fields[] = "$VideoE164"; } } else { $fields[] = "$VideoE164"; } if ($view == "video" || $view == "mnet") { $fields[] = "$IP"; } if ($view == "mnet") { $fields[] = "system"; $fields[] = "device"; } $xgroup = ""; if ($group != "") { $xgroup = "&group=$group"; } $fields[] = "Info"; echo "" . join("", $fields) . "\n"; } echo "\n"; } # ------------------------------------------------------------ # is the value viewable? function Viewable ($view, $access) { if ($view == "mnet") { return true; } elseif ($view == "video") { if ($access == "mnet") { return false; } else { return true; } } else { # default is public if ($access == "mnet" || $access == "video") { return false; } else { return true; } } } ?>