1
0

fluazuSettings.php 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <?php
  2. /* $Id: fluazuSettings.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. // FluAzu
  23. require_once("inc/classes/FluAzu.php");
  24. // init template-instance
  25. tmplInitializeInstance($cfg["theme"], "page.admin.fluazuSettings.tmpl");
  26. // superadmin-links
  27. $tmpl->setvar('SuperAdminLink1', getSuperAdminLink('?a=1','<font class="adminlink">log</font></a>'));
  28. $tmpl->setvar('SuperAdminLink3', getSuperAdminLink('?a=3','<font class="adminlink">ps</font></a>'));
  29. $tmpl->setvar('SuperAdminLink9', getSuperAdminLink('?a=9','<font class="adminlink">version</font></a>'));
  30. // message section
  31. $message = tfb_getRequestVar('m');
  32. if ($message != "")
  33. $tmpl->setvar('message', urldecode($message));
  34. // check the needed bins
  35. // python
  36. if (@file_exists($cfg['pythonCmd']) !== true)
  37. $tmpl->setvar('pythonMissing', 1);
  38. // fluazu status
  39. if (FluAzu::isRunning()) {
  40. $tmpl->setvar('fluazuRunning', 1);
  41. $tmpl->setvar('fluazuPid', FluAzu::getPid());
  42. $status = FluAzu::getStatus();
  43. $statusKeys = FluAzu::getStatusKeys();
  44. foreach ($statusKeys as $statusKey)
  45. $tmpl->setvar($statusKey, $status[$statusKey]);
  46. } else {
  47. $tmpl->setvar('fluazuRunning', 0);
  48. }
  49. // settings
  50. $tmpl->setvar('fluazu_host', $cfg['fluazu_host']);
  51. $tmpl->setvar('fluazu_port', $cfg['fluazu_port']);
  52. $tmpl->setvar('fluazu_secure', $cfg['fluazu_secure']);
  53. $tmpl->setvar('fluazu_user', $cfg['fluazu_user']);
  54. $tmpl->setvar('fluazu_pw', $cfg['fluazu_pw']);
  55. // templ-calls
  56. tmplSetTitleBar("Administration - fluazu Settings");
  57. tmplSetAdminMenu();
  58. tmplSetFoot();
  59. tmplSetIidVars();
  60. // parse template
  61. $tmpl->pparse();
  62. ?>