Limit unlink folder

This commit is contained in:
danpros 2021-01-22 12:15:07 +07:00
commit 2b147ebb35
3 changed files with 3 additions and 52 deletions

View file

@ -3,56 +3,7 @@ Owner: danpros
Github: https://github.com/danpros
Weblog: http://www.danpros.com
Contributor: Kanti
Github: https://github.com/Kanti
Weblog: https://kanti.de
Contributor: fahmi182
Github: https://github.com/fahmi182
Weblog: http://ifahmi.com
Contributor: fanningert
Github: https://github.com/fanningert
Contributor: BlackCodec
Github: https://github.com/BlackCodec
Contributor: mlncn
Github: https://github.com/mlncn
Contributor: Tea23
Github: https://github.com/Tea23
Contributor: greenphp
Github: https://github.com/greenphp
Contributor: brh55
Github: https://github.com/brh55
Contributor: ecc
Github: https://github.com/ecc
Contributor: bluebirch
Github: https://github.com/bluebirch
Contributor: EBethus
Github: https://github.com/EBethus
Contributor: nikkolai14
Github: https://github.com/nikkolai14
Contributor: RalfZim
Github: https://github.com/RalfZim
Contributor: NightPurrer
Github: https://github.com/NightPurrer
Contributor: EtherialNL
Github: https://github.com/EtherialNL
/* THANKS */
Name: Martin Angelov (http://tutorialzine.com)
Name: Xiaoying Riley (http://themes.3rdwavemedia.com)
Contributor: https://github.com/danpros/htmly/graphs/contributors
/* SITE */
Software: HTMLy

View file

@ -795,7 +795,7 @@ function get_backup_files()
echo '<tr class="' . $class . '">';
echo '<td>' . $name . '</td>';
echo '<td>' . $timestamp . '</td>';
echo '<td><a target="_blank" href="' . $url . '">Download</a> <form method="GET"><input type="hidden" name="file" value="' . $file . '"/><input type="submit" name="submit" value="Delete"/></form></td>';
echo '<td><a target="_blank" href="' . $url . '">Download</a> <form method="GET"><input type="hidden" name="file" value="' . $name . '"/><input type="submit" name="submit" value="Delete"/></form></td>';
echo '</tr>';
}
echo '</table>';

View file

@ -4,7 +4,7 @@ if (login()) {
$file = _h($_GET['file']);
if (!empty($file)) {
unlink($file);
unlink("backup/$file");
}
}