index.php 858 B

123456789101112131415161718192021222324
  1. <?php
  2. session_start();
  3. include($_SERVER['DOCUMENT_ROOT'] . "/inc/main.php");
  4. if (empty($panel)) {
  5. $command = VESTA_CMD."v-list-user '".$user."' 'json'";
  6. exec ($command, $output, $return_var);
  7. if ( $return_var > 0 ) {
  8. header("Location: /error/");
  9. exit;
  10. }
  11. $panel = json_decode(implode('', $output), true);
  12. }
  13. $path_a = !empty($_REQUEST['dir_a']) ? $_REQUEST['dir_a'] : '';
  14. $path_b = !empty($_REQUEST['dir_b']) ? $_REQUEST['dir_b'] : '';
  15. $GLOBAL_JS = '<script type="text/javascript">GLOBAL.START_DIR_A = "' . $path_a . '";</script>';
  16. $GLOBAL_JS .= '<script type="text/javascript">GLOBAL.START_DIR_B = "' . $path_b . '";</script>';
  17. $GLOBAL_JS .= '<script type="text/javascript">GLOBAL.ROOT_DIR = "' . $panel[$user]['HOME'] . '";</script>';
  18. // Footer
  19. include($_SERVER['DOCUMENT_ROOT'].'/templates/file_manager/main.php');