-
Notifications
You must be signed in to change notification settings - Fork 988
/
precheck_view.php
160 lines (151 loc) · 6.08 KB
/
precheck_view.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
151
152
153
154
155
156
157
158
159
160
<?php
function dirReport($dir, $write)
{
$error = 0;
if ($dir == "Found")
{
$a = gT("Found");
} else
{
$error = 1;
$a = gT("Not found");
}
if ($write == "Writable")
{
$b = gT("Writable");
} else
{
$error = 1;
$b = gT("Unwritable");
}
if ($error)
{
return '<h3 class="label label-danger" style="font-size: 100%;">'.$a.' & '.$b.'</h3>';
}
else
{
return $a.' & '.$b;
}
}
?>
<div class="row">
<div class="col-md-3">
<?php $this->renderPartial('/installer/sidebar_view', compact('progressValue', 'classesForStep')); ?>
</div>
<div class="col-md-9">
<h2><?php echo $title; ?></h2>
<p><?php echo $descp; ?></p>
<legend><?php eT("Minimum requirements"); ?></legend>
<table class='table-striped table'>
<thead>
<tr>
<th> </th>
<th class='text-center'><?php eT("Required"); ?></th>
<th class='text-center'><?php eT("Current"); ?></th>
</tr>
</thead>
<tbody>
<tr>
<td><?php eT("PHP version"); ?></td>
<td>5.5.9+</td>
<td><?php if (isset($verror) && $verror) { ?><span style='font-weight:bold; color: red'><?php eT("Outdated"); ?>: <?php echo $phpVersion; ?></span>
<?php } else { ?><?php echo $phpVersion ; ?> <?php } ?></td>
</tr>
<tr>
<td><?php eT("Minimum memory available"); ?></td>
<td>128</td>
<td><?php
if (isset($bMemoryError) && $bMemoryError) { ?><span style='font-weight:bold; color: red'><?php eT("Too low"); ?>: <?php echo convertPHPSizeToBytes(ini_get('memory_limit'))/1024/1024; ?>MB</span>
<?php } elseif (ini_get('memory_limit')=='-1') eT("Unlimited"); else { echo convertPHPSizeToBytes(ini_get('memory_limit'))/1024/1024; echo ' MB';} ?></td>
</tr>
<tr>
<td><?php eT("PHP PDO driver library"); ?></td>
<td><?php eT("At least one installed"); ?></td>
<td><?php if (count($dbtypes)==0) { ?><span style='font-weight:bold; color: red'><?php eT("None found"); ?></span>
<?php } else { ?><?php echo implode(', ',$dbtypes); ?> <?php } ?></td>
</tr>
<tr>
<td><?php eT("PHP mbstring library"); ?></td>
<td><span class='fa fa-check text-success' alt="Yes"></span></td>
<td><?php echo $mbstringPresent; ?></td>
</tr>
<tr>
<td><?php eT("PHP zlib library");?></td>
<td><span class='fa fa-check text-success' alt="Yes"></span></td>
<td><?php echo $zlibPresent ; ?></td>
</tr>
<tr>
<td><?php eT("PHP/PECL JSON library"); ?></td>
<td><span class='fa fa-check text-success' alt="Yes"></span></td>
<td><?php echo $bJSONPresent; ?></td>
</tr>
<tr>
<td>/application/config <?php eT("directory"); ?></td>
<td><?php eT("Found & writable"); ?></td>
<td><?php echo dirReport($configPresent,$configWritable); ?></td>
</tr>
<tr>
<td>/upload <?php eT("directory"); ?></td>
<td><?php eT("Found & writable"); ?></td>
<td><?php echo dirReport($uploaddirPresent,$uploaddirWritable); ?></td>
</tr>
<tr>
<td>/tmp <?php eT("directory"); ?></td>
<td><?php eT("Found & writable"); ?></td>
<td><?php echo dirReport($tmpdirPresent,$tmpdirWritable); ?></td>
</tr>
<tr>
<td><?php eT("Session writable"); ?></td>
<td><span class='fa fa-check text-success' alt="Yes"></span></td>
<td><?php echo $sessionWritableImg; if (!$sessionWritable) echo '<br/>session.save_path: ' . session_save_path(); ?></td>
</tr>
</tbody>
</table>
<br/>
<legend><?php eT('Optional modules'); ?></legend>
<table class='table-striped table'>
<thead>
<tr>
<th> </th>
<th><?php eT('Recommended'); ?></th>
<th><?php eT('Current'); ?></th>
</tr>
</thead>
<tbody>
<tr>
<td><?php eT("PHP GD library"); ?></td>
<td><span class='fa fa-check text-success' alt="Check"></span></td>
<td><?php echo $gdPresent ; ?></td>
</tr>
<tr>
<td><?php eT("PHP LDAP library"); ?></td>
<td><span class='fa fa-check text-success' alt="Check"></span></td>
<td><?php echo $ldapPresent ; ?></td>
</tr>
<tr>
<td><?php eT("PHP zip library"); ?></td>
<td><span class='fa fa-check text-success' alt="Check"></span></td>
<td><?php echo $zipPresent ; ?></td>
</tr>
<tr>
<td><?php eT("PHP imap library"); ?></td>
<td><span class='fa fa-check text-success' alt="Check"></span></td>
<td><?php echo $bIMAPPresent ; ?></td>
</tr>
</tbody>
</table>
<div class="row navigator">
<div class="col-md-4" >
<input class="btn btn-default" type="button" value="<?php eT('Previous'); ?>" onclick="javascript: window.open('<?php echo $this->createUrl("installer/license"); ?>', '_top')" />
</div>
<div class="col-md-4">
<input class="btn btn-default" type="button" value="<?php eT('Check again'); ?>" onclick="javascript: window.open('<?php echo $this->createUrl("installer/precheck"); ?>', '_top')" />
</div>
<div class="col-md-4">
<?php if (isset($next) && $next== TRUE) { ?>
<input class="btn btn-default" type="button" value="<?php eT('Next'); ?>" onclick="javascript: window.open('<?php echo $this->createUrl("installer/database"); ?>', '_top')" />
<?php } ?>
</div>
</div>
</div>
</div>