index.php 639 B

123456789101112131415161718192021222324252627
  1. <?php
  2. error_reporting(NULL);
  3. $TAB = 'RRD';
  4. // Main include
  5. include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
  6. // Check user
  7. if ($_SESSION['user'] != 'admin') {
  8. header('Location: /list/user');
  9. exit;
  10. }
  11. if (!empty($_GET['period'])) {
  12. if ($_GET['period']!="daily" && $_GET['period']!="weekly" && $_GET['period']!="monthly" && $_GET['period']!="yearly") unset($_GET['period']);
  13. }
  14. // Data
  15. exec (VESTA_CMD."v-list-sys-rrd json", $output, $return_var);
  16. $data = json_decode(implode('', $output), true);
  17. unset($output);
  18. // Render page
  19. render_page($user, $TAB, 'list_rrd');
  20. // Back uri
  21. $_SESSION['back'] = $_SERVER['REQUEST_URI'];