X-Git-Url: https://git.p6c8.net/jirafeau_project.git/blobdiff_plain/70d841a8fc4727b02da6adde3ad12326430d87a8..5d7c0d3ce08074fff55e7731490fe786cd6101e6:/admin.php diff --git a/admin.php b/admin.php index 4a3d25f..44a0134 100644 --- a/admin.php +++ b/admin.php @@ -241,7 +241,7 @@ if (php_sapi_name() == "cli") { echo '
'; } elseif (strcmp($_POST['action'], 'delete_file') == 0) { - $count = jirafeau_delete_file($_POST['md5']); + $count = jirafeau_delete_file($_POST['hash']); echo ' '; } elseif (strcmp($_POST['action'], 'download') == 0) { @@ -249,13 +249,13 @@ if (php_sapi_name() == "cli") { if (!count($l)) { return; } - $p = s2p($l['md5']); + $p = s2p($l['hash']); header('Content-Length: ' . $l['file_size']); header('Content-Type: ' . $l['mime_type']); header('Content-Disposition: attachment; filename="' . $l['file_name'] . '"'); - if (file_exists(VAR_FILES . $p . $l['md5'])) { - $r = fopen(VAR_FILES . $p . $l['md5'], 'r'); + if (file_exists(VAR_FILES . $p . $l['hash'])) { + $r = fopen(VAR_FILES . $p . $l['hash'], 'r'); while (!feof($r)) { print fread($r, 1024); ob_flush();