1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
| <?php
session_start();
include('fonctions.php');
header("Content-type:text/xml");
echo '<?xml version="1.0" encoding="ISO-8859-1"?>';
echo "<racine>";
if(isset($_POST["Nom"]))
{
$fichierini = "../php.ini";
$tab = file($fichierini);
foreach($tab as $ligne)
{
$infoBDD[] = $ligne;
}
$User = substr($infoBDD[0],0,strlen($infoBDD[0]) - 1);
$passwd = substr($infoBDD[1],0,strlen($infoBDD[1]) - 1);
$host = substr($infoBDD[2],0,strlen($infoBDD[2]) - 1);
$bdd = substr($infoBDD[3],0,strlen($infoBDD[3]) - 1);
try
{
mysql_connect("localhost","root","");
mysql_select_db($bdd);
}
catch(exception $e)
{
die('<option>Erreur : '. $e->getMessage().'</option>');
}
$res = mysql_query("SELECT DSLAM_Libelle , DSLAM_CodeNoeud FROM DSLAM WHERE `DSLAM_ID` = '".$_POST['Nom']."'");
while($row = mysql_fetch_array($res))
{
echo '<libelle2>'.$row["DSLAM_Libelle"].'</libelle2>';
echo "<codenoeud>".$row['DSLAM_CodeNoeud']."</codenoeud>";
}
}
echo "</racine>";
?> |