From 54de4ae000c0b1f3629e3a4aabdc3adc26dd2772 Mon Sep 17 00:00:00 2001 From: clement <clemmercier45@gmail.com> Date: Tue, 17 Jun 2014 23:06:10 +0200 Subject: [PATCH] footer --- class/objet.php | 19 +++++++++++++++++++ css/bootstrap.css | 2 +- view/form.php | 2 +- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/class/objet.php b/class/objet.php index c7abade..5c2f502 100644 --- a/class/objet.php +++ b/class/objet.php @@ -47,4 +47,23 @@ class Objet } return $ret; } + + public static function insertAll() + { + $className = get_called_class(); + $dbName = lcfirst($className); + $bdd = new Db(); + $result = Array(); + + $requete_prepare = $bdd->db->prepare("SELECT * FROM ".$dbName); // on prépare notre requête + $requete_prepare->execute(); + + while($ligne = $requete_prepare->fetch(PDO::FETCH_ASSOC)) { + $temp = new $className(); + $temp->fromDb($ligne); + $result[] = $temp; + } + + return $result; + } } \ No newline at end of file diff --git a/css/bootstrap.css b/css/bootstrap.css index 245fca8..83d907f 100644 --- a/css/bootstrap.css +++ b/css/bootstrap.css @@ -499,7 +499,7 @@ cite { text-align: justify; } .text-muted { - color: rgba(255, 255, 255, 0.6); + color: rgba(0, 0, 0, 0.6); } .text-primary { color: #ad1d28; diff --git a/view/form.php b/view/form.php index 298d1ef..1669c6f 100644 --- a/view/form.php +++ b/view/form.php @@ -3,7 +3,7 @@ <div class="page-header"> <h1><?php echo $formConf->getTitle(); ?></h1> </div> - <form role="form"> + <form role="form" action ="action.php"> <?php foreach($formConf->getFields() as $field): ?> <?php echo $field->html(); ?> <?php endforeach; ?> -- GitLab