index.php 960 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. if (cfr('ROOT')) {
  3. $dashBoard = new OphanimDash();
  4. $ip = (ubRouting::checkPost($dashBoard::PROUTE_IP)) ? ubRouting::post($dashBoard::PROUTE_IP) : '';
  5. $period = (ubRouting::checkPost($dashBoard::PROUTE_PERIOD)) ? ubRouting::post($dashBoard::PROUTE_PERIOD) : 'day';
  6. if (empty($ip)) {
  7. //get fallback
  8. if (ubRouting::checkGet($dashBoard::PROUTE_IP)) {
  9. $ip = ubRouting::get($dashBoard::PROUTE_IP);
  10. }
  11. }
  12. //per IP search form
  13. show_window(__('Per host data'), $dashBoard->renderIpSelectForm($ip, $period));
  14. //basic dashboard
  15. if (!$ip) {
  16. //dashboard
  17. show_window(__('System info'), $dashBoard->renderSystemInfo());
  18. show_window(__('Traffic summary'), $dashBoard->renderTrafProtos());
  19. show_window(__('Host details'),$dashBoard->renderHostDetails());
  20. }
  21. if ($ip) {
  22. //per-host charts
  23. show_window('Charts', $dashBoard->renderIpGraphs($ip, $period));
  24. }
  25. } else {
  26. show_error(__('Access denied'));
  27. }