This repository has been archived by the owner on Feb 10, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
install.php
150 lines (125 loc) · 3.08 KB
/
install.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<?php include "config.php"; ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>XDCC Fetcher</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
TABLE.Section {
border:solid 1px #333333;
width:300;
margin-bottom: 25px;
}
TD {
font-family: Verdana, Arial;
font-size: 12px;
color: #333333;
}
TD.Section {
padding:5px;
font-size: 10px;
}
.TableTitle {
position: relative;
top: -15px;
padding-left: 2px;
padding-right: 2px;
color: #333333;
background-color: #CCCCCC;
font-weight: bold;
font-size: 10px;
}
IMG {
width: 300px;
height: 32px;
border: 0px;
margin-top: 30px;
margin-bottom: 15px;
}
.CopyRight {
font-family: Verdana, Arial;
font-size: 10px;
color: #999999;
text-align: center;
}
</style>
</head>
<body bgcolor="#CCCCCC">
<center><img src="logo.gif"></center>
<?php
echo '<table align="center" class="Section">
<tr>
<td class="Section"><span class="TableTitle">Downloads folder</span><br>';
echo "The downloads folder is: <b>" . $downloadfolder . "</b><br>
If this is incorrect, please edit config.php<br>";
echo "<br>Directory listing test...";
flush();
$handler = @opendir($downloadfolder);
if ($handler) {
echo ' <font color="green"><b>success!</b></font>';
}
else {
echo ' <font color="red"><b>error - directory does not exist, or access denied</b></font>';
}
echo "<br>File creation test...";
flush();
$testfilename = $downloadfolder . "xf" . rand(10000,99999) . ".please.delete.me";
$handler = @fopen($testfilename, 'a');
if ($handler) {
echo ' <font color="green"><b>success!</b></font>';
@fclose($handler);
echo "<br>Deleting test file...";
flush();
$handler = @unlink($testfilename);
if ($handler) {
echo ' <font color="green"><b>success!</b></font>';
}
else {
echo ' <font color="red"><b>error - access denied. Please delete manually.</b></font>';
}
}
else {
echo ' <font color="red"><b>error - access denied</b></font>';
}
echo '</td>
</tr>
</table>';
echo '<table align="center" class="Section">
<tr>
<td class="Section"><span class="TableTitle">Logs folder</span><br>';
echo "The logs folder is: <b>" . $logsfolder . "</b><br>
If this is incorrect, please edit config.php<br>";
echo "<br>Directory listing test...";
flush();
$handler = @opendir($logsfolder);
if ($handler) {
echo ' <font color="green"><b>success!</b></font>';
}
else {
echo ' <font color="red"><b>error - directory does not exist, or access denied</b></font>';
}
echo "<br>File creation test...";
flush();
$testfilename = $logsfolder . "xf" . rand(10000,99999) . ".please.delete.me";
$handler = @fopen($testfilename, 'a');
if ($handler) {
echo ' <font color="green"><b>success!</b></font>';
@fclose($handler);
echo "<br>Deleting test file...";
flush();
$handler = @unlink($testfilename);
if ($handler) {
echo ' <font color="green"><b>success!</b></font>';
}
else {
echo ' <font color="red"><b>error - access denied. Please delete manually.</b></font>';
}
}
else {
echo ' <font color="red"><b>error - access denied</b></font>';
}
echo '</td>
</tr>
</table>';
include 'footer.php';
?>