<!--// $Id$ //-->
<H1>{$layout.pagetitle}</H1>
{if $bars}
<TABLE WIDTH="100%" ALIGN="center" CELLPADDING="3">
	<TR>
		<TD VALIGN="top" WIDTH="50%">
			<TABLE WIDTH="100%" CELLPADDING="2">
				<TR class="DARK">
					<TD class="FALL" align="center" COLSPAN="2">
						<P><B>{t}Download{/t}</B></P>
					</TD>
				</TR>
				{section name=download loop=$download.name}
				<TR>
					<TD CLASS="fleft" WIDTH="1%" NOWRAP>
						<B><A HREF="?m=core&a=nodeinfo&id={$download.nodeid[download]}">{if $showips}{$download.ipaddr[download]}{else}{$download.name[download]|truncate:32:"..."}{/if}</A></B>
					</TD>
					<TD CLASS="fright" WIDTH="99%" NOWRAP>
						<IMG SRC="modules/traffic/img/redpx.gif" HEIGHT="12" WIDTH="{$download.bar[download]}" BORDER="1" ALT=""> {$download.data[download]|string_format:"%.2f"}&nbsp;{$download.unit[download]} ({$download.avg[download]|string_format:"%d"}&nbsp;kbit/s) 
					</TD>
				</TR>
				{/section}
				<TR class="LIGHT">
					<TD ALIGN="center" class="FALL" COLSPAN="2">
						<P><B>{t}Total:{/t} {$download.sum.data|string_format:"%.2f "}{$download.sum.unit} ({$download.avgsum|string_format:"%d"}&nbsp;kbit/s)</B></P>
					</TD>
				</TR>
			</TABLE>
		</TD>
		<TD VALIGN="top" WIDTH="100%">
			<TABLE WIDTH="100%" CELLPADDING="2">
				<TR class="DARK">
					<TD class="FALL" align="center" COLSPAN="2">
						<P><B>{t}Upload{/t}</B></P>
					</TD>
				</TR>
				{section name=upload loop=$upload.name}
				<TR>
					<TD CLASS="fleft" WIDTH="1%" NOWRAP>
						<B><A HREF="?m=core&a=nodeinfo&id={$upload.nodeid[upload]}">{if $showips}{$upload.ipaddr[upload]}{else}{$upload.name[upload]|truncate:32:"..."}{/if}</A></B>
					</TD>
					<TD CLASS="fright" WIDTH="99%" NOWRAP>
						<IMG SRC="modules/traffic/img/bluepx.gif" HEIGHT="12" WIDTH="{$upload.bar[upload]}" BORDER="1" ALT=""> {$upload.data[upload]|string_format:"%.2f"}&nbsp;{$upload.unit[upload]} ({$upload.avg[upload]|string_format:"%d"}&nbsp;kbit/s) 
					</TD>
				</TR>
				{/section}
				<TR class="LIGHT">
					<TD ALIGN="center" CLASS="FALL" COLSPAN="2">
						<P><B>{t}Total:{/t} {$upload.sum.data|string_format:"%.2f "}{$upload.sum.unit} ({$upload.avgsum|string_format:"%d"}&nbsp;kbit/s)</B></P>
					</TD>
				</TR>
			</TABLE>
		</TD>
	</TR>
