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

\n"; } $query = "select ItemID,Status,Notes,Description,VideoCaution,VideoConformance,VideoConnection,VideoCredentialsCommunity,VideoCredentialsPassword,VideoCredentialsUsername,VideoE164,VideoGatekeeper,VideoManufacturer,VideoModel,VideoSeatingCapacity,VideoSerial,VideoSoftwareVersion,VideoSystemName,VideoVisibility,VideoVisibilityGroup,VideoVoice,AbbrevName,IP,Device,Interface,Network,Room,City,AddressAsVCARD,LastUpdateStamp from VideoSystems where DbUid=$which"; #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 such video system.

"; return; } $ItemID = htmlspecialchars(CF_DB_Get_Field($db, $DB_DEVICES_TYPE, $result, 0, 0)); $Status = htmlspecialchars(CF_DB_Get_Field($db, $DB_DEVICES_TYPE, $result, 0, 1)); $Notes = htmlspecialchars(CF_DB_Get_Field($db, $DB_DEVICES_TYPE, $result, 0, 2)); $Description = htmlspecialchars(CF_DB_Get_Field($db, $DB_DEVICES_TYPE, $result, 0, 3)); $VideoCaution = htmlspecialchars(CF_DB_Get_Field($db, $DB_DEVICES_TYPE, $result, 0, 4)); $VideoConformance = htmlspecialchars(CF_DB_Get_Field($db, $DB_DEVICES_TYPE, $result, 0, 5)); $VideoConnection = htmlspecialchars(CF_DB_Get_Field($db, $DB_DEVICES_TYPE, $result, 0, 6)); $VideoCredentialsCommunity = htmlspecialchars(CF_DB_Get_Field($db, $DB_DEVICES_TYPE, $result, 0, 7)); $VideoCredentialsPassword = htmlspecialchars(CF_DB_Get_Field($db, $DB_DEVICES_TYPE, $result, 0, 8)); $VideoCredentialsUsername = htmlspecialchars(CF_DB_Get_Field($db, $DB_DEVICES_TYPE, $result, 0, 9)); $VideoE164 = htmlspecialchars(CF_DB_Get_Field($db, $DB_DEVICES_TYPE, $result, 0, 10)); $VideoGatekeeper = htmlspecialchars(CF_DB_Get_Field($db, $DB_DEVICES_TYPE, $result, 0, 11)); $VideoManufacturer = htmlspecialchars(CF_DB_Get_Field($db, $DB_DEVICES_TYPE, $result, 0, 12)); $VideoModel = htmlspecialchars(CF_DB_Get_Field($db, $DB_DEVICES_TYPE, $result, 0, 13)); $VideoSeatingCapacity = htmlspecialchars(CF_DB_Get_Field($db, $DB_DEVICES_TYPE, $result, 0, 14)); $VideoSerial = htmlspecialchars(CF_DB_Get_Field($db, $DB_DEVICES_TYPE, $result, 0, 15)); $VideoSoftwareVersion = htmlspecialchars(CF_DB_Get_Field($db, $DB_DEVICES_TYPE, $result, 0, 16)); $VideoSystemName = htmlspecialchars(CF_DB_Get_Field($db, $DB_DEVICES_TYPE, $result, 0, 17)); $VideoVisibility = htmlspecialchars(CF_DB_Get_Field($db, $DB_DEVICES_TYPE, $result, 0, 18)); $VideoVisibilityGroup = htmlspecialchars(CF_DB_Get_Field($db, $DB_DEVICES_TYPE, $result, 0, 19)); $VideoVoice = htmlspecialchars(CF_DB_Get_Field($db, $DB_DEVICES_TYPE, $result, 0, 20)); $AbbrevName = htmlspecialchars(CF_DB_Get_Field($db, $DB_DEVICES_TYPE, $result, 0, 21)); $IP = htmlspecialchars(CF_DB_Get_Field($db, $DB_DEVICES_TYPE, $result, 0, 22)); $Device = htmlspecialchars(CF_DB_Get_Field($db, $DB_DEVICES_TYPE, $result, 0, 23)); $Interface = htmlspecialchars(CF_DB_Get_Field($db, $DB_DEVICES_TYPE, $result, 0, 24)); $Network = htmlspecialchars(CF_DB_Get_Field($db, $DB_DEVICES_TYPE, $result, 0, 25)); $Room = htmlspecialchars(CF_DB_Get_Field($db, $DB_DEVICES_TYPE, $result, 0, 26)); $City = htmlspecialchars(CF_DB_Get_Field($db, $DB_DEVICES_TYPE, $result, 0, 27)); $AddressAsVCARD = htmlspecialchars(CF_DB_Get_Field($db, $DB_DEVICES_TYPE, $result, 0, 28)); $LastUpdateStamp = htmlspecialchars(CF_DB_Get_Field($db, $DB_DEVICES_TYPE, $result, 0, 29)); if ($VideoVisibilityGroup != "") { if (!CDS_Verify_Video($VideoVisibilityGroup)) { CF_Error_Error("access not permitted"); return; } } elseif ($view == "public" || $view == "video") { if ($VideoVisibility != "Courts" && $VideoVisibility != "HIPAA" && $VideoVisibility != "Public" && $VideoVisibility != "") { CF_Error_Error("access not permitted"); return; } } echo "

