Advertisement
Fray117

PHP Multi User Login in Array

Jul 29th, 2018
251
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 9.60 KB | None | 0 0
  1. <?php
  2. $CREDENTIALS = array('Fray117' => '34e4b7f1093144e1e178917946f46e5b', 'blackdeath' => '99c0f8cd7c7b049a27a3be5d1ddc5651', 'root' => '555d0fe0e710a911423fa738e8c325bb', 'KID2ZON3' => '424f7bccf8b5f2c121dfb0ace2ef62ba', 'E4OXY' => '4ea4b142c6b0178b8cc3cd73bdc77fef', 'WhiteDeath-SZY' => 'ceada9f33a310a28db99c465cf3b928b', 'br0k3nh34rtz' => '7796b23660a8248d623d8d677247d955');
  3. function login(){?>
  4.   <!DOCTYPE HTML>
  5.   <html>
  6.   <head>
  7.     <title>USER &#8250; Login</title>
  8.     <style media="screen" type="text/css">/* Extract from normalize.css by Nicolas Gallagher and Jonathan Neal git.io/normalize */ html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}a{background-color:transparent;-webkit-text-decoration-skip:objects}a:active,a:hover{outline-width:0}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}dfn{font-style:italic}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}figure{margin:1em 40px}img{border-style:none}svg:not(:root){overflow:hidden}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}hr{box-sizing:content-box;height:0;overflow:visible}button,input,select,textarea{font:inherit;margin:0}optgroup{font-weight:bold}button,input{overflow:visible}button,select{text-transform:none}button,html [type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner, [type=button]::-moz-focus-inner, [type=reset]::-moz-focus-inner, [type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring, [type=button]:-moz-focusring, [type=reset]:-moz-focusring, [type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:.35em .625em .75em}legend{color:inherit;display:table;max-width:100%;padding:0;white-space:normal}textarea{overflow:auto}[type=checkbox],[type=radio]{padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-input-placeholder{color:inherit;opacity:0.54}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}/* End extract */html,body{font-size:15px;line-height:1.5}html{overflow-x:hidden}h1{font-size:36px}h2{font-size:30px}h3{font-size:24px}h4{font-size:20px}h5{font-size:18px}h6{font-size:16px}.serif{font-family:serif}h1,h2,h3,h4,h5,h6{font-weight:200;margin:10px 0}.wide{letter-spacing:4px}hr{border:0;border-top:1px solid #eee;margin:20px 0}.image{max-width:100%;height:auto}img{vertical-align:middle}a{color:inherit}.table,.table-all{border-collapse:collapse;border-spacing:0;width:100%;display:table}.table-all{border:1px solid #ccc}.bordered tr,.table-all tr{border-bottom:1px solid #ddd}.striped tbody tr:nth-child(even){background-color:#f1f1f1}.top,.bottom{position:fixed;width:100%;z-index:1}.top{top:0}.bottom{bottom:0}.overlay{position:fixed;display:none;width:100%;height:100%;top:0;left:0;right:0;bottom:0;background-color:rgba(0,0,0,0.5);z-index:2}.display-topleft{position:absolute;left:0;top:0}.display-topright{position:absolute;right:0;top:0}.display-bottomleft{position:absolute;left:0;bottom:0}.display-bottomright{position:absolute;right:0;bottom:0}.display-middle{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%)}.display-left{position:absolute;top:50%;left:0%;transform:translate(0%,-50%);-ms-transform:translate(-0%,-50%)}.display-right{position:absolute;top:50%;right:0%;transform:translate(0%,-50%);-ms-transform:translate(0%,-50%)}.display-topmiddle{position:absolute;left:50%;top:0;transform:translate(-50%,0%);-ms-transform:translate(-50%,0%)}.display-bottommiddle{position:absolute;left:50%;bottom:0;transform:translate(-50%,0%);-ms-transform:translate(-50%,0%)}.display-container:hover .display-hover{display:block}.display-container:hover span.display-hover{display:inline-block}.display-hover{display:none}.display-position{position:absolute}.container,.panel{padding:0.01em 16px}.panel{margin-top:16px;margin-bottom:16px}.opacity,.hover-opacity:hover{opacity:0.60}.opacity-off,.hover-opacity-off:hover{opacity:1}.opacity-max{opacity:0.25}.opacity-min{opacity:0.75}.tiny{font-size:10px!important}.small{font-size:12px!important}.medium{font-size:15px!important}.large{font-size:18px!important}.xlarge{font-size:24px!important}.xxlarge{font-size:36px!important}.xxxlarge{font-size:48px!important}.jumbo{font-size:64px!important}.left-align{text-align:left!important}.right-align{text-align:right!important}.justify{text-align:justify!important}.center{text-align:center!important}.border-0{border:0!important}.border{border:1px solid #ccc!important}.border-top{border-top:1px solid #ccc!important}.border-bottom{border-bottom:1px solid #ccc!important}.border-left{border-left:1px solid #ccc!important}.border-right{border-right:1px solid #ccc!important}.topbar{border-top:6px solid #ccc!important}.bottombar{border-bottom:6px solid #ccc!important}.leftbar{border-left:6px solid #ccc!important}.rightbar{border-right:6px solid #ccc!important}</style>
  9.     <style type="text/css">
  10.     html {margin: 20px auto;background: #000000;color: #00FF00;text-align: center;font-family: "Courier New";white-space: nowrap;}
  11.     header {color: #00FF00;margin: 10px auto;}body,h1 {font-family: "Courier New"}
  12.     form {font-family: "Courier New";white-space: nowrap;}
  13.     input[type=password]{font-size: 20px;width: 400px;height: 40px;color: red;background: transparent;border: 1px solid #00FF00;text-align: center;}input[type=password]:hover {background-color: #1A1A1A}
  14.     input[type=text]{font-size: 20px;width: 400px;height: 40px;color: #00FF00;background: transparent;border: 1px solid #00FF00;text-align: center;}input[type=text]:hover{background-color: #1A1A1A;}
  15.     input[type=submit] {width: 400px;height: 40px;color: #00FF00;background: #000000;border: 1px solid #00FF00;text-align: center;}input[type=submit]:hover{background-color: #00FF00;color: #000000;}.button{padding-left: 90px;}
  16.     .no-js #bootanimation0,#bootanimation1 {display: none;}
  17.     #bootanimation0,#bootanimation1{position: absolute;left: 50%;top: 50%;z-index: 1;width: 150px;height: 150px;margin: -75px 0 0 -75px;border: 16px solid #F3F3F3;border-radius: 50%;border-top: 16px solid #00FF00;border-top: 16px solid transparent;width: 120px;height: 120px;}
  18.     #bootanimation0 {-webkit-animation: spin 1s linear infinite;animation: spin 1s linear infinite;}
  19.     #bootanimation1 {-webkit-animation: spin 2s linear infinite;animation: spin 2s linear infinite;}
  20.     @-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg);}100%{-webkit-transform:rotate(360deg);}}@keyframes spin{0%{transform:rotate(0deg);}100%{transform:rotate(360deg);}}
  21.     .animate-bottom{position:relative;-webkit-animation-name:animatebottom;-webkit-animation-duration:1s;animation-name:animatebottom;animation-duration:1s}@-webkit-keyframes animatebottom{from{bottom:-100px;opacity:0}to{bottom:0px;opacity:1}}@keyframes animatebottom{from{bottom:-100px;opacity:0}to{bottom:0;opacity:1}}#login {display:none;text-align:center;}#widgets-topleft,#widgets-topright,#widgets-bottomleft,#widgets-bottomright {display:none;}
  22.     </style>
  23.     <script type="text/javascript">
  24.     // Boot Function, make simpler to see :V I don't know what I'm doing because I'm just adding some features to make it cooler and something that make less boring, WHAT THE FUCK I'M TYPING THIS AND IT MAY MAKE THIS SOFTWARE HAD GREATER SIZE.
  25.     var bootTime;
  26.     function boot(){bootTime = setTimeout(showPage, 1500);}
  27.     function showPage(){document.getElementById("bootanimation0").style.display = "none";document.getElementById("bootanimation1").style.display = "none";document.getElementById("login").style.display = "block";document.getElementById("widgets-topleft").style.display = "block";document.getElementById("widgets-topright").style.display = "block";document.getElementById("widgets-bottomleft").style.display = "block";document.getElementById("widgets-bottomright").style.display = "block";}
  28.     </script>
  29.   </head>
  30.   <center>
  31.   <body onload="boot()" style="margin:0;">
  32.     <div id="bootanimation0"></div><div id="bootanimation1"></div>
  33.     <div style="display:none;" id="login" class="animate-bottom">
  34.       <header>
  35.         <pre>
  36.           <h1 class="center jumbo">LOGIN PAGE</h1>
  37.           <form class="center" method="post">
  38.             <input type="text" name="username" placeholder="Username" required autocomplete="off"><br>
  39.             <input type="password" name="password" placeholder="Password" required autocomplete="off"><br><br>
  40.             <input type="submit" name="login" value="LOGIN">
  41.           </form>
  42.         </pre>
  43.       </header>
  44.     </div>
  45.     <div id="widgets-topleft" class="display-topleft padding-large large"><?php $register_globals=(bool)ini_get('register_gobals');if($register_globals)$ip=getenv(REMOTE_ADDR);else$ip=$_SERVER['REMOTE_ADDR'];print "Connected from $ip" ?></div><div id="widgets-bottomright" class="display-bottomright padding-large"></div><div id="widgets-bottomleft" class="display-bottomleft padding-large">Developed by Fray117 & l0c4lh34rtz</div><div id="widgets-topright" class="display-topright padding-large medium"><?php echo date("l, F jS Y, H:i A"); ?></div>
  46.   </body>
  47.   <?php
  48.   exit;
  49. }
  50. if (!isset($_SESSION[md5($_SERVER['HTTP_HOST'])])) {
  51.   if ($CREDENTIALS[$_POST['username']] == md5($_POST['password'])) {
  52.     $_SESSION['username'] = $_POST['username'];
  53.     $_SESSION[md5($_SERVER['HTTP_HOST'])] = true;
  54.   }else{
  55.     login();
  56.   }
  57. }
  58. ?>
  59. </body>
  60. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement