Advertisement
Guest User

adminCP Index Page 2

a guest
May 28th, 2016
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.21 KB | None | 0 0
  1. <?php
  2. session_start();
  3. ?>
  4. <!DOCTYPE html>
  5. <html>
  6. <head>
  7. <title>Admin Control Panel - SVM</title>
  8. <link type="text/css" rel="stylesheet" href="css/style.css" media="screen" />
  9. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  10. <meta name="keywords" content="" />
  11. <meta name="description" content="" />
  12. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  13. </head>
  14. <body>
  15. <h1 class="title">Welcome at Admin Control Panel of SVM</h1>
  16. <?php
  17. if (!isset($_SESSION["username"]))
  18. {
  19. die("<form method=\"POST\" action=\"login.php\" style=\"min-width: 80%; text-align: center;\">
  20. <input name=\"adminUsername\" type=\"text\" placeholder=\"Enter your username\" /><br />
  21. <input name=\"adminPassword\" type=\"password\" placeholder=\"Enter your password\" /><br />
  22. <input name=\"do\" type=\"submit\" value=\"login\" />
  23. </form>");
  24. }
  25. else
  26. {
  27. if ($_SESSION["username"] == "")
  28. {
  29. echo("<h3 class=\"title\">Invalid login data</h3>
  30. <form method=\"POST\" action=\"login.php\" style=\"min-width: 80%; text-align: center;\">
  31. <input name=\"adminUsername\" type=\"text\" placeholder=\"Enter your username\" /><br />
  32. <input name=\"adminPassword\" type=\"password\" placeholder=\"Enter your password\" /><br />
  33. <input name=\"do\" type=\"submit\" value=\"login\" />
  34. </form>");
  35. session_unset();
  36. session_destroy();
  37. exit;
  38. }
  39. }
  40. ?>
  41.  
  42. <div style="margin:0 0 10px 50px; padding: 5px 20px; display: inline-block; font-size: 1.33em; font-weight: bold; border: 3px solid #3751A6; color: #3751A6; background-color: #ADD8EC; border-radius: 10px; cursor: default; "><?php echo("Welcome $_SESSION[username].");?></div>
  43. <a href="logout.php"><div style="float: right; margin:0 50px 10px 0; padding: 5px 20px; display: inline-block; font-size: 1.33em; font-weight: bold; border: 3px solid #3751A6; color: #3751A6; background-color: #ADD8EC; border-radius: 10px; cursor: pointer; ">Logout</div></a>
  44. <ul>
  45. <li><a href="home">Home Page Management</a></li>
  46. <li><a href="#">Honor List Page Management</a></li>
  47. <li><a href="#">Exam Results Page Management</a></li>
  48. <li><a href="#">Contact Us Page Management</a></li>
  49. </ul>
  50.  
  51.  
  52. </body>
  53. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement