<div class="header">{#Stats#}</div>

<script type="text/javascript" src="{$jspath}/chart/json.js"></script>
<script type="text/javascript" src="{$jspath}/chart/chartplugin.js"></script>
<script type="text/javascript" src="{$jspath}/chart/excanvas.js"></script>
<script type="text/javascript" src="{$jspath}/chart/wz_jsgraphics.js"></script>
<script type="text/javascript" src="{$jspath}/chart/chart.js"></script>
<script type="text/javascript" src="{$jspath}/chart/canvaschartpainter.js"></script>
<script type="text/javascript" src="{$jspath}/chart/jgchartpainter.js"></script>



<script language="javascript">
$(document).ready(function(){ldelim}
$('#chartdata')
.chartInit({ldelim}"painterType":"jsgraphics","backgroundColor":"","textColor":"","axesColor":"","yMin":"0","yMax":"","xGrid":"0","yGrid":"15","xLabels":[{#ChartArr#}],"showLegend":false{rdelim})
.chartAdd({ldelim}"label":"{#Stats_Visits#}","type":"Bar","color":"#ff9900","values":[{foreach from=$res_mon item=rd name=m}{if !$rd.Alle}"0"{else}"{$rd.Alle}"{/if}{if !$smarty.foreach.m.last},{/if}{/foreach}]{rdelim})
.chartClear()
.chartDraw();

$('#chartdata_hits')
.chartInit({ldelim}"painterType":"jsgraphics","backgroundColor":"","textColor":"","axesColor":"","yMin":"0","yMax":"","xGrid":"0","yGrid":"15","xLabels":[{#ChartArr#}],"showLegend":false{rdelim})
.chartAdd({ldelim}"label":"{#Stats_Hits#}","type":"Bar","color":"#ccc","values":[{foreach from=$res_mon item=rd name=m}{if !$rd.Hits}"0"{else}"{$rd.Hits}"{/if}{if !$smarty.foreach.m.last},{/if}{/foreach}],"stackedOn":"{#Stats_Visits#}"{rdelim})
.chartClear()
.chartDraw();


$('#chartdata_month')
.chartInit({ldelim}"painterType":"jsgraphics","backgroundColor":"","textColor":"","axesColor":"","yMin":"0","yMax":"","xGrid":"0","yGrid":"15","xLabels":[{foreach from=$res_day item=rd name=m}"{$smarty.foreach.m.index+1}"{if !$smarty.foreach.m.last},{/if}{/foreach}]{rdelim})
.chartAdd({ldelim}"label":"{#Stats_Hits#}","type":"Bar","color":"#ccc","values":[{foreach from=$res_day item=rd name=m}{if !$rd.Hits}"0"{else}"{$rd.Hits}"{/if}{if !$smarty.foreach.m.last},{/if}{/foreach}],"stackedOn":"{#Stats_Visits#}"{rdelim})
.chartClear()
.chartDraw();


$('#chartdata_monthvisits')
.chartInit({ldelim}"painterType":"jsgraphics","backgroundColor":"","textColor":"","axesColor":"","yMin":"0","yMax":"","xGrid":"0","yGrid":"15","xLabels":[{foreach from=$res_day item=rd name=m}"{$smarty.foreach.m.index+1}"{if !$smarty.foreach.m.last},{/if}{/foreach}]{rdelim})
.chartAdd({ldelim}"label":"{#Stats_Visits#}","type":"Bar","color":"#ff9900","values":[{foreach from=$res_day item=rd name=m}{if !$rd.Alle}"0"{else}"{$rd.Alle}"{/if}{if !$smarty.foreach.m.last},{/if}{/foreach}]{rdelim})
.chartClear()
.chartDraw();
{rdelim});


$(document).ready(function(){ldelim}
$('#chartdata_system')
.chartInit({ldelim}"painterType":"jsgraphics","backgroundColor":"","textColor":"","axesColor":"","yMin":"0","yMax":"","xGrid":"0","yGrid":"","xLabels":[""],"showLegend":false{rdelim})
.chartAdd({ldelim}"label":"Windows","type":"Bar","color":"#ccc","values":["{$WIN}"]{rdelim})
.chartAdd({ldelim}"label":"Windows 98","type":"Bar","color":"#eee","values":["{$w98}"]{rdelim})
.chartAdd({ldelim}"label":"Windows XP","type":"Bar","color":"#ff9933","values":["{$XP}"]{rdelim})
.chartAdd({ldelim}"label":"Windows NT","type":"Bar","color":"#cccccc","values":["{$NT}"]{rdelim})
.chartAdd({ldelim}"label":"Windows VISTA","type":"Bar","color":"#0099ff","values":["{$VISTA}"]{rdelim})
.chartAdd({ldelim}"label":"MAC OS","type":"Bar","color":"#fff600","values":["{$MAC}"]{rdelim})
.chartAdd({ldelim}"label":"LINUX","type":"Bar","color":"#00cc00","values":["{$LINUX}"]{rdelim})
.chartAdd({ldelim}"label":"UNIX","type":"Bar","color":"#33ccff","values":["{$UNIX}"]{rdelim})
.chartAdd({ldelim}"label":"Sonstige","type":"Bar","color":"#cc0033","values":["{$OTHER}"]{rdelim})
.chartClear()
.chartDraw();
{rdelim});

</script>
{*.chartAdd({ldelim}"label":"Windows","type":"Bar","color":"#ccc","values":["{$WIN}","{$w98}","{$NT}","{$XP}","{$VISTA}","{$MAC}","{$LINUX}","{$UNIX}","{$OTHER}"]{rdelim})*}

<div class="subheaders">
<form method="post" action="">
<select name="monat" class="input">
{section name=m loop=12}
<option value="{$smarty.section.m.index+1}" {if $smarty.section.m.index+1==$smarty.post.monat}selected="selected"{/if}>{$smarty.section.m.index+1}</option>
{/section}
</select>

<select name="jahr" class="input">
{section name=j loop=$end start=$start}
<option value="{$smarty.section.j.index+1}" {if $smarty.section.j.index+1==$smarty.post.jahr}selected="selected"{/if}>{$smarty.section.j.index+1}</option>
{/section}
</select>

<input type="submit" class="button" value="{#Stats_Button#}">
</form>
</div>

<div class="subheaders">{#Stats_Year#}</div>
<table width="500" border="0" cellpadding="0" cellspacing="1">
<tr>
<td class="row_left"><strong>{#Global_Date#}:</strong></td>
{foreach from=$res_mon item=rd name=m}
<td class="row_left"><small><strong>{$smarty.foreach.m.index+1}.</strong></small></td>
{/foreach}
</tr>
<tr>
<td class="row_right"><strong>{#Stats_Visits#}:</strong></td>
{foreach from=$res_mon item=rd name=m}
{assign var=td value=$smarty.now|date_format:'%m'}
 <td class="row_right" {if $td==$smarty.foreach.m.index+1}style="background:#eee; font-weight:bold"{/if}>
	{if !$rd.Alle}
    	0
    {else}
    	{$rd.Alle}
    {/if}
    
    {if !$smarty.foreach.m.last}{/if}    </td>
{/foreach}
</tr>
</table>
<div id="chartdata" class="chart" style="width: 650px; height: 300px;"></div>
<div id="chartdata_hits" class="chart" style="width: 650px; height: 300px;"></div>

<div class="subheaders">{#Stats_Month#}</div>
<table border="0" cellpadding="0" cellspacing="1">
<tr>
<td class="row_left"><strong>{#Global_Date#}:</strong></td>
{foreach from=$res_day item=rd name=m}
<td class="row_left"><small><strong>{$smarty.foreach.m.index+1}.</strong></small></td>
{/foreach}
</tr>
<tr>
<td class="row_right"><strong>{#Stats_Visits#}:</strong></td>
{foreach from=$res_day item=rd name=m}
{assign var=td value=$smarty.now|date_format:'%d'}
 <td class="row_right" {if $td==$smarty.foreach.m.index+1}style="background:#eee; font-weight:bold"{/if}>
	{if !$rd.Alle}
    	0
    {else}
    	{$rd.Alle}
    {/if}
    
    {if !$smarty.foreach.m.last}{/if}    </td>
{/foreach}
</tr>
</table>
<div id="chartdata_monthvisits" class="chart" style="width: 650px; height: 300px;"></div>
<div id="chartdata_month" class="chart" style="width: 650px; height: 300px;"></div>


<div class="subheaders">{#Stats_Os#}</div>
<div id="chartdata_system" class="chart" style="width: 300px; height: 300px;"></div>