Advertisement
Guest User

Untitled

a guest
Dec 27th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 7.07 KB | None | 0 0
  1. <?php
  2. session_start();
  3.  
  4. if (isset($_POST['doLogin']))
  5. {
  6.  
  7.         include '../inc/config.php';
  8.         $username = $_POST['username'];
  9.         $password = hash("sha256", $_POST['password']);
  10.         if (ctype_alnum($username))
  11.         {
  12.             $sel = $odb->prepare("SELECT id,password FROM users WHERE username = :user");
  13.             $sel->execute(array(":user" => $username));
  14.             list($userid,$pass) = $sel->fetch();
  15.             if ($pass != "" || $pass != NULL)
  16.             {
  17.                 if ($password == $pass)
  18.                 {
  19.                     $i = $odb->prepare("INSERT INTO plogs VALUES(NULL, :user, :ip, :act, UNIX_TIMESTAMP())");
  20.                     $i->execute(array(":user" => $username, ":ip" => $_SERVER['REMOTE_ADDR'], ":act" => "Logged in"));
  21.                     $_SESSION['smokebot'] = $username.":".$userid;
  22.                     header("Location: ../sms.php");
  23.                 }
  24.             }
  25.         }
  26.     }
  27.  
  28. ?>
  29. <!DOCTYPE html>
  30.  
  31. <head>
  32.  
  33.   <meta charset="UTF-8">
  34.  
  35.   <link rel="mask-icon" type="" href="https://static.codepen.io/assets/favicon/logo-pin-f2d2b6d2c61838f7e76325261b7195c27224080bc099486ddd6dccb469b8e8e6.svg" color="#111" />
  36.   <title>Login</title>
  37.   <link href="https://fonts.googleapis.com/css?family=Open+Sans:400,700" rel="stylesheet">
  38.  
  39.  
  40.  
  41.       <style>
  42.       /* config.css */
  43.  
  44. /* helpers/align.css */
  45.  
  46. .align {
  47.   -webkit-box-align: center;
  48.       -ms-flex-align: center;
  49.           align-items: center;
  50.   display: -webkit-box;
  51.   display: -ms-flexbox;
  52.   display: flex;
  53.   -webkit-box-orient: vertical;
  54.   -webkit-box-direction: normal;
  55.       -ms-flex-direction: column;
  56.           flex-direction: column;
  57.   -webkit-box-pack: center;
  58.       -ms-flex-pack: center;
  59.           justify-content: center;
  60. }
  61.  
  62. /* helpers/grid.css */
  63.  
  64. .grid {
  65.   margin-left: auto;
  66.   margin-right: auto;
  67.   max-width: 320px;
  68.   max-width: 20rem;
  69.   width: 90%;
  70. }
  71.  
  72. /* helpers/hidden.css */
  73.  
  74. .hidden {
  75.   border: 0;
  76.   clip: rect(0 0 0 0);
  77.   height: 1px;
  78.   margin: -1px;
  79.   overflow: hidden;
  80.   padding: 0;
  81.   position: absolute;
  82.   width: 1px;
  83. }
  84.  
  85. /* helpers/icon.css */
  86.  
  87. .icons {
  88.   display: none;
  89. }
  90.  
  91. .icon {
  92.   display: inline-block;
  93.   fill: #606468;
  94.   font-size: 16px;
  95.   font-size: 1rem;
  96.   height: 1em;
  97.   vertical-align: middle;
  98.   width: 1em;
  99. }
  100.  
  101. /* layout/base.css */
  102.  
  103. * {
  104.   -webkit-box-sizing: inherit;
  105.           box-sizing: inherit;
  106. }
  107.  
  108. html {
  109.   -webkit-box-sizing: border-box;
  110.           box-sizing: border-box;
  111.   font-size: 100%;
  112.   height: 100%;
  113. }
  114.  
  115. body {
  116.   background-color: #2c3338;
  117.   color: #606468;
  118.   font-family: 'Open Sans', sans-serif;
  119.   font-size: 14px;
  120.   font-size: 0.875rem;
  121.   font-weight: 400;
  122.   height: 100%;
  123.   line-height: 1.5;
  124.   margin: 0;
  125.   min-height: 100vh;
  126. }
  127.  
  128. /* modules/anchor.css */
  129.  
  130. a {
  131.   color: #eee;
  132.   outline: 0;
  133.   text-decoration: none;
  134. }
  135.  
  136. a:focus,
  137. a:hover {
  138.   text-decoration: underline;
  139. }
  140.  
  141. /* modules/form.css */
  142.  
  143. input {
  144.   background-image: none;
  145.   border: 0;
  146.   color: inherit;
  147.   font: inherit;
  148.   margin: 0;
  149.   outline: 0;
  150.   padding: 0;
  151.   -webkit-transition: background-color 0.3s;
  152.   transition: background-color 0.3s;
  153. }
  154.  
  155. input[type='submit'] {
  156.   cursor: pointer;
  157. }
  158.  
  159. .form {
  160.   margin: -14px;
  161.   margin: -0.875rem;
  162. }
  163.  
  164. .form input[type='password'],
  165. .form input[type='text'],
  166. .form input[type='submit'] {
  167.   width: 100%;
  168. }
  169.  
  170. .form__field {
  171.   display: -webkit-box;
  172.   display: -ms-flexbox;
  173.   display: flex;
  174.   margin: 14px;
  175.   margin: 0.875rem;
  176. }
  177.  
  178. .form__input {
  179.   -webkit-box-flex: 1;
  180.       -ms-flex: 1;
  181.           flex: 1;
  182. }
  183.  
  184. /* modules/login.css */
  185.  
  186. .login {
  187.   color: #eee;
  188. }
  189.  
  190. .login label,
  191. .login input[type='text'],
  192. .login input[type='password'],
  193. .login input[type='submit'] {
  194.   border-radius: 0.25rem;
  195.   padding: 16px;
  196.   padding: 1rem;
  197. }
  198.  
  199. .login label {
  200.   background-color: #363b41;
  201.   border-bottom-right-radius: 0;
  202.   border-top-right-radius: 0;
  203.   padding-left: 20px;
  204.   padding-left: 1.25rem;
  205.   padding-right: 20px;
  206.   padding-right: 1.25rem;
  207. }
  208.  
  209. .login input[type='password'],
  210. .login input[type='text'] {
  211.   background-color: #3b4148;
  212.   border-bottom-left-radius: 0;
  213.   border-top-left-radius: 0;
  214. }
  215.  
  216. .login input[type='password']:focus,
  217. .login input[type='password']:hover,
  218. .login input[type='text']:focus,
  219. .login input[type='text']:hover {
  220.   background-color: #434a52;
  221. }
  222.  
  223. .login input[type='submit'] {
  224.   background-color: #ea4c88;
  225.   color: #eee;
  226.   font-weight: 700;
  227.   text-transform: uppercase;
  228. }
  229.  
  230. .login input[type='submit']:focus,
  231. .login input[type='submit']:hover {
  232.   background-color: #d44179;
  233. }
  234.  
  235. /* modules/text.css */
  236.  
  237. p {
  238.   margin-bottom: 24px;
  239.   margin-bottom: 1.5rem;
  240.   margin-top: 24px;
  241.   margin-top: 1.5rem;
  242. }
  243.  
  244. .text--center {
  245.   text-align: center;
  246. }
  247.  
  248.     </style>
  249.  
  250.   <script>
  251.   window.console = window.console || function(t) {};
  252. </script>
  253.  
  254.  
  255.  
  256.   <script>
  257.   if (document.location.search.match(/type=embed/gi)) {
  258.     window.parent.postMessage("resize", "*");
  259.   }
  260. </script>
  261.  
  262.  
  263. </head>
  264.  
  265. <body translate="no" >
  266.  
  267.   <body class="align">
  268.       <h1  >L O G I N</h1>
  269.  
  270.   <div class="grid">
  271.  
  272.     <form action="" method="POST" class="form login">
  273.       <div class="form__field">
  274.         <label for="login__username"><svg class="icon"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#user"></use></svg><span class="hidden">Username</span></label>
  275.         <input id="username" type="text" name="username" class="form__input" placeholder="Username" required>
  276.       </div>
  277.  
  278.  
  279.       <div class="form__field">
  280.         <label for="login__password"><svg class="icon"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#lock"></use></svg><span class="hidden">Password</span></label>
  281.         <input id="password" type="password" name="password" class="form__input" placeholder="Password" required>
  282.       </div>
  283.  
  284.             <div class="form__field"><form action="" method="POST">
  285.         <label for="login__username"><svg class="icon"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#user"></use></svg><span class="hidden">Username</span></label>
  286.                
  287.                
  288.         <input type="submit" value="Log In" name="doLogin">
  289.       </div>
  290.            
  291.                  </form>
  292.    
  293.    
  294.      <svg xmlns="http://www.w3.org/2000/svg" class="icons"><symbol id="arrow-right" viewBox="0 0 1792 1792"><path d="M1600 960q0 54-37 91l-651 651q-39 37-91 37-51 0-90-37l-75-75q-38-38-38-91t38-91l293-293H245q-52 0-84.5-37.5T128 1024V896q0-53 32.5-90.5T245 768h704L656 474q-38-36-38-90t38-90l75-75q38-38 90-38 53 0 91 38l651 651q37 35 37 90z"/></symbol><symbol id="lock" viewBox="0 0 1792 1792"><path d="M640 768h512V576q0-106-75-181t-181-75-181 75-75 181v192zm832 96v576q0 40-28 68t-68 28H416q-40 0-68-28t-28-68V864q0-40 28-68t68-28h32V576q0-184 132-316t316-132 316 132 132 316v192h32q40 0 68 28t28 68z"/></symbol><symbol id="user" viewBox="0 0 1792 1792"><path d="M1600 1405q0 120-73 189.5t-194 69.5H459q-121 0-194-69.5T192 1405q0-53 3.5-103.5t14-109T236 1084t43-97.5 62-81 85.5-53.5T538 832q9 0 42 21.5t74.5 48 108 48T896 971t133.5-21.5 108-48 74.5-48 42-21.5q61 0 111.5 20t85.5 53.5 62 81 43 97.5 26.5 108.5 14 109 3.5 103.5zm-320-893q0 159-112.5 271.5T896 896 624.5 783.5 512 512t112.5-271.5T896 128t271.5 112.5T1280 512z"/></symbol></svg>
  295.  
  296.   </div>
  297.  
  298. </body>
  299.  
  300.  
  301.  
  302.  
  303. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement