<!DOCTYPE html>
<!--// $Id$ //-->
<html><head>
<meta name="GENERATOR" content="LMS {$layout.lmsv}">
{include file="language.html"}
<title>LMS – {if $layout.pagetitle != ""}{$layout.pagetitle}{/if}</title>
<link href="css/style.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="js/common.js"></script>
{if $js}<script type="text/javascript">
<!--
	{$js}
//-->
</script>{/if}
</head>
{if ! $part}
<frameset frameborder="0" framespacing="0" ROWS="30,*">
	<frame scrolling="no" frameborder="0" marginheight="0" marginwidth="0" name="cal" noresize src="?m=choosenode&id={$customerid}&p=top">
	<frame scrolling="always" frameborder="0" marginheight="0" marginwidth="0" name="m" noresize src="?m=choosenode&id={$customerid}&p=main">
</frameset>
{/if}
{if $part == "main"}
<body class="lms-ui-popup">
<script type="text/javascript">
<!--
	var targetfield = window.opener.targetfield;

	function SaveForm()
	{
		var result = '';

		for (var i=0; i<document.nodelist.elements.length; i++)
		{
			var e = document.nodelist.elements[i];
			if (e.name != 'allbox' && e.checked)
				result += e.value + ',';
		}

		sendvalue(targetfield, result);
		window.close();
	}
//-->
</script>
<form name="nodelist">
<table width="100%" cellpadding="3" id="table">
	{cycle values="light,lucid" print=false}
	{if count($nodelist) > 0}
	{section name=nodelist loop=$nodelist}
	{if $nodelist[nodelist].id}
	<tr class="highlight {cycle}{if ! $nodelist[nodelist].access} blend{/if}"  >
		<td width="1%">
			<input type="checkbox" class="box {cycle print=false}{cycle}" name="nodes" value="{$nodelist[nodelist].id}">
		</td>
		<td width="99%" style="vertical-align: top;">
			<table width="100%">
			    <tr>
				<td width="1%"><img src="img/node.gif" alt=""></td>
				<td width="99%"><b>{$nodelist[nodelist].name}</b></td>
			    </tr>
			    <tr>
				<td width="1%"><img src="img/ip.gif" alt=""></td>
				<td width="99%" class="nobr">{$nodelist[nodelist].ip} {if $nodelist[nodelist].ip_pub!="0.0.0.0"} ({$nodelist[nodelist].ip_pub}) {/if} / {$nodelist[nodelist].mac}</td>
			    </tr>
			    {if $nodelist[nodelist].location}
			    <tr>
				<td width="1%"><img src="img/home.gif" alt=""></td>
				<td width="99%" class="nobr">{$nodelist[nodelist].location|truncate:60:"&hellip;":true}</td>
			    </tr>
			    {/if}
			</table>
		</td>
	</tr>
	{/if}
	{/section}
	{else}
	<tr>
		<td colspan="3" class="empty-table">
			{trans("That customer hasn't got any node.")}
		</td>
	</tr>
	{/if}
	<tr>
		<td width="100%" colspan="3" align="center">
		    <table width="100%" cellpadding="3" id="table">
			<tr>
			    <td align="left" class="nobr">
			        {if count($nodelist) > 1}
				<input class="box" type="checkbox" name="allbox" id="allbox" onchange="CheckAll('nodelist', this)" value="1"><label for="allbox">{trans("Check All")}</label>
				{/if}
			    </td>
			    <td align="right" class="nobr">
				<a href="javascript:SaveForm();">{trans("Close")} <img src="img/save.gif" alt=""></a>
			    </td>
			</tr>
		    </table>
		</td>
	</tr>
</table>
</form>
</body>
{/if}
</html>
