Guest User

Untitled

a guest
Jan 22nd, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. <?php
  2.  
  3. include("../config.php");
  4.  
  5. $lock = "installer.lock";
  6. if (!file_exists($lock)) {
  7.  
  8. $connection = mysql_connect($host, $username, $password);
  9. if (!$connection) { die('Could not connect: ' . mysql_error()); }
  10. else {
  11. echo "Connected!";
  12.  
  13. mysql_select_db($database, $connection);
  14. $query = "CREATE TABLE {$prefix}members
  15. (
  16. Username varchar(15),
  17. Password varchar(15),
  18. Email varchar(255),
  19. Admin int
  20. )";
  21.  
  22. if (mysql_query($query, $connection)) {
  23. echo "Success!";
  24. mysql_close($close, $connection); }
  25. else { echo "Failure! :("; }
  26.  
  27. // Create Installer Lock
  28. $file = "installer.lock";
  29. $handle = fopen($file, "w") or die("Can't open File");
  30. fclose($handle);
  31.  
  32. }}
  33. else {
  34.  
  35. echo "The Installer is locked. Please delete installer.lock before continuing";
  36.  
  37. }
  38.  
  39. ?>
  40.  
  41. <title>Installer</title>
Add Comment
Please, Sign In to add comment