{assign var=TotalData value=0}
{assign var=TotalWData value=0}
<table border="0" width="100%">
	<tr>
		<td align="center"><img src="draw.php?op=stat" >
{if $weight_field==""}
{else}
<!--	</tr>
	<tr>-->
		<img src="draw.php?op=weight" >
{/if}
	</td></tr>

	<Tr><TD align="center">    <br><br>
	    <table border="1" cellspacing="0" cellpadding="2">
		<tr>
		    <th>{$field}</th><th>{$STRING.INDEX.NumberOfBugs}</th>
		    {if $weight_field==""}
		    {else}
		    	<th> {$STRING.weighted}<br> {$weight_field}</th>
		    {/if}
		</tr>
    {foreach name=outer key=key item=item from=$stats}
		<tr>
		    <th>{$item.label}</th>
		    <td align="center">{$item.data|default:0}</td>
		     {math equation="(x + y)" x=$item.data y=$TotalData assign=TotalData}
		    {if $weight_field==""}
		    {else}
			    <td align="center">{$item.w_data|default:0}</T>
			     {math equation="(x + y)" x=$item.w_data y=$TotalWData assign=TotalWData}
		    {/if}
		</tr>
    {/foreach}
		<tr>
		    <th>{$STRING.totalbugs}</th>
		    	<th align="center"> {$TotalData}</th>
		    {if $weight_field==""}
		    {else}
		    	<th align="center"> {$TotalWData}</th>
		    {/if}
		</tr>
    
	    </table>
	    </TD></tr>
</table>
