Guest User

Untitled

a guest
Nov 24th, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.31 KB | None | 0 0
  1. <?
  2. if(file_exists('config.php')){
  3. if(file_exists('logindetails.php'))
  4. header("Location: ");
  5. }else{
  6. echo '
  7.  
  8. <html>
  9. <head>
  10. <link rel="stylesheet" type="text/css" href="style1.css" />
  11. </head>
  12. <body>
  13. <h1>Installer</h1>
  14. <form action="" method="post">
  15. <div id="installer"><div id="border">
  16. Text: <br/>
  17. Website Title: <input type="text" name="title" id="title" style="margin-left:47px">
  18. <br/>
  19. Main Header: <input type="text" name="main_header" id="main_header" style="margin-left:47px">
  20. <br/>
  21. Sub Header: <input type="text" name="sub_header" id="sub_header" style="margin-left:55px">
  22. </div>
  23. <p>
  24. <div id="border">
  25. Background:
  26. <br/>
  27. Background Colour: <input type="text" name="bg_color" id="bg_color" style="margin-left:5px;">
  28. <br>
  29. Background Image: <input type="text" name="bg_image" id="bg_image" style="margin-left:10px;">
  30. <br/>
  31. Background Music: <input type="text" name="yt_url" id="yt_url" value=" (youtube url) " style="margin-left:10px;">
  32. </div>
  33. <p><div id="border">
  34. Meta Tags (help get you on google): <br/>
  35. Website Description: <input type="text" id="web_desc" name="web_desc">
  36. </br>
  37. Website Owner: <input type="text" id="web_owner" name="web_owner" style="margin-left:31px">
  38. </div>
  39. <p><div id="border">
  40. Admin Login:
  41. <br/>
  42. Username: <input type="text" id="username" name="username" style="margin-left:65px">
  43. <br/>
  44. Password: <input type="password" id="password" name="password" style="margin-left:68px">
  45. <p>
  46. <br/>
  47. <input type="submit" value="install" name="install" id="install" style="width:351px;height:70px;font-size:40px">
  48. </div>
  49. </form>
  50. </body>
  51. </html>
  52.  
  53. ';
  54. }
  55.  
  56. if(isset($_POST["install"])){
  57. $settings = '<?php
  58. $title = "'. $_POST["title"] .'";
  59. $header1 = "'. $_POST["main_header"] .'";
  60. $header2 = "'. $_POST["sub_header"] .'";
  61. $bg_color = "'. $_POST["bg_color"] .'";
  62. $bg_image = "'. $_POST["bg_image"] .'";
  63. $bg_music = "'. $_POST["yt_url"] .'";
  64. $metadesc = "'. $_POST["web_desc"] .'";
  65. $metaowner = "'. $_POST["web_owner"] .'";
  66. ?>';
  67.  
  68. $Login = '<?php
  69. $username = "'. $_POST["username"] .'";
  70. $password = "'. md5($_POST["password"]) .'";
  71. <?';
  72.  
  73. $myfile = 'config.php';
  74. $fh = fopen($myfile, "w");
  75. fwrite($fh,$settings);
  76. fclose($fh);
  77.  
  78. $myfile2 = 'logindetails.php';
  79. $fh2 = fopen($myfile2, "w");
  80. fwrite($fh2,$Login);
  81. fclose($fh2);
  82. }
  83.  
  84.  
  85. ?>
Add Comment
Please, Sign In to add comment