Advertisement
Guest User

Login Index

a guest
Oct 13th, 2018
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 2.04 KB | None | 0 0
  1. <html>
  2. <head><title>Justice Signup</title></head>
  3. <body>
  4.     <?php
  5.    if(!isset($_COOKIE['Username']) and !isset($_COOKIE['Password'])){
  6.        // DO NOTHING
  7.        }else{
  8.        //Below alerts the user if they aren't logged in. It also makes the window go back.
  9.    echo <<<EOF
  10.    <script>
  11.     alert("You are already logged in!");
  12.     location = "/";
  13.    
  14.     </script>
  15. EOF;
  16.     }
  17. ?>
  18.     <?php
  19. if(isset($_COOKIE["Username"]) and isset($_COOKIE["Password"])) {
  20. ?>
  21. <div style="background-color:blue;float:right;" class="Profile">
  22.     <h2 class="profile">Profile Options</h2>
  23.     <div class="Options">
  24.         <h3 style="text-align:center;"><a href="/Settings.php"><button style="border-color:cyan;background-color:cyan;">User Information</button></a></h3>
  25.         <h3 style="text-align:center;"><a href="/Logoff.php"><button style="border-color:cyan;background-color:cyan;">Log Off</button></a></h3>
  26.        
  27.        
  28.     </div>
  29.    
  30. </div>
  31. <?php
  32. } else {
  33. ?>
  34. <div style="background-color:blue;float:right;" class="Login">
  35.     <h2 class="login"><a href="/Access"><button style="border-color:cyan;background-color:cyan;">Login / Signup</button></a></h2>
  36.    
  37.    
  38. </div>
  39. <?php
  40. }
  41. ?>
  42. <h1>The Justice Signup</h1>
  43. <h2>Signup to the Justice Engine to get all the latest news and games! Plus get some Purchasable Games <b>FREE!</b></h2>
  44. <form action="cuser.php" method="post">
  45. Username: <input type="text" name="uname"><br>
  46. Password: <input type="password" name="pass"><br>
  47. <input type="submit" value="Submit Account">
  48. <h3>By clicking Submit Account, you are agreeing to our <a href="/Policy">Privacy Policy.</a></h3>
  49. </form>
  50.  
  51. <br>
  52. <h2>
  53. <?php
  54. error_reporting(0);
  55.  
  56. $fi = new FilesystemIterator(Users, FilesystemIterator::SKIP_DOTS);
  57. printf("%d people have signed up to The Justice Engine!", iterator_count($fi));
  58.  
  59. $myfile = fopen("UserCount.txt", "w") or die("Unable to open file!");
  60. $txt = iterator_count($fi);
  61. fwrite($myfile, $txt);
  62.  
  63.  
  64.  
  65. ?>
  66. </h2>
  67. <br>
  68. <br>
  69. <a href="/"><button>Go Back To Home Page</button></a>
  70. </body>
  71. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement