loginPrompt.php 1.2 KB

123456789101112131415161718192021222324252627282930
  1. <nav class="navbar navbar-fixed-top">
  2. <div class="container">
  3. <div class="navbar-header">
  4. <a href="#" type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar"
  5. aria-expanded="false" aria-controls="navbar">Menu</a>
  6. <a class="navbar-brand" href="/">Browser Game</a>
  7. </div>
  8. <div id="navbar" class="collapse navbar-collapse">
  9. <?php if($isLoggedIn) { ?>
  10. <ul class="nav navbar-nav">
  11. <li class="active"><a href="/dashboard">Dashboard</a></li>
  12. <li><a href="/profile">Profile</a></li>
  13. <li><a href="/logout">Logout</a></li>
  14. </ul>
  15. <?php } else { ?>
  16. <form class="navbar-form navbar-right" method="post" action="/login">
  17. <div class="form-group">
  18. <input type="email" name="email" placeholder="your@email.com" class="form-control">
  19. </div>
  20. <div class="form-group">
  21. <input type="password" name="password" placeholder="password" class="form-control">
  22. </div>
  23. <input type="hidden" name="current" value="<?php echo $url->toString(); ?>" />
  24. <button type="submit" name="submit" class="btn">Login</button>
  25. </form>
  26. <?php } ?>
  27. </div>
  28. </div>
  29. </nav>