NOAACompare et Java sribe
- MAGNUS
- Membre
- Messages : 992
- Inscription : dim. mars 26, 2006 4:44 pm
- Localisation : VIDAUBAN (83) FRANCE
- Contact :
NOAACompare et Java sribe
Bonjour
NOAACompare permet d'afficher, dans les tableaux, les données mini et maxi en chiffres clignotants.
Or, Le navigateur Firefox ne permet plus cette fonction car Java Deployment Toolkit a été bloqué
Y-a-t-il une autre possibilité de corriger ce problème ?
Par avance, merci de votre réponse.
Cordialement.
NOAACompare permet d'afficher, dans les tableaux, les données mini et maxi en chiffres clignotants.
Or, Le navigateur Firefox ne permet plus cette fonction car Java Deployment Toolkit a été bloqué
Y-a-t-il une autre possibilité de corriger ce problème ?
Par avance, merci de votre réponse.
Cordialement.
Station WMR 200 avec XNet_meteo V 2014-10-29a Logiciels:Graphweather V 3.0.16, Noaa Template2, Windows 7
Mon abri météo ici :http://www.vardecouverte.fr/sta%20bc2008.htm
Site Web : http://www.vardecouverte.fr

Mon abri météo ici :http://www.vardecouverte.fr/sta%20bc2008.htm
Site Web : http://www.vardecouverte.fr

- paaubert
- Membre
- Messages : 2624
- Inscription : dim. janv. 17, 2010 7:16 pm
- Localisation : 1555 Villarzel - Switzerland
- Contact :
Re: NOAACompare et Java sribe
Salut,
Ce code fonctionne, mais seulement avec FF
dans le head
<style type="text/css">
@keyframes clignotement { to { visibility : hidden; } }
.monBlink {animation : clignotement 1s steps(2, start) infinite; }
</style>
dans le body
<font class="monBlink" ><b>mon texte</b></font>
Résultat
http://www.boock.ch/meteo/test/test.php
A+
Ce code fonctionne, mais seulement avec FF
dans le head
<style type="text/css">
@keyframes clignotement { to { visibility : hidden; } }
.monBlink {animation : clignotement 1s steps(2, start) infinite; }
</style>
dans le body
<font class="monBlink" ><b>mon texte</b></font>
Résultat
http://www.boock.ch/meteo/test/test.php
A+
_________________________________________________________________________________________________________
Station Vantage Pro2+ avec station agricole - Weatherlink 6.0.3 - GraphWeather 3.0.15b - Cumulus 1.9.4 - Windows W10 ultimate x64
http://www.boock.ch/meteo-villarzel.php

Station Vantage Pro2+ avec station agricole - Weatherlink 6.0.3 - GraphWeather 3.0.15b - Cumulus 1.9.4 - Windows W10 ultimate x64
http://www.boock.ch/meteo-villarzel.php

- ardigier
- Membre
- Messages : 2260
- Inscription : mar. mars 23, 2010 6:05 pm
- Localisation : Le Thor 84250
- Contact :
Re: NOAACompare et Java sribe
Salut PA,
Ce que constate Magnus est aussi vrai chez moi
À l'origine le clignotement des valeurs extrême fonctionnait sur FF mais pas sur IE ou chrome mais depuis quelques jours sur FF cette fonction ne marche plus
Je ne sais pas si l'explication de Magnus est la bonne mais le fait est avéré
Ce que constate Magnus est aussi vrai chez moi
À l'origine le clignotement des valeurs extrême fonctionnait sur FF mais pas sur IE ou chrome mais depuis quelques jours sur FF cette fonction ne marche plus
Je ne sais pas si l'explication de Magnus est la bonne mais le fait est avéré
WMR200 - XNet meteo 2011-10-14a- graphweather V 3.0.35- Win10 x64
webcam installée orientation NE
http://le-thor-meteo.com/index.php
webcam installée orientation NE
http://le-thor-meteo.com/index.php
- paaubert
- Membre
- Messages : 2624
- Inscription : dim. janv. 17, 2010 7:16 pm
- Localisation : 1555 Villarzel - Switzerland
- Contact :
Re: NOAACompare et Java sribe
Salut René,
J'avais bien compris le problème, le code que j'ai mis plus haut n'est pas celui du script de comparaison, mais une autre façon de faire un clignotement sans utiliser la balise blink qui n'est plus supportée par FF
ça fonctionne, regarde avec FF ici
http://www.boock.ch/meteo/test/test.php
ps:
C’est officiel, Firefox ne supporte plus la balise <blink>.
La dernière version du navigateur (Firefox 23), n’implémente pas cette balise HTML qui permet d’ajouter du texte clignotant à une page Web.
La balise <blink> avait été implémentée en premier par Nestcape comme un gag, et sa mise en œuvre initiale avait été émise par un ingénieur de Netscape après une nuit de beuverie à Mountain View, Californie, selon Montulli Lou, développeur chez Netscape.
La balise <blink> était populaire dans les années 90, une époque à laquelle le langage JavaScript et ActiveX n’existaient pas encore et le multimédia était à ses balbutiements. La balise permettait donc d’ajouter un peu de gaité aux pages qui étaient plutôt ternes. Au fil du temps <blink> est devenu inutile et ennuyeux.
A+
J'avais bien compris le problème, le code que j'ai mis plus haut n'est pas celui du script de comparaison, mais une autre façon de faire un clignotement sans utiliser la balise blink qui n'est plus supportée par FF
ça fonctionne, regarde avec FF ici
http://www.boock.ch/meteo/test/test.php
ps:
C’est officiel, Firefox ne supporte plus la balise <blink>.
La dernière version du navigateur (Firefox 23), n’implémente pas cette balise HTML qui permet d’ajouter du texte clignotant à une page Web.
La balise <blink> avait été implémentée en premier par Nestcape comme un gag, et sa mise en œuvre initiale avait été émise par un ingénieur de Netscape après une nuit de beuverie à Mountain View, Californie, selon Montulli Lou, développeur chez Netscape.
La balise <blink> était populaire dans les années 90, une époque à laquelle le langage JavaScript et ActiveX n’existaient pas encore et le multimédia était à ses balbutiements. La balise permettait donc d’ajouter un peu de gaité aux pages qui étaient plutôt ternes. Au fil du temps <blink> est devenu inutile et ennuyeux.
A+
_________________________________________________________________________________________________________
Station Vantage Pro2+ avec station agricole - Weatherlink 6.0.3 - GraphWeather 3.0.15b - Cumulus 1.9.4 - Windows W10 ultimate x64
http://www.boock.ch/meteo-villarzel.php

Station Vantage Pro2+ avec station agricole - Weatherlink 6.0.3 - GraphWeather 3.0.15b - Cumulus 1.9.4 - Windows W10 ultimate x64
http://www.boock.ch/meteo-villarzel.php

- ardigier
- Membre
- Messages : 2260
- Inscription : mar. mars 23, 2010 6:05 pm
- Localisation : Le Thor 84250
- Contact :
Re: NOAACompare et Java sribe
OK merci pour cet éclairage
WMR200 - XNet meteo 2011-10-14a- graphweather V 3.0.35- Win10 x64
webcam installée orientation NE
http://le-thor-meteo.com/index.php
webcam installée orientation NE
http://le-thor-meteo.com/index.php
- MAGNUS
- Membre
- Messages : 992
- Inscription : dim. mars 26, 2006 4:44 pm
- Localisation : VIDAUBAN (83) FRANCE
- Contact :
Re: NOAACompare et Java sribe
Bonjour P-A,paaubert a écrit :Salut,
Ce code fonctionne, mais seulement avec FF
dans le head
<style type="text/css">
@keyframes clignotement { to { visibility : hidden; } }
.monBlink {animation : clignotement 1s steps(2, start) infinite; }
</style>
dans le body
<font class="monBlink" ><b>mon texte</b></font>
Résultat
http://www.boock.ch/meteo/test/test.php
A+
Merci pour cette explication mais sur quelle page je dois marquer ce code ,
Désolé pour mon ignorance.
Cordialement.
Station WMR 200 avec XNet_meteo V 2014-10-29a Logiciels:Graphweather V 3.0.16, Noaa Template2, Windows 7
Mon abri météo ici :http://www.vardecouverte.fr/sta%20bc2008.htm
Site Web : http://www.vardecouverte.fr

Mon abri météo ici :http://www.vardecouverte.fr/sta%20bc2008.htm
Site Web : http://www.vardecouverte.fr

- paaubert
- Membre
- Messages : 2624
- Inscription : dim. janv. 17, 2010 7:16 pm
- Localisation : 1555 Villarzel - Switzerland
- Contact :
Re: NOAACompare et Java sribe
Salut
C'est le fichier procs.inc.php
Je n'ai pas testé, je regarde quand j'ai un moment.
A+
C'est le fichier procs.inc.php
Je n'ai pas testé, je regarde quand j'ai un moment.
A+
_________________________________________________________________________________________________________
Station Vantage Pro2+ avec station agricole - Weatherlink 6.0.3 - GraphWeather 3.0.15b - Cumulus 1.9.4 - Windows W10 ultimate x64
http://www.boock.ch/meteo-villarzel.php

Station Vantage Pro2+ avec station agricole - Weatherlink 6.0.3 - GraphWeather 3.0.15b - Cumulus 1.9.4 - Windows W10 ultimate x64
http://www.boock.ch/meteo-villarzel.php

Re: NOAACompare et Java sribe
Bonjour
celui la pour Firefox dans le head
<style>
@keyframes blink {
0% { opacity:1; }
75% { opacity:1; }
76% { opacity:0; }
100% { opacity:0; }
}
blink {
text-decoration: inherit;
animation: blink 0.50s ease-in infinite alternate;
}
</style>
et celui là pour IE dans le head
<script type="text/javascript">
if ( document.all )
{
function blink_show()
{
blink_tags = document.all.tags('blink');
blink_count = blink_tags.length;
for ( i = 0; i < blink_count; i++ )
{
blink_tags.style.visibility = 'visible';
}
window.setTimeout( 'blink_hide()', 700 );
}
function blink_hide()
{
blink_tags = document.all.tags('blink');
blink_count = blink_tags.length;
for ( i = 0; i < blink_count; i++ )
{
blink_tags.style.visibility = 'hidden';
}
window.setTimeout( 'blink_show()', 250 );
}
window.onload = blink_show;
}
</script>
ça fonctionne moi j'ai mis les deux rien d'autre à changer
celui la pour Firefox dans le head
<style>
@keyframes blink {
0% { opacity:1; }
75% { opacity:1; }
76% { opacity:0; }
100% { opacity:0; }
}
blink {
text-decoration: inherit;
animation: blink 0.50s ease-in infinite alternate;
}
</style>
et celui là pour IE dans le head
<script type="text/javascript">
if ( document.all )
{
function blink_show()
{
blink_tags = document.all.tags('blink');
blink_count = blink_tags.length;
for ( i = 0; i < blink_count; i++ )
{
blink_tags.style.visibility = 'visible';
}
window.setTimeout( 'blink_hide()', 700 );
}
function blink_hide()
{
blink_tags = document.all.tags('blink');
blink_count = blink_tags.length;
for ( i = 0; i < blink_count; i++ )
{
blink_tags.style.visibility = 'hidden';
}
window.setTimeout( 'blink_show()', 250 );
}
window.onload = blink_show;
}
</script>
ça fonctionne moi j'ai mis les deux rien d'autre à changer
-
- Membre
- Messages : 111
- Inscription : jeu. avr. 10, 2008 3:37 pm
- Localisation : St Laurent de la Salanque
- Contact :
Re: NOAACompare et Java sribe
Bonjour,
Impeccable pour moi cela fonctionne comme avant avec Firefox.
Impeccable pour moi cela fonctionne comme avant avec Firefox.
Station Davis VP2+, Fichiers CSV générés par logiciel perso, GW V3.0.35
http://meteo-st-laurent66250.lescigales.org/

http://meteo-st-laurent66250.lescigales.org/

- paaubert
- Membre
- Messages : 2624
- Inscription : dim. janv. 17, 2010 7:16 pm
- Localisation : 1555 Villarzel - Switzerland
- Contact :
Re: NOAACompare et Java sribe
Bonjour Gérard
effectivement, plus simple à mettre en œuvre et fonctionne parfaitement.
Merci et @+
effectivement, plus simple à mettre en œuvre et fonctionne parfaitement.
Merci et @+
_________________________________________________________________________________________________________
Station Vantage Pro2+ avec station agricole - Weatherlink 6.0.3 - GraphWeather 3.0.15b - Cumulus 1.9.4 - Windows W10 ultimate x64
http://www.boock.ch/meteo-villarzel.php

Station Vantage Pro2+ avec station agricole - Weatherlink 6.0.3 - GraphWeather 3.0.15b - Cumulus 1.9.4 - Windows W10 ultimate x64
http://www.boock.ch/meteo-villarzel.php

- MAGNUS
- Membre
- Messages : 992
- Inscription : dim. mars 26, 2006 4:44 pm
- Localisation : VIDAUBAN (83) FRANCE
- Contact :
Re: NOAACompare et Java sribe
Bonjour,
Je suis nul en programmation, et ne sais pas ou placer le code dans le fichier procs.inc.php
J'ai à chaque fois une erreur à la ligne correspondant au début du code
Pourriez-vous me le préciser ou me transmettre le fichier procs.inc.php
Je vous remercie par avance.
Cordialement.
Je suis nul en programmation, et ne sais pas ou placer le code dans le fichier procs.inc.php
J'ai à chaque fois une erreur à la ligne correspondant au début du code
Pourriez-vous me le préciser ou me transmettre le fichier procs.inc.php
Je vous remercie par avance.
Cordialement.
Dernière modification par MAGNUS le sam. sept. 21, 2013 8:56 am, modifié 1 fois.
Station WMR 200 avec XNet_meteo V 2014-10-29a Logiciels:Graphweather V 3.0.16, Noaa Template2, Windows 7
Mon abri météo ici :http://www.vardecouverte.fr/sta%20bc2008.htm
Site Web : http://www.vardecouverte.fr

