1
0

servermon.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. /* $Id: servermon.php 3082 2007-06-09 13:51:43Z danez $ */
  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.servermon.tmpl");
  24. // set vars
  25. $tmpl->setvar('onLoad', "ajax_initialize(".(intval($cfg['servermon_update']) * 1000).",'".$cfg['stats_txt_delim']."','".$cfg['pagetitle']." - Server Monitor');");
  26. //
  27. $tmpl->setvar('_DOWNLOADSPEED', $cfg['_DOWNLOADSPEED']);
  28. $tmpl->setvar('_UPLOADSPEED', $cfg['_UPLOADSPEED']);
  29. $tmpl->setvar('_TOTALSPEED', $cfg['_TOTALSPEED']);
  30. $tmpl->setvar('_ID_CONNECTIONS', $cfg['_ID_CONNECTIONS']);
  31. $tmpl->setvar('_DRIVESPACE', $cfg['_DRIVESPACE']);
  32. $tmpl->setvar('_SERVERLOAD', $cfg['_SERVERLOAD']);
  33. //
  34. tmplSetTitleBar($cfg["pagetitle"]." - Server Monitor", false);
  35. tmplSetIidVars();
  36. // parse template
  37. $tmpl->pparse();
  38. ?>