* Maybe: Zip files and/or folders.
* Fix file names with æ, ø, å.
CHANGELOG:
* Added support for https
* Added total dir size in footer
* Timezone setting for PHP 5.10 and above
* Save and Save&Exit buttons added.
* Added extra option for IIS users.
* Added option to CHMOD files.
*/
# Settings - Change as appropriate. See online documentation for explanations. #
define("USERNAME", "pippy"); // Your default username.
define("PASSWORD", "longstockings"); // Your default password.
define("DIR", "."); // Your default directory. Do NOT include a trailing slash!
define("AUTOUPDATES", "0"); // Number of days between checking for updates. Set to '0' to turn off (automatic updates are turned off by default).
define("MAXSIZE", 2000000); // Maximum file upload size - in bytes.
define("PERMISSION", 0644); // Permission for uploaded files.
define("DISABLELOGIN", FALSE); // Set to TRUE if you want to disable password protection.
define("FILEBLACKLIST", "ft2.php filethingie.php index.php"); // Specific files that will not be shown.
define("FILETYPEBLACKLIST", "php phtml php3 php4 php5"); // File types that are not allowed for upload.
define("FILETYPEWHITELIST", ""); // Add file types here to *only* allow those types to be uploaded.
define("EDITLIST", "txt html css"); // List of file types that can be edited.
define("DISABLEUPLOAD", FALSE); // Set to TRUE if you want to disable file uploads.
define("DISABLEFILEACTIONS", FALSE); // Set to TRUE if you want to disable file actions (rename, move, delete, edit, duplicate).
define("CONVERTTABS", FALSE); // Set to TRUE to convert tabs to spaces when editing a file.
# Colours #
define("COLOURONE", "#326532"); // Dark background colour - also used on menu links.
define("COLOURONETEXT", "#fff"); // Text for the dark background.
define("COLOURTWO", "#DAE3DA"); // Brighter color (for table rows and sidebar background).
define("COLOURTEXT", "#000"); // Regular text colour.
define("COLOURHIGHLIGHT", "#ffc"); // Hightlight colour for status messages.
# Additional users #
/*
$users['REPLACE_WITH_USERNAME']['password'] = "REPLACE_WITH_PASSWORD";
$users['REPLACE_WITH_USERNAME']['dir'] = "REPLACE_WITH_CUSTOM_DIRECTORY";
*/
# Version #
define("VERSION", "2.0.6"); // Current version of File Thingie.
# Installation path. You only need to set this if $_SERVER['REQUEST_URI'] is not being set by your server.
define("REQUEST_URI", FALSE);
# Various helper functions #
function checkLogin() {}
// Default user was not valid, we check additional users (if any).
if (is_array($users) && sizeof($users) > 0) {}
}
redirect(
"act=error")
;
}
return FALSE;
} else {}
} else {}
}
function fetchURL( $url ) {}
$path = $url_parsed["path"];
if ($url_parsed["query"] != "") {}
$out = "GET $path HTTP/1.0\r\nHost: $host\r\n\r\n";
$fp = fsockopen($host, $port, $errno, $errstr, 30);
fwrite($fp, $out);
$body = false;
while (!feof($fp)) {}
if ( $s == "\r\n" ) {}
}
fclose($fp);
return $in;
}
function versioncheck() {} else {}
return "
Newest version is: {}
"; } else {} } function redirect($query = '') {} $protocol = '/'; } if (stristr($_SERVER["REQUEST_URI"], "?")) {}{}{}"; } else {}{}{}"; } if (!empty($query)) {}"; } header($location); exit; } function sanitizeREQUEST() {} // Set 'dir' to empty if it isn't set. if (empty($_REQUEST['dir'])) {} // Nuke slashes from 'file' and 'newvalue' if (!empty($_REQUEST['file'])) {} if (!empty($_REQUEST['act']) && $_REQUEST['act'] != "move") {} } } // Nuke ../ for 'file' if (!empty($_REQUEST['file']) && stristr($_REQUEST['file'], "..") || empty($_REQUEST['file'])) {} // Set 'q' (search queries) to empty if it isn't set. if (empty($_REQUEST['q'])) {} } function getExt ($name) {} else {} return $ext; } function stripslashes_smart($string) {} else {} } function niceFileSize($size) {} elseif (strlen($size) > 4 || $size > 1024) {} else {} } function getMaxUploadSize() {} else {} // Compare with MAXSIZE. if ($max > MAXSIZE) {} return niceFileSize($max); } function return_bytes($val) {}); switch($last) {} return $val; } function getSelf() {} function checkfile($file) {} else {} } else {} } function checkforedit($file) {} else {} } else {} } function checkfiletype($file) {} else {} } else {} else {} } else {} } } function getRoot() {} else {} else {} } } function getDir() {} else {} } function getFileList($dir) {}/{}"))) {}/{}"); if (checkforedit($file)) {} // File permissions. if ($c['perms'] = fileperms("{}/{}")) {} // $c['modified'] = filemtime("{}/{}"); $c['size'] = filesize("{}/{}"); grew hotorange porn