image.php 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. <?php
  2. /* $Id: image.php 2918 2007-04-17 17:08:09Z b4rt $ */
  3. /*******************************************************************************
  4. LICENSE
  5. This program is free software; you can redistribute it and/or
  6. modify it under the terms of the GNU General Public License (GPL)
  7. as published by the Free Software Foundation; either version 2
  8. of the License, or (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. To read the license please visit http://www.gnu.org/copyleft/gpl.html
  14. *******************************************************************************/
  15. // core functions
  16. require_once('inc/functions/functions.core.php');
  17. // common functions
  18. require_once('inc/functions/functions.common.php');
  19. // image functions
  20. require_once('inc/functions/functions.image.php');
  21. // Image class
  22. require_once('inc/classes/Image.php');
  23. // image-op-switch
  24. $imageOp = (isset($_REQUEST['i'])) ? tfb_getRequestVar('i') : "noop";
  25. switch ($imageOp) {
  26. case "login":
  27. // check for valid referer
  28. Image::checkReferer();
  29. // main.external
  30. require_once('inc/main.external.php');
  31. // output image
  32. image_login();
  33. case "test":
  34. // check for valid referer
  35. Image::checkReferer();
  36. // main.internal
  37. require_once('inc/main.internal.php');
  38. // output image
  39. image_test();
  40. case "pieTransferTotals":
  41. // main.internal
  42. require_once('inc/main.internal.php');
  43. // output image
  44. image_pieTransferTotals();
  45. case "pieTransferPeers":
  46. // main.internal
  47. require_once('inc/main.internal.php');
  48. // output image
  49. image_pieTransferPeers();
  50. case "pieTransferScrape":
  51. // main.internal
  52. require_once('inc/main.internal.php');
  53. // output image
  54. image_pieTransferScrape();
  55. case "pieServerBandwidth":
  56. // main.internal
  57. require_once('inc/main.internal.php');
  58. // output image
  59. image_pieServerBandwidth();
  60. case "pieServerDrivespace":
  61. // main.internal
  62. require_once('inc/main.internal.php');
  63. // output image
  64. image_pieServerDrivespace();
  65. case "mrtg":
  66. // main.internal
  67. require_once('inc/main.internal.php');
  68. // output image
  69. image_mrtg();
  70. case "spacer":
  71. // check for valid referer
  72. Image::checkReferer();
  73. // output image
  74. image_spacer();
  75. case "notsup":
  76. // check for valid referer
  77. Image::checkReferer();
  78. // output image
  79. image_notsup();
  80. case "noop":
  81. default:
  82. // check for valid referer
  83. Image::checkReferer();
  84. // output image
  85. image_noop();
  86. }
  87. ?>