Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include('header.php');
- // Check to see if the Configuration File has been written, if so then show the Database Selection Box
- echo "<div id='login'></div>";
- if(file_exists('config.php')){
- include_once('config.php');
- if(isset($_SESSION['suser']) && isset($_SESSION['spass'])){
- if($_SESSION['suser'] == DBUSER && $_SESSION['spass'] == DBPASS){
- echo "<div class='navBar'><img id='navbarbg' src='images/nav.gif' alt='navigation menu' />";
- include_once('selectdb.php');
- echo "<div id='ResponseDBmenu'></div>";
- echo "</div>";
- echo "<div class='main'>";
- echo "<div id='ResponseTbl'></div>";
- }else{
- include('login.php');
- echo "invalid username or password";
- }
- }else{
- include('login.php');
- echo "session not started";
- }
- }else{
- echo "<table class='formStep1'>";
- echo '<tr><td id="title" colspan="2"><h1>WEBSERVER CONFIGURATION</h1>';
- echo 'Before Continuing please create your database and add a user to that database</td></tr>';
- echo '<form name="createconfig" action="createconfig.php" method="POST">';
- echo '<tr><td width="120px"><label>Hostname: </label></td><td><input name="host" value="localhost"></input></td></tr>';
- echo '<tr><td><label>Database Username: </label></td><td><input name="user"></input></td></tr>';
- echo '<tr><td><label>Database Password: </label></td><td><input name="pass" type="password"></input></td></tr>';
- echo '<tr><td><label>Configuration Database: </label></td><td><input name="dbconfig"></input> <font color="darkred"><b>*Used to store information of the last items you selected</b></font></td></tr>';
- echo '<tr><td><label>Local Path: </label></td><td><input name="path"></input></td></tr>';
- echo '<tr><td colspan="2" align="center"><input id="submit" type="image" width="175px" src="images/submit.png" onmouseover="document.getElementById(\'submit\').src = \'images/submit_over.png\';" onmouseout="document.getElementById(\'submit\').src = \'images/submit.png\';"> </input></td></tr>';
- echo '<tr><td colspan="2"><div id="note">NOTE<hr>I suggest putting this path 1 directory behind the web directory so it cannot be accessed from the website<br>';
- echo 'Local Path to save the DB Connect file (example: ../../) is used to go 2 directories behind the current directory</div>';
- echo '</form>';
- echo '</tr></td></table>';
- echo '</div>';
- }
- include('footer.php');
- ?>
Add Comment
Please, Sign In to add comment