Advertisement
Guest User

Untitled

a guest
Jun 16th, 2017
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.68 KB | None | 0 0
  1. -------register.php--------
  2. <?php
  3. if(isset($_POST['submit'])) {
  4. require('config.php');
  5. if(!$_POST['user'] || !$_POST['pass1'] || !$_POST['pass2']) {
  6. die('<strong>You must fill in all of the feilds!!!<BR></strong>');
  7. }
  8. else {
  9. $user = mysql_real_escape_string($_POST['user']);
  10. $pass = md5('kikugalanet' .mysql_real_escape_string($_POST['pass1']). '');
  11. }
  12. $pass2 = md5('kikugalanet' .mysql_real_escape_string($_POST['pass2']). '');
  13. if(exi($user) != '0') {
  14. die("Username: '".$user."' is in use!");
  15. }
  16. if($pass != $pass2) {
  17. die('<strong>Passwords dont match!</strong>');
  18. }
  19. $nww = nw($user, $pass);
  20. if ($nww){
  21. echo("<p class='b01'><strong>Registration Complete!</strong></p>");
  22. }else {
  23. echo("<p class='b01'><strong>Registration Failed!</strong></p>");
  24. }}
  25. ?>
  26.  
  27.  
  28.  
  29. -------config.php----------
  30. <?php
  31. /* Made by Daison6 of RageZone as DeadlyMan of OsaFlyff Support Forum */
  32.  
  33. if(stristr($_SERVER['PHP_SELF'], "config.php")) die('asdada');
  34. $host = "localhost"; // host mysql
  35. $user = "user"; // mysql username
  36. $pass = "password"; // mysql password
  37. $db = "db"; // mysql db
  38.  
  39. mysql_connect($host,$user,$pass) or die(mysql_error());
  40. mysql_select_db($db) or die(mysql_error());
  41.  
  42. function nw($N, $C){
  43. $reg = mysql_query("INSERT INTO flyff_accounts (flyff_accountname, flyff_passwordhash, flyff_authoritylevel) VALUES( '$N', '$C', '70')")or die(mysql_error());
  44. return $reg;
  45. }
  46. function exi($user){
  47. $check = mysql_query("SELECT * FROM flyff_accounts WHERE flyff_accountname = '$user'");
  48. $check2 = mysql_num_rows($check);
  49. return $check2;
  50. }
  51.  
  52.  
  53. $checkusers = mysql_query("SELECT * FROM flyff_accounts WHERE flyff_linestatus = '01001'");
  54. $showusers = mysql_num_rows($checkusers);
  55. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement