index.php 882 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. // Init
  3. error_reporting(NULL);
  4. session_start();
  5. include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
  6. $v_domain = $_GET['domain'];
  7. $v_domain = escapeshellarg($_GET['domain']);
  8. if ($_GET['type'] == 'access') $type = 'access';
  9. if ($_GET['type'] == 'error') $type = 'error';
  10. header("Cache-Control: public");
  11. header("Content-Description: File Transfer");
  12. header("Content-Disposition: attachment; filename=".$_GET['domain'].".".$type."-log.txt");
  13. header("Content-Type: application/octet-stream; ");
  14. header("Content-Transfer-Encoding: binary");
  15. $v_domain = escapeshellarg($_GET['domain']);
  16. if ($_GET['type'] == 'access') $type = 'access';
  17. if ($_GET['type'] == 'error') $type = 'error';
  18. exec (VESTA_CMD."v-list-web-domain-".$type."log $user ".$v_domain." 5000", $output, $return_var);
  19. if ($return_var == 0 ) {
  20. foreach($output as $file) {
  21. echo $file . "\n";
  22. }
  23. }
  24. ?>