enr37 a écrit:as tu testé le xml et qu'indique t il ? tu pour nous faire une copie du code ?
Oui j'ai testé le XML, il remonte une valeur de 0.. le problème se situe donc dans la récupération de la valeur sur l'interface Legrand.
ECOCOMPTEUR.PHP (SCRIPT EEDOMUS):
- Code : Tout sélectionner
<?
// Script de pilotage ampli Pioneer VSX // réalisé par Connected Object // vous pouvez améliorer ce script et en faire profiter la communauté eedomus
$GLOBALS['ip'] = getArg('ip');
$url = 'http://'.$GLOBALS['ip'].'/1.html';
function sdk_get_value($html, $name) { $value = ''; $lines = explode("\n", $html); foreach($lines as $line) { if (strpos($line, $name. ' = ') !== false && strpos($line, 'parseInt') == false && strpos($line, 'reponse.data') == false) { $value = str_replace($name. ' = ', '', trim($line)); $value = substr($value, 0, strpos($value, ';')); $value = str_replace('var ', '', $value); $value = str_replace('setNull(', '', $value); $value = str_replace('.toFixed(2)', '', $value); $value = trim($value, '"'); $value = trim($value, ')'); break; } } return $value; }
function sdk_round_decimal($value) { if (is_numeric($value)) { $value = round($value, 2); } return $value; }
$html = httpQuery($url, 'GET', NULL, NULL, NULL, false);
$values = array('tarif' => 'tarif', 'isousc' => 'isousc', 'conso_base' => 'conso_base', 'conso_hc' => 'conso_hc', 'conso_hp' => 'conso_hp', 'conso_hc_b' => 'conso_hc_b', 'conso_hp_b' => 'conso_hp_b', 'conso_hc_w' => 'conso_hc_w', 'conso_hp_w' => 'conso_hp_w', 'conso_hc_r' => 'conso_hc_r', 'conso_hp_r' => 'conso_hp_r', 'c1' => 'c1', 'LG0_0_41' => 'c1_name', 'c2' => 'c2', 'LG0_0_42' => 'c2_name', 'c3' => 'c3', 'LG0_0_43' => 'c3_name', 'c4' => 'c4', 'LG0_0_44' => 'c4_name', 'c5' => 'c5', 'LG0_0_45' => 'c5_name', 'c6' => 'c6', 'LG0_0_57' => 'c6_name', 'c7' => 'c7', 'LG0_0_58' => 'c7_name' );
foreach($values as $name => $txt) { $value[$name] = sdk_get_value($html, $name); $xml .= "\t<$txt>".sdk_round_decimal($value[$name])."</$txt>\n"; }
$current_kwh = $value['conso_base'] + $value['conso_hc'] + $value['conso_hp'] + $value['conso_hc_b'] + $value['conso_hp_b'] + $value['conso_hc_w'] + $value['conso_hp_w'] + $value['conso_hc_r'] + $value['conso_hp_r']; $previous_kwh = loadVariable('previous_kwh'); $previous_kwh_time = loadVariable('previous_kwh_time');
// on calcule la puissance instantanée à partir de l'index total $power = 0; if (time() - $previous_kwh_time > 0 && $previous_kwh > 0) { $power = ($current_kwh - $previous_kwh) * 1000 * 60 * 60 / (time() - $previous_kwh_time); } $xml .= "\t<power>".sdk_round_decimal($power)."</power>\n";
saveVariable('previous_kwh', $current_kwh); saveVariable('previous_kwh_time', time());
sdk_header('text/xml'); echo "<ecocompteur>\n$xml</ecocompteur>"; ?>
HTML DE L'INTERFACE LEGRAND:
- Code : Tout sélectionner
<!DOCTYPE html> <html> <head> <meta charset="utf-8"/> <title>EcoCompteur - Accueil</title> <link rel="stylesheet" href="styles.css" /> <script src="common.js"></script> <script src="charts.js"></script> <script src="chartND.js"></script> <script type="text/javascript"> /** * \file 1.html * \author Knowledge Community, Redon N., Descubes G. * \version 1.0 * \date 20 Aout 2013 * \brief Page d'accueil du concentrateur * * \details Permet de visualiser les consommations electriques instantanées. * \n Visualisation des consommations de deux entrées impulsionnelles (Gaz et Eau par défaut). * \n Affichage des cinq entrées de mesure Tore sur un graphe de type histogramme horizontal créé avec la bibliothèque Javascript Highcharts */ var jour = 22; var mois = 4; var annee = 16; var heure = 11; var minute = 55; var version = "3.0.15";
//mantis 3694: Présence d'une conso de 1Wh sur certaines voies vides var conso_minimum = 9; /** * \brief Fonction Ajax qui récupère les consommations instantanées * \details Récupère les données provenant du fichier JSON inst.json. * \n Recharge les données du graphe et des consommations impulsionnelles. */ function RefreshRepartitionAjax(){ $.ajax({ type: "GET", dataType:"json", url: "inst.json", cache: false, //complete: une_fonction_on_complete(), success: function myChangeDatas(reponse){ c1 = 0; if (parseInt(reponse.data1) > conso_minimum){ c1 = parseInt(reponse.data1); } c2 = 0; if (parseInt(reponse.data2) > conso_minimum){ c2 = parseInt(reponse.data2); } c3 = 0; if (parseInt(reponse.data3) > conso_minimum){ c3 = parseInt(reponse.data3); } c4 = 0; if (parseInt(reponse.data4) > conso_minimum){ c4 = parseInt(reponse.data4); } c5 = 0; if (parseInt(reponse.data5) > conso_minimum){ c5 = parseInt(reponse.data5); }
c6 = reponse.data6.toFixed(2); c6m3 = reponse.data6m3.toFixed(2); c7 = reponse.data7.toFixed(2); c7m3 = reponse.data7m3.toFixed(2);
//Mantis 4039 : extension radio c8 = reponse.CIR1_Nrj.toFixed(2); //3748: Usage des informations HC HP //c8_part = reponse.CIR1_Nrj_part.toFixed(2); c8m3 = reponse.CIR1_Vol.toFixed(2); //c8m3_part = reponse.CIR1_Vol_part.toFixed(2);
c9 = reponse.CIR2_Nrj.toFixed(2); //3748: Usage des informations HC HP //c9_part = reponse.CIR2_Nrj_part.toFixed(2); c9m3 = reponse.CIR2_Vol.toFixed(2); //c9m3_part = reponse.CIR2_Vol_part.toFixed(2);
c10 = reponse.CIR3_Nrj.toFixed(2); //3748: Usage des informations HC HP //c10_part = reponse.CIR3_Nrj_part.toFixed(2); c10m3 = reponse.CIR3_Vol.toFixed(2); //c10m3_part = reponse.CIR3_Vol_part.toFixed(2);
c11 = reponse.CIR4_Nrj.toFixed(2); //3748: Usage des informations HC HP //c11_part = reponse.CIR4_Nrj_part.toFixed(2); c11m3 = reponse.CIR4_Vol.toFixed(2); //c11m3_part = reponse.CIR4_Vol_part.toFixed(2);
//Mantis 4039 : extension radio var timestamp = reponse.Date_Time; var date_to_display = new Date(timestamp * 1000); heure = twoDigitsTime(date_to_display.getUTCHours()); minute = twoDigitsTime(date_to_display.getUTCMinutes()); changeDatas(); //Raffraichissement du graphe inputDatas(); inputDatasRel(); } }); } /** * \brief Fonction récursive de mise a jour des données * \details Fonction récursive qui rappelle chaque seconde la fonction de mise à jour des données RefreshRepartitionAjax() */ function loopedback(){ setTimeout(function(){ loopedback(); RefreshRepartitionAjax(); },1000); } /** * \brief Fonction qui met a jour les données du graphique dynamiquement * \details Met a jour les données du graphique Highchart avec les données provenant des requetes Ajax. * \n Cette fonction est appelée par RefreshRepartitionAjax() */ function changeDatas(){ var chart = $('#container').highcharts(); //Met à jour avec animation chart.series[0].data[0].update(c1,true); chart.series[1].data[1].update(c2,true); chart.series[2].data[2].update(c3,true); chart.series[3].data[3].update(c4,true); chart.series[4].data[4].update(c5,true); } /** * \brief Fonction qui met a jour les données des entrées impulsionnelles * \details Met a jour les données des deux entrées impulsionnelles, le nom ansi que la valeur sont rechargés avec les données provenant des requetes Ajax. * \n Cette fonction est appelée par RefreshRepartitionAjax() */ function inputDatas(){ var unite_kwh = " kWh"; var unite_m3 = " m<sup>3</sup>"; if(0 == 1){ //Si entree 1 est affectee a Eau froide, on affiche des m3 $('#entree1_value').html(c6m3.toString()+unite_m3); }else{ // Pas pour le reste $('#entree1_value').html(c6.toString()+unite_kwh); } if(1 == 1){ //Si entree 2 est affectee a Eau froide, on affiche des m3 $('#entree2_value').html(c7m3.toString()+unite_m3); }else{ // Pas pour le reste $('#entree2_value').html(c7.toString()+unite_kwh); }
//Mantis 4039 : extension radio if(1 == 1){ //Si entree 3 est affectee a Eau froide, on affiche des m3 $('#entree3_value').html(c8m3.toString()+unite_m3); }else{ // Pas pour le reste $('#entree3_value').html(c8.toString()+unite_kwh); } if(1 == 1){ //Si entree 4 est affectee a Eau froide, on affiche des m3 $('#entree4_value').html(c9m3.toString()+unite_m3); }else{ // Pas pour le reste $('#entree4_value').html(c9.toString()+unite_kwh); } if(1 == 1){ //Si entree 5 est affectee a Eau froide, on affiche des m3 $('#entree5_value').html(c10m3.toString()+unite_m3); }else{ // Pas pour le reste $('#entree5_value').html(c10.toString()+unite_kwh); } if(1 == 1){ //Si entree 6 est affectee a Eau froide, on affiche des m3 $('#entree6_value').html(c11m3.toString()+unite_m3); }else{ // Pas pour le reste $('#entree6_value').html(c11.toString()+unite_kwh); } displayTime(); }
/** * \brief Fonction qui met a jour les données des entrées non electriques * \details Met a jour les données des deux entrées impulsionnelles, le nom ansi que la valeur sont rechargés avec les données provenant des requetes Ajax. * \n Cette fonction est appelée par RefreshRepartitionAjax() */ function inputDatasRel(){ var unite_kwh = " kWh"; var unite_m3 = " m<sup>3</sup>";
//Mantis 4039 : extension radio if(1 == 1){ //Si entree 1 est affectee a Eau froide, on affiche des m3 $('#entree3_part_value').html(c8m3_part.toString()+unite_m3); }else{ // Pas pour le reste $('#entree3_part_value').html(c8_part.toString()+unite_kwh); } if(1 == 1){ //Si entree 1 est affectee a Eau froide, on affiche des m3 $('#entree4_part_value').html(c9m3_part.toString()+unite_m3); }else{ // Pas pour le reste $('#entree4_part_value').html(c9_part.toString()+unite_kwh); } if(1 == 1){ //Si entree 1 est affectee a Eau froide, on affiche des m3 $('#entree5_part_value').html(c10m3_part.toString()+unite_m3); }else{ // Pas pour le reste $('#entree5_part_value').html(c10_part.toString()+unite_kwh); } if(1 == 1){ //Si entree 1 est affectee a Eau froide, on affiche des m3 $('#entree6_part_value').html(c11m3_part.toString()+unite_m3); }else{ // Pas pour le reste $('#entree6_part_value').html(c11_part.toString()+unite_kwh); } } /** \brief Fonction qui affiche la date au bon format suivant la langue*/ function displayDate(){ jour = twoDigitsTime(jour); mois = twoDigitsTime(mois); annee = "20"+annee; if(lang == "en"){ $('#date_displayed').html(mois+"/"+jour+"/"+annee); } else{ $('#date_displayed').html(jour+"/"+mois+"/"+annee); } } /** \brief Fonction qui affiche l'heure au bon format suivant la langue*/ function displayTime(){ var h = parseInt(heure); var m = parseInt(minute); var add = ""; if(lang == "en"){ if(h == 12) // midi add = " PM"; else if(h == 0){ //minuit h += 12; add = " AM"; }else if(h > 12){ h -= 12; add = " PM"; }else add = " AM"; } $('#hour_displayed').html(twoDigitsTime(h)); $('#minute_displayed').html(twoDigitsTime(m)+add); } /** * \brief Fonction d'initialisation * \details Récupère les principales variables utiles. * \n Telles que la langue, les tarifs en cours, les consommations effectives, les noms des circuits avec les labels traduits avec la fonction getLabel(), la date et l'heure du concentrateur */ function getDatas(){ lang = (1 == 1) ? 'fr' : 'en' ;//langue tarif = 2; // tarif isousc = "60"; //intensite souscrite /* conso_base = 0.000000; conso_hc = 59.008789; conso_hp = 44.486328; conso_hc_b = 0.000000; conso_hp_b = 0.000000; conso_hc_w = 0.000000; conso_hp_w = 0.000000; conso_hc_r = 0.000000; conso_hp_r = 0.000000; */ //Mantis 3748 conso_base = '0'; if (conso_base != ''){ conso_base = parseFloat(conso_base)/1000;} else { conso_base = 0;} conso_hc = '009444035'; if (conso_hc != ''){ conso_hc = parseFloat(conso_hc)/1000} else { conso_hc = 0;} conso_hp = '009134366'; if (conso_hp != ''){ conso_hp = parseFloat(conso_hp)/1000} else { conso_hp = 0;} conso_hc_b = '0'; if (conso_hc_b != ''){ conso_hc_b = parseFloat(conso_hc_b)/1000} else { conso_hc_b = 0;} conso_hp_b = '0'; if (conso_hp_b != ''){ conso_hp_b = parseFloat(conso_hp_b)/1000} else { conso_hp_b = 0;} conso_hc_w = '0'; if (conso_hc_w != ''){ conso_hc_w = parseFloat(conso_hc_w)/1000} else { conso_hc_w = 0;} conso_hp_w = '0'; if (conso_hp_w != ''){ conso_hp_w = parseFloat(conso_hp_w)/1000} else { conso_hp_w = 0;} conso_hc_r = '0'; if (conso_hc_r != ''){ conso_hc_r = parseFloat(conso_hc_r)/1000} else { conso_hc_r = 0;} conso_hp_r = '0'; if (conso_hp_r != ''){ conso_hp_r = parseFloat(conso_hp_r)/1000} else { conso_hp_r = 0;} //circuits c1Name = getLabel("Eau chaude"); c1 = 0.000000; //mantis 3694: Présence d'une conso de 1Wh sur certaines voies vides if (c1 <= conso_minimum){ c1 = 0; } c2Name = getLabel("Lave et Seche Linge "); c2 = 0.000000; //mantis 3694: Présence d'une conso de 1Wh sur certaines voies vides if (c2 <= conso_minimum){ c2 = 0; } c3Name = getLabel("Cuisine "); c3 = 0.000000; //mantis 3694: Présence d'une conso de 1Wh sur certaines voies vides if (c3 <= conso_minimum){ c3 = 0; } c4Name = getLabel("PC Salon "); c4 = 0.000000; //mantis 3694: Présence d'une conso de 1Wh sur certaines voies vides if (c4 <= conso_minimum){ c4 = 0; } c5Name = getLabel("2eme Etage "); c5 = 0.000000; //mantis 3694: Présence d'une conso de 1Wh sur certaines voies vides if (c5 <= conso_minimum){ c5 = 0; } //mantis 3768 : Label eau et gaz par defaut a la sortie d'usine c6Name = getLabel("Gaz"); c6 = 0.000000.toFixed(2); c6m3 = 0.000000.toFixed(2); //mantis 3768 : Label eau et gaz par defaut a la sortie d'usine c7Name = getLabel("Eau"); c7 = 0.000000.toFixed(2); c7m3 = 0.000000.toFixed(2);
//mantis 4039 : extensions radio c8Name = getLabel("Eau"); c8 = 0.000000.toFixed(2); //3748: Usage des informations HC HP c8_part = 0.000000.toFixed(2); c8m3 = 0.000000.toFixed(2); c8m3_part = 0.000000.toFixed(2);
c9Name = getLabel("Eau"); c9 = 0.000000.toFixed(2); //3748: Usage des informations HC HP c9_part = 0.000000.toFixed(2); c9m3 = 0.000000.toFixed(2); c9m3_part = 0.000000.toFixed(2);
c10Name = getLabel("Eau"); c10 = 0.000000.toFixed(2); //3748: Usage des informations HC HP c10_part = 0.000000.toFixed(2); c10m3 = 0.000000.toFixed(2); c10m3_part = 0.000000.toFixed(2);
c11Name = getLabel("Eau"); c11 = 0.000000.toFixed(2); //3748: Usage des informations HC HP c11_part = 0.000000.toFixed(2); c11m3 = 0.000000.toFixed(2); c11m3_part = 0.000000.toFixed(2);
//mantis 4039 : affichage des entrée si coché ou pas dans les parametres entree1Disable = 0; entree2Disable = 0; entree3Disable = 1; entree4Disable = 1; entree5Disable = 1; entree6Disable = 1; } /** * \brief Fonction d'affichage du tarif * \details Remplace les différents éléments HTML de la page avec les informations adéquates concernant le tarif en cours transmis par le Téléinfo. */ function displayFare(){ if(isousc == "") $('#isouscrite').html('<span>ti</span>'); else{ var kva_isousc = isousc/5; $('#isouscrite').html(isousc+ " A - "+kva_isousc+" kVA"); } // if(tarif == 11) // tarif = 0; switch(tarif){ case 0: //if (conso_base == 0){ // $('#val_t_en_cours').html('<span>no_teleinfo</span>'); //} else { $('#val_t_en_cours').html('<span>tarif_base</span>'); //} $('#title_i_conso_1').html('<span>kwh_conso_base</span>'); $('#val_i_conso_1').html(conso_base.toFixed(2)+' kWh'); break; case 1: //if (conso_hc == 0 && conso_hp == 0){ // $('#val_t_en_cours').html('<span>no_teleinfo</span>'); //} else { $('#val_t_en_cours').html('<span>tarif_hc</span>'); //} $('#title_i_conso_1').html('<span>kwh_consomes_hc</span>'); $('#val_i_conso_1').html(conso_hc.toFixed(2)+' kWh'); $('#title_i_conso_2').html('<span>kwh_consomes_hp</span>'); $('#val_i_conso_2').html(conso_hp.toFixed(2)+' kWh'); break; case 2: //if (conso_hc == 0 && conso_hp == 0){ // $('#val_t_en_cours').html('<span>no_teleinfo</span>'); //} else { $('#val_t_en_cours').html('<span>tarif_hp</span>'); //} $('#title_i_conso_1').html('<span>kwh_conso_hc</span>'); $('#val_i_conso_1').html(conso_hc.toFixed(2)+' kWh'); $('#title_i_conso_2').html('<span>kwh_conso_hp</span>'); $('#val_i_conso_2').html(conso_hp.toFixed(2)+' kWh'); break; case 3: //if (conso_base == 0){ // $('#val_t_en_cours').html('<span>no_teleinfo</span>'); //} else { $('#val_t_en_cours').html('<span>tarif_h_normale</span>'); //} $('#title_i_conso_1').html('<span>kwh_conso_normale</span>'); $('#val_i_conso_1').html(conso_base.toFixed(2)+' kWh'); //correspond a EJP sur simu téléinfo break; case 4: //if (conso_base == 0){ // $('#val_t_en_cours').html('<span>no_teleinfo</span>'); //} else { $('#val_t_en_cours').html('<span>tarif_hpm</span>'); //} $('#title_i_conso_1').html('<span>kwh_conso_hpm</span>'); $('#val_i_conso_1').html(conso_base.toFixed(2)+' kWh');//correspond a heure de pointe mobile dans la doc break; case 5: //if (conso_base == 0){ // $('#val_t_en_cours').html('<span>no_teleinfo</span>'); //} else { $('#val_t_en_cours').html('<span>tempo_bleu_creuse</span>'); //} break; case 6: //if (conso_base == 0){ // $('#val_t_en_cours').html('<span>no_teleinfo</span>'); //} else { $('#val_t_en_cours').html('<span>tempo_blanc_creuse</span>'); //} break; case 7: //if (conso_base == 0){ // $('#val_t_en_cours').html('<span>no_teleinfo</span>'); //} else { $('#val_t_en_cours').html('<span>tempo_rouge_creuse</span>'); //} break; case 8: //if (conso_base == 0){ // $('#val_t_en_cours').html('<span>no_teleinfo</span>'); //} else { $('#val_t_en_cours').html('<span>tempo_bleu_pleine</span>'); //} break; case 9: //if (conso_base == 0){ // $('#val_t_en_cours').html('<span>no_teleinfo</span>'); //} else { $('#val_t_en_cours').html('<span>tempo_blanc_pleine</span>'); //} break; case 10: //if (conso_base == 0){ // $('#val_t_en_cours').html('<span>no_teleinfo</span>'); //} else { $('#val_t_en_cours').html('<span>tempo_rouge_pleine</span>'); //} break; case 11: $('#val_t_en_cours').html('<span>no_teleinfo</span>'); $('#title_i_conso_1').html('<span>kwh_conso_base</span>'); $('#val_i_conso_1').html(conso_base.toFixed(2)+' kWh'); break; default: //if (conso_hc == 0 && conso_hp == 0){ // $('#val_t_en_cours').html('<span>no_teleinfo</span>'); //} else { $('#val_t_en_cours').html('<span>no_teleinfo</span>'); //} $('#title_i_conso_7').html('<span>kwh_consomes_hc</span>'); $('#val_i_conso_7').html(conso_hc.toFixed(2)+' kWh'); $('#title_i_conso_8').html('<span>kwh_consomes_hp</span>'); $('#val_i_conso_8').html(conso_hp.toFixed(2)+' kWh'); } var style ="display:inline-block;width:20px; height:15px; margin-left:25px; vertical-align:middle;"; if(tarif > 4 && tarif != 11){ widthDiv = "120px"; if(lang=='fr'){ widthDiv = "90px"; } $('#title_i_conso_1').html('<div style="display:inline-block;width:'+widthDiv+'"><span>conso_hc_b</span></div><div style="background-color:blue;'+style+'"> </div>'); $('#val_i_conso_1').html(conso_hc_b.toFixed(2)+' kWh'); $('#title_i_conso_2').html('<div style="display:inline-block;width:'+widthDiv+'"><span>conso_hp_b</span></div><div style="background-color:blue; '+style+'"> </div>'); $('#val_i_conso_2').html(conso_hp_b.toFixed(2)+' kWh'); $('#title_i_conso_3').html('<div style="display:inline-block;width:'+widthDiv+'"><span>conso_hc_w</span></div><div style="background-color:white; '+style+'"> </div>'); $('#val_i_conso_3').html(conso_hc_w.toFixed(2)+' kWh'); $('#title_i_conso_4').html('<div style="display:inline-block;width:'+widthDiv+'"><span>conso_hp_w</span></div><div style="background-color:white; '+style+'"> </div>'); $('#val_i_conso_4').html(conso_hp_w.toFixed(2)+' kWh'); $('#title_i_conso_5').html('<div style="display:inline-block;width:'+widthDiv+'"><span>conso_hc_r</span></div><div style="background-color:red; '+style+'"> </div>'); $('#val_i_conso_5').html(conso_hc_r.toFixed(2)+' kWh'); $('#title_i_conso_6').html('<div style="display:inline-block;width:'+widthDiv+'"><span>conso_hp_r</span></div><div style="background-color:red;'+style+'"> </div>'); $('#val_i_conso_6').html(conso_hp_r.toFixed(2)+' kWh'); } } /** * \brief Fonction d'affichage de la version * \details Affiche la version de l'EcoCompteur ou 1.0.10 sinon */ function displayVersion(){ if(version=="?"){ version="1.0.10" } $("#version").html("v "+version); } /** * \brief Fonction principale de la page * \details Point d'entrée JQuery qui intervient après la fin du chargement de la page. * \n Appel des différentes fonctions d'initialisation et tracage du graphe principal. * \n Les évènements relatifs a l'affichage de fenètres modales pour l'accès a l'administration et l'indication de favoris sont détectés ici. * \n Changement du titre html de la page */ $(function () { getDatas(); displayDate(); //displayTime(); inputDatas(); //Affiche la conso des entrées impulsionnelles + l'heure inputDatasRel(); //3991: Visualiser les informations de comptage non électrique document.title = translateSentence('title_html_accueil',lang); Highcharts.setOptions({ colors: ["#D7FF82", "#FCC646", "#E62EF7", "#007DFF", "#E8FBFF", "#FFE400", "#5DFFF5", "#77a1e5", "#c42525", "#a6c96a","#f26d7d","#8781bd","#c7b299", "#fff799"] }); colorCharts(); loopedback(); $('.entree1_name').html(translateIfPossible(getCleanedSpaceString(c6Name), lang)); $('.entree2_name').html(translateIfPossible(getCleanedSpaceString(c7Name), lang)); $('.entree3_name').html(translateIfPossible(getCleanedSpaceString(c8Name), lang)); $('.entree4_name').html(translateIfPossible(getCleanedSpaceString(c9Name), lang)); $('.entree5_name').html(translateIfPossible(getCleanedSpaceString(c10Name), lang)); $('.entree6_name').html(translateIfPossible(getCleanedSpaceString(c11Name), lang)); displayFare(); displayVersion(); translateContent(lang);//traduction $("#admin").click(function() {ConfirmAdmin(lang)}); // administration $("#bookmark").click(function() {ModalBookmark(lang)}); // bookmark $("#dialog-modal").attr("title",translateSentence('title_modal_admin',lang)); $("#dialog-modal-bookmark").attr("title",translateSentence('bookmark',lang)); // Build the chart $('#container').highcharts({ chart: { type: 'bar', plotBackgroundColor: null, plotBorderWidth: null, plotShadow: false, backgroundColor: null }, title: { text: '' }, xAxis: { categories: [c1Name, c2Name, c3Name, c4Name, c5Name], labels: { style: { color: 'black' }, } }, yAxis: { min: 0, title: { text: '' }, stackLabels: { enabled: true, align: 'center', style: { color: 'white', }, formatter: function() { if(this.total == null) return ''; else return this.total+" W"; }, }, labels: { style: { color: 'black', }, formatter: function() { return this.value; } } }, tooltip: { formatter: function() { return '<b>'+this.series.name+'</b><br/>' + this.y + ' W'; } }, legend: { backgroundColor: '#8A7F72', enabled: true, itemStyle: { color: '#FFF' } }, plotOptions: { series: { stacking: "normal", } }, series: [{ name: c1Name, data: [c1, null, null, null, null] }, { name: c2Name, data: [null, c2, null, null, null] }, { name: c3Name, data: [null, null, c3, null, null] } , { name: c4Name, data: [null, null, null, c4, null] } , { name: c5Name, data: [null, null, null, null, c5] }], exporting: { buttons: [ { enabled: false } ] }, credits: { enabled: false }, lang: { noData: translateSentence("no_data",lang) } });
//mantis 4039 : affichage des entrée si coché ou pas dans les parametres if(entree1Disable == 0){ $("#entree1_tr").show(); } if(entree2Disable == 0){ $("#entree2_tr").show(); } if(entree3Disable == 0){ $("#entree3_tr").show(); //3991: Visualiser les informations de comptage non électrique $("#entree3_tr_part").show(); } if(entree4Disable == 0){ $("#entree4_tr").show(); //3991: Visualiser les informations de comptage non électrique $("#entree4_tr_part").show(); } if(entree5Disable == 0){ $("#entree5_tr").show(); //3991: Visualiser les informations de comptage non électrique $("#entree5_tr_part").show(); } if(entree6Disable == 0){ $("#entree6_tr").show(); //3991: Visualiser les informations de comptage non électrique $("#entree6_tr_part").show(); }
/* //cartouches repliables $( ".toogle-title" ).click(function() { $(this).next().toggle("blind"); }); */
//Mantis 4100 $("#loader").fadeOut("fast"); }); </script> </head> <body> <div id="loader"><span>chargement</span></div> <div id='canvas'> <div id='entete'> <ul id='menu'> <li> <div id='borderR'> </div> </li> <li> <a href="1.html" class="item-menu actif"> <span>accueil</span> </a> </li> <li> <a href="rpt.html" class="item-menu"> <span>repartition</span> </a> </li> <li> <a id='admin' class="item-menu"> <span>administration</span> </a> </li> <li> <div id='borderL'> </div> </li> </ul> </div> <div id='body'> <div id='name'> <div class='ligne-name'> <div id='concent-name'><span>eco_compteur</span></div> <div id='rt-name'></div> <div class="newclock"> <div class="date_style" id="date_displayed"></div> <div class="time_style" id="hour_displayed"> </div><div class="css3-blink-deuxpoints time_style">:</div><div class="time_style" id="minute_displayed"> </div> </div> </div> <div class='ligne-name'> <div id='repart-name'><span>titre_accueil</span></div> </div> </div> <div id="sidebar_container"> <div class="sidebar"> <div class='title2'><span>libelle_teleinfo</span></div> <table class='index_table'> <tr><td><span>tarif_en_cours</span></td><td id="val_t_en_cours" class='data'></td></tr> <tr><td><span>intensite_souscrite</span></td><td id="isouscrite" class='data'></td></tr> <tr><td id="title_i_conso_1"></td><td id="val_i_conso_1" class='data'></td></tr> <tr><td id="title_i_conso_2"></td><td id="val_i_conso_2" class='data'></td></tr> <tr><td id="title_i_conso_3"></td><td id="val_i_conso_3" class='data'></td></tr> <tr><td id="title_i_conso_4"></td><td id="val_i_conso_4" class='data'></td></tr> <tr><td id="title_i_conso_5"></td><td id="val_i_conso_5" class='data'></td></tr> <tr><td id="title_i_conso_6"></td><td id="val_i_conso_6" class='data'></td></tr> <tr><td id="title_i_conso_7"></td><td id="val_i_conso_7" class='data'></td></tr> <tr><td id="title_i_conso_8"></td><td id="val_i_conso_8" class='data'></td></tr> </table> <br/> </div> <div class="sidebar"> <div class='title2'><span>autre_consommation</span></div> <table class='index_table'> <tr id="entree1_tr" style="display:none;"><td class="entree1_name"></td> <td id="entree1_value" class='data'></td></tr> <tr id="entree2_tr" style="display:none;"><td class="entree2_name"></td> <td id="entree2_value" class='data'></td></tr> <tr id="entree3_tr" style="display:none;"><td class="entree3_name"></td> <td id="entree3_value" class='data'></td></tr> <tr id="entree4_tr" style="display:none;"><td class="entree4_name"></td> <td id="entree4_value" class='data'></td></tr> <tr id="entree5_tr" style="display:none;"><td class="entree5_name"></td> <td id="entree5_value" class='data'></td></tr> <tr id="entree6_tr" style="display:none;"><td class="entree6_name"></td> <td id="entree6_value" class='data'></td></tr> </table> <br/> </div> </div> <div id='content' class="content_right"> <div class='title1'><span>titre_graphe_repartition</span></div> <div id="container"></div> </div> </div> <div id="bookmark" class="bookmark"><span>bookmark</span></div> <div class="sidebar_logo"> <img src="logo.png"> </div> <div id='footer'><span>copyright_footer_legrand</span> <div id="version"></div> </div> </div> <div style="display:none;"> <div id="dialog-modal" title="Administration" style="font-size:80.5%;"> <p><span>acces_admin</span></p> </div> </div> <div style="display:none;"> <div id="dialog-modal-bookmark" title="Bookmark" style="font-size:80.5%;"> <p><span>bookmark_content</span></p> </div> </div> </body> </html>
Avec le peu de connaissance en HTML et PHP, je n'ai pas trouvé l'origine du problème.. peut être qu'un codeur va pouvoir trouver le problème.
|