This repository has been archived by the owner on Nov 25, 2020. It is now read-only.
/
startup.phtml
217 lines (199 loc) · 9.05 KB
/
startup.phtml
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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
<!DOCTYPE html>
<html>
<head>
<title>Pydio</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link rel="icon" type="image/x-png" href="AJXP_THEME_FOLDER/images/html-folder.png">
<script src="plugins/gui.ajax/res/js/vendor/prototype/prototype.js" type="text/javascript"></script>
<style>
* {
font-family: Roboto, sans-serif;
}
body {
background-color: #F5F5F5;
margin: 0;
padding: 20px;
overflow: hidden;
}
h1 {
font-size: 30px;
font-weight: normal;
color: #555;
height: 20px;
text-align: center;
margin: 10px auto;
}
div.mainContainer{
position: relative;
display: block;
border-radius: 4px;
margin: 36px auto;
width: 660px;
height: 80%;
padding: 7px 11px;
color: #535353;
}
p.status{
margin-top: 0;
font-size: 15px;
line-height: 20px;
text-align: justify;
height: 60px;
padding: 0 5px;
}
p.status a{
display: inline-block;
background-color: #555555;
color: white;
text-transform: uppercase;
padding: 5px 10px;
text-decoration: none;
border-radius: 3px;
margin: 9px 1px;
}
p.status strong{
font-weight: normal;
font-style: italic;
}
div.testList{
font-size: 15px;
margin: 0 auto;
overflow-y: scroll;
background-color: #ffffff;
border-radius: 3px;
box-shadow: 0 0 8px rgba(0,0,0,0.25);
}
div.testLine {
text-align: left;
padding: 15px 15px 9px;
border-bottom: 1px solid #E7E7E7;
}
div.testClear{
clear:both;
height: 8px;
}
div.testName{
float: left;
width: 80%;
cursor: pointer;
font-size: 20px;
color: #555;
}
div.testName span{
display: none;
}
div.testStatus{
float: right;
width: 20%;
text-transform: uppercase;
text-align: right;
color: #090;
margin-top: 3px;
}
div.testLine.error .testStatus{
color : #933;
}
div.testLine.warning .testStatus{
color: #f90;
}
div.testDescription{
display:none;
font-size: 0.8em;
color: #999;
clear: both;
padding: 20px 0 5px;
}
div.testDescription.visible
{
display: block;
}
p.suggestion{
font-size:0.9em;
margin:5px 0 0;
}
</style>
</head>
<body bgcolor="#FFFFFF" text="#000000" marginheight="0" marginwidth="0" leftmargin="0" topmargin="0" style="">
<h1>Pydio Diagnostic Tool</h1>
<div class="mainContainer">
<?php
if ($showSkipLink) {
if (count($ALL_ROWS["warning"]) && !count($ALL_ROWS["error"])) {
echo "<p class='status statusWarning'><strong>Status</strong> : You have some warnings, but no fatal error detected, Pydio should run ok. <br/>Please review the warnings, and <a href='?ignore_tests=true'>click here to continue to Pydio</a>.</p>";
} else if(count($ALL_ROWS["error"])) {
echo "<p class='status statusError'><strong>Status</strong> : <b>You have some errors</b> that may prevent Pydio from running. Please review the error lines to check what action you should do. If you want to skip this step, simply <a href='?ignore_tests=true'>click here to continue to Pydio</a>.</p>";
}else{
echo "<p class='status'><strong>Status</strong> : <b>No specific errors</b> were detected, your Pydio installation should run smoothly! <br/><a href='?ignore_tests=true'>Click there to continue to Pydio</a></p>";
}
}
?>
<div class="testList">
<?php
foreach ($ALL_ROWS as $testsType => $allTests){
foreach($allTests as $testKey => $testInfo){
$status = ($testsType == "passed"?"ok":$testsType);
echo "<div class='testLine $testsType'>
<div class='testName'><span>".($testsType != "passed"?"-":"+")."</span> $testKey</div>
<div class='testStatus'>$status</div>
<div class='testDescription ".($testsType != "passed"?" visible":"")."'>$testInfo</div>
<div class='testClear'></div>
</div>";
}
}
?>
</div>
<script type="text/javascript">
var testAllowOverride = new Ajax.Request('data/cache/index.html', {
method : 'get',
onComplete : function(response){
if(200 === response.status){
var html = '<div class="testLine error">\
<div class="testName"><span>-</span>Security Breach</div>\
<div class="testStatus">error</div>\
<div class="testDescription visible">It seems that your <b>data/</b> folder is not correctly protected, and that subfolders (like the data/cache/ folder) are web-accessible. If you are using <b>Apache</b>, make sure the AllowOverride All option is active for your current directory. If you are running <b>Windows IIS</b>, you must manually add a RequestFiltering/HiddenSegments configuration to prevent web access to these folders. If you have defined a different AJXP_DATA_PATH pointing outside the webfolder, you can ignore this warning.</div>\
<div class="testClear"></div>\
</div>';
$$('div.testList')[0].insert({top:html});
}
}
});
/*
var testRewrite = new Ajax.Request('public/', {
method : 'get',
onComplete : function(response){
if(404 === response.status){
var html = '<div class="testLine error">\
<div class="testName"><span>-</span>RewriteRule does not seem to work</div>\
<div class="testStatus">error</div>\
<div class="testDescription visible">Testing access to <b>public/</b> should give an empty link page but gives a 404, which seems to indicate that your server is not configure to support RewriteRules. If you are using <b>Apache</b>, make sure the ModRewrite is active. For other servers, check pydio install folder where you may find proper configuration files (web.config.sample, nginx.sample)</div>\
<div class="testClear"></div>\
</div>';
$$('div.testList')[0].insert({top:html});
}
}
});
*/
$$('div.testName').invoke("observe", "click", function(event){
var target = event.target;
if(target.tagName.toLowerCase() == "span") target = target.up("div.testName");
target.next("div.testDescription").toggleClassName("visible");
if(target.next("div.testDescription").hasClassName("visible")){
target.down("span").update("-");
}else{
target.down("span").update("+");
}
});
var resize = function(){
var h1 = document.viewport.getHeight() - 120 ;
var h = h1 - 80;
$$("div.mainContainer")[0].setStyle({height:h1+'px'});
$$("div.testList")[0].setStyle({height:h + 'px'});
};
Event.observe(window, "resize", resize);
resize();
</script>
</div>
<!-- <h1 style="text-align: right">Continue to Pydio >> </h1>-->
</body>
</html>