1
0

admin.php 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. <?php
  2. /* $Id: admin.php 3057 2007-05-27 13:06:39Z 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. // main.internal
  16. require_once("inc/main.internal.php");
  17. // common functions
  18. require_once('inc/functions/functions.common.php');
  19. // admin functions
  20. require_once('inc/functions/functions.admin.php');
  21. // access-check
  22. if ((!isset($cfg['isAdmin'])) || (!$cfg['isAdmin'])) {
  23. // the user probably hit this page direct
  24. AuditAction($cfg["constants"]["access_denied"], "ILLEGAL ACCESS: No Admin");
  25. @header("location: index.php?iid=index");
  26. }
  27. // op-arg
  28. $op = (isset($_REQUEST['op'])) ? tfb_getRequestVar('op') : "default";
  29. // check arg
  30. if (!preg_match('/^[a-zA-Z]+$/D', $op)) {
  31. AuditAction($cfg["constants"]["error"], "INVALID ADMIN-OP : ".$op);
  32. @error("Invalid Admin-Op", "admin.php", "Admin", array($op));
  33. }
  34. // op-switch
  35. switch ($op) {
  36. case "updateServerSettings":
  37. admin_updateServerSettings();
  38. case "updateTransferSettings":
  39. admin_updateTransferSettings();
  40. case "updateWebappSettings":
  41. admin_updateWebappSettings();
  42. case "updateIndexSettings":
  43. admin_updateIndexSettings();
  44. case "updateControlSettings":
  45. admin_updateControlSettings();
  46. case "updateDirSettings":
  47. admin_updateDirSettings();
  48. case "updateStatsSettings":
  49. admin_updateStatsSettings();
  50. case "updateXferSettings":
  51. admin_updateXferSettings();
  52. case "updateFluxdSettings":
  53. admin_updateFluxdSettings();
  54. case "controlFluxd":
  55. admin_controlFluxd();
  56. case "controlFluAzu":
  57. admin_controlFluAzu();
  58. case "updateFluAzuSettings":
  59. admin_updateFluAzuSettings();
  60. case "updateAzureusSettings":
  61. admin_updateAzureusSettings();
  62. case "updateSearchSettings":
  63. admin_updateSearchSettings();
  64. case "addLink":
  65. admin_addLink();
  66. case "editLink":
  67. admin_editLink();
  68. case "moveLink":
  69. admin_moveLink();
  70. case "deleteLink":
  71. admin_deleteLink();
  72. case "addRSS":
  73. admin_addRSS();
  74. case "deleteRSS":
  75. admin_deleteRSS();
  76. case "deleteUser":
  77. admin_deleteUser();
  78. case "setUserState":
  79. admin_setUserState();
  80. default:
  81. // set iid-var
  82. $_REQUEST["iid"] = "admin";
  83. // include page
  84. @require_once("inc/iid/admin/".$op.".php");
  85. }
  86. ?>