</TABLE>
{else}
<FORM NAME="traffic" METHOD="POST" ACTION="?m=traffic&a=traffic&bar=user">
<INPUT type="submit" class="hiddenbtn">
<TABLE ALIGN="center" WIDTH="100%" CELLPADDING="3">
	<TR CLASS="dark">
		<TD COLSPAN="3" CLASS="fall">
			<B>{t}Enter search criteria:{/t}</B>
		</TD>
	</TR>
	<TR CLASS="light" {tip text="Limit results to selected period"}>
		<TD WIDTH="1%" CLASS="fleft">
			<IMG src="modules/traffic/img/calendar.gif">
		</TD>
		<TD WIDTH="1%" nowrap>
			<B>{t}From (day/month/year hh:mm):{/t}</B>
		</TD>
		<TD WIDTH="98%" CLASS="fright" nowrap>
			{html_select_date field_array="from" prefix="" time=$starttime field_order="DMY" field_separator=" / " start_year=$startyear end_year=$endyear}
			&nbsp;
			{html_select_time field_array="from" prefix="" time=$starttime display_seconds=0}
		</TD>
	</TR>
	<TR CLASS="light" {tip text="Limit results to selected period"}>
		<TD WIDTH="1%" CLASS="fleft">
			<IMG src="modules/traffic/img/calendar.gif">
		</TD>
		<TD nowrap>
			<B>{t}To (day/month/year hh:mm):{/t}</B>
		</TD>
		<TD CLASS="fright" nowrap>
			{html_select_date field_array="to" prefix="" time=$endtime field_order="DMY" field_separator=" / " start_year=$startyear end_year=$endyear}
			&nbsp;
			{html_select_time field_array="to" prefix="" time=$endtime display_seconds=0}
		</TD>
	</TR>
	<TR CLASS="light" {tip text="Limit results to selected network"}>
		<TD WIDTH="1%" CLASS="fleft">
			<IMG src="modules/traffic/img/network.gif">
		</TD>
		<TD nowrap>
			<B>{t}Network:{/t}</B>
		</TD>
		<TD CLASS="fright">
			<SELECT SIZE="1" NAME="net">
				<OPTION VALUE="allnets">{t}All{/t}</OPTION>
				{section name="netlist" loop=$netlist}
				<OPTION VALUE="{$netlist[netlist].id}">{$netlist[netlist].name|truncate:20:" ..."}</OPTION>
				{/section}
			</SELECT>
		</TD>
	</TR>
	<TR CLASS="light" {tip text="Select results sorting order"}>
		<TD WIDTH="1%" CLASS="fleft">
			<IMG src="img/view.gif">
		</TD>
		<TD nowrap>
			<B>{t}Sorting:{/t}</B>
		</TD>
		<TD CLASS="fright">
			<SELECT SIZE="1" NAME="order">
				<OPTION VALUE="name"{if $trafficorder == "name"} SELECTED{/if}>{t}Node name{/t}</OPTION>
				<OPTION VALUE="ip"{if $trafficorder == "ip"} SELECTED{/if}>{t}Node IP address{/t}</OPTION>
				<OPTION VALUE="nodeid"{if $trafficorder == "nodeid"} SELECTED{/if}>{t}Node number{/t}</OPTION>
				<OPTION VALUE="download"{if $trafficorder == "download"} SELECTED{/if}>{t}Download{/t}</OPTION>
				<OPTION VALUE="upload"{if $trafficorder == "upload"} SELECTED{/if}>{t}Upload{/t}</OPTION>
			</SELECT>
		</TD>
	</TR>
	<TR CLASS="light" {tip text="Limit results to n computers"}>
		<TD WIDTH="1%" CLASS="fleft"></TD>
		<TD nowrap>
			<B>{t}Nodes limit:{/t}</B>
		</TD>
		<TD CLASS="fright">
			<INPUT NAME="limit" SIZE="3"></INPUT>
		</TD>
	</TR>
	<TR CLASS="light" {tip text="Nodes depiction way on charts"}>
		<TD WIDTH="1%" CLASS="fleft"></TD>
		<TD nowrap>
			<B>{t}IP addresses instead of nodes names{/t}</B>
		</TD>
		<TD CLASS="fright">
			<INPUT CLASS="box light" TYPE="checkbox" NAME="showips" VALUE="1"></INPUT>
		</TD>
	</TR>
	<TR CLASS="light">
		<TD COLSPAN="3" ALIGN="right" CLASS="fbottomu">
			<A HREF="javascript:document.traffic.submit();" ACCESSKEY="s">{t}Submit{/t} <IMG SRC="img/save.gif" alt=""></A>
		</TD>
	</TR>
</TABLE>
</FORM>
{/if}
