stats.php 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. <?php
  2. /**
  3. * Insipid
  4. * Personal web-bookmark-system
  5. *
  6. * Copyright 2016-2021 Johannes Keßler
  7. *
  8. * Development starting from 2011: Johannes Keßler
  9. * https://www.bananas-playground.net/projekt/insipid/
  10. *
  11. * creator:
  12. * Luke Reeves <luke@neuro-tech.net>
  13. *
  14. * This program is free software: you can redistribute it and/or modify
  15. * it under the terms of the GNU General Public License as published by
  16. * the Free Software Foundation, either version 3 of the License, or
  17. * (at your option) any later version.
  18. *
  19. * This program is distributed in the hope that it will be useful,
  20. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  21. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  22. * GNU General Public License for more details.
  23. *
  24. * You should have received a copy of the GNU General Public License
  25. * along with this program. If not, see http://www.gnu.org/licenses/gpl-3.0.
  26. *
  27. */
  28. ?>
  29. <section class="section">
  30. <div class="columns">
  31. <?php require('_headNavIcons.inc.php'); ?>
  32. </div>
  33. <div class="columns">
  34. <div class="column">
  35. <h2 class="is-size-2">Stats</h2>
  36. </div>
  37. </div>
  38. <?php require('_displaySubmitStatus.inc.php'); ?>
  39. </section>
  40. <section class="section">
  41. <div class="columns is-multiline">
  42. <div class="column is-one-quarter">
  43. <h4 class="is-size-4"><?php echo $T->t('view.links'); ?></h4>
  44. <p># <?php echo $linkAmount; ?></p>
  45. <p><a href="index.php?p=overview&m=all"><?php echo $T->t('stats.view.all'); ?></a></p>
  46. </div>
  47. <div class="column is-one-quarter">
  48. <h4 class="is-size-4"><?php echo $T->t('view.tags'); ?></h4>
  49. <p># <?php echo $tagAmount; ?></p>
  50. <p><a href="index.php?p=overview&m=tag"><?php echo $T->t('stats.view.all'); ?></a></p>
  51. </div>
  52. <div class="column is-one-quarter">
  53. <h4 class="is-size-4"><?php echo $T->t('view.categories'); ?></h4>
  54. <p># <?php echo $categoryAmount; ?></p>
  55. <p><a href="index.php?p=overview&m=category"><?php echo $T->t('stats.view.all'); ?></a></p>
  56. </div>
  57. <?php if($_displayEditButton === true) { ?>
  58. <div class="column is-one-quarter">
  59. <h4 class="is-size-4"><?php echo $T->t('stats.moderation'); ?></h4>
  60. <p># <?php echo $moderationAmount; ?></p>
  61. <p><a href="index.php?p=overview&m=awm"><?php echo $T->t('stats.view.all'); ?></a></p>
  62. </div>
  63. <div class="column is-one-quarter">
  64. <h4 class="is-size-4"><?php echo $T->t('stats.image.storage'); ?></h4>
  65. <p><?php echo $T->t('stats.image.storage.diskspace'); ?>: <?php echo $localStorageAmount; ?></p>
  66. <form method="post">
  67. <input type="submit" class="button is-info is-small" value="<?php echo $T->t('stats.image.delete.all'); ?>" name="statsDeleteLocalStorage">
  68. </form>
  69. </div>
  70. <div class="column is-one-quarter">
  71. <h4 class="is-size-4"><?php echo $T->t('stats.full.backup'); ?></h4>
  72. <p><?php echo $T->t('stats.full.backup.help'); ?></p>
  73. <form method="post">
  74. <input type="submit" class="button is-info is-small" value="<?php echo $T->t('stats.full.backup.create'); ?>" name="statsCreateDBBackup">
  75. </form>
  76. </div>
  77. <div class="column is-one-quarter">
  78. <h4 class="is-size-4"><?php echo $T->t('stats.search.index'); ?></h4>
  79. <p><?php echo $T->t('stats.search.index.help'); ?></p>
  80. <form method="post">
  81. <input type="submit" class="button is-info is-small" value="<?php echo $T->t('stats.search.index.update'); ?>" name="statsUpdateSearchIndex">
  82. </form>
  83. </div>
  84. <div class="column is-one-quarter">
  85. <h4 class="is-size-4"><?php echo $T->t('stats.import.xml'); ?></h4>
  86. <p><?php echo $T->t('stats.import.xml.help'); ?></p>
  87. <form method="post" enctype="multipart/form-data">
  88. <div class="file">
  89. <label class="file-label">
  90. <input class="file-input" type="file" name="importxmlfile">
  91. <span class="file-cta">
  92. <span class="file-icon">
  93. <i class="ion-md-cloud-upload"></i>
  94. </span>
  95. <span class="file-label">
  96. <?php echo $T->t('stats.import.xml.file'); ?>
  97. </span>
  98. </span>
  99. </label>
  100. </div>
  101. <div class="field">
  102. <label class="checkbox">
  103. <input type="checkbox" value="overwrite" name="importOverwrite">
  104. <?php echo $T->t('stats.import.xml.overwrite'); ?>
  105. </label>
  106. </div>
  107. <div class="field">
  108. <input type="submit" class="button is-info is-small" value="<?php echo $T->t('stats.import.xml.import'); ?>" name="statsImportXML">
  109. </div>
  110. </form>
  111. </div>
  112. <?php } ?>
  113. </div>
  114. </section>