Guest User

Untitled

a guest
Jun 22nd, 2018
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.33 KB | None | 0 0
  1. <?php
  2. include('header.php');
  3. // Check to see if the Configuration File has been written, if so then show the Database Selection Box
  4. echo "<div id='login'></div>";
  5. if(file_exists('config.php')){
  6. include_once('config.php');
  7. if(isset($_SESSION['suser']) && isset($_SESSION['spass'])){
  8. if($_SESSION['suser'] == DBUSER && $_SESSION['spass'] == DBPASS){
  9. echo "<div class='navBar'><img id='navbarbg' src='images/nav.gif' alt='navigation menu' />";
  10. include_once('selectdb.php');
  11. echo "<div id='ResponseDBmenu'></div>";
  12. echo "</div>";
  13. echo "<div class='main'>";
  14. echo "<div id='ResponseTbl'></div>";
  15. }else{
  16. include('login.php');
  17. echo "invalid username or password";
  18. }
  19. }else{
  20. include('login.php');
  21. echo "session not started";
  22. }
  23. }else{
  24. echo "<table class='formStep1'>";
  25. echo '<tr><td id="title" colspan="2"><h1>WEBSERVER CONFIGURATION</h1>';
  26. echo 'Before Continuing please create your database and add a user to that database</td></tr>';
  27. echo '<form name="createconfig" action="createconfig.php" method="POST">';
  28. echo '<tr><td width="120px"><label>Hostname: </label></td><td><input name="host" value="localhost"></input></td></tr>';
  29. echo '<tr><td><label>Database Username: </label></td><td><input name="user"></input></td></tr>';
  30. echo '<tr><td><label>Database Password: </label></td><td><input name="pass" type="password"></input></td></tr>';
  31. 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>';
  32. echo '<tr><td><label>Local Path: </label></td><td><input name="path"></input></td></tr>';
  33. 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>';
  34. 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>';
  35. echo 'Local Path to save the DB Connect file (example: ../../) is used to go 2 directories behind the current directory</div>';
  36. echo '</form>';
  37. echo '</tr></td></table>';
  38. echo '</div>';
  39. }
  40. include('footer.php');
  41. ?>
Add Comment
Please, Sign In to add comment