adminpwd.php 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. include_once ('includes/checklogin.php');
  3. include_once('tools/util.php');
  4. $ini = read_config();
  5. include_once ('includes/head.php');
  6. //$salt = $ini['admin_pwd_salt'];
  7. include_once ('tools/htpasswd.php');
  8. include_once ('includes/nav.php');
  9. ?>
  10. <div class="container box">
  11. <div class="row">
  12. <div class="col-xs-12">
  13. <h2>Create Admin Password Hash</h2>
  14. <?php
  15. if (isset ( $_POST ['pwd'] )) {
  16. ?>
  17. <div class="alert alert-info">
  18. <?php
  19. echo "<p>Your new hash: " . htpasswd::htcrypt($_POST['pwd']) . "</p>";
  20. ?>
  21. </div>
  22. <?php
  23. }
  24. ?>
  25. <p>Create a new password hash for the config file:</p>
  26. <form class="navbar-form navbar-left" action="adminpwd.php" method="post">
  27. <div class="form-group">
  28. <p>
  29. <input class="form-control" type="password" name="pwd"
  30. placeholder="Password" />
  31. </p>
  32. <button type="submit" class="btn btn-default">Submit</button>
  33. </div>
  34. </form>
  35. </div>
  36. </div>
  37. </div>
  38. <?php
  39. include_once ('includes/nav.php');
  40. include_once ('includes/footer.php');
  41. ?>