-function format_filename($str) {
- $str = strtolower($str);
- $str = ereg_replace('[^a-z0-9_.-]', '_', $str);
+function format_filename($str, $allow_uppercase = false) {
+ if(!$allow_uppercase) {
+ $str = strtolower($str);
+ }
+ $str = ereg_replace('[^a-zA-Z0-9_.-]', '_', $str);