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 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
| <?php
if(isset($_GET['a']) AND isset($_GET['aeroport']) AND isset($_GET['destinations'])) {
$conn = oci_connect('scott', 'tiger', 'orcl');
$sql = oci_parse($conn, 'select calendrier.date_choisiee,
calendrier.hid,
calendrier.id,
heure.heure_depart,
heure.heure_arrivee,
destinations.id_des,
heure.f_des,
heure.prix,
heure.id_h,
aeroport.pays,
aeroport.ae_nom,
destinations.ville_depart,
destinations.ville_arrivee,
aeroport.ae_id from calendrier,heure,destinations,aeroport
where ville_arrivee=ae_id and hid=id_h and f_des=id_des and destinations.ville_depart=\''.$_GET['aeroport'].'\' and
destinations.ville_arrivee=\''.$_GET['destinations'].'\' and calendrier.date_choisiee=\''.$_GET['a'].'\'');
oci_execute($sql);
while ($row = oci_fetch_array($sql)){
echo '<center>';
echo '<table border=1 bgcolor=ffffff>';
echo '<tr>';
echo '<td WIDTH=100 height=100>';
echo '<center>';
echo 'AZ'.$row['ID'];
echo '</center>';
echo '</td>';
echo '<td WIDTH=100 height=100>';
echo '<center>';
echo $row['DATE_CHOISIEE'];
echo '</center>';
echo '</td>';
echo '<td WIDTH=100 height=100>';
echo 'Aeroport de';
echo '</br>';
$conn01 = oci_connect('scott', 'tiger', 'orcl');
$sql01 = oci_parse($conn01, 'select ae_nom from aeroport,destinations where ae_id = '.$row['VILLE_DEPART'].'');
oci_execute($sql01);
$row01 = oci_fetch_array($sql01);
echo $row01['AE_NOM'];
echo '</br>';
echo $row['PAYS'];
echo '</td>';
echo '<td WIDTH=100 height=100>';
echo '<center>';
echo 'Aeroport de';
echo '</br>';
echo $row['AE_NOM'];
echo '</br>';
echo $row['PAYS'];
echo '</center>';
echo '</td>';
echo '<td WIDTH=100 height=100>';
echo '<center>';
echo $row['HEURE_DEPART'];
echo '</center>';
echo '</td>';
echo '<td WIDTH=100 height=100>';
echo '<center>';
echo $row['HEURE_ARRIVEE'];
echo '</center>';
echo '</td>';
echo '<td WIDTH=100 height=100>';
echo '<center>';
echo $row['PRIX'].'€';
echo '</td>';
echo '<td WIDTH=50 height=100>';
echo '<a href="vente.php">Acheter</a>';
echo '</td>';
echo '<td WIDTH=50 height=100>';
echo '<a href="retrieve_name.php">Reserver</a>';
echo '</td>';
echo '</tr>';
echo '</table>';
echo '</center>';
}
$rows = OCIFetchstatement($sql,$results);
if($rows == 0){
echo "Pas de vol disponible";
}
}
?> |
Partager