1
0

statsSettings.php 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?php
  2. /* $Id: statsSettings.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.statsSettings.tmpl");
  24. // set vars
  25. $list = array();
  26. for ($i = 0; $i <= 9 ; $i++) {
  27. array_push($list, array(
  28. 'i' => $i,
  29. 'is_selected' => ($cfg["stats_deflate_level"] == $i) ? 1 : 0
  30. )
  31. );
  32. }
  33. $tmpl->setloop('deflate_list', $list);
  34. $tmpl->setvar('stats_enable_public', $cfg["stats_enable_public"]);
  35. $tmpl->setvar('stats_show_usage', $cfg["stats_show_usage"]);
  36. $tmpl->setvar('stats_txt_delim', $cfg["stats_txt_delim"]);
  37. $tmpl->setvar('stats_default_header', $cfg["stats_default_header"]);
  38. $tmpl->setvar('stats_default_type', $cfg["stats_default_type"]);
  39. $tmpl->setvar('stats_default_format', $cfg["stats_default_format"]);
  40. $tmpl->setvar('stats_default_compress', $cfg["stats_default_compress"]);
  41. $tmpl->setvar('stats_default_attach', $cfg["stats_default_attach"]);
  42. //
  43. tmplSetTitleBar("Administration - Stats Settings");
  44. tmplSetAdminMenu();
  45. tmplSetFoot();
  46. tmplSetIidVars();
  47. // parse template
  48. $tmpl->pparse();
  49. ?>