random.php 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <?php
  2. /**
  3. * Insipid
  4. * Personal web-bookmark-system
  5. *
  6. * Copyright 2016-2022 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"><?php echo $T->t('view.random.headline'); ?></h2>
  36. </div>
  37. </div>
  38. </section>
  39. <section class="section">
  40. <div class="columns">
  41. <div class="column">
  42. <h3 class="is-size-3"><?php echo $T->t('view.random.link'); ?></h3>
  43. <div class="field is-grouped is-grouped-multiline">
  44. <?php foreach ($randomLink as $sr) { ?>
  45. <div class="control">
  46. <div class="tags has-addons">
  47. <a class="tag is-dark" href="<?php echo $sr['link']; ?>" target="_blank" ><?php echo $sr['title']; ?></a>
  48. <a class="tag is-info" title="<?php echo $T->t('view.more.details'); ?>" href="index.php?p=linkinfo&id=<?php echo $sr['hash']; ?>" ><i class="ion-md-information-circle-outline"></i></a>
  49. </div>
  50. </div>
  51. <?php } ?>
  52. </div>
  53. <h3 class="is-size-3"><?php echo $T->t('view.tag'); ?></h3>
  54. <div>
  55. <?php foreach ($randomTag as $sr) { ?>
  56. <a href="index.php?p=overview&m=tag&id=<?php echo $sr['id']; ?>"" class="button is-small">
  57. <span class="icon"><i class="ion-md-pricetag"></i></span>
  58. <span><?php echo $sr['name']; ?></span>
  59. </a>
  60. <?php } ?>
  61. </div>
  62. <h3 class="is-size-3"><?php echo $T->t('view.category'); ?></h3>
  63. <div>
  64. <?php foreach ($randomCategory as $sr) { ?>
  65. <a href="index.php?p=overview&m=category&id=<?php echo $sr['id']; ?>"" class="button is-small">
  66. <span class="icon"><i class="ion-md-filing"></i></span>
  67. <span><?php echo $sr['name']; ?></span>
  68. </a>
  69. <?php } ?>
  70. </div>
  71. </div>
  72. </div>
  73. </section>