diff --git a/application/addAnimal.php b/application/addAnimal.php index 61630a59b584180f3ace42018ecced0b21eb10a2..81bbaae9255e2d924936954f768c94866a2ccbe8 100644 --- a/application/addAnimal.php +++ b/application/addAnimal.php @@ -7,9 +7,9 @@ prepare($vSql); $vSt->execute(); - header('Location: http://tuxa.sme.utc/~bdd0p117/animal.php'); + header('Location: http://tuxa.sme.utc/~bdd0p042/application/animal.php'); }else echo "Il faut donner une espece"; }else diff --git a/application/affichage.php b/application/affichage.php new file mode 100755 index 0000000000000000000000000000000000000000..61b033b63cc7fc0436cf6a325ba065c23274520d --- /dev/null +++ b/application/affichage.php @@ -0,0 +1,3 @@ +

Test

+ +

diff --git a/application/ajout.php b/application/ajout.php new file mode 100755 index 0000000000000000000000000000000000000000..27ad12ffc8728044009a5818e29d3dbde30ef15b --- /dev/null +++ b/application/ajout.php @@ -0,0 +1,11 @@ + diff --git a/application/ajoutAnimal.php b/application/ajoutAnimal.php new file mode 100755 index 0000000000000000000000000000000000000000..afb108fabfc9043a899260ab10d29bd3890e6f98 --- /dev/null +++ b/application/ajoutAnimal.php @@ -0,0 +1,52 @@ + + + Exercice + + + + +

Information des animaux

+ +
+
+

Nom de l'animal:

+

Poids:

+

Taille:

+

Date de naissance:

+

Client: + +

+

Espece: + +

+

+
+
+ + diff --git a/application/animal.php b/application/animal.php index 04339b0717e16815cb714c668fb00e297f5ea2dc..695a778985fcd2061f4c2eda70c59ff2def08f2e 100644 --- a/application/animal.php +++ b/application/animal.php @@ -22,9 +22,9 @@ // Connexion à la base de données $vHost = 'tuxa.sme.utc'; $vPort = '5432'; - $vData = 'dbbdd0p117'; - $vUser = 'bdd0p117'; - $vPass = 'LpIHl1sZ'; + $vData = 'dbbdd0p042'; + $vUser = 'bdd0p042'; + $vPass = 'cyLu9JFl'; try{ $vConn = new PDO("pgsql:host=$vHost;port=$vPort;dbname=$vData", $vUser, $vPass); @@ -33,12 +33,16 @@ } // Affichage du tableau de données - $vSql ='select * from Animal;'; + if ($_POST['affiche'] == "animaux") + $vSql ='select * from Animal;'; + include("animal.php"); + try{ $vSt = $vConn->prepare($vSql); $vSt->execute(); + while ($vResult = $vSt->fetch(PDO::FETCH_BOTH)) { echo ''; echo "$vResult[0]"; diff --git a/application/connexion.php b/application/connexion.php new file mode 100755 index 0000000000000000000000000000000000000000..467ef59ab98b4bfad83c49013c2a87fbc23fd2a7 --- /dev/null +++ b/application/connexion.php @@ -0,0 +1,7 @@ + diff --git a/application/error.php b/application/error.php new file mode 100755 index 0000000000000000000000000000000000000000..e903e38fda63c3ae71edfb27ef69503055cada00 --- /dev/null +++ b/application/error.php @@ -0,0 +1 @@ +

Choix non supporté, veuillez retourner à l'index

diff --git a/application/index.php b/application/index.php index 36b69dd077254730c9f6a4c5d9ba70611604cdba..92578785dbb8c51c0451bdac88802047dc0f5ab2 100644 --- a/application/index.php +++ b/application/index.php @@ -10,7 +10,7 @@


- @@ -30,7 +30,7 @@


- diff --git a/application/remAnimal.php b/application/remAnimal.php index e19813739fdc63adb5b258edfc46834c4d8fbf95..bdfdbcc57ce0f3a921eb6f6f91d01c0549468a72 100644 --- a/application/remAnimal.php +++ b/application/remAnimal.php @@ -5,11 +5,12 @@ prepare($vSql); $vSt->execute(); - header('Location: http://tuxa.sme.utc/~bdd0p117/animal.php'); + header('Location: http://tuxa.sme.utc/~bdd0p042/application/animal.php'); }else echo "Il manque une donnée"; } catch(PDOException $e){ diff --git a/application/statAnimal.php b/application/statAnimal.php index 452cd06d6a19050be94eecda8e30f0499459865a..4f0c19ccb8987e065f546c74753abfe5117a9c4b 100644 --- a/application/statAnimal.php +++ b/application/statAnimal.php @@ -6,11 +6,13 @@