Information on System '$VideoSystemName'

"; $cnt = 0; echo CF_TRow2($cnt++, "System Name", $VideoSystemName); if ($view == "mnet") { if ($VideoVisibility == "Courts" || $VideoVisibility == "HIPAA" || $VideoVisibility == "Public" || $VideoVisibility == "") { echo CF_TRow2($cnt++, "E.164", $VideoE164); } elseif ($VideoVisibility == "Non-Published") { echo CF_TRow2($cnt++, "E.164", "$VideoE164"); } else { echo CF_TRow2($cnt++, "E.164", "$VideoE164"); } } else { echo CF_TRow2($cnt++, "E.164", $VideoE164); } if ($view == "video") { echo CF_TRow2($cnt++, "IP", $IP); } elseif ($view == "mnet") { echo CF_TRow2($cnt++, "IP", "$IP"); } echo CF_TRow2($cnt++, "Room", $Room); echo CF_TRow2($cnt++, "City", $City); echo CF_TRow2($cnt++, "Voice", $VideoVoice); echo CF_TRow2($cnt++, "Status", $Status); echo CF_TRow2($cnt++, "Notes", $Notes); echo CF_TRow2($cnt++, "Conformance", $VideoConformance); echo CF_TRow2($cnt++, "Connection", $VideoConnection); echo CF_TRow2($cnt++, "Seating Capacity", $VideoSeatingCapacity); echo CF_TRow2($cnt++, "Address", FigureAddress($AddressAsVCARD)); echo CF_TRow2($cnt++, "LastUpdateStamp", $LastUpdateStamp); echo "
\n"; Show_Contacts($db, $usertype, $view, $which); Show_Map(); if ($view == "mnet") { echo "

 

"; echo CF_TRow2($cnt++, "Visibility", $VideoVisibility); echo CF_TRow2($cnt++, "Visibility Group", $VideoVisibilityGroup); echo CF_TRow2($cnt++, "Caution", $VideoCaution); echo CF_TRow2($cnt++, "Credentials Community", $VideoCredentialsCommunity); echo CF_TRow2($cnt++, "Credentials Password", $VideoCredentialsPassword); echo CF_TRow2($cnt++, "Credentials Username", $VideoCredentialsUsername); echo CF_TRow2($cnt++, "Gatekeeper", $VideoGatekeeper); echo CF_TRow2($cnt++, "Manufacturer", $VideoManufacturer); echo CF_TRow2($cnt++, "Model", $VideoModel); echo CF_TRow2($cnt++, "Software Version", $VideoSoftwareVersion); echo CF_TRow2($cnt++, "Serial", $VideoSerial); echo CF_TRow2($cnt++, "Abbreviated Name", $AbbrevName); echo CF_TRow2($cnt++, "Device", "$Device"); echo CF_TRow2($cnt++, "Interface", $Interface); echo CF_TRow2($cnt++, "Network", $Network); echo CF_TRow2($cnt++, "ARS inventory", "record"); echo CF_TRow2($cnt++, "ARS inventory", "data"); echo "
\n"; } echo "

