foreach ($table as $month => $data) { echo '<div class="month"><div class="month-bar" style="height: ' . $data['nb_scale'] . 'px; margin-top:' . max(20 - $data['nb_scale'], 0) . 'px"></div><a href="commentaires.php?filtre=' . $month . '"><span class="month-name">' . mois_en_lettres(substr($month, 4, 2), 1) . ' ' . substr($month, 0, 4) . ' : </span><span class="month-nb">' . nombre_commentaires($data['nb']) . '</span></a></div>'; } echo '<a href="commentaires.php" class="comm-total">Total : ' . nombre_commentaires($total_comms) . '</a>' . "\n"; echo '</div>' . "\n"; } else { $nothingyet++; } if (!$total_links == 0) { // print sur chaque div pour les liens. echo '<div class="graphique" id="links"><h3>' . ucfirst($GLOBALS['lang']['label_links']) . ' :</h3>' . "\n"; $table = scaled_size(get_tableau_date('links'), 50); foreach ($table as $month => $data) { echo '<div class="month"><div class="month-bar" style="height: ' . $data['nb_scale'] . 'px; margin-top:' . max(20 - $data['nb_scale'], 0) . 'px"></div><a href="links.php?filtre=' . $month . '"><span class="month-name">' . mois_en_lettres(substr($month, 4, 2), 1) . ' ' . substr($month, 0, 4) . ' : </span><span class="month-nb">' . nombre_liens($data['nb']) . '</span></a></div>'; } echo '<a href="links.php" class="links-total">Total : ' . nombre_liens($total_links) . '</a>' . "\n"; echo '</div>' . "\n"; } else { $nothingyet++; } echo '</div>' . "\n"; if ($nothingyet == 3) { echo ' <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADoAAABwAgMAAAAyFouxAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3QMFDDAtgYm8UQAAAAxQTFRFGBEPg3ue872G////A0Y42AAAAWNJREFUOMul1KGOXDEMheFDQkLOq4WYDMmrXbIk5L6aSciQv2C222rH2YKafZYly7JsATkxr0gVdirVzk4ANA+OyeIzXTnXc93Ac9amf2jmaLdr7/W4rySfB9M7T4NPzs4N9JO3PCcSB8/Uo0vTB9vT6fmDw7T76GwM4KvfdyMWT3x0PqW9OZo+aT47NRk6OjuS7YOz36kbp2tLd0pi5yxtlAZvdmkZI7UgK2cbkiLahFk5x6BFeLNdeKadEWHmrOy0pQhvXHhLgmcLb7zfnWBSEZ443z2hQxs62CAj5+bk1AX5AUZvTkgJ8q6N1C+/3CvjtPw6rCsrQ5PGT37VR3fhvSdttOH92ud3J5s2Iv7L+oej/eyRZ88vj9I7Ph1ZGjKuDENpRD6uDJMundLDNEnUjlimRYyTH8u0WNfJsUxbGrWbWgxaRLi0JI1ckmbpTmLUf8/z5rUEuRa1U6+n+Nf8f/wL/hlQOQcLWpwAAAAASUVORK5CYII=" style="height:112px; width:58px;display:block;margin:30px auto;"> <div style=" display: inline-block; border: 2px black inset; border-radius: 4px;"><div style="text-align: left;border: 1px white solid; border-radius: 4px;"><div style="border: 1px black inset; padding: 3px 5px; letter-spacing: 2px;">No data yet . . .<br/> Why not write <a href="ecrire.php" style="color: inherit">something</a> ? </div></div></div> '; } }
afficher_menu(pathinfo($_SERVER['PHP_SELF'], PATHINFO_BASENAME)); echo '</div>' . "\n"; echo '<div id="axe">' . "\n"; // SUBNAV echo '<div id="subnav">' . "\n"; // Affichage formulaire filtrage liens if (isset($_GET['filtre'])) { afficher_form_filtre('links', htmlspecialchars($_GET['filtre'])); } else { afficher_form_filtre('links', ''); } echo '</div>' . "\n"; echo '<div id="page">' . "\n"; if ($step == 'edit' and !empty($tableau[0])) { // edit un lien : affiche le lien au dessus du champ d’édit afficher_liens($tableau[0]); echo afficher_form_link($step, $erreurs_form, $tableau[0]); } elseif ($step == 2) { // lien donné dans l’URL echo afficher_form_link($step, $erreurs_form); } else { // aucun lien à ajouter ou éditer : champ nouveau lien + listage des liens en dessus. echo afficher_form_link(1, $erreurs_form); echo "\t" . '<p class="nombre-elem">'; echo "\t\t" . ucfirst(nombre_liens($nb_links_displayed)) . ' ' . $GLOBALS['lang']['sur'] . ' ' . liste_elements_count("SELECT count(*) AS nbr FROM links", array(), 'links') . "\n"; echo "\t" . '</p>' . "\n"; foreach ($tableau as $link) { afficher_liens($link); } } footer('', $begin);