editcategories.php 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <?php
  2. /**
  3. * Insipid
  4. * Personal web-bookmark-system
  5. *
  6. * Copyright 2016-2020 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. <div class="column">
  32. <p class="has-text-right">
  33. <a href="index.php?p=overview&m=tag" title="all tags" class="button">
  34. <span class="icon"><i class="ion-md-pricetags"></i></span>
  35. </a>
  36. <a href="index.php?p=overview&m=category" title="all categories" class="button">
  37. <span class="icon"><i class="ion-md-filing"></i></span>
  38. </a>
  39. <a href="index.php" title="... back to home" class="button">
  40. <span class="icon"><i class="ion-md-home"></i></span>
  41. </a>
  42. </p>
  43. </div>
  44. </div>
  45. <div class="columns">
  46. <div class="column">
  47. <?php if(!empty($subHeadline)) { ?>
  48. <h2 class="is-size-2"><?php echo $subHeadline; ?></h2>
  49. <?php } ?>
  50. <h3><a href="index.php?p=overview&m=tag">
  51. <i class="icon ion-md-return-left"></i></a></h3>
  52. </div>
  53. </div>
  54. <?php require('_displaySubmitStatus.inc.php'); ?>
  55. </section>
  56. <section>
  57. <?php if(!empty($categoryCollection)) { ?>
  58. <div class="columns">
  59. <div class="column">
  60. <form method="post">
  61. <table class="table">
  62. <tr>
  63. <th>Name</th>
  64. <th>New name</th>
  65. <th>Deletion</th>
  66. </tr>
  67. <?php foreach ($categoryCollection as $k=>$v) { ?>
  68. <tr>
  69. <td><a href="index.php?p=overview&m=category&id=<?php echo urlencode($k); ?>" target="_blank"><?php echo $v['name']; ?></a></td>
  70. <td>
  71. <input class="input" type="text" name="category[<?php echo urlencode($k); ?>]">
  72. </td>
  73. <td>
  74. <input type="checkbox" value="delete" name="deleteCategory[<?php echo urlencode($k); ?>]">
  75. </td>
  76. </tr>
  77. <?php } ?>
  78. <tr>
  79. <td>New category</td>
  80. <td>
  81. <input class="input" type="text" name="newCategory">
  82. </td>
  83. <td>
  84. &nbsp;
  85. </td>
  86. </tr>
  87. <tr>
  88. <td colspan="3">
  89. <input type="submit" class="button is-success" name="updateCategories" value="Update categories">
  90. </td>
  91. </tr>
  92. </table>
  93. </form>
  94. </div>
  95. </div>
  96. <?php } ?>
  97. </section>