Update information on this system.

\n"; } # ------------------------------------------------------------ # Show the contacts function Show_Contacts ($db, $usertype, $view, $tableuid) { global $DB_DEVICES_TYPE; $query = "select ContactUid,ContactType from ContactMap where TableName='VideoSystems' and TableUid=$tableuid order by ContactType"; #CF_Print_Var("query", $query); $match_type = "Site Application"; if ($view == "public" && Show_Contacts_Any_Scheduling($db, $tableuid)) { $match_type = "Site Scheduling"; } $result = CF_DB_Select($db, $DB_DEVICES_TYPE, $query); $numrows = CF_DB_Num_Rows($db, $DB_DEVICES_TYPE, $result); if ($numrows <= 0) { echo "

No contacts listed.

\n"; return; } $any = false; for ($i = 0; $i < $numrows; $i++) { $ContactUid = CF_DB_Get_Field($db, $DB_DEVICES_TYPE, $result, $i, 0); $ContactType = htmlspecialchars(CF_DB_Get_Field($db, $DB_DEVICES_TYPE, $result, $i, 1)); #CF_Print_Var("ContactUid", $ContactUid); #CF_Print_Var("ContactType", $ContactType); if ($view == "public" && $ContactType != $match_type) { continue; } $query2 = "select Name,EmailAddress,TelephoneNumber from ContactCore where DbUid='$ContactUid'"; #CF_Print_Var("query2", $query2); $result2 = CF_DB_Select($db, $DB_DEVICES_TYPE, $query2); $numrows2 = CF_DB_Num_Rows($db, $DB_DEVICES_TYPE, $result2); if ($numrows2 <= 0) { continue; } $Name = htmlspecialchars(CF_DB_Get_Field($db, $DB_DEVICES_TYPE, $result2, 0, 0)); $EmailAddress = htmlspecialchars(CF_DB_Get_Field($db, $DB_DEVICES_TYPE, $result2, 0, 1)); $TelephoneNumber = htmlspecialchars(CF_DB_Get_Field($db, $DB_DEVICES_TYPE, $result2, 0, 2)); #CF_Print_Var("Name", $Name); #CF_Print_Var("EmailAddress", $EmailAddress); #CF_Print_Var("TelephoneNumber", $TelephoneNumber); if ($view == "public") { if (!$any) { echo " "; } $any = true; echo CF_TRow3($i, $ContactType, $Name, $TelephoneNumber); } else { if (!$any) { echo "
contact typenamephone
"; } $any = true; echo CF_TRow4($i, $ContactType, $Name, $TelephoneNumber, $EmailAddress); } } if (!$any) { echo "

No contacts listed.

\n"; return; } else { echo "
contact typenamephoneemail
\n"; } } # ------------------------------------------------------------ # Indicate whether this item has a Site Scheduling contact. function Show_Contacts_Any_Scheduling ($db, $tableuid) { global $DB_DEVICES_TYPE; $query = "select ContactUid from ContactMap where TableName='VideoSystems' and TableUid=$tableuid and ContactType='Site Scheduling'"; #CF_Print_Var("query", $query); $result = CF_DB_Select($db, $DB_DEVICES_TYPE, $query); $numrows = CF_DB_Num_Rows($db, $DB_DEVICES_TYPE, $result); #CF_Print_Var("numrows", $numrows); return $numrows > 0; } # ------------------------------------------------------------ # Show the map. function Show_Map () { global $system_address; global $PROTOCOL; if ($system_address == "") { return; } if ($PROTOCOL == "https") { # on maya, use this one... $KEY_MAP = "ABQIAAAAO5iV36O3AqsPelqCXGI9zhQSJRzuLWgQ_TTKbGWK2_bHyjaSgRSf9EHqsbCi8M3Z5EJbsxJ0MSKDKA"; # http://state.mn.us } else { # on inca, use this one... $KEY_MAP = "ABQIAAAAO5iV36O3AqsPelqCXGI9zhQ_6UGJFjfwiOPNOUb6eohAU4QYgxR-lsfQLDfftCIIe6BnsYWuy1z0bQ"; # http://www.mnet.state.mn.us } echo "
"; } # ------------------------------------------------------------ # 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; } } } ?>