echo '<br><h2>Album edited successfully</h2>'; } else { echo '<br><h2>Album deleted successfully</h2>'; } } if (isset($_GET['recordcompany'])) { $label = $_GET['recordcompany']; $result = $album->getByLabel($label); } elseif (isset($_GET['artist'])) { $artist = $_GET['artist']; $result = $album->getByArtist($artist); } else { $result = $album->allAlbums(); } $count = count($result); if (!adminLoggedIn() && !custLoggedIn()) { echo '<h3>You are not logged in. Please log in for full functionality</h3>'; } ?> <div class="row"> <div class="btn-group" style="margin-bottom: 20px;"> <?php if (adminLoggedIn()) { ?> <a class="btn btn-primary" href="add_album.php"><span class="glyphicon glyphicon-save"></span> Add an Album</a> <?php } ?> <button class="btn btn-primary" id="showAlbumSearch"><span class="glyphicon glyphicon-search"></span> Search</button>
} ?> </div> <div class="hidden col-sm-9 col-sm-offset-2" id="loginDiv" style="padding-bottom: 20px;"> <form action="<?php $_SERVER['PHP_SELF']; ?> " method="post" class="form-inline" role="form"> <div class="form-group"> <label class="sr-only" for="uname">label</label> <input type="text" class="form-control" name="uname" id="uname" placeholder="Username"> </div> <div class="form-group"> <div class="form-group"> <label for="password" class="sr-only">Password</label> <input type="password" class="form-control" id="password" name="password" placeholder="Password"> </div> </div> <button type="submit" class="btn btn-primary">Submit</button> </form> </div> <div class="container"> <?php if (custLoggedIn()) { ?> <h3>Welcome, <?php echo $_SESSION['custName']; ?> </h3> <?php }