functions.php 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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. <a class="button" href="<?php echo $_SERVER['PHP_SELF']; ?>?forms=register">Register</a>
  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. <form action="<?php echo $_SERVER['PHP_SELF']; ?>?do=register" method="post">
  57. <table><tr><td>
  58. Username:</td><td> <input class="text" type="text" name="username"></td></tr><tr><td>
  59. Full name:</td><td> <input class="text" type="text" name="fullname"></td></tr><tr><td>
  60. Email:</td><td><input class="text" type="text" name="email"></td></tr><tr><td>
  61. Password:</td><td> <input class="text" type="password" name="password"></td></tr><tr><td>
  62. Password Again:</td><td> <input class="text" type="password" name="password-again"></td></tr><tr><td>
  63. <input class="text" type="submit" name="submitBtn" value="Register">
  64. </td></tr></table>
  65. </form>
  66. </div>
  67. <?php
  68. }
  69. ?>