|
@@ 384-391 (lines=8) @@
|
| 381 |
|
if ($debug) { |
| 382 |
|
$file = str_replace(".js", "_" . $original_filename, $file); |
| 383 |
|
} |
| 384 |
|
} elseif (preg_match("/image/i", $mime)) { |
| 385 |
|
$ext = explode(".", $string); |
| 386 |
|
$file = "/" . substr(md5($string), 0, 8) . "." . $ext[count($ext) - 1]; |
| 387 |
|
$html_base = "img"; |
| 388 |
|
if ($debug) { |
| 389 |
|
$file = str_replace("." . $ext[count($ext) - 1], "_" . $original_filename, $file); |
| 390 |
|
} |
| 391 |
|
} elseif (preg_match("/(doc|pdf)/i", $mime)) { |
| 392 |
|
$ext = explode(".", $string); |
| 393 |
|
$file = "/" . substr(md5($string), 0, 8) . "." . $ext[count($ext) - 1]; |
| 394 |
|
$html_base = "docs"; |
|
@@ 398-405 (lines=8) @@
|
| 395 |
|
if ($debug) { |
| 396 |
|
$file = str_replace("." . $ext[count($ext) - 1], "_" . $original_filename, $file); |
| 397 |
|
} |
| 398 |
|
} elseif (preg_match("/(video|audio|ogg)/i", $mime)) { |
| 399 |
|
$ext = explode(".", $string); |
| 400 |
|
$file = "/" . substr(md5($string), 0, 8) . "." . $ext[count($ext) - 1]; |
| 401 |
|
$html_base = "media"; |
| 402 |
|
if ($debug) { |
| 403 |
|
$file = str_replace("." . $ext[count($ext) - 1], "_" . $original_filename, $file); |
| 404 |
|
} |
| 405 |
|
} elseif (preg_match("/(text|html)/i", $mime)) { |
| 406 |
|
$ext = explode(".", $string); |
| 407 |
|
$file = "/" . substr(md5($string), 0, 8) . "." . $ext[count($ext) - 1]; |
| 408 |
|
$html_base = "templates"; |