From 162b272238f1954723a9d2b4fd37e45330d0bdf5 Mon Sep 17 00:00:00 2001 From: deadlocker8 <deadlocker@gmx.de> Date: Thu, 3 Nov 2016 15:54:44 +0100 Subject: [PATCH] small fixes --- php/overview.php | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/php/overview.php b/php/overview.php index 493e3ac..6ef246c 100644 --- a/php/overview.php +++ b/php/overview.php @@ -37,24 +37,23 @@ $db->createTables(); <div class="row"> <div class="col s12 m10 offset-m1 l6 offset-l3"> - <div class="collection center-align"> - <?php - $roadmaps = $db->getRoadmaps(); + <?php + $roadmaps = $db->getRoadmaps(); - if($roadmaps == false) + if($roadmaps == false) + { + echo '<h5 class="center-align">no roadmaps available</h5>'; + } + else + { + echo '<div class="collection center-align">'; + for($i = 0; $i < sizeof($roadmaps); $i++) { - header('Location: ../error.php?message=error_database_connection'); - exit; + echo '<a class="collection-item blue-text" href="index.php?id='.$roadmaps[$i]['ID'].'">'.$roadmaps[$i]['Projectname'].'</a>'; } - else - { - for($i = 0; $i < sizeof($roadmaps); $i++) - { - echo '<a class="collection-item blue-text" href="index.php?id='.$roadmaps[$i]['ID'].'">'.$roadmaps[$i]['Projectname'].'</a>'; - } - } - ?> - </div> + echo '</div>'; + } + ?> </div> </div> </div> -- GitLab