function print_summary_table($label, $iparr, $sort = TRUE)
{
    ?>

<h3><?php 
    echo $label;
    ?>
</h3>
<table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="0">
	<tr>
		<td class="listhdrr">IP</td>
		<td class="listhdrr"># States</td>
		<td class="listhdrr">Proto</td>
		<td class="listhdrr"># States</td>
		<td class="listhdrr">Src Ports</td>
		<td class="listhdrr">Dst Ports</td>
	</tr>
<?php 
    if ($sort) {
        uksort($iparr, "sort_by_ip");
    }
    foreach ($iparr as $ip => $ipinfo) {
        ?>
	<tr>
		<td class='vncell'><?php 
        echo $ip;
        ?>
</td>
		<td class='vncell'><?php 
        echo $ipinfo['seen'];
        ?>
</td>
		<td class='vncell'>&nbsp;</td>
		<td class='vncell'>&nbsp;</td>
		<td class='vncell'>&nbsp;</td>
		<td class='vncell'>&nbsp;</td>
	</tr>
	<?php 
        foreach ($ipinfo['protos'] as $proto => $protoinfo) {
            ?>
	<tr>
		<td class='list'>&nbsp;</td>
		<td class='list'>&nbsp;</td>
		<td class='listlr'><?php 
            echo $proto;
            ?>
</td>
		<td class='listr' align="center"><?php 
            echo $protoinfo['seen'];
            ?>
</td>
		<td class='listr' align="center"><span title="<?php 
            echo build_port_info($protoinfo['srcports'], $proto);
            ?>
"><?php 
            echo count($protoinfo['srcports']);
            ?>
</span></td>
		<td class='listr' align="center"><span title="<?php 
            echo build_port_info($protoinfo['dstports'], $proto);
            ?>
"><?php 
            echo count($protoinfo['dstports']);
            ?>
</span></td>
	</tr>
	<?php 
        }
    }
    ?>

</table>

<?php 
}
function print_summary_table($label, $iparr, $sort = TRUE)
{
    if ($sort) {
        uksort($iparr, "sort_by_ip");
    }
    ?>
    <section class="col-xs-12">
      <div class="content-box">
        <header class="content-box-head container-fluid">
          <h3><?php 
    echo $label;
    ?>
</h3>
        </header>
        <div class="table-responsive">
          <table class="table table-striped">
            <tr>
              <td><?php 
    echo gettext("IP");
    ?>
</td>
              <td># <?php 
    echo gettext("States");
    ?>
</td>
              <td><?php 
    echo gettext("Proto");
    ?>
</td>
              <td># <?php 
    echo gettext("States");
    ?>
</td>
              <td><?php 
    echo gettext("Src Ports");
    ?>
</td>
              <td><?php 
    echo gettext("Dst Ports");
    ?>
</td>
            </tr>
    <?php 
    foreach ($iparr as $ip => $ipinfo) {
        ?>
            <tr>
              <td><?php 
        echo $ip;
        ?>
</td>
              <td><?php 
        echo $ipinfo['seen'];
        ?>
</td>
              <td colspan="4">&nbsp;</td>
            </tr>
<?php 
        foreach ($ipinfo['protos'] as $proto => $protoinfo) {
            ?>
        <tr>
          <td colspan="2">&nbsp;</td>
          <td><?php 
            echo $proto;
            ?>
</td>
          <td ><?php 
            echo $protoinfo['seen'];
            ?>
</td>
          <td ><span data-toggle="tooltip" title="<?php 
            echo build_port_info($protoinfo['srcports'], $proto);
            ?>
"><?php 
            echo count($protoinfo['srcports']);
            ?>
</span></td>
          <td ><span data-toggle="tooltip" title="<?php 
            echo build_port_info($protoinfo['dstports'], $proto);
            ?>
"><?php 
            echo count($protoinfo['dstports']);
            ?>
</span></td>
        </tr>
        <?php 
        }
        ?>
      <?php 
    }
    ?>
      </table>
     </div>
   </div>
  </section>
<?php 
}
function print_summary_table($label, $iparr, $sort = TRUE)
{
    if ($sort) {
        uksort($iparr, "sort_by_ip");
    }
    ?>
	<div class="panel panel-default">
		<div class="panel-heading">
			<h2 class="panel-title"><?php 
    echo $label;
    ?>
</h2>
		</div>
		<div class="panel-body">
			<div class="table-responsive">
				<table class="table table-hover table-condensed table-striped">
					<thead>
						<tr>
							<th ><?php 
    echo gettext("IP");
    ?>
</th>
							<th class="text-center"># <?php 
    echo gettext("States");
    ?>
</th>
							<th ><?php 
    echo gettext("Proto");
    ?>
</th>
							<th class="text-center"># <?php 
    echo gettext("States");
    ?>
</th>
							<th class="text-center"><?php 
    echo gettext("Src Ports");
    ?>
</th>
							<th class="text-center"><?php 
    echo gettext("Dst Ports");
    ?>
</th>
						</tr>
					</thead>
					<tbody>
<?php 
    foreach ($iparr as $ip => $ipinfo) {
        $protocolCount = count($ipinfo['protos']);
        $rowSpan = '';
        $i = 0;
        if ($protocolCount > 1) {
            $rowSpan = ' rowspan="' . $protocolCount . '"';
        }
        ?>
						<tr>
							<td<?php 
        echo $rowSpan;
        ?>
><?php 
        echo $ip;
        ?>
</td>
							<td<?php 
        echo $rowSpan;
        ?>
 class="text-center"><?php 
        echo $ipinfo['seen'];
        ?>
</td>

<?php 
        foreach ($ipinfo['protos'] as $proto => $protoinfo) {
            if ($protocolCount > 1 && $i > 0) {
                ?>
							</tr><tr>
<?php 
            }
            ?>
							<td><?php 
            echo $proto;
            ?>
</td>
							<td class="text-center" ><?php 
            echo $protoinfo['seen'];
            ?>
</td>
							<td class="text-center" ><span title="<?php 
            echo build_port_info($protoinfo['srcports'], $proto);
            ?>
"><?php 
            echo count($protoinfo['srcports']);
            ?>
</span></td>
							<td class="text-center" ><span title="<?php 
            echo build_port_info($protoinfo['dstports'], $proto);
            ?>
"><?php 
            echo count($protoinfo['dstports']);
            ?>
</span></td>
<?php 
            $i++;
        }
        ?>
						</tr>
<?php 
    }
    ?>
					</tbody>
				</table>
			</div>
		</div>
	</div>
<?php 
}