functions.php 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <?php
  2. // SVMM - Simple VM Manager - for Qemu KVM
  3. // (C) Chris Dorman, 2020
  4. // License: CC-BY-NC-SA version 3.0
  5. // http://github.com/Pentium44/SVMM
  6. function loginForm() {
  7. ?>
  8. <br />
  9. <div class="login">
  10. Don't have an account? No problem, <a href="<?php echo $_SERVER['PHP_SELF']; ?>?forms=register">register here</a>!<br /><br />
  11. <form action="<?php echo $_SERVER['PHP_SELF']; ?>?do=login" method="post">
  12. <table><tr><td>
  13. Username:</td><td> <input class="text" type="text" name="username"></td></tr><tr><td>
  14. Password:</td><td> <input class="text" type="password" name="password"></td></tr></table>
  15. <input style="padding: 2px;" class="text" type="submit" name="submitBtn" value="Login">
  16. </form>
  17. </div>
  18. <?php
  19. }
  20. function changePassForm() {
  21. ?>
  22. <br />
  23. <div class="chgpass">
  24. <form action="<?php echo $_SERVER['PHP_SELF']; ?>?do=changepass" method="post">
  25. <table><tr><td>
  26. Old password:</td><td> <input class="text" type="password" name="oldpass"></td></tr><tr><td>
  27. Password:</td><td> <input class="text" type="password" name="password"></td></tr><tr><td>
  28. Password Again:</td><td> <input class="text" type="password" name="password_again"></td></tr>
  29. </table>
  30. <input class="text" type="submit" name="submitBtn" value="Change">
  31. </form>
  32. </div>
  33. <?php
  34. }
  35. /*function uploadForm() {
  36. print <<<EOD
  37. Upload
  38. <table style="margin:auto;">
  39. <form action="upload.php" method="post" enctype="multipart/form-data">
  40. <tr>
  41. <td>
  42. <input type="file" name="file[]" id="file" multiple><br>
  43. </td>
  44. <td>
  45. <input type="submit" name="submit" value="Upload">
  46. </td>
  47. </tr>
  48. </form>
  49. </table>
  50. EOD;
  51. }*/
  52. function registerForm() {
  53. ?>
  54. <br />
  55. <div class="login">
  56. Don't have a registration code? Reach out! cddo [at] riseup [dot] net<br />
  57. <form action="<?php echo $_SERVER['PHP_SELF']; ?>?do=register" method="post">
  58. <table><tr><td>
  59. Username:</td><td> <input class="text" type="text" name="username"></td></tr><tr><td>
  60. Full name:</td><td> <input class="text" type="text" name="fullname"></td></tr><tr><td>
  61. Email:</td><td><input class="text" type="text" name="email"></td></tr><tr><td>
  62. Password:</td><td> <input class="text" type="password" name="password"></td></tr><tr><td>
  63. Password again:</td><td> <input class="text" type="password" name="password-again"></td></tr><tr><td>
  64. Registration code (required):</td><td> <input class="text" type="text" name="codeword"></td></tr><tr><td>
  65. <input class="text" type="submit" name="submitBtn" value="Register">
  66. </td></tr></table>
  67. </form>
  68. </div>
  69. <?php
  70. }
  71. ?>