rendered paste body<script type="text/javascript">
var intervals = {
"1 DAY":[
new Option("1 heure",3600)
,new Option("1 jour",86400)
]
,"2 DAY":[
new Option("1 heure",3600)
,new Option("1 jour",86400)
]
};
</script>
<form name="{$current_class->table}" action="" method="post">
<div style="display:table;">
<div style="display:table-row">
<div style="display:table-cell;padding-left:150px;padding-right:6px;padding-bottom:6px;"> Nombre de Jours :
</div>
<div style="display:table-cell;padding-bottom:6px;">
{html_options
style="width:80px"
name=intervalle
selected=$smarty.post.intervalle|default:"1 WEEK"
options=$globals.classes.data->affichage
}
</div>
</div>
<div style="display:table-row">
<div style="display:table-cell;padding-left:150px;padding-right:6px;padding-bottom:6px"> Jusqu'au :
</div>
{assign var=day value=$globals.classes.data->date_("d")}
{assign var=year value=$globals.classes.data->date_("Y")}
{assign var=month value=$globals.classes.data->date_("m")}
<div style="display:table-cell;padding-bottom:6px">
{html_options
name=jours
options=$globals.classes.data->options_date("jours",$smarty.post.mois,$smarty.post.annee)
style="width:75px"
selected=$smarty.post.jours|default:$day
onchange="document.getElementById('pas').options=intervals[this.value];"
}
</div>
<div style="display:table-cell;padding-right:6px;padding-bottom:6px;">
{html_options
name=mois
options=$globals.classes.data->options_date("mois")
selected=$smarty.post.mois|default:$month
style="width:75px"
onchange="submit()"
}
</div>
<div style="display:table-cell;padding-bottom:6px;">
{html_options
name=annee
options=$globals.classes.data->options_date("annee")
selected=$smarty.post.annee|default:$year
style="width:75px"
}
</div>
</div>
<div style="display:table-row">
<div style="display:table-cell;padding-left:150px;padding-right:6px;padding-bottom:6px;"> Pas :
</div>
<div style="display:table-cell;padding-bottom:6px;">
{html_options
name=pas
id=pas
options=$globals.classes.data->pas
selected=$smarty.post.pas
style="width:75px"
}
</div>
</div>
</div>
<table>
<tr>
<td align="center" style="width:500px;padding-left:259px">
<input align="middle" type="submit" value="Afficher le graphe"/>
</td>
<td {popup text="Télécharger les données"}><a href="data.php?event=download&id_point_de_mesure={$id_point_de_mesure}&pas={$smarty.post.pas}&intervalle={$smarty.post.intervalle}&jours={$smarty.post.jours}&mois={$smarty.post.mois}&annee={$smarty.post.annee}&type={$type_graph}"><img src="images/upload.png" /></a></td>
</tr>
</table>
{*if $globals.classes.data->flash_display_accept($smarty.post.intervalle,$smarty.post.pas)*}
<div>
<div id="{$current_class->table}__"><div id="{$current_class->table}_" align="center" style="z-index:4;width:100%"></div></div>
<script type="text/javascript">
/*<![CDATA[*/
{if $type_graph=="consommations"}
var so = new SWFObject("flash/Charts/Column2D.swf", "{$current_class->table}", "800", "500", "8", "#FFFFFF");
so.addVariable("dataXML","{include file="data`$smarty.const.__TEMPLATE_EXTENSION_XML__`" data=$globals.classes.data->data2($id_point_de_mesure,$smarty.post,$type_graph) type="`$type_graph`" assign=x}{$x|escape}");
{else}
var so = new SWFObject("flash/Charts/Line.swf", "{$current_class->table}", "800", "500", "8", "#FFFFFF");
so.addVariable("dataXML","{include file="data`$smarty.const.__TEMPLATE_EXTENSION_XML__`" data=$globals.classes.data->data2($id_point_de_mesure,$smarty.post,$smarty.get.type) type="`$type_graph`" assign=x}{$x|escape}");
{/if}
so.addParam("wmode", "transparent");
so.addParam("chartHeight", "300");
so.write('{$current_class->table}_');
/*]]>*/
</script>
</div>
</div>
{*else*}
<div align="center">
{*assign var=test value=$globals.classes.data->data2($id_point_de_mesure,$smarty.post)*}
{*assign var=chaine value=$globals.classes.data->array2url($test,$smarty.post)*}
{*$globals.log->logger($chaine,0,nbertemont)*}
<!-- <a href="graph.php?id_point_de_mesure={$id_point_de_mesure}&pas={$smarty.post.pas}&intervalle={$smarty.post.intervalle}&jours={$smarty.post.jours}&mois={$smarty.post.mois}&annee={$smarty.post.annee}">img</a>
--> {*png_image src="graph.php?id_point_de_mesure=`$id_point_de_mesure`&pas=`$smarty.post.pas`&intervalle=`$smarty.post.intervalle`&jours=`$smarty.post.jours`&mois=`$smarty.post.mois`&annee=`$smarty.post.annee`" height="368" width="800" *}
</div>
{*/if*}
</form>