xferSettings.php 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <?php
  2. /* $Id: xferSettings.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. // init template-instance
  23. tmplInitializeInstance($cfg["theme"], "page.admin.xferSettings.tmpl");
  24. // set vars
  25. $tmpl->setvar('enable_xfer', $cfg["enable_xfer"]);
  26. $tmpl->setvar('xfer_realtime', $cfg["xfer_realtime"]);
  27. $tmpl->setvar('enable_public_xfer', $cfg["enable_public_xfer"]);
  28. $tmpl->setvar('xfer_total', $cfg["xfer_total"]);
  29. $tmpl->setvar('xfer_month', $cfg["xfer_month"]);
  30. $tmpl->setvar('xfer_week', $cfg["xfer_week"]);
  31. $tmpl->setvar('xfer_day', $cfg["xfer_day"]);
  32. $tmpl->setvar('week_start', $cfg["week_start"]);
  33. $month_list = array();
  34. for ($i = 1; $i <= 31 ; $i++) {
  35. array_push($month_list, array(
  36. 'i' => $i,
  37. 'month_start_true' => ($cfg["month_start"] == $i) ? 1 : 0
  38. )
  39. );
  40. }
  41. $tmpl->setloop('month_list', $month_list);
  42. $tmpl->setvar('SuperAdminLink', getSuperAdminLink('?m=52','<font class="adminlink">reset stats</font></a>'));
  43. //
  44. tmplSetTitleBar("Administration - Xfer Settings");
  45. tmplSetAdminMenu();
  46. tmplSetFoot();
  47. tmplSetIidVars();
  48. // parse template
  49. $tmpl->pparse();
  50. ?>