-
Notifications
You must be signed in to change notification settings - Fork 5
/
index.php
executable file
·62 lines (58 loc) · 1.78 KB
/
index.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<?php
ob_start();
$directory = getcwd();
$step = $_GET["step"];
//echo $directory. "/install/index.php";
if (file_exists($directory . "/install/index.php") && $step != 1) {
//$step!=1;
$step = 2;
}
if (!file_exists($directory . "/install/index.php") && $step != 1) {
$step = 3;
}
function rrmdir($dir) {
if (is_dir($dir)) {
$objects = scandir($dir);
foreach ($objects as $object) {
if ($object != "." && $object != "..") {
if (filetype($dir . "/" . $object) == "dir")
rrmdir($dir . "/" . $object);
else
unlink($dir . "/" . $object);
}
}
reset($objects);
rmdir($dir);
}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Setup File</title>
<link rel="stylesheet" href="css/install.css" type="text/css" />
<link rel="stylesheet" href="css/buttons.css" type="text/css" />
</head>
<body id="wp-core-ui">
<h1 id="logo"><a href="http://www.ladybirdweb.com/">Ladybird</a></h1>
<?php
switch ($step) {
case 1:
rrmdir($directory . "/install");
?>
<p>All right, sparky! You’ve made it through the installation. </p>
<?php
break;
case 2:
header("Location: install/index.php");
exit;
case 3:
?>
<p>Product already installed </p>
<?php
break;
}
?>
</body>
</html>