Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $error = '';
- if (isset ($_POST ['u']) && isset ($_POST ['p']) && isset ($_POST ['ap']))
- {
- $userName = $_POST ['u'];
- if ($userName == '')
- $error = 'Error: no username entered';
- else
- {
- $password = $_POST ['p'];
- if ($password == '')
- $error = 'Error: no password entered';
- else
- {
- $adminPassword = $_POST ['ap'];
- if (md5 ($adminPassword) == 'b34bb3a5f5241a061737bba8a691538e')
- {
- if (isset ($_POST ['r'])) $userRole = $_POST ['r'];
- else $userRole = '1';
- $_config ['host'] = 'localhost';
- $_config ['user'] = 'scofiel1_chatusr';
- $_config ['pass'] = 'express1';
- $_config ['name'] = 'scofiel1_chat';
- mysql_select_db ($_config ['name'], ($_link = mysql_connect ($_config ['host'], $_config ['user'], $_config ['pass'], true)));
- $_result = mysql_query ("INSERT INTO `users` (`id`, `userName`, `password`, `userRole`) VALUES (NULL, '" . $userName . "', '" . $password . "', '" . $userRole . "');");
- }
- }
- }
- }
- ?>
- <html>
- <head>
- <title>LOL</title>
- <script type="text/javascript" src="visits.js"></script>
- <style type="text/css">
- body {background-color:#000000;}
- body {
- color: #5EFB6E;
- }
- </style>
- </style>
- </head>
- <body>
- <font face=Monospace>
- Welcome, to the admin panel
- </head>
- <body>
- <form onsubmit="return handleThis(this)">
- z:\<input type="text" name="number" style="background-color:#000000;color:#5EFB6E;border:#000000;" size="25" />
- </form>
- <hr>
- <div align = "left">
- <div align = "center" style = "border: 1px solid; width: 50%">
- <form action = "" method = "POST">
- <span style = "font-size: 1.5em; font-weight: bold">Add user</span><br/>
- <?php
- if ($error != '') echo '<span style = "color: red; font-weight: bold">' . $error . '</span><br />';
- ?>
- Username: <input type = "text" name = "u" /><br />
- Password: <input type = "text" name = "p" /><br />
- User role: <input type = "text" name = "r" /><br />
- Administrative password: <input type = "text" name = "ap" /><br />
- <input type = "submit" value = "Add" /><br />
- 1 = regular user; 2 = moderator; 3 = administrator 4=ChatBot 5=Expert<br />
- Your admin password, to prevent script abuse
- <h6> script courtesy of <a href=halext.org>TheXDarksider</a></h6>
- </form>
- </div>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement