echo "<th>Partition<br />sauvegardée</th>\n"; echo "<th>Image</th>\n"; //echo "<th>Statut</th>\n"; echo "<th>Descriptif</th>\n"; echo "<th>Partitionnement</th>\n"; //echo "<th>Supprimer</th>\n"; echo "<th><input type='submit' name='supprimer' value='Supprimer' /><br />\n"; echo "<a href='#' onclick='check_suppr(\"check\");return false'><img src=\"../elements/images/enabled.gif\" border='0' alt=\"Tout cocher\" title=\"Tout cocher\" /></a>\n"; echo " / <a href='#' onclick='check_suppr(\"uncheck\");return false'><img src=\"../elements/images/disabled.gif\" border='0' alt=\"Tout décocher\" title=\"Tout décocher\" /></a>\n"; echo "</th>\n"; echo "</tr>\n"; $cpt = 0; while ($lig2 = mysql_fetch_object($res2)) { echo "<tr>\n"; echo "<td>{$lig2->name}</td>\n"; echo "<td>" . mysql_date_to_fr_date($lig2->date) . "</td>\n"; echo "<td>" . $lig2->partition . "</td>\n"; echo "<td>" . $lig2->image . "</td>\n"; /* echo "<td>\n"; $tmp=ucfirst(strtolower($lig2->statut)); if($tmp=="Succes") { echo "<span style='color:green;'>Succès</span>"; } elseif($tmp=="Echec") { echo "<span style='color:red;'>Echec</span>"; } else{ echo $tmp; } echo "</td>\n";
echo "<img src=\"../elements/images/disabled.gif\" border='0' alt=\"Aucun rapport existant\" title=\"Aucun rapport existant\" />"; } } else { echo "<img src=\"../elements/images/disabled.gif\" border='0' alt=\"Aucun rapport existant\" title=\"Aucun rapport existant\" />"; } echo "</td>\n"; // Sauvegardes existantes echo "<td width='20%'>\n"; if ($id_machine != "") { $sql = "SELECT * FROM se3_tftp_sauvegardes WHERE id='" . $id_machine . "' ORDER BY date DESC;"; $res = mysql_query($sql); if (mysql_num_rows($res) > 0) { $lig = mysql_fetch_object($res); echo "<a href='visu_svg.php?id_machine={$id_machine}' target='_blank'><img src=\"../elements/images/enabled.gif\" border='0' alt=\"Visualiser la(les) sauvegarde(s) existante(s)\" title=\"Visualiser la(les) sauvegarde(s) existante(s)\" /></a>"; echo "<br />\n"; echo "<span style='font-size: x-small;' title='Dernière sauvegarde: {$lig->image}'>" . mysql_date_to_fr_date($lig->date) . "</span>\n"; } else { echo "<img src=\"../elements/images/disabled.gif\" border='0' alt=\"Aucune sauvegarde existante\" title=\"Aucune sauvegarde existante\" />"; } } else { echo "<img src=\"../elements/images/disabled.gif\" border='0' alt=\"Aucune sauvegarde existante\" title=\"Aucune sauvegarde existante\" />"; } echo "</td>\n"; echo "</tr>\n"; } } echo "</table>\n"; if ($max_eff_parc < $loop) { $max_eff_parc = $loop; } }
function tableau_liste_rapports($name, $id = "", $mac = "", $order_by = 'date DESC', $limit = "") { $html = ""; $tab = liste_rapports($name, $id, $mac, $order_by, $limit); if (count($tab) == 0) { $html = "Aucune sauvegarde n'est recensée pour <b>{$name}</b>"; } else { if ($limit == 1) { $html .= "Le dernier rapport :"; } elseif ($limit > 1) { $html .= "Les {$limit} derniers rapports :"; } $html .= "<table class='crob'>\n"; $html .= "<tr>\n"; $html .= "<th>Id</th>\n"; $html .= "<th>Nom</th>\n"; $html .= "<th>Partition</th>\n"; $html .= "<th>Sauvegarde</th>\n"; $html .= "<th>Date</th>\n"; $html .= "<th>Descriptif</th>\n"; $html .= "</tr>\n"; for ($loop = 0; $loop < count($tab); $loop++) { $html .= "<tr>\n"; $html .= "<td>" . $tab[$loop]['id'] . "</td>\n"; $html .= "<td>" . $tab[$loop]['name'] . "</td>\n"; $html .= "<td>" . $tab[$loop]['partition'] . "</td>\n"; $html .= "<td>" . $tab[$loop]['image'] . "</td>\n"; $html .= "<td>" . mysql_date_to_fr_date($tab[$loop]['date']) . "</td>\n"; $html .= "<td style='text-align:left'><pre>" . $tab[$loop]['descriptif'] . "</pre></td>\n"; $html .= "</tr>\n"; } $html .= "</table>\n"; } return $html; }
$chaine_tab .= "</tr>\n"; for ($i = 0; $i < count($id_machine); $i++) { $sql = "SELECT * FROM se3_tftp_sauvegardes WHERE id='" . $id_machine[$i] . "';"; //echo "$sql<br />"; $res = mysql_query($sql); $sql = "SELECT * FROM se3_tftp_sauvegardes WHERE id='" . $id_machine[$i] . "' ORDER BY date DESC;"; //echo "$sql<br />"; $res = mysql_query($sql); if (mysql_num_rows($res) > 0) { while ($lig = mysql_fetch_object($res)) { $chaine_tab .= "<tr>\n"; $chaine_tab .= "<td>{$lig->id}</td>\n"; $chaine_tab .= "<td>{$lig->name}</td>\n"; $chaine_tab .= "<td>{$lig->partition}</td>\n"; $chaine_tab .= "<td>{$lig->image}</td>\n"; $chaine_tab .= "<td>" . mysql_date_to_fr_date($lig->date) . "</td>\n"; $chaine_tab .= "<td style='text-align:left'><pre>{$lig->descriptif}</pre></td>\n"; $chaine_tab .= "</tr>\n"; $temoin_svg_existantes++; } } } $chaine_tab .= "</table>\n"; $chaine_tab .= "<p><br /></p>\n"; if ($temoin_svg_existantes > 0) { echo $chaine_tab; } //====================================================== echo "<p><i>NOTES:</i></p>\n"; echo "<ul>\n"; echo "<li>Ce choix nécessite une partition de sauvegarde sur la machine.</li>\n";