Location: PHPKode > projects > Network Configuration Store > NCS-3.0.2/wwwroot/Devices/CS_Menu.php
<?php

require_once('./CS_Includes.inc.php');

// Let's try load some data!
try {
	$deviceTree = new CSTreeView('deviceTree');
	$rootNode = CSDevice::GetGroupById(0, TRUE, array_key_exists('archive', $_GET));

	// Populate the TreeView with nodes...
	foreach($rootNode['children'] as $groupNode)
		CSDevice::LoadGroupNode($deviceTree, $deviceTree->getRootName(), $groupNode);
}
catch (Exception $e) {
	CS::Abort($e);
}
	
CS::PrintHtmlHeader(FALSE, CSTreeView::GetHeaderArray(), FALSE, FALSE);

?>

<body onload="<?php echo $deviceTree->getInitName(); ?>();">

<div id="Menu">

	<div class="Controls">
		<img name="MenuHome" src="../assets/img/home_off.gif" alt="Home" height="18" width="18"
			onclick="window.parent.frames['MainFrame'].location.href='CS_Main.php';"
			onMouseOver="showHand(this); newIcon('MenuHome', '../assets/img/home_on.gif');"
			onMouseOut="hideHand(this); newIcon('MenuHome', '../assets/img/home_off.gif');" />

		<img name="MenuAdd" src="../assets/img/add_off.gif" alt="Add" height="18" width="18"
			onClick="window.parent.frames['MainFrame'].location.href='Admin.php';"
			onMouseOver="showHand(this); newIcon('MenuAdd', '../assets/img/add_on.gif');"
			onMouseOut="hideHand(this); newIcon('MenuAdd', '../assets/img/add_off.gif');" />

		<img name="MenuRefresh" src="../assets/img/refresh_off.gif" alt="Refresh" height="18" width="18"
			onClick="refreshMenu();"
			onMouseOver="showHand(this); newIcon('MenuRefresh', '../assets/img/refresh_on.gif');"
			onMouseOut="hideHand(this); newIcon('MenuRefresh', '../assets/img/refresh_off.gif');" />

		<img name="MenuExpand" src="../assets/img/expand_off.gif" alt="Expand" height="18" width="18"
			onClick="<?php echo $deviceTree->getId(); ?>.expandAll();"
			onMouseOver="showHand(this); newIcon('MenuExpand', '../assets/img/expand_on.gif');"
			onMouseOut="hideHand(this); newIcon('MenuExpand', '../assets/img/expand_off.gif');" />

		<img name="MenuCollapse" src="../assets/img/collapse_off.gif" alt="Collapse" height="18" width="18"
			onClick="<?php echo $deviceTree->getId(); ?>.collapseAll();"
			onMouseOver="showHand(this); newIcon('MenuCollapse', '../assets/img/collapse_on.gif');"
			onMouseOut="hideHand(this); newIcon('MenuCollapse', '../assets/img/collapse_off.gif');" />

	<!-- closes #Menu.Controls -->
	</div>

	<div class="TreeView">

	<?php if (isset($_GET['archive'])): ?>
		<p style="font-weight: bold;"><a href="CS_Menu.php">Switch to Normal View</a></p>
	<?php else: ?>
		<p style="font-weight: bold;"><a href="CS_Menu.php?archive">Switch to Archive View</a></p>
	<?php endif; ?>

	<?php

		$deviceTree->InsertClientScript();
		$deviceTree->InsertTreeElement();

	?>

	<!-- closes #Menu.TreeView -->
	</div>


<?php if (count($rootNode['children']) == 0): ?>
	<p>There are no devices to view.</p>
<?php endif; ?>


<!-- closes #Menu -->
</div>

<?php CS::PrintCopyright(); ?>

</body>
</html>
Return current item: Network Configuration Store