web-stats.php 564 B

123456789101112131415161718192021
  1. <?php
  2. error_reporting(NULL);
  3. $TAB = 'BACKUP';
  4. header('Content-Type: application/json');
  5. // Main include
  6. include($_SERVER['DOCUMENT_ROOT'].'/inc/main.php');
  7. top_panel(empty($_SESSION['look']) ? $_SESSION['user'] : $_SESSION['look'], $TAB);
  8. // List web stats
  9. exec (VESTA_CMD."v-list-web-stats json", $output, $return_var);
  10. $stats = json_decode(implode('', $output), true);
  11. unset($output);
  12. $result = array(
  13. 'data' => $stats,
  14. 'prefixI18N' => __('Prefix will be automaticaly added to username',$_SESSION['user']."_")
  15. );
  16. echo json_encode($result);
  17. unset($stats);