Advertisement
KHIT

mode_menu

May 1st, 2012
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.67 KB | None | 0 0
  1. <script src="js/placeholder.js"></script>
  2.     <script type="text/javascript">
  3.     //JavaScript fallback til HTML5 placeholder attribut
  4.     window.onload = function(){
  5.         var arr = document.getElementsByTagName("input");
  6.         for (i = 0; i < arr.length; i++) {
  7.         if(arr[i].className == "input-placeholder"){
  8.               inputPlaceholder( arr[i] );
  9.         }
  10.       }
  11.     }
  12.  
  13.     </script>
  14. <a href="http://localhost/eksamensprojekt/" id="pagelogo">Unsub</a>
  15.      <ul>
  16.      <li class="<?php if (strpos($_SERVER['PHP_SELF'], 'index.php')) echo 'current'; //Kigger om man er på en side der indeholder index.php i filnavnet og hvis ja, sættes class="current" ?>"><a href="index.php">Forside</a></li>
  17.      <li class="<?php if (strpos($_SERVER['PHP_SELF'], 'mode.php')) echo 'current'; ?>"><a href="mode.php">Mode</a></li>
  18.      <li class="<?php if (strpos($_SERVER['PHP_SELF'], 'om.php')) echo 'current'; ?>"><a href="om.php">Om os</a></li>
  19. </ul>
  20. <?php
  21. include 'inc/connect.php';
  22. if(isset($_SESSION['username'])) {;
  23. ?>
  24. <form action="http://localhost/eksamensprojekt/inc/logout.php" id="login">
  25. Velkommen <a href="usercp.php"><?php echo $_SESSION['name']; ?></a>
  26.     <input type="submit" value="Log ud"/>
  27. </form>
  28. <?php
  29. } else {
  30. ?>
  31. <form name="login" id="login" action="http://localhost/eksamensprojekt/inc/auth.php" method="post">
  32. Brugernavn: <input type="text" name="username" id="username" class="input-placeholder" placeholder="brugernavn" style="font-size: 10px;" /> Password: <input type="password" name="password" style="font-size: 10px;" /> <input type="submit" name="submit" value="Log ind" /><a href="http://localhost/eksamensprojekt/opret_bruger.php">Opret bruger</a></form>
  33. <?php
  34. }
  35. ?>
  36. <div>
  37. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement