Advertisement
Guest User

scode

a guest
Jul 6th, 2015
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.29 KB | None | 0 0
  1. <?php
  2. /* By Lex */
  3. define("IN_HOLOCMS", true);
  4. include('config.php');
  5. include('includes/mysql.php');
  6. session_start();
  7.  
  8. if(!session_is_registered('username')){
  9. header("location: index.php");
  10. exit;
  11. }
  12. $q = mysql_query("SELECT * FROM users WHERE USERNAME = '".$_SESSION['username']."' LIMIT 1");
  13. $myrow = mysql_fetch_assoc($q);
  14.  
  15.  
  16. if(session_is_registered('scode') || $_SESSION['scode'] !== 'no' & $my_row['rank'] >= 4){
  17. header("location: index.php");
  18. exit;
  19. } else {
  20.  
  21. if($myrow['scode'] == ''){
  22. ?>
  23. <center>PERMESSI DISABILITATI, CONTATTA L'ADMIN PER ATTIVARLI!</center>
  24.  
  25. <?php } else {?>
  26. <html>
  27. <head>
  28. <title>Sicurezza</title>
  29. </head>
  30. <body style=" margin: 0px;
  31. background: url(https://habboo-a.akamaihd.net/c_images/reception/paris15_background_left.png) left bottom no-repeat,url(https://habboo-a.akamaihd.net/c_images/reception/paris15_background_right.png) right bottom no-repeat,url(http://i.imgur.com/RvR1eef.png) center bottom repeat-x;
  32. width: 100%;
  33. background-color: #024172;
  34. min-height: 400px;
  35. font-family: "Myriad-Pro";
  36. background-attachment: fixed;
  37. text-decoration: none;
  38. margin: 0;
  39. padding: 0;">
  40. <center><div style="font-family:cursive;">INSERISCI IL TUO STAFF CODE <br><br></div>
  41. <form action="" method="POST">
  42. <input name="do" value="sc" type="hidden" readonly>
  43. <input name="scode" type="password" autocomplete="off" style=" outline: none;
  44. border-radius: 5px;
  45. border: 2px solid #5593DA;
  46. padding: 7px;
  47. text-align: center;
  48. position:relative;
  49. margin: 0 auto;"><br><br>
  50. <button type="submit" style=" width: 130px;
  51. height: 35px;
  52. background-color: #0065BA;
  53. position: relative;
  54. border-radius: 5px;
  55. cursor: pointer;
  56. color: #FFF;
  57. text-decoration: none;
  58. font-family: Calibri;
  59. font-size: 16px;
  60. display: inline-block;
  61. text-align: center;
  62. margin: 0 auto;
  63. font-weight: bold;
  64. border-color: #5593DA;
  65. text-transform: uppercase;
  66. box-shadow: 0 3px 0 1px rgba(0,0,0,.3);
  67. border-width: 2px;
  68. border-style: solid;
  69. outline: none;">ACCEDI</button></form></center>
  70. </body>
  71. </html>
  72. <?php
  73. $do = $_POST['do'];
  74. if($do == 'sc'){
  75. $scode1 = $_POST['scode'];
  76.  
  77. if($myrow['scode'] == $scode1){
  78. $_SESSION['scode'] = $scode1;
  79.  
  80. header("location:me.php");
  81. } else {
  82. echo '<br> Codice Errato';
  83. }
  84.  
  85. }
  86.  
  87.  
  88. } }?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement