\n"; if ((is_admin("system_is_admin",$login)=="Y")||(ldap_get_right("parc_can_clone",$login)=="Y")) { $id_machine=isset($_POST['id_machine']) ? $_POST['id_machine'] : (isset($_GET['id_machine']) ? $_GET['id_machine'] : NULL); $suppr=isset($_POST['suppr']) ? $_POST['suppr'] : NULL; if(!isset($id_machine)) { echo "

Aucune machine n'est choisie.

"; include ("pdp.inc.php"); die(); } $restriction_parcs="n"; if(is_admin("system_is_admin",$login)!="Y") { $restriction_parcs="y"; $tab_delegated_parcs=list_delegated_parcs($login); if(count($tab_delegated_parcs)==0) { echo "

Aucun parc ne vous a été délégué.

\n"; include ("pdp.inc.php"); die(); } $temoin_erreur="y"; $nom=""; $sql="SELECT name FROM se3_dhcp WHERE id='$id_machine';"; $res=mysql_query($sql); if(mysql_num_rows($res)>0) { $lig=mysql_fetch_object($res); $nom=$lig->name; for($loop=0;$loopLa machine $nom n'est pas dans un de vos parcs delegues.

\n"; include ("pdp.inc.php"); die(); } } if(isset($suppr)) { $chaine=""; for($i=0;$i0) { $lig=mysql_fetch_object($res); $mac_machine=$lig->mac; $nom_machine=$lig->name; echo "

Sauvegarde(s) sur $nom_machine

\n"; $sql="SELECT * FROM se3_tftp_sauvegardes WHERE id='$id_machine' ORDER BY date DESC;"; $res2=mysql_query($sql); if(mysql_num_rows($res2)==0) { echo "

Aucune sauvegarde trouvée.

\n"; } else { echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; //echo "\n"; echo "\n"; echo "\n"; //echo "\n"; echo "\n"; echo "\n"; $cpt=0; while($lig2=mysql_fetch_object($res2)) { echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; /* echo "\n"; */ echo "\n"; $temoin_infos_image=-100000; $temoin_volume_image=-100000; $temoin_espace_dispo++; } */ if($temoin_infos_image==1) { //echo "\n"; echo "\n"; if($lig2->df!="") { unset($tab_esp); $tab_esp=explode(" ",preg_replace("/ {2,}/"," ",preg_replace("/\t/"," ",$lig2->df))); echo "\n"; echo "\n"; echo "\n"; } //echo "\n"; echo "
NomDatePartition
sauvegardée
ImageStatutDescriptifPartitionnementSupprimer
\n"; echo "\"Tout\n"; echo " / \"Tout\n"; echo "
$lig2->name".mysql_date_to_fr_date($lig2->date)."".$lig2->partition."".$lig2->image."\n"; $tmp=ucfirst(strtolower($lig2->statut)); if($tmp=="Succes") { echo "Succès"; } elseif($tmp=="Echec") { echo "Echec"; } else{ echo $tmp; } echo "\n"; //echo nl2br(htmlentities($lig2->descriptif)); //if(!preg_match("/Infos sur ".$lig2->image."\n/",$lig2->descriptif)){ if(!mb_ereg("Infos sur ".$lig2->image."\n",$lig2->descriptif)){ echo nl2br(htmlentities($lig2->descriptif)); } else { //echo "\n"; echo "
\n"; $temoin_infos_image=0; $temoin_volume_image=0; $temoin_espace_dispo=0; $infos_complementaires_svg=""; $tab_descr=explode("\n",$lig2->descriptif); for($i=0;$iimage."$/",$tab_descr[$i])){ if(mb_ereg("^Infos sur ".$lig2->image."$",$tab_descr[$i])){ $temoin_infos_image++; } //if(preg_match("/^Volume:$/",$tab_descr[$i])) { if(preg_match("/^Volume de la sauvegarde:$/",$tab_descr[$i])) { echo "\n"; $temoin_infos_image=-100000; $temoin_volume_image++; } if(preg_match("/^Espace total\/occupé\/encore disponible:$/",$tab_descr[$i])) { break; } /* //if(preg_match("/^___+\*+___$/",$tab_descr[$i])) { //if(preg_match("/___+\*+___/",trim($tab_descr[$i]))) { //if(preg_match("/^___+/",trim($tab_descr[$i]))) { if(preg_match("/^___\+\*\+___$/",trim($tab_descr[$i]))) { echo "
\n"; //echo "aaaaaaa"; echo "
Infos"; echo "
Infos"; //echo htmlentities($tab_descr[$i])."
\n"; $temoin_infos_image++; } elseif($temoin_infos_image>1) { //echo nl2br(htmlentities($tab_descr[$i])); echo htmlentities($tab_descr[$i])."
\n"; $temoin_infos_image++; } if($temoin_volume_image==1) { //echo "
Volume"; //echo htmlentities($tab_descr[$i])."
\n"; echo "\n"; $temoin_volume_image++; } elseif($temoin_volume_image>1) { //echo nl2br(htmlentities($tab_descr[$i])); //echo htmlentities($tab_descr[$i])."
\n"; //if(trim($tab_descr[$i])!=""){ if(($infos_complementaires_svg=="")&&(trim($tab_descr[$i])!="")) { unset($tab_vol); $tab_vol=explode(" ",preg_replace("/\t/"," ",$tab_descr[$i])); echo "\n"; } else { $infos_complementaires_svg.=$tab_descr[$i]."\n"; } $temoin_volume_image++; } /* if($temoin_espace_dispo==1) { $temoin_espace_dispo++; } elseif($temoin_espace_dispo>1) { if(trim($tab_descr[$i])!="") { unset($tab_esp); $tab_esp=explode(" ",preg_replace("/ {2,}/"," ",preg_replace("/\t/"," ",$tab_descr[$i]))); echo "\n"; echo "\n"; echo "\n"; } $temoin_espace_dispo++; } */ } if($temoin_volume_image!=0) { echo "
".htmlentities($tab_vol[0])."".basename(htmlentities($tab_vol[1]))."
V.total partition".$tab_esp[1]."
V.occupé".$tab_esp[2]."
V.libre".$tab_esp[3]."
\n"; if($infos_complementaires_svg!='') {echo "
$infos_complementaires_svg
";} } //echo ""; echo "
V.total partition".$tab_esp[1]."
V.occupé".$tab_esp[2]."
V.libre".$tab_esp[3]."
\n"; } echo "\n"; echo "\n"; echo "
".htmlentities($lig2->partitionnement)."
"; echo "\n"; echo "\n"; echo "\n"; //echo $lig2->identifiant; echo "\n"; echo "\n"; $cpt++; } echo "\n"; echo "\n"; //echo "\n"; echo "
\n"; echo "\n"; } echo "

NOTE:

\n"; } else { echo "

Visualisation de sauvegardes

\n"; echo "

ERREUR: Machine $id_machine inconnue dans la table 'se3_dhcp'.

\n"; } } // Footer include ("pdp.inc.php"); ?>