index.php 675 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. // Init
  3. error_reporting(NULL);
  4. header('Content-Type: application/json');
  5. include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
  6. // Header
  7. // include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_weblog.html');
  8. $v_domain = escapeshellarg($_GET['domain']);
  9. if ($_GET['type'] == 'access') $type = 'access';
  10. if ($_GET['type'] == 'error') $type = 'error';
  11. $data = exec (VESTA_CMD."v-list-web-domain-".$type."log $user ".$v_domain, $output, $return_var);
  12. echo json_encode(
  13. array(
  14. 'data' => $data
  15. )
  16. );
  17. // if ($return_var == 0 ) {
  18. // foreach($output as $file) {
  19. // echo htmlentities($file) . "\n";
  20. // }
  21. // }
  22. // echo " </pre>\n</body>\n</html>\n";