Mon abri météo ici :http://www.vardecouverte.fr/sta%20bc2008.htm
Site Web : http://www.vardecouverte.fr

Re: NOAACompare et Java sribe
Bonjour
entre <head> et </head> au début de la page ligne 12
entre <head> et </head> au début de la page ligne 12
- MAGNUS
- Membre
- Messages : 992
- Inscription : dim. mars 26, 2006 4:44 pm
- Localisation : VIDAUBAN (83) FRANCE
- Contact :
Re: NOAACompare et Java sribe
Bonjour g9300_1,g9300_1 a écrit :Bonjour
entre <head> et </head> au début de la page ligne 12
Au début de la ligne 12 j'ai une erreuer qui s'affiche :
Parse error: syntax error, unexpected '<' in C:\wamp\www\METEO VARDECOUVERTE\NOAAcompare\procs.inc.php on line 12
Voici le début de code du fichier procs.php :
<?php
## contraste color ty bgcolor
function convertColor($color){
$r=hexdec(substr($color,1,2))*0.30;
$v=hexdec(substr($color,3,2))*0.54;
$b=hexdec(substr($color,5,2))*0.2;
if(($r+$v+$b) < 127.5){ $col1="#ffffff";} else { $col1="#000000";}
$style="$color;color:$col1";
return $style;
<head>
<style>
@keyframes blink {
0% { opacity:1; }
75% { opacity:1; }
76% { opacity:0; }
100% { opacity:0; }
}
blink {
text-decoration: inherit;
animation: blink 0.50s ease-in infinite alternate;
}
</style>
</head>
}
## couleur en fonction de la temp
function gettempcolor($temp)
{
$value = 38; #valeure max de la légende
$colorisetemp = array (
"#A00031",
"#800027",
"#802100",
"#A00000",
Station WMR 200 avec XNet_meteo V 2014-10-29a Logiciels:Graphweather V 3.0.16, Noaa Template2, Windows 7
Mon abri météo ici :http://www.vardecouverte.fr/sta%20bc2008.htm
Site Web : http://www.vardecouverte.fr

Mon abri météo ici :http://www.vardecouverte.fr/sta%20bc2008.htm
Site Web : http://www.vardecouverte.fr

Re: NOAACompare et Java sribe
voici mon fichier procs.php
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript">
function blinker(id,c1,c2)
{
elm = document.getElementById(id);
setTimeout(function() {setInterval(function () {elm.style.color=c1;},1000);},500);
setInterval(function () {elm.style.color=c2;},1000);
}
</script>
<style>
@keyframes blink {
0% { opacity:1; }
75% { opacity:1; }
76% { opacity:0; }
100% { opacity:0; }
}
blink {
text-decoration: inherit;
animation: blink 0.50s ease-in infinite alternate;
}
</style>
<script type="text/javascript">
if ( document.all )
{
function blink_show()
{
blink_tags = document.all.tags('blink');
blink_count = blink_tags.length;
for ( i = 0; i < blink_count; i++ )
{
blink_tags.style.visibility = 'visible';
}
window.setTimeout( 'blink_hide()', 700 );
}
function blink_hide()
{
blink_tags = document.all.tags('blink');
blink_count = blink_tags.length;
for ( i = 0; i < blink_count; i++ )
{
blink_tags.style.visibility = 'hidden';
}
window.setTimeout( 'blink_show()', 250 );
}
window.onload = blink_show;
}
</script>
</head>
<?php
## contraste color ty bgcolor
function convertColor($color){
$r=hexdec(substr($color,1,2))*0.30;
$v=hexdec(substr($color,3,2))*0.54;
$b=hexdec(substr($color,5,2))*0.2;
if(($r+$v+$b) < 127.5){ $col1="#ffffff";} else { $col1="#000000";}
$style="$color;color:$col1";
return $style;
}
## couleur en fonction de la temp
function gettempcolor($temp)
{
$value = 38; #valeure max de la légende
$colorisetemp = array (
"#A00031",
"#800027",
"#802100",
"#A00000",
"#C00000",
"#E00000",
"#ff0101",
"#FF4141",
"#FF6161",
"#FF8A61",
"#FFB361",
"#FFDC61",
"#F9FF61",
"#D1FF61",
"#A8FF61",
"#61FF6C",
"#61FF95",
"#61FFE7",
"#61EEFF",
"#61C5FF",
"#619CFF",
"#7C8AF8",
"#7761FF",
"#A061FF",
"#C961FF",
"#FF61E3",
"#FF61BA",
"#FF6191",
"#FF417B",
"#FF2165",
);
if ($temp >= 38){$color = $colorisetemp[0];}
elseif ($temp < -18){$color = $colorisetemp[count($colorisetemp)-1];}
else {
for ($i=1;$i<count($colorisetemp)-1;$i++)
{
$value2 = $value - 2;
if ($temp < $value && $temp >= $value2 )
{$color = $colorisetemp[$i];}
$value = $value - 2;
}
}
$ret=convertColor($color);
return $ret;
}
## couleur en fonction de la direction du vent
function getdircolor($dir)
{
$dircolors = array(
"N"=>"161,172,255",
"NNE"=>"199,161,255",
"NE"=>"223,161,255",
"ENE"=>"174,161,255",
"E"=>"209,193,232",
"ESE"=>"168,255,97",
"SE"=>"251,255,129",
"SSE"=>"255,227,129",
"S"=>"255,161,161",
"SSO"=>"255,185,161",
"SO"=>"255,210,161",
"OSO"=>"252,255,161",
"O"=>"227,255,161",
"ONO"=>"161,255,168",
"NO"=>"161,255,216",
"NNO"=>"161,221,255"
);
return $dircolors[$dir];
}
## couleur en fonction de la quantité de pluie
function getpluiecolor($rain){
if($rain >= '0.2' && $rain <= '1') {$color='#00fe96';}
elseif($rain > '1' && $rain <= '2.5') {$color='#00fefe';}
elseif($rain > '2.5' && $rain <= '5') {$color='#00c8fe';}
elseif($rain > '5' && $rain <= '7.5') {$color='#0096fe'; }
elseif($rain > '7.5' && $rain <= '10') {$color='#0064fe'; }
elseif($rain > '10' && $rain <= '15') {$color='#3200fe'; }
elseif($rain > '15' && $rain <= '30') {$color='#6400fe';}
elseif($rain > '30' && $rain <= '60') {$color='#9600fe'; }
elseif($rain > '60' && $rain <= '100') {$color='#c800fe'; }
elseif($rain > '100') {$color='#640064';}
else {$color='';}
$ret=convertColor($color);
return $ret;
}
## couleur en fonction de la vitesse du vent
function getventcolor($rafales){
#colorisation vent
if($rafales < '10' ) {$color='#ffffff';}
elseif($rafales >= '10' && $rafales < '20') {$color='#ebebeb';}
elseif($rafales >= '20' && $rafales < '30') {$color='#d7d7d7';}
elseif($rafales >= '30' && $rafales < '40') {$color='#c4c4c4'; }
elseif($rafales >= '40' && $rafales < '50') {$color='#afafaf'; }
elseif($rafales >= '50' && $rafales < '60') {$color='#AB8787'; }
elseif($rafales >= '60' && $rafales < '70') {$color='#D07676';}
elseif($rafales >= '70' ) {$color='#ff0000'; }
else {$color='#222222';}
return $color;
}
##Récupération du minimum d'un tableau
function getmin($arrayvar){
$set="";
$min="";
for($i=0;$i<sizeof($arrayvar);$i++){
if($arrayvar[$i]!="" && $set!=1){$min= $arrayvar[$i]; $set=1;}
if($arrayvar[$i]<$min && $arrayvar[$i]!=""){$min=$arrayvar[$i];}
}
return $min;
}
##Récupération du maxiimum d'un tableau
function getmax($arrayvar){
$max="";
$arrayvar[0]=$max;
for($i=0;$i<sizeof($arrayvar);$i++){
if($arrayvar[$i]>$max && $arrayvar[$i]!=""){$max=$arrayvar[$i];}
}
return $max;
}
##*****************************
function comptemax($arrayvar,$trigger,$trigger2){
$max=0;
for($i=0;$i<sizeof($arrayvar);$i++){
if($arrayvar[$i]>$trigger && $arrayvar[$i]<=$trigger2 && $arrayvar[$i]!=""){$max++;}
}
return $max;
}
##*****************************
function comptemin($arrayvar,$trigger,$trigger2){
$max=0;
for($i=0;$i<sizeof($arrayvar);$i++){
if($arrayvar[$i]<$trigger && $arrayvar[$i]!=""){$min++;}
}
return $min;
}
##récupération de l'indice du jour correspondant au maxi d'un tableau
function getJmax($arrayvar){
$max="";
$imax="";
for($i=0;$i<sizeof($arrayvar);$i++)
{
if($arrayvar[$i]>$max){$max=$arrayvar[$i]; $imax=$i+1;}
}
$imx = substr((100+$imax),1,2);
return $imx;
}
##*****************************
function cptmin($arrayvar,$trig1,$trig2){
$min=0;
for($i=0;$i<sizeof($arrayvar);$i++){
if($arrayvar[$i]<=$trig1 && $arrayvar[$i]>$trig2){$min++;}
}
return $min;
}
##*****************************
##*****************************
function cptmax($arrayvar,$trig1,$trig2){
$max=0;
for($i=0;$i<sizeof($arrayvar);$i++){
if($arrayvar[$i]>=$trig1 && $arrayvar[$i]<$trig2){$max++;}
}
return $max;
}
##Coloration de la ligne correspondant au maxi
function ismaxa($arr,$val){
$gras="";
if (max($arr)==$val){
$gras=" ;font-weight:900;color:blue;font-style: italic;";}
return $gras;
}
##*****************************#
##*********color black*********
function ismaxa1($arr,$val){
$gras="";
if (max($arr)==$val){$gras=" ;font-weight:900;font-style: italic;color:black";}
return $gras;
}
##*****************************#
##colorisation de la cellule correspondant à la valeur mini d'un tableau
##les valeurs à 0 integer, pour être comparables doivent être formatées
##avec un 0 décimal !!!
function ismina($arr,$val){
$mini=100;
$gras="";
for ($z=1;$z<=count($arr)-1;$z++)
{
if ($arr[$z]<=$mini){$mini=$arr[$z];}
}
if ($val==$mini){$gras=" ;font-weight:900;color:navy;font-style: italic;";}
return $gras;
}
####test**********************
####test**********************
####test**********************
####test**********************
####test**********************
function myminmax($arr,$val){
$mini=100;
$maxi=-100;
$gras="";
for ($z=0;$z<=count($arr)-1;$z++)
{
if (($arr[$z]!="") && ($arr[$z]<=$mini)){$mini=$arr[$z];}
if (($arr[$z]!="") && ($arr[$z]>=$maxi)){$maxi=$arr[$z];}
}
if ($val==$mini){$gras="<span style='font-weight:bold;color: black;font-style: italic;'><blink>".$val."</blink></span> ";}
elseif ($val==$maxi){$gras="<span style='font-weight:bold;color:black;font-style: italic;'><blink>$val</blink></span> ";}
else $gras=$val;
return $gras;
}
####test**********************
function mymin($arr,$val){
$mini=100;
$gras="";
for ($z=0;$z<=count($arr)-1;$z++)
{
if (($arr[$z]!="") && ($arr[$z]<=$mini)){$mini=$arr[$z];}
}
if ($val==$mini){$gras="<span style='font-weight:bold;color: black;font-style: italic;'><blink>".$val."</blink></span> ";}
else $gras=$val;
return $gras;
}
####test**********************
function mymax($arr,$val){
$maxi=-100;
$gras="";
for ($z=0;$z<=count($arr)-1;$z++)
{
if (($arr[$z]!="") && ($arr[$z]>=$maxi)){$maxi=$arr[$z];}
}
if ($val==$maxi){$gras="<span style='font-weight:bold;color:black;font-style: italic;'><blink>$val</blink></span> ";}
else $gras=$val;
return $gras;
}
####test**********************
####test**********************
####test**********************
####test**********************
####test**********************
##*****************************
function gtmois($m)
{
global $tabmois;
global $tabmois1;
switch ($m) {
case $tabmois[0]:
$mA=$tabmois1[0];
break;
case $tabmois[1]:
$mA=$tabmois1[1];
break;
case $tabmois[2]:
$mA=$tabmois1[2];
break;
case $tabmois[3]:
$mA=$tabmois1[3];
break;
case $tabmois[4]:
$mA=$tabmois1[4];
break;
case $tabmois[5]:
$mA=$tabmois1[5];
break;
case $tabmois[6]:
$mA=$tabmois1[6];
break;
case $tabmois[7]:
$mA=$tabmois1[7];
break;
case $tabmois[8]:
$mA=$tabmois1[8];
break;
case $tabmois[9]:
$mA=$tabmois1[9];
break;
case $tabmois[10]:
$mA=$tabmois1[10];
break;
case $tabmois[11]:
$mA=$tabmois1[11];
break;
}
return $mA;
}
##*****************************
function getmoy($arrayvar){
$moy=0;
for($i=0;$i<sizeof($arrayvar);$i++){
if($arrayvar[$i]!=""){$cnt++;}
}
$moy = round(array_sum($arrayvar) / $cnt,1);
return $moy;
}
function getStats($file){
$typefile = searchFile($file);
if($typefile=="month"){
list($jour,$meantemp,$hightemp,$hourhighttemp,$lowtemp,$hourlowtemp,$rain,$ventmoyen,$rafales,$hourrafales,$domdir) = parseFile($file);
$tn = getmin($lowtemp);
$tx = getmax($hightemp);
$wx = getmax($rafales);
$rx = getmax($rain);
$rs = array_sum($rain);
$tm = getmoy($meantemp);
$wm = getmoy($ventmoyen);
$dr = getrec($domdir);
$tmx = getmax($meantemp);
$tmn = getmin($meantemp);
return array($tn,$tx,$wx,$rx,$rs,$tm,$wm,$dr,$tmx,$tmn);
}
if($typefile=="year"){
global $moistxt;
list($annee,$mois,$meanmax,$meanmin,$meantemp,$hightemp,$datehighttemp,$lowtemp,$datelowtemp,$gel,$rain,$maxrain,$ventmoyen,$rafales,$domdir)=parseFile($file);
$tn = getmin($lowtemp);
$tx = getmax($hightemp);
$tnm = getmoy($meanmin);
$txm = getmoy($meanmax);
$tnmn = getmin($meanmin);
$txmx = getmax($meanmax);
$tmx = getmax($meantemp);
$tmn = getmin($meantemp);
$wx = getmax($rafales);
$rx = getmax($rain);
$rxj = getmax($maxrain);
$rs = array_sum($rain);
$tm = getmoy($meantemp);
$wm = getmoy($ventmoyen);
$dr = getrec($domdir);
return array($tn,$tx,$tnm,$txm,$tnmn,$txmx,$tmx,$tmn,$wx,$rx,$rxj,$rs,$tm,$wm,$dr);
}
}
function afficheTable($file){
if($file==""){echo "selectionnez un rapport à afficher"; return;}
$url = $_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
$sep = explode("/",$url);
for($i=0;$i<sizeof($sep)-1;$i++){
$lien .=$sep[$i]."/" ;
}
$typefile = searchFile($file,$data);
if($typefile=="year"){
global $moistxt;
list($annee,$mois,$meanmax,$meanmin,$meantemp,$hightemp,$datehighttemp,$lowtemp,$datelowtemp,$gel,$rain,$maxrain,$ventmoyen,$rafales,$domdir)=parseFile($file);
$legx = array_values($moistxt);
array_shift($legx);
$tn = getmin($lowtemp);
$tx = getmax($hightemp);
$tnm = getmoy($meanmin);
$txm = getmoy($meanmax);
$tnmn = getmin($meanmin);
$txmx = getmax($meanmax);
$tmx = getmax($meantemp);
$tmn = getmin($meantemp);
$wx = getmax($rafales);
$rx = getmax($rain);
$rxj = getmax($maxrain);
$rs = array_sum($rain);
$tm = getmoy($meantemp);
$wm = getmoy($ventmoyen);
$dr = getrec($domdir);
echo "
<table style=\"border:1px solid #ccd3e0\">
<caption style=\"color:#303D58\">Tableau récapitulatif pour ".gettitre($file)."</caption>
<tr style='background:#ccd3e0;'>
<td colspan='6' style='text-align:center;'><b>TEMPERATURES</b></td>
<td colspan='3' style='text-align:center;'><b>VENT</b></td>
<td colspan='3' style='text-align:center;'><b>PRECIPITATIONS</b></td></tr>
<tr style='background:#ccd3e0;'>
<td rowspan='2'><b>Mois</b></td>
<td colspan='2'><b>Températures min</b></td>
<td colspan='2'><b>Températures max</b></td>
<td rowspan='2'><b>Moyenne <br/>mensuelle</b></td>
<td rowspan='2'><b>Vent<br/>moyen</b></td>
<td rowspan='2'><b>Rafales max</b></td>
<td rowspan='2'><b>Secteur<br/> dominant</b></td>
<td rowspan='2'><b>Cumul</b></td>
<td rowspan='2'><b>Max en<br/>un jour</b></td>
</tr>
<tr style='background:#ccd3e0;'>
<td>Tn absolue</td>
<td>Tn moyenne</td>
<td>Tx absolue</td>
<td>Tx moyenne</td>
</tr>\n";
for ($i=0;$i<sizeof($legx);$i++){
echo"<tr>\n";
echo "<td style=\"background:#ccd3e0\">$legx[$i]</td>\n";
if($lowtemp[$i]!=""){echo "<td style=\"background:".gettempcolor($lowtemp[$i]).""; if($lowtemp[$i]==$tn){echo"; font-weight:bold";} echo"\">$lowtemp[$i] °C</td>\n";}else{echo "<td>---</td>\n";}
if($meanmin[$i]!=""){echo "<td style=\"background:".gettempcolor($meanmin[$i]).""; if($meanmin[$i]==$tnmn){echo"; font-weight:bold";} echo"\">$meanmin[$i] °C</td>\n";}else{echo "<td>---</td>\n";}
if($hightemp[$i]!=""){echo "<td style=\"background:".gettempcolor($hightemp[$i]).""; if($hightemp[$i]==$tx){echo"; font-weight:bold";} echo"\">$hightemp[$i] °C</td>\n";}else{echo "<td>---</td>\n";}
if($meanmax[$i]!=""){echo "<td style=\"background:".gettempcolor($meanmax[$i]).""; if($meanmax[$i]==$txmx){echo"; font-weight:bold";} echo"\">$meanmax[$i] °C</td>\n";}else{echo "<td>---</td>\n";}
if($meantemp[$i]!=""){echo "<td style=\"background:".gettempcolor($meantemp[$i]).""; if($meantemp[$i]==$tmn or $meantemp[$i]==$tmx){echo"; font-weight:bold";} echo"\">$meantemp[$i] °C</td>\n";}else{echo "<td>---</td>\n";}
if($ventmoyen[$i]!=""){echo "<td style=\"background:".getventcolor($ventmoyen[$i]*10).""; if($ventmoyen[$i]==$hw){echo"; font-weight:bold";} echo"\">$ventmoyen[$i] km/h </td>\n";}else{echo "<td>---</td>\n";}
if($rafales[$i]!=""){echo "<td style=\"background:".getventcolor($rafales[$i]).""; if($rafales[$i]==$wx){echo"; font-weight:bold";} echo"\">$rafales[$i] km/h </td>\n";}else{echo "<td>---</td>\n";}
if($domdir[$i]!=""){echo "<td style=\"background:RGB(".getdircolor($domdir[$i]).")\"><img style=\"height:10px\" src=\"http://".$lien."pics/$domdir[$i].gif\" alt=\"$domdir[$i]\"/> $domdir[$i]</td>\n";}else{echo "<td>---</td>\n";}
if($rain[$i]!=""){echo "<td style=\"background:".getpluiecolor($rain[$i]).""; if($rain[$i]==$rx){echo"; font-weight:bold";} echo"\">$rain[$i] mm</td>\n";}else{echo "<td>---</td>\n";}
if($maxrain[$i]!=""){echo "<td style=\"background:".getpluiecolor($maxrain[$i]).""; if($maxrain[$i]==$rxj){echo"; font-weight:bold";} echo"\">$maxrain[$i] mm</td>\n";}else{echo "<td>---</td>\n";}
}
echo "</tr>\n";
echo "<tr style='background:#ccd3e0'>\n<td style='font-weight:bold'>Total</td>\n<td>$tn °C</td>\n<td>$tnm °C</td>\n<td>$tx °C</td>\n<td>$txm °C</td>\n<td> $tm °C</td>\n<td>$wm km/h</td>\n<td>$wx km/h</td>\n<td><img style=\"height:10px\" src=\"http://".$lien."pics/$dr.gif\" alt=\"$dr\"/> $dr</td>\n<td>$rs mm</td>\n<td>$rxj mm</td>\n</tr>\n";
echo "</table>\n";
}
}
?>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript">
function blinker(id,c1,c2)
{
elm = document.getElementById(id);
setTimeout(function() {setInterval(function () {elm.style.color=c1;},1000);},500);
setInterval(function () {elm.style.color=c2;},1000);
}
</script>
<style>
@keyframes blink {
0% { opacity:1; }
75% { opacity:1; }
76% { opacity:0; }
100% { opacity:0; }
}
blink {
text-decoration: inherit;
animation: blink 0.50s ease-in infinite alternate;
}
</style>
<script type="text/javascript">
if ( document.all )
{
function blink_show()
{
blink_tags = document.all.tags('blink');
blink_count = blink_tags.length;
for ( i = 0; i < blink_count; i++ )
{
blink_tags.style.visibility = 'visible';
}
window.setTimeout( 'blink_hide()', 700 );
}
function blink_hide()
{
blink_tags = document.all.tags('blink');
blink_count = blink_tags.length;
for ( i = 0; i < blink_count; i++ )
{
blink_tags.style.visibility = 'hidden';
}
window.setTimeout( 'blink_show()', 250 );
}
window.onload = blink_show;
}
</script>
</head>
<?php
## contraste color ty bgcolor
function convertColor($color){
$r=hexdec(substr($color,1,2))*0.30;
$v=hexdec(substr($color,3,2))*0.54;
$b=hexdec(substr($color,5,2))*0.2;
if(($r+$v+$b) < 127.5){ $col1="#ffffff";} else { $col1="#000000";}
$style="$color;color:$col1";
return $style;
}
## couleur en fonction de la temp
function gettempcolor($temp)
{
$value = 38; #valeure max de la légende
$colorisetemp = array (
"#A00031",
"#800027",
"#802100",
"#A00000",
"#C00000",
"#E00000",
"#ff0101",
"#FF4141",
"#FF6161",
"#FF8A61",
"#FFB361",
"#FFDC61",
"#F9FF61",
"#D1FF61",
"#A8FF61",
"#61FF6C",
"#61FF95",
"#61FFE7",
"#61EEFF",
"#61C5FF",
"#619CFF",
"#7C8AF8",
"#7761FF",
"#A061FF",
"#C961FF",
"#FF61E3",
"#FF61BA",
"#FF6191",
"#FF417B",
"#FF2165",
);
if ($temp >= 38){$color = $colorisetemp[0];}
elseif ($temp < -18){$color = $colorisetemp[count($colorisetemp)-1];}
else {
for ($i=1;$i<count($colorisetemp)-1;$i++)
{
$value2 = $value - 2;
if ($temp < $value && $temp >= $value2 )
{$color = $colorisetemp[$i];}
$value = $value - 2;
}
}
$ret=convertColor($color);
return $ret;
}
## couleur en fonction de la direction du vent
function getdircolor($dir)
{
$dircolors = array(
"N"=>"161,172,255",
"NNE"=>"199,161,255",
"NE"=>"223,161,255",
"ENE"=>"174,161,255",
"E"=>"209,193,232",
"ESE"=>"168,255,97",
"SE"=>"251,255,129",
"SSE"=>"255,227,129",
"S"=>"255,161,161",
"SSO"=>"255,185,161",
"SO"=>"255,210,161",
"OSO"=>"252,255,161",
"O"=>"227,255,161",
"ONO"=>"161,255,168",
"NO"=>"161,255,216",
"NNO"=>"161,221,255"
);
return $dircolors[$dir];
}
## couleur en fonction de la quantité de pluie
function getpluiecolor($rain){
if($rain >= '0.2' && $rain <= '1') {$color='#00fe96';}
elseif($rain > '1' && $rain <= '2.5') {$color='#00fefe';}
elseif($rain > '2.5' && $rain <= '5') {$color='#00c8fe';}
elseif($rain > '5' && $rain <= '7.5') {$color='#0096fe'; }
elseif($rain > '7.5' && $rain <= '10') {$color='#0064fe'; }
elseif($rain > '10' && $rain <= '15') {$color='#3200fe'; }
elseif($rain > '15' && $rain <= '30') {$color='#6400fe';}
elseif($rain > '30' && $rain <= '60') {$color='#9600fe'; }
elseif($rain > '60' && $rain <= '100') {$color='#c800fe'; }
elseif($rain > '100') {$color='#640064';}
else {$color='';}
$ret=convertColor($color);
return $ret;
}
## couleur en fonction de la vitesse du vent
function getventcolor($rafales){
#colorisation vent
if($rafales < '10' ) {$color='#ffffff';}
elseif($rafales >= '10' && $rafales < '20') {$color='#ebebeb';}
elseif($rafales >= '20' && $rafales < '30') {$color='#d7d7d7';}
elseif($rafales >= '30' && $rafales < '40') {$color='#c4c4c4'; }
elseif($rafales >= '40' && $rafales < '50') {$color='#afafaf'; }
elseif($rafales >= '50' && $rafales < '60') {$color='#AB8787'; }
elseif($rafales >= '60' && $rafales < '70') {$color='#D07676';}
elseif($rafales >= '70' ) {$color='#ff0000'; }
else {$color='#222222';}
return $color;
}
##Récupération du minimum d'un tableau
function getmin($arrayvar){
$set="";
$min="";
for($i=0;$i<sizeof($arrayvar);$i++){
if($arrayvar[$i]!="" && $set!=1){$min= $arrayvar[$i]; $set=1;}
if($arrayvar[$i]<$min && $arrayvar[$i]!=""){$min=$arrayvar[$i];}
}
return $min;
}
##Récupération du maxiimum d'un tableau
function getmax($arrayvar){
$max="";
$arrayvar[0]=$max;
for($i=0;$i<sizeof($arrayvar);$i++){
if($arrayvar[$i]>$max && $arrayvar[$i]!=""){$max=$arrayvar[$i];}
}
return $max;
}
##*****************************
function comptemax($arrayvar,$trigger,$trigger2){
$max=0;
for($i=0;$i<sizeof($arrayvar);$i++){
if($arrayvar[$i]>$trigger && $arrayvar[$i]<=$trigger2 && $arrayvar[$i]!=""){$max++;}
}
return $max;
}
##*****************************
function comptemin($arrayvar,$trigger,$trigger2){
$max=0;
for($i=0;$i<sizeof($arrayvar);$i++){
if($arrayvar[$i]<$trigger && $arrayvar[$i]!=""){$min++;}
}
return $min;
}
##récupération de l'indice du jour correspondant au maxi d'un tableau
function getJmax($arrayvar){
$max="";
$imax="";
for($i=0;$i<sizeof($arrayvar);$i++)
{
if($arrayvar[$i]>$max){$max=$arrayvar[$i]; $imax=$i+1;}
}
$imx = substr((100+$imax),1,2);
return $imx;
}
##*****************************
function cptmin($arrayvar,$trig1,$trig2){
$min=0;
for($i=0;$i<sizeof($arrayvar);$i++){
if($arrayvar[$i]<=$trig1 && $arrayvar[$i]>$trig2){$min++;}
}
return $min;
}
##*****************************
##*****************************
function cptmax($arrayvar,$trig1,$trig2){
$max=0;
for($i=0;$i<sizeof($arrayvar);$i++){
if($arrayvar[$i]>=$trig1 && $arrayvar[$i]<$trig2){$max++;}
}
return $max;
}
##Coloration de la ligne correspondant au maxi
function ismaxa($arr,$val){
$gras="";
if (max($arr)==$val){
$gras=" ;font-weight:900;color:blue;font-style: italic;";}
return $gras;
}
##*****************************#
##*********color black*********
function ismaxa1($arr,$val){
$gras="";
if (max($arr)==$val){$gras=" ;font-weight:900;font-style: italic;color:black";}
return $gras;
}
##*****************************#
##colorisation de la cellule correspondant à la valeur mini d'un tableau
##les valeurs à 0 integer, pour être comparables doivent être formatées
##avec un 0 décimal !!!
function ismina($arr,$val){
$mini=100;
$gras="";
for ($z=1;$z<=count($arr)-1;$z++)
{
if ($arr[$z]<=$mini){$mini=$arr[$z];}
}
if ($val==$mini){$gras=" ;font-weight:900;color:navy;font-style: italic;";}
return $gras;
}
####test**********************
####test**********************
####test**********************
####test**********************
####test**********************
function myminmax($arr,$val){
$mini=100;
$maxi=-100;
$gras="";
for ($z=0;$z<=count($arr)-1;$z++)
{
if (($arr[$z]!="") && ($arr[$z]<=$mini)){$mini=$arr[$z];}
if (($arr[$z]!="") && ($arr[$z]>=$maxi)){$maxi=$arr[$z];}
}
if ($val==$mini){$gras="<span style='font-weight:bold;color: black;font-style: italic;'><blink>".$val."</blink></span> ";}
elseif ($val==$maxi){$gras="<span style='font-weight:bold;color:black;font-style: italic;'><blink>$val</blink></span> ";}
else $gras=$val;
return $gras;
}
####test**********************
function mymin($arr,$val){
$mini=100;
$gras="";
for ($z=0;$z<=count($arr)-1;$z++)
{
if (($arr[$z]!="") && ($arr[$z]<=$mini)){$mini=$arr[$z];}
}
if ($val==$mini){$gras="<span style='font-weight:bold;color: black;font-style: italic;'><blink>".$val."</blink></span> ";}
else $gras=$val;
return $gras;
}
####test**********************
function mymax($arr,$val){
$maxi=-100;
$gras="";
for ($z=0;$z<=count($arr)-1;$z++)
{
if (($arr[$z]!="") && ($arr[$z]>=$maxi)){$maxi=$arr[$z];}
}
if ($val==$maxi){$gras="<span style='font-weight:bold;color:black;font-style: italic;'><blink>$val</blink></span> ";}
else $gras=$val;
return $gras;
}
####test**********************
####test**********************
####test**********************
####test**********************
####test**********************
##*****************************
function gtmois($m)
{
global $tabmois;
global $tabmois1;
switch ($m) {
case $tabmois[0]:
$mA=$tabmois1[0];
break;
case $tabmois[1]:
$mA=$tabmois1[1];
break;
case $tabmois[2]:
$mA=$tabmois1[2];
break;
case $tabmois[3]:
$mA=$tabmois1[3];
break;
case $tabmois[4]:
$mA=$tabmois1[4];
break;
case $tabmois[5]:
$mA=$tabmois1[5];
break;
case $tabmois[6]:
$mA=$tabmois1[6];
break;
case $tabmois[7]:
$mA=$tabmois1[7];
break;
case $tabmois[8]:
$mA=$tabmois1[8];
break;
case $tabmois[9]:
$mA=$tabmois1[9];
break;
case $tabmois[10]:
$mA=$tabmois1[10];
break;
case $tabmois[11]:
$mA=$tabmois1[11];
break;
}
return $mA;
}
##*****************************
function getmoy($arrayvar){
$moy=0;
for($i=0;$i<sizeof($arrayvar);$i++){
if($arrayvar[$i]!=""){$cnt++;}
}
$moy = round(array_sum($arrayvar) / $cnt,1);
return $moy;
}
function getStats($file){
$typefile = searchFile($file);
if($typefile=="month"){
list($jour,$meantemp,$hightemp,$hourhighttemp,$lowtemp,$hourlowtemp,$rain,$ventmoyen,$rafales,$hourrafales,$domdir) = parseFile($file);
$tn = getmin($lowtemp);
$tx = getmax($hightemp);
$wx = getmax($rafales);
$rx = getmax($rain);
$rs = array_sum($rain);
$tm = getmoy($meantemp);
$wm = getmoy($ventmoyen);
$dr = getrec($domdir);
$tmx = getmax($meantemp);
$tmn = getmin($meantemp);
return array($tn,$tx,$wx,$rx,$rs,$tm,$wm,$dr,$tmx,$tmn);
}
if($typefile=="year"){
global $moistxt;
list($annee,$mois,$meanmax,$meanmin,$meantemp,$hightemp,$datehighttemp,$lowtemp,$datelowtemp,$gel,$rain,$maxrain,$ventmoyen,$rafales,$domdir)=parseFile($file);
$tn = getmin($lowtemp);
$tx = getmax($hightemp);
$tnm = getmoy($meanmin);
$txm = getmoy($meanmax);
$tnmn = getmin($meanmin);
$txmx = getmax($meanmax);
$tmx = getmax($meantemp);
$tmn = getmin($meantemp);
$wx = getmax($rafales);
$rx = getmax($rain);
$rxj = getmax($maxrain);
$rs = array_sum($rain);
$tm = getmoy($meantemp);
$wm = getmoy($ventmoyen);
$dr = getrec($domdir);
return array($tn,$tx,$tnm,$txm,$tnmn,$txmx,$tmx,$tmn,$wx,$rx,$rxj,$rs,$tm,$wm,$dr);
}
}
function afficheTable($file){
if($file==""){echo "selectionnez un rapport à afficher"; return;}
$url = $_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
$sep = explode("/",$url);
for($i=0;$i<sizeof($sep)-1;$i++){
$lien .=$sep[$i]."/" ;
}
$typefile = searchFile($file,$data);
if($typefile=="year"){
global $moistxt;
list($annee,$mois,$meanmax,$meanmin,$meantemp,$hightemp,$datehighttemp,$lowtemp,$datelowtemp,$gel,$rain,$maxrain,$ventmoyen,$rafales,$domdir)=parseFile($file);
$legx = array_values($moistxt);
array_shift($legx);
$tn = getmin($lowtemp);
$tx = getmax($hightemp);
$tnm = getmoy($meanmin);
$txm = getmoy($meanmax);
$tnmn = getmin($meanmin);
$txmx = getmax($meanmax);
$tmx = getmax($meantemp);
$tmn = getmin($meantemp);
$wx = getmax($rafales);
$rx = getmax($rain);
$rxj = getmax($maxrain);
$rs = array_sum($rain);
$tm = getmoy($meantemp);
$wm = getmoy($ventmoyen);
$dr = getrec($domdir);
echo "
<table style=\"border:1px solid #ccd3e0\">
<caption style=\"color:#303D58\">Tableau récapitulatif pour ".gettitre($file)."</caption>
<tr style='background:#ccd3e0;'>
<td colspan='6' style='text-align:center;'><b>TEMPERATURES</b></td>
<td colspan='3' style='text-align:center;'><b>VENT</b></td>
<td colspan='3' style='text-align:center;'><b>PRECIPITATIONS</b></td></tr>
<tr style='background:#ccd3e0;'>
<td rowspan='2'><b>Mois</b></td>
<td colspan='2'><b>Températures min</b></td>
<td colspan='2'><b>Températures max</b></td>
<td rowspan='2'><b>Moyenne <br/>mensuelle</b></td>
<td rowspan='2'><b>Vent<br/>moyen</b></td>
<td rowspan='2'><b>Rafales max</b></td>
<td rowspan='2'><b>Secteur<br/> dominant</b></td>
<td rowspan='2'><b>Cumul</b></td>
<td rowspan='2'><b>Max en<br/>un jour</b></td>
</tr>
<tr style='background:#ccd3e0;'>
<td>Tn absolue</td>
<td>Tn moyenne</td>
<td>Tx absolue</td>
<td>Tx moyenne</td>
</tr>\n";
for ($i=0;$i<sizeof($legx);$i++){
echo"<tr>\n";
echo "<td style=\"background:#ccd3e0\">$legx[$i]</td>\n";
if($lowtemp[$i]!=""){echo "<td style=\"background:".gettempcolor($lowtemp[$i]).""; if($lowtemp[$i]==$tn){echo"; font-weight:bold";} echo"\">$lowtemp[$i] °C</td>\n";}else{echo "<td>---</td>\n";}
if($meanmin[$i]!=""){echo "<td style=\"background:".gettempcolor($meanmin[$i]).""; if($meanmin[$i]==$tnmn){echo"; font-weight:bold";} echo"\">$meanmin[$i] °C</td>\n";}else{echo "<td>---</td>\n";}
if($hightemp[$i]!=""){echo "<td style=\"background:".gettempcolor($hightemp[$i]).""; if($hightemp[$i]==$tx){echo"; font-weight:bold";} echo"\">$hightemp[$i] °C</td>\n";}else{echo "<td>---</td>\n";}
if($meanmax[$i]!=""){echo "<td style=\"background:".gettempcolor($meanmax[$i]).""; if($meanmax[$i]==$txmx){echo"; font-weight:bold";} echo"\">$meanmax[$i] °C</td>\n";}else{echo "<td>---</td>\n";}
if($meantemp[$i]!=""){echo "<td style=\"background:".gettempcolor($meantemp[$i]).""; if($meantemp[$i]==$tmn or $meantemp[$i]==$tmx){echo"; font-weight:bold";} echo"\">$meantemp[$i] °C</td>\n";}else{echo "<td>---</td>\n";}
if($ventmoyen[$i]!=""){echo "<td style=\"background:".getventcolor($ventmoyen[$i]*10).""; if($ventmoyen[$i]==$hw){echo"; font-weight:bold";} echo"\">$ventmoyen[$i] km/h </td>\n";}else{echo "<td>---</td>\n";}
if($rafales[$i]!=""){echo "<td style=\"background:".getventcolor($rafales[$i]).""; if($rafales[$i]==$wx){echo"; font-weight:bold";} echo"\">$rafales[$i] km/h </td>\n";}else{echo "<td>---</td>\n";}
if($domdir[$i]!=""){echo "<td style=\"background:RGB(".getdircolor($domdir[$i]).")\"><img style=\"height:10px\" src=\"http://".$lien."pics/$domdir[$i].gif\" alt=\"$domdir[$i]\"/> $domdir[$i]</td>\n";}else{echo "<td>---</td>\n";}
if($rain[$i]!=""){echo "<td style=\"background:".getpluiecolor($rain[$i]).""; if($rain[$i]==$rx){echo"; font-weight:bold";} echo"\">$rain[$i] mm</td>\n";}else{echo "<td>---</td>\n";}
if($maxrain[$i]!=""){echo "<td style=\"background:".getpluiecolor($maxrain[$i]).""; if($maxrain[$i]==$rxj){echo"; font-weight:bold";} echo"\">$maxrain[$i] mm</td>\n";}else{echo "<td>---</td>\n";}
}
echo "</tr>\n";
echo "<tr style='background:#ccd3e0'>\n<td style='font-weight:bold'>Total</td>\n<td>$tn °C</td>\n<td>$tnm °C</td>\n<td>$tx °C</td>\n<td>$txm °C</td>\n<td> $tm °C</td>\n<td>$wm km/h</td>\n<td>$wx km/h</td>\n<td><img style=\"height:10px\" src=\"http://".$lien."pics/$dr.gif\" alt=\"$dr\"/> $dr</td>\n<td>$rs mm</td>\n<td>$rxj mm</td>\n</tr>\n";
echo "</table>\n";
}
}
?>
- ardigier
- Membre
- Messages : 2260
- Inscription : mar. mars 23, 2010 6:05 pm
- Localisation : Le Thor 84250
- Contact :
Re: NOAACompare et Java sribe
merci Gégé
ça marche chez moi
a+
ça marche chez moi
a+
WMR200 - XNet meteo 2011-10-14a- graphweather V 3.0.35- Win10 x64
webcam installée orientation NE
http://le-thor-meteo.com/index.php
webcam installée orientation NE
http://le-thor-meteo.com/index.php