-
Notifications
You must be signed in to change notification settings - Fork 25
/
cleanup.php
38 lines (33 loc) · 1.09 KB
/
cleanup.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<p align="center"><?php
include("install/includes/install_settings.php");
foreach ($files as $file) {
if (!unlink($file)) {
echo ("Error deleting $file<br>");
}else{
echo ("Deleted $file<br>");
}
}
function rrmdir($dir) {
if (is_dir($dir)) {
$objects = scandir($dir);
foreach ($objects as $object) {
if ($object != "." && $object != "..") {
if (is_dir($dir."/".$object))
rrmdir($dir."/".$object);
else
unlink($dir."/".$object);
}
}
rmdir($dir);
}
}
rrmdir("install");
?>
</p>
<p align="center">If you made it this far, everything SHOULD be good to go. If you see any errors above, you will want to navigate to the install folder, and delete it manually. Don't forget to check out UserSpice.com if you need any help. Click the button below to make sure you have the latest updates to your database.</p>
<h3 align="center"><a class="button" href="../users/update.php">Update Database and Login!</a></h3>
<?php
//this is a temporary fix
require_once("../users/classes/Redirect.php");
Redirect::to("../users/update.php?installer=1");
?>