dirSettings.php 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <?php
  2. /* $Id: dirSettings.php 2893 2007-04-14 13:20:30Z 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. // prevent direct invocation
  16. if ((!isset($cfg['user'])) || (isset($_REQUEST['cfg']))) {
  17. @ob_end_clean();
  18. @header("location: ../../../index.php");
  19. exit();
  20. }
  21. /******************************************************************************/
  22. // dir functions
  23. require_once('inc/functions/functions.dir.php');
  24. // config
  25. initRestrictedDirEntries();
  26. // init template-instance
  27. tmplInitializeInstance($cfg["theme"], "page.admin.dirSettings.tmpl");
  28. // restricted entries
  29. $dir_list = array();
  30. foreach ($restrictedFileEntries as $entry) {
  31. $target = trim($entry);
  32. if ((strlen($target) > 0) && ((substr($target, 0, 1)) != ";"))
  33. array_push($dir_list, array('target' => $target));
  34. }
  35. $tmpl->setloop('dir_restricted_list', $dir_list);
  36. $tmpl->setvar('dir_restricted', $cfg["dir_restricted"]);
  37. $tmpl->setvar('dir_public_read', $cfg["dir_public_read"]);
  38. $tmpl->setvar('dir_public_write', $cfg["dir_public_write"]);
  39. $tmpl->setvar('dir_enable_chmod', $cfg["dir_enable_chmod"]);
  40. $tmpl->setvar('enable_maketorrent', $cfg["enable_maketorrent"]);
  41. $tmpl->setvar('dir_maketorrent_default', $cfg["dir_maketorrent_default"]);
  42. $tmpl->setvar('enable_file_download', $cfg["enable_file_download"]);
  43. $tmpl->setvar('package_type', $cfg["package_type"]);
  44. $tmpl->setvar('enable_view_nfo', $cfg["enable_view_nfo"]);
  45. $tmpl->setvar('enable_dirstats', $cfg["enable_dirstats"]);
  46. $tmpl->setvar('enable_rar', $cfg["enable_rar"]);
  47. $tmpl->setvar('enable_sfvcheck', $cfg["enable_sfvcheck"]);
  48. $tmpl->setvar('enable_vlc', $cfg["enable_vlc"]);
  49. $tmpl->setvar('vlc_port', $cfg["vlc_port"]);
  50. $tmpl->setvar('enable_rename', $cfg["enable_rename"]);
  51. $tmpl->setvar('enable_move', $cfg["enable_move"]);
  52. tmplSetMoveSettings();
  53. //
  54. tmplSetTitleBar("Administration - Dir Settings");
  55. tmplSetAdminMenu();
  56. tmplSetFoot();
  57. tmplSetIidVars();
  58. // parse template
  59. $tmpl->pparse();
  60. ?>