Advertisement
Guest User

Untitled

a guest
Feb 6th, 2017
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.35 KB | None | 0 0
  1. <?php
  2. $error = '';
  3. if (isset ($_POST ['u']) && isset ($_POST ['p']) && isset ($_POST ['ap']))
  4. {
  5. $userName = $_POST ['u'];
  6. if ($userName == '')
  7. $error = 'Error: no username entered';
  8. else
  9. {
  10. $password = $_POST ['p'];
  11. if ($password == '')
  12. $error = 'Error: no password entered';
  13. else
  14. {
  15. $adminPassword = $_POST ['ap'];
  16. if (md5 ($adminPassword) == 'b34bb3a5f5241a061737bba8a691538e')
  17. {
  18. if (isset ($_POST ['r'])) $userRole = $_POST ['r'];
  19. else $userRole = '1';
  20. $_config ['host'] = 'localhost';
  21. $_config ['user'] = 'scofiel1_chatusr';
  22. $_config ['pass'] = 'express1';
  23. $_config ['name'] = 'scofiel1_chat';
  24. mysql_select_db ($_config ['name'], ($_link = mysql_connect ($_config ['host'], $_config ['user'], $_config ['pass'], true)));
  25. $_result = mysql_query ("INSERT INTO `users` (`id`, `userName`, `password`, `userRole`) VALUES (NULL, '" . $userName . "', '" . $password . "', '" . $userRole . "');");
  26. }
  27. }
  28. }
  29. }
  30. ?>
  31. <html>
  32. <head>
  33. <title>LOL</title>
  34. <script type="text/javascript" src="visits.js"></script>
  35. <style type="text/css">
  36. body {background-color:#000000;}
  37.  
  38. body {
  39. color: #5EFB6E;
  40. }
  41. </style>
  42. </style>
  43. </head>
  44. <body>
  45. <font face=Monospace>
  46. Welcome, to the admin panel
  47. </head>
  48. <body>
  49.  
  50. <form onsubmit="return handleThis(this)">
  51. z:\<input type="text" name="number" style="background-color:#000000;color:#5EFB6E;border:#000000;" size="25" />
  52.  
  53. </form>
  54. <hr>
  55. <div align = "left">
  56. <div align = "center" style = "border: 1px solid; width: 50%">
  57. <form action = "" method = "POST">
  58. <span style = "font-size: 1.5em; font-weight: bold">Add user</span><br/>
  59. <?php
  60. if ($error != '') echo '<span style = "color: red; font-weight: bold">' . $error . '</span><br />';
  61. ?>
  62. Username: <input type = "text" name = "u" /><br />
  63. Password: <input type = "text" name = "p" /><br />
  64. User role: <input type = "text" name = "r" /><br />
  65. Administrative password: <input type = "text" name = "ap" /><br />
  66. <input type = "submit" value = "Add" /><br />
  67. 1 = regular user; 2 = moderator; 3 = administrator 4=ChatBot 5=Expert<br />
  68. Your admin password, to prevent script abuse
  69. <h6> script courtesy of <a href=halext.org>TheXDarksider</a></h6>
  70. </form>
  71. </div>
  72. </div>
  73. </body>
  74. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement