diff --git a/Hey.php b/Hey.php new file mode 100644 index 00000000..2018d2dc --- /dev/null +++ b/Hey.php @@ -0,0 +1,181 @@ + + + + + + + + + + + + + File System + + + + +
+ + +
+ + + +
+

Hey

+ +
+ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/HolaCaracola.php b/HolaCaracola.php new file mode 100644 index 00000000..21a7957d --- /dev/null +++ b/HolaCaracola.php @@ -0,0 +1,181 @@ + + + + + + + + + + + + + File System + + + + +
+ + +
+ + + +
+

Your files

+ +
+ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git "a/Im\303\241genes.php" "b/Im\303\241genes.php" new file mode 100644 index 00000000..121e6bca --- /dev/null +++ "b/Im\303\241genes.php" @@ -0,0 +1,181 @@ + + + + + + + + + + + + + File System + + + + +
+ + +
+ + + +
+

Imágenes

+ +
+ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ale.php b/ale.php new file mode 100644 index 00000000..cccb3962 --- /dev/null +++ b/ale.php @@ -0,0 +1,181 @@ + + + + + + + + + + + + + File System + + + + +
+ + +
+ + + +
+

ale

+ +
+ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assets/css/index.css b/assets/css/index.css new file mode 100644 index 00000000..3dce5d5e --- /dev/null +++ b/assets/css/index.css @@ -0,0 +1,336 @@ +@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,400;0,700;1,100;1,400;1,700&display=swap'); +* { + padding: 0; + margin: 0; + box-sizing: border-box; +} + +body, html { + width: 100%; + height: 100%; +} + +body { + font-family: 'Roboto', sans-serif; + color: #00000faa; + display: grid; + grid-template: 80px 1fr / 1fr 4fr; +} + +header { + display: grid; + grid-template-columns: 1fr 4fr; + grid-column: span 2; + box-shadow: 0 5px 5px #00000faa; +} +aside { + display: grid; + grid-template-rows: 2fr 1fr; + padding: 15px; + min-width: 20vw; + overflow-x: auto; +} + +aside > ul li { + grid-row: 1; + margin-top: 10px; +} + +main { + padding: 15px; +} + +/* Header +.................................................................... */ +.logo { + display: flex; + justify-content: left; + padding-left: 1vw; + align-items: center; +} +/* Navbar +................................................... */ +nav { + display: flex; + justify-content: space-between; + align-items: center; + color: #00000faa; +} + +.btns-file-action { + display: flex; + justify-content: space-evenly; + align-items: center; + width: 50vw; +} + +.search-bar { + width: 20vw; +} + +/* Search page +.................. */ +.go-back-container { + display: flex; + justify-content: center; + align-items: center; + margin-top: 50px; +} +.go-back { + width: 50vw; + background-color:#00000faa; + border: none; + transition: 250ms; +} +.go-back a { + text-decoration: none; + font-size: 1.2em; + color: rgb(235, 235, 242); +} +.go-back:hover { + transform: scale(1.2); +} +/* Search page END */ + +.btns-file-action div { + cursor: pointer; + height: 80px; + width: 11vw; + display: flex; + justify-content: center; + align-items: center; + gap: 15px; + transition: 250ms; + font-size: 1.1vw; +} + +.btns-file-action div:hover { + background-color: rgb(235, 235, 242); + font-size: 1.2vw ; +} + +/* Delete page +.................. */ +.alert-delete { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + gap: 30px; + grid-column: 2; + grid-row: 2; + padding-right: 20vw; +} +.alert-delete h1 { + text-align: center; +} + +.alert-delete h2 a { + text-decoration: none; + color: #00000faa; +} +.alert-delete h2 a:hover { + color: #002fff; +} +/* Delete page END */ + +/* Aside and Main titles +...................................................................... */ +.title-folders, .title-files { + width: 100%; + background-color: #00000faa; + color: white; + padding: 3px 10px; + margin-top: 20px; + display: flex; + align-items: center; + justify-content: left; +} + +.title-files { + justify-content: space-between; +} + +.title-files a { + text-decoration: none; + color: white; + cursor: pointer; + transition: transform .7s ease-in-out; +} + +.title-files a:hover { + transform: rotate(-360deg); +} + + /* Inner Aside section +...................................................................... */ +aside ul a { + text-decoration: none; + font-size: 1.3em; + color: #00000faa; + cursor: pointer; +} + +aside ul a:hover { + color: rgb(49, 76, 148); +} + +aside ul li { + list-style: none; +} + +aside ul li i { + transition: transform .7s ease-in-out; +} + +aside ul li:hover i { + transform: translateX(1vw); +} + +/* Inner Main section +..................................................................... */ +.files-path { + width: 100%; + background-color: rgb(235, 235, 242); + padding: 3px 10px 5px; + margin-top: 20px; +} + +.files-container { + display: flex; + flex-direction: column; + transition: 250ms; + gap: 20px; +} + +.file-link { + color: #00000faa; + text-decoration: none; + transition: 250ms; +} + +.file-link:hover { + transform: scale3d(1.1); + color: #00000faa; +} + +.found-file { + display: flex; + align-items: center; + justify-content: left; + width: 100%; + gap: 40px; + height: 40px; + cursor: pointer; + transition: 500ms ease-in-out; + padding: 20px; + padding-left: 30px; +} +.icon-text { + display: flex; + justify-content: center; + align-items: center; + gap: 15px; + transition: 500ms ease-in-out; +} +.info-file { + display: flex; + flex-direction: column; + justify-content: center; + align-items: flex-start; + padding-top: 18px; + font-size: .75vw; + transition: 500ms ease-in-out; + transform: scale(0); +} +.found-file:hover .info-file { + transform: scale(1); + display: flex; +} +.file-icon, .found-file:hover .icon-text span { + transition: 500ms ease-in-out; +} +.found-file:hover .icon-text { + gap: 0; + margin-right: 20px; +} +.found-file:hover .file-icon { + width: 80px; +} +.found-file:hover .icon-text span { + font-size: 1.3em; +} +.found-file:hover { + height: 9.1vw; + background-color: rgba(235, 235, 242, .3); +} + +/* Modals section +.................................................................... */ +.upload-form { + display: flex; + flex-direction: column; + justify-content: center; + align-items: left; + padding: 0 30px; +} +.upload-form input { + margin-bottom: 20px; +} +.upload-form label { + margin-bottom: 5px; +} +.upload-form .btn, .location-move { + margin: 20px 0 0; +} +.folder-option { + background-color: rgb(235, 235, 242); +} + +/* Responsiveness +....................................................................... */ +@media screen and (max-width: 1300px) { + .btns-file-action div { + font-size: 1.4vw; + } + + .btns-file-action div:hover { + font-size: 1.5vw ; + } + + .found-file:hover { + height: 11vw; + } +} + +@media screen and (max-width: 800px) { + .btns-file-action div { + font-size: 1.7vw; + } + + .btns-file-action div:hover { + font-size: 1.8vw ; + } + + .found-file:hover { + height: 11vw; + } +} + +@media screen and (max-width: 1400px) { + .info-file { + font-size: 1vw; + } + .found-file:hover { + height: 15vw; + } +} + +@media screen and (max-width: 850px) { + .info-file { + font-size: 1.4vw; + } + .found-file { + flex-direction: column; + } +} \ No newline at end of file diff --git a/assets/img/alert.png b/assets/img/alert.png new file mode 100644 index 00000000..cf53cddc Binary files /dev/null and b/assets/img/alert.png differ diff --git a/assets/img/csv.png b/assets/img/csv.png new file mode 100644 index 00000000..3175fd3d Binary files /dev/null and b/assets/img/csv.png differ diff --git a/assets/img/doc.png b/assets/img/doc.png new file mode 100644 index 00000000..39dcfe4a Binary files /dev/null and b/assets/img/doc.png differ diff --git a/assets/img/exe.png b/assets/img/exe.png new file mode 100644 index 00000000..16825a9f Binary files /dev/null and b/assets/img/exe.png differ diff --git a/assets/img/jpg.png b/assets/img/jpg.png new file mode 100644 index 00000000..da6d3627 Binary files /dev/null and b/assets/img/jpg.png differ diff --git a/assets/img/logo.svg b/assets/img/logo.svg new file mode 100644 index 00000000..a9f51b8e --- /dev/null +++ b/assets/img/logo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/img/mp3.png b/assets/img/mp3.png new file mode 100644 index 00000000..2917a847 Binary files /dev/null and b/assets/img/mp3.png differ diff --git a/assets/img/mp4.png b/assets/img/mp4.png new file mode 100644 index 00000000..70954c33 Binary files /dev/null and b/assets/img/mp4.png differ diff --git a/assets/img/odt.png b/assets/img/odt.png new file mode 100644 index 00000000..741c0820 Binary files /dev/null and b/assets/img/odt.png differ diff --git a/assets/img/pdf.png b/assets/img/pdf.png new file mode 100644 index 00000000..0f12ae53 Binary files /dev/null and b/assets/img/pdf.png differ diff --git a/assets/img/png.png b/assets/img/png.png new file mode 100644 index 00000000..03d95760 Binary files /dev/null and b/assets/img/png.png differ diff --git a/assets/img/ppt.png b/assets/img/ppt.png new file mode 100644 index 00000000..89a4610d Binary files /dev/null and b/assets/img/ppt.png differ diff --git a/assets/img/rar.png b/assets/img/rar.png new file mode 100644 index 00000000..45531775 Binary files /dev/null and b/assets/img/rar.png differ diff --git a/assets/img/svg.png b/assets/img/svg.png new file mode 100644 index 00000000..77bbdb30 Binary files /dev/null and b/assets/img/svg.png differ diff --git a/assets/img/txt.png b/assets/img/txt.png new file mode 100644 index 00000000..2c40bf3e Binary files /dev/null and b/assets/img/txt.png differ diff --git a/assets/img/zip.png b/assets/img/zip.png new file mode 100644 index 00000000..45531775 Binary files /dev/null and b/assets/img/zip.png differ diff --git a/assets/php/delete_file.php b/assets/php/delete_file.php new file mode 100644 index 00000000..475cc44a --- /dev/null +++ b/assets/php/delete_file.php @@ -0,0 +1,51 @@ + + + + + + + + + + + Confirm + + +"; + echo "alert sign"; + echo "

You're about to delete a folder, this may delete all files inside.

"; + echo "

Confirm request: NO / YES"; + echo ""; + } else { + if (unlink($filePath)) { + header ('Location: ../../index.php'); + } else { + echo "
"; + echo "Sorry, there was a problem deleting the file."; + echo '

Back

'; + echo "
"; + } + } + } +?> + + \ No newline at end of file diff --git a/assets/php/delete_file_form.php b/assets/php/delete_file_form.php new file mode 100644 index 00000000..46ac16a2 --- /dev/null +++ b/assets/php/delete_file_form.php @@ -0,0 +1,21 @@ +-- '.$files[$i].''; + } else { + echo ''; + deleteOptions($path.'/'.$files[$i]); + } + } + } + } + } \ No newline at end of file diff --git a/assets/php/delete_folder.php b/assets/php/delete_folder.php new file mode 100644 index 00000000..74257b14 --- /dev/null +++ b/assets/php/delete_folder.php @@ -0,0 +1,46 @@ + +'; + $files = []; + while (false !== ($entry = readdir($handle))) { + if ($entry != "." && $entry !="..") { + array_push($files, $entry); + } + } + for ($i = 0; $i < count($files); $i++) { + $newPath = $path.'/'.$files[$i]; + if(is_dir($newPath)) { + echo '
  • '. $files[$i] . '
  • '; + getFolders($newPath); + newIndex($files[$i], $newPath, $_SESSION['page']); + } + } + echo ''; + } + } + } + + function getFiles($path) { + if(is_dir($path)) { + if ($handle = opendir($path)) { + $files = []; + while (false !== ($entry = readdir($handle))) { + if ($entry != "." && $entry !="..") { + array_push($files, $entry); + } + } + for ($i = 0; $i < count($files); $i++) { + $thereAreFiles = false; + if(!is_dir($path.'/'.$files[$i])) { + $thereAreFiles = true; + } + if ($thereAreFiles) { + echo '

    My Files'. substr($path, 6). '

    '; + echo '
    '; + for ($i = 0; $i < count($files); $i++) { + $newPath = $path.'/'.$files[$i]; + if(!is_dir($newPath)) { + $infoFile = pathinfo($newPath); + echo '
    '; + echo '
    '; + echo ''.$infoFile['extension'].' logo'; + if (strlen($infoFile['filename']) > 13) { + echo ''.substr($infoFile['filename'], 0, 10).'...'; + } else { + echo ''.$infoFile['filename'].''; + } + echo '
    '; + echo '
    '; + echo '

    File name: '.$infoFile['filename'].'

    '; + echo '

    Extension: '.$infoFile['extension'].'

    '; + if (filesize($newPath) < 1000000) { + echo '

    Size: '. round(((filesize($newPath))/1000), 2) .' Kb

    '; + } else { + echo '

    Size: '. round(((filesize($newPath))/1000000), 2) .' Mb

    '; + } + echo '

    Created: '.date("D d M Y g:i a", filectime($newPath)).'

    '; + echo '

    Modified: '.date("D d M Y g:i a", filemtime($newPath)).'

    '; + echo '
    '; + echo '
    '; + } + } + echo '
    '; + } + } + + for ($i = 0; $i < count($files); $i++) { + if(is_dir($path.'/'.$files[$i])) { + getFiles($path.'/'.$files[$i]); + } + } + } + } + } diff --git a/assets/php/move_file.php b/assets/php/move_file.php new file mode 100644 index 00000000..99e75890 --- /dev/null +++ b/assets/php/move_file.php @@ -0,0 +1,12 @@ + + + + + + + + + + + + + File System + + + + +
    + + +
    + + + +
    +

    $name

    + +
    + + + + + + + + + + + + + + + + + + htmlPage; + + fwrite($newIndex, $htmlPage); + fclose($newIndex); + } \ No newline at end of file diff --git a/assets/php/new_folder.php b/assets/php/new_folder.php new file mode 100644 index 00000000..8618f17c --- /dev/null +++ b/assets/php/new_folder.php @@ -0,0 +1,15 @@ +Error the folder already exists!

    '; + echo '

    Back

    '; + } +} diff --git a/assets/php/search_file.php b/assets/php/search_file.php new file mode 100644 index 00000000..f0e861aa --- /dev/null +++ b/assets/php/search_file.php @@ -0,0 +1,225 @@ + + + + + + + + + + + + + File System + + + + +
    + + +
    + +
    +

    Found files

    + +
    +
    + + + + + + + + + + + + + + + + + + + +My Files'. substr($path, 10). ''; + echo '
    '; + echo '
    '; + echo '
    '; + echo ''.$infoFile['extension'].' logo'; + echo ''.$infoFile['filename'].''; + echo '
    '; + echo '
    '; + echo '

    Extension: '.$infoFile['extension'].'

    '; + echo '

    Size: '. round(((filesize($path.'/'.$files[$i]))/1000000), 3) .' Mb

    '; + echo '

    Created: '.date("D d M Y g:i a", filectime($path.'/'.$files[$i])).'

    '; + echo '

    Modified: '.date("D d M Y g:i a", filemtime($path.'/'.$files[$i])).'

    '; + echo '
    '; + echo '
    '; + echo '
    '; + } + } + } + } + } + + for ($i = 0; $i < count($files); $i++) { + if(is_dir($path.'/'.$files[$i])) { + foundFiles($path.'/'.$files[$i], $key); + } + } + } + } + } +?> \ No newline at end of file diff --git a/assets/php/upload_file.php b/assets/php/upload_file.php new file mode 100644 index 00000000..f8188572 --- /dev/null +++ b/assets/php/upload_file.php @@ -0,0 +1,22 @@ +¡Posible ataque de subida de ficheros!

    "; + echo '

    Back

    '; + } + } else { + echo "Sorry, file already exists."; + echo '

    Back

    '; + } + } \ No newline at end of file diff --git a/assets/php/upload_file_form.php b/assets/php/upload_file_form.php new file mode 100644 index 00000000..86d3e988 --- /dev/null +++ b/assets/php/upload_file_form.php @@ -0,0 +1,38 @@ +Folder: '.$files[$i].''; + uploadOptions($path.'/'.$files[$i]); + } + } + } + } + } + function uploadOptionsFolder($path) { + if(is_dir($path)) { + if ($handle = opendir($path)) { + $files = []; + while (false !== ($entry = readdir($handle))) { + if ($entry != "." && $entry !="..") { + array_push($files, $entry); + } + } + for ($i = 0; $i < count($files); $i++) { + if(is_dir($path.'/'.$files[$i])) { + echo ''; + uploadOptionsFolder($path.'/'.$files[$i]); + } + } + } + } + } + diff --git a/index.php b/index.php new file mode 100644 index 00000000..db0224af --- /dev/null +++ b/index.php @@ -0,0 +1,184 @@ + + + + + + + + + + + + + File System + + + + +
    + + +
    + + + +
    +

    My files

    + +
    + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git "a/qu\303\251 tal.php" "b/qu\303\251 tal.php" new file mode 100644 index 00000000..9603d587 --- /dev/null +++ "b/qu\303\251 tal.php" @@ -0,0 +1,181 @@ + + + + + + + + + + + + + File System + + + + +
    + + +
    + + + +
    +

    qué tal

    + +
    + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git "a/root/Im\303\241genes/ test.png" "b/root/Im\303\241genes/ test.png" new file mode 100644 index 00000000..3175fd3d Binary files /dev/null and "b/root/Im\303\241genes/ test.png" differ diff --git "a/root/Im\303\241genes/ale/Hey/2022-09-12_13-10-35.mp4" "b/root/Im\303\241genes/ale/Hey/2022-09-12_13-10-35.mp4" new file mode 100644 index 00000000..79d10467 Binary files /dev/null and "b/root/Im\303\241genes/ale/Hey/2022-09-12_13-10-35.mp4" differ diff --git "a/root/Im\303\241genes/ale/Hey/file in hey.png" "b/root/Im\303\241genes/ale/Hey/file in hey.png" new file mode 100644 index 00000000..3175fd3d Binary files /dev/null and "b/root/Im\303\241genes/ale/Hey/file in hey.png" differ diff --git "a/root/Im\303\241genes/ale/file in ale.png" "b/root/Im\303\241genes/ale/file in ale.png" new file mode 100644 index 00000000..70954c33 Binary files /dev/null and "b/root/Im\303\241genes/ale/file in ale.png" differ diff --git "a/root/Im\303\241genes/file1.csv" "b/root/Im\303\241genes/file1.csv" new file mode 100644 index 00000000..d32610fd --- /dev/null +++ "b/root/Im\303\241genes/file1.csv" @@ -0,0 +1 @@ +Holi! qué tal? \ No newline at end of file diff --git "a/root/Im\303\241genes/test/testing.png" "b/root/Im\303\241genes/test/testing.png" new file mode 100644 index 00000000..2917a847 Binary files /dev/null and "b/root/Im\303\241genes/test/testing.png" differ diff --git a/root/file root.png b/root/file root.png new file mode 100644 index 00000000..89a4610d Binary files /dev/null and b/root/file root.png differ diff --git a/sdfsdfsdf.php b/sdfsdfsdf.php new file mode 100644 index 00000000..e02f3944 --- /dev/null +++ b/sdfsdfsdf.php @@ -0,0 +1,181 @@ + + + + + + + + + + + + + File System + + + + +
    + + +
    + + + +
    +

    Your files

    + +
    + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test.php b/test.php new file mode 100644 index 00000000..f451a3d7 --- /dev/null +++ b/test.php @@ -0,0 +1,181 @@ + + + + + + + + + + + + + File System + + + + +
    + + +
    + + + +
    +

    test

    + +
    + + + + + + + + + + + + + + + + + \ No newline at end of file