photos.php 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <?php
  2. /**
  3. * Admin page
  4. *
  5. * @author Cash Costello
  6. * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License v2
  7. */
  8. $tab = get_input('tab', 'settings');
  9. echo elgg_view('navigation/tabs', array(
  10. 'tabs' => array(
  11. array(
  12. 'text' => elgg_echo('settings'),
  13. 'href' => '/admin/settings/photos',
  14. 'selected' => ($tab == 'settings'),
  15. ),
  16. array(
  17. 'text' => elgg_echo('tidypics:server_info'),
  18. 'href' => '/admin/settings/photos?tab=server_info',
  19. 'selected' => ($tab == 'server_info'),
  20. ),
  21. array(
  22. 'text' => elgg_echo('tidypics:server_config'),
  23. 'href' => '/admin/settings/photos?tab=server_config',
  24. 'selected' => ($tab == 'server_config'),
  25. ),
  26. array(
  27. 'text' => 'ImageMagick',
  28. 'href' => '/admin/settings/photos?tab=image_lib',
  29. 'selected' => ($tab == 'image_lib'),
  30. ),
  31. array(
  32. 'text' => elgg_echo('tidypics:settings:thumbnail'),
  33. 'href' => '/admin/settings/photos?tab=thumbnail',
  34. 'selected' => ($tab == 'thumbnail'),
  35. ),
  36. array(
  37. 'text' => elgg_echo('tidypics:delete_image'),
  38. 'href' => '/admin/settings/photos?tab=delete_image',
  39. 'selected' => ($tab == 'delete_image'),
  40. ),
  41. array(
  42. 'text' => elgg_echo('tidypics:settings:help'),
  43. 'href' => '/admin/settings/photos?tab=help',
  44. 'selected' => ($tab == 'help'),
  45. ),
  46. )
  47. ));
  48. switch ($tab) {
  49. case 'server_info':
  50. echo elgg_view('admin/settings/photos/server_info');
  51. break;
  52. case 'server_config':
  53. echo elgg_view('admin/settings/photos/server_config');
  54. break;
  55. case 'image_lib':
  56. echo elgg_view('admin/settings/photos/image_lib');
  57. break;
  58. case 'thumbnail':
  59. echo elgg_view('admin/settings/photos/thumbnail');
  60. break;
  61. case 'delete_image':
  62. echo elgg_view('admin/settings/photos/delete_image');
  63. break;
  64. case 'help':
  65. echo elgg_view('admin/settings/photos/help');
  66. break;
  67. default:
  68. case 'settings':
  69. echo elgg_view('admin/settings/photos/settings');
  70. break;
  71. }