diff --git a/class/objet.php b/class/objet.php index c7abade0287343331b337f8d3e199532f917d80c..5c2f502ce1a4eefba36b7a968158e05c3fd8eae8 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 245fca8d71cb63faab9d658a53888029faefce98..83d907f0a82054dc4a2df010822084365d10613c 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 298d1ef0f04aa53e59cbbd70454fbf8e06d95b28..1669c6f9076d402c7da5c2a20a95303b8bd1607c 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; ?>