Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- if(file_exists('config.php')){
- if(file_exists('logindetails.php'))
- header("Location: ");
- }else{
- echo '
- <html>
- <head>
- <link rel="stylesheet" type="text/css" href="style1.css" />
- </head>
- <body>
- <h1>Installer</h1>
- <form action="" method="post">
- <div id="installer"><div id="border">
- Text: <br/>
- Website Title: <input type="text" name="title" id="title" style="margin-left:47px">
- <br/>
- Main Header: <input type="text" name="main_header" id="main_header" style="margin-left:47px">
- <br/>
- Sub Header: <input type="text" name="sub_header" id="sub_header" style="margin-left:55px">
- </div>
- <p>
- <div id="border">
- Background:
- <br/>
- Background Colour: <input type="text" name="bg_color" id="bg_color" style="margin-left:5px;">
- <br>
- Background Image: <input type="text" name="bg_image" id="bg_image" style="margin-left:10px;">
- <br/>
- Background Music: <input type="text" name="yt_url" id="yt_url" value=" (youtube url) " style="margin-left:10px;">
- </div>
- <p><div id="border">
- Meta Tags (help get you on google): <br/>
- Website Description: <input type="text" id="web_desc" name="web_desc">
- </br>
- Website Owner: <input type="text" id="web_owner" name="web_owner" style="margin-left:31px">
- </div>
- <p><div id="border">
- Admin Login:
- <br/>
- Username: <input type="text" id="username" name="username" style="margin-left:65px">
- <br/>
- Password: <input type="password" id="password" name="password" style="margin-left:68px">
- <p>
- <br/>
- <input type="submit" value="install" name="install" id="install" style="width:351px;height:70px;font-size:40px">
- </div>
- </form>
- </body>
- </html>
- ';
- }
- if(isset($_POST["install"])){
- $settings = '<?php
- $title = "'. $_POST["title"] .'";
- $header1 = "'. $_POST["main_header"] .'";
- $header2 = "'. $_POST["sub_header"] .'";
- $bg_color = "'. $_POST["bg_color"] .'";
- $bg_image = "'. $_POST["bg_image"] .'";
- $bg_music = "'. $_POST["yt_url"] .'";
- $metadesc = "'. $_POST["web_desc"] .'";
- $metaowner = "'. $_POST["web_owner"] .'";
- ?>';
- $Login = '<?php
- $username = "'. $_POST["username"] .'";
- $password = "'. md5($_POST["password"]) .'";
- <?';
- $myfile = 'config.php';
- $fh = fopen($myfile, "w");
- fwrite($fh,$settings);
- fclose($fh);
- $myfile2 = 'logindetails.php';
- $fh2 = fopen($myfile2, "w");
- fwrite($fh2,$Login);
- fclose($fh2);
- }
- ?>
Add Comment
Please, Sign In to add comment