\n"; if((is_admin("system_is_admin",$login)!="Y")&&(ldap_get_right("parc_can_clone",$login)!="Y")) { echo "

Action non autorisee.

"; include ("pdp.inc.php"); die(); } else { $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 "

Rapport(s) sur $nom_machine

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

Aucun rapport trouvé.

\n"; } else { echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; //echo "\n"; echo "\n"; echo "\n"; //$nb_rapports=mysql_num_rows($res2); $cpt=0; while($lig2=mysql_fetch_object($res2)) { echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; $cpt++; } echo "
NomDateTâcheStatutDescriptifSupprimer
\n"; echo "\"Tout\n"; echo " / \"Tout\n"; echo "
$lig2->name".mysql_date_to_fr_date($lig2->date)."".ucfirst(strtolower($lig2->tache))."\n"; $tmp=ucfirst(strtolower($lig2->statut)); if($tmp=="Succes") { echo "Succès"; } elseif($tmp=="Echec") { echo "Echec"; } elseif($tmp=="Valide") { echo "Valide"; } else{ echo $tmp; } echo "\n"; echo nl2br(htmlentities($lig2->descriptif)); echo "\n"; echo "\n"; //echo $lig2->identifiant; echo "
\n"; echo "\n"; //echo "\n"; echo "
\n"; echo "\n"; } //echo "

NOTE: Ajouter la possibilité de supprimer des rapports.

\n"; } else { echo "

Visualisation de rapport

\n"; echo "

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

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