home *** CD-ROM | disk | FTP | other *** search
- <?php
- ////////////////////////////////////////////////////////////////////////////////
- // <!--Copyright (c) 2005 Pure Networks Inc. All rights reserved.-->
- ////////////////////////////////////////////////////////////////////////////////
- //
- // Build: 3.0.6121.0 (Stable)
- // $Revision: #3 $
- //
- if ($bNetworkMap || $bLoggedIn)
- {
- // only get the list of devices if we have not already AND if the user is logged in
- if ($bLoggedIn)
- {
- if (!isset($nmSharedPlaces))
- {
- try
- {
- $nmSharedPlaces = $nmNetworkLib->OpenAllShares();
- }
- catch(Exception $ex)
- {
- $nmSharedPlaces = null;
- $sErrorHeader = "An Error Occurred.";
- log_activity("Attempting nmNetworkLib->OpenAllShares()", "exception", $ex->getMessage());
- }
- }
- }
- else
- {
- $nmSharedPlaces = null;
- }
- $j=0;
- $arShareLocations = null;
- $arShareLocationsCase = null;
- $sLastLocation = "";
- if (count($nmSharedPlaces) > 0)
- {
- foreach ($nmSharedPlaces as $share)
- {
- if ($share->Location != $sLastLocation)
- {
- $arShareLocations[$j][0] = $share->Location;
- $arShareLocations[$j][1] = $share->IsOnline;
- $arShareLocationsCase[$j][0] = strtolower($arShareLocations[$j][0]);
- }
- $sLastLocation = $share->Location;
- $j++;
- }
- array_multisort($arShareLocationsCase,SORT_ASC, SORT_REGULAR,$arShareLocations);
- }
- $sPanelTableHeader = "site map";
- require "_header_panel.php";
- ?>
- <div class="Computer">
- <div class="PublicFolder"> </div>
- <div class="FolderName<?php if (($sFolderAccessLevel == "public" && !$bLimitLocations) | !$bLoggedIn) { echo ("Active"); } ?>">
- <a href="/folders/public" alt="Public Folders">Public Home Page</a>
- </div>
- </div>
-
- <?php if ($bLoggedIn)
- {
- ?>
-
- <div><img src="/images/pixel.trans.gif" width="90%" height="8" alt=""/></div>
-
- <h2>
- <?php
- if (!isValidString($sNetworkName))
- {
- try
- {
- $nmNetworkLib = new COM("PureNetworks.NetMagic.NmRaNetworkLib");
- $nmNetworkLib->EnsureLoaded();
- $sNetworkName = $nmNetworkLib->NetworkName;
- }
- catch(com_exception $ex)
- {
- $sNetworkName = "(Could not determine the network name)";
- log_activity("Attempting nmNetworkLib->NetworkName", "exception", $ex->getMessage());
- if ($sNavLocation != "error")
- {
- gotoAbs("/error/103/return");
- exit();
- }
- }
- }
- echo str_replace(" ", " ",truncate_string(htmlspecialchars($sNetworkName), $iNetworkNameTruncateLength, "...", "right", true)) . ":";
- ?>
- </h2>
- <div><img src="/images/pixel.trans.gif" width="90%" height="3" alt=""/></div>
-
- <div class="Computer">
- <div class="PrivateFolder"> </div>
- <div class="FolderName<?php if ($sFolderAccessLevel == "private" && !$bLimitLocations) { echo ("Active"); } ?>">
- <a href="/folders/private" alt="Shared Folders">Shared Folders</a>
- </div>
- </div>
- <?php
- }
- ?>
- <?php
- if ($arShareLocations != null)
- {
- $k = 0;
- foreach($arShareLocations as $shareLocation)
- {
- echo ("<div class=\"Computer\">\r\n");
- if ($k == count($arShareLocations) - 1)
- {
- echo ("<div class=\"NetworkLineEnd\"> </div>\r\n");
- }
- else
- {
- echo ("<div class=\"NetworkLineStart\"> </div>\r\n");
- }
- ?>
- <div class="ComputerIcon ComputerNM"> </div>
- <?php
- if ($sLocation == $arShareLocations[$k][0] OR $sLocationLimiter == $arShareLocations[$k][0])
- {
- echo ("<div class=\"ComputerNameActive\">\r\n");
- }
- else
- {
- echo ("<div class=\"ComputerName\">\r\n");
- }
- echo ("<a href=\"/folders/private/" . urlEncodeString($arShareLocations[$k][0]) ."\" alt=\"" . urlEncodeString($arShareLocations[$k][0]) . "\">");
- echo str_replace(" ", " ",truncate_string($arShareLocations[$k][0], $iComputerNameTruncateLength, "...", "right", true));
- echo ("</a>");
- if (!$arShareLocations[$k][1])
- {
- echo (" (offline)");
- }
- ?>
- </div>
- </div>
- <?php
- $k++;
- }
- }
- ?>
- <?php
- if ($bAutoDetectWebCams || $bAutoDetectUSBCams)
- {
- ///////////////////////////////////////////////////
- // let's get the cameras
- ///////////////////////////////////////////////////
- try
- {
- $nmCameras = array();
- if ($bAutoDetectWebCams && $bAutoDetectUSBCams)
- {
- $nmUSBCameras = $nmNetworkLib->USBCameras;
- if (count($nmUSBCameras) > 0)
- {
- foreach ($nmUSBCameras as $camera)
- {
- $nmCameras[] = $camera;
- }
- }
-
- $nmWebCameras = $nmNetworkLib->WebCameras;
- if (count($nmWebCameras) > 0)
- {
- foreach ($nmWebCameras as $camera)
- {
- $nmCameras[] = $camera;
- }
- }
- }
- else if ($bAutoDetectWebCams)
- {
- $nmCameras = $nmNetworkLib->WebCameras;
- }
- else if ($bAutoDetectUSBCams)
- {
- $nmCameras = $nmNetworkLib->USBCameras;
- }
-
- if (count($nmCameras) > 0)
- {
- ?>
- <div class="Computer">
- <div class="WebCamera"> </div>
- <div class="FolderName">
- Cameras
- </div>
- </div>
- <?php
- $k = 0;
- foreach ($nmCameras as $camera)
- {
- if ($k == count($nmCameras) - 1)
- {
- echo ("<div class=\"NetworkLineEnd\"> </div>\r\n");
- }
- else
- {
- echo ("<div class=\"NetworkLineStart\"> </div>\r\n");
- }
- echo ("<div class=\"Computer\">");
- echo ("<div class=\"WebCamera\"> </div>");
-
- if ($sNavLocation == "webcamera" && isValidString($sCameraGuid) && $sCameraGuid==$camera->Guid)
- {
- echo ("<div class=\"FolderNameActive\">");
- }
- else
- {
- echo ("<div class=\"FolderName\">");
- }
-
- echo ("<a href=\"/webcamera.php?Guid=" . urlencode($camera->Guid) . "\">" . str_replace(" ", " ",truncate_string($camera->FriendlyName, $iNetworkNameTruncateLength, "...", "right", true)) . "</a>");
- if (!($camera->Online))
- {
- echo (" (offline)");
- }
- echo ("</div>");
- echo ("</div>");
- $k++;
- }
- }
- }
- catch(Exception $ex)
- {
- $nmCameras = null;
- log_activity("Attempting nmNetworkLib->Cameras", "exception", $ex->getMessage());
- }
- }
- ?>
-
- <div><img src="/images/pixel.trans.gif" width="90%" height="8" alt=""/></div>
- <?php
- require "_footer_panel.php";
- }
- ?>
-