Jacek Kowalski
2019-12-16 07517ae563097e04e91ea3fae2c2ca1cf2309b86
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
<?php
include('./includes/std.php');
 
$title = 'Test systemu';
include('./design/top.php');
 
define('OK', '<b style="color:green">OK</b>');
define('NT', '<b style="color:blue">NIE SPRAWDZANE</b>');
define('FAIL', '<b style="color:red">BRAK</b>');
define('SFAIL', '<b style="color:lightcoral">BRAK<br />NIE WYMAGANE</b>');
?>
 
<style type="text/css">
th, td {border: 1px solid black; padding: 5px;}
th {text-align: left;}
th.head {text-align: center; background: lightblue;}
</style>
 
<table>
 
 
<tr> <th class="head" colspan="2">PHP</th> </tr>
<tr> <th>PHP 5.2 lub nowsze</th> <td><?php
if(version_compare(phpversion(), '5.2') >= 0) echo OK;
else echo FAIL;
?></td> </tr>
<tr> <th>magic_quotes_gpc = Off</th> <td><?php
if(get_magic_quotes_gpc()) echo FAIL;
else echo OK;
?></td> </tr>
 
 
<tr> <th class="head" colspan="2">Baza danych</th> </tr>
<tr> <th>Ustawienia bazy<br />(/includes/config.php)</th> <td><?php echo NT; ?></td> </tr>
<tr> <th>Rozszerzenie PDO</th> <td><?php
if(!extension_loaded('pdo')) {
    echo FAIL;
    $mysql = FALSE;
}
else echo OK;
?></td> </tr>
<tr> <th>Rozszerzenie PDO MySQL</th> <td><?php
if(!extension_loaded('pdo_mysql')) {
    echo FAIL;
    $mysql = FALSE;
}
else echo OK;
?></td> </tr>
<tr> <th>Tabela książek</th> <td><?php
$num = db2::num('ksiazki', '*', NULL);
if($mysql===FALSE) echo NT;
elseif($num===FALSE) echo FAIL;
else echo OK; ?></td> </tr>
<tr> <th>Tabela wypożyczeń</th> <td><?php
$num = db2::num('pozycz', '*', NULL);
if($mysql===FALSE) echo NT;
elseif($num===FALSE) echo FAIL;
else echo OK; ?></td> </tr>
 
 
<tr> <th class="head" colspan="2">Zewnętrzne bazy danych</th> </tr>
<tr> <th>Rozszerzenie YAZ</th> <td><?php
if(!extension_loaded('yaz')) {
    echo SFAIL;
    $yaz = FALSE;
}
else
    echo OK;
?></td> </tr>
<tr> <th>Próba pobrania</th> <td><?php
if($yaz===FALSE)
    echo NT;
else {
    $ibd = new ibd_BN;
    if($ibd->szukaj_ISBN('9788301121365'))
        echo OK;
    else
        echo SFAIL;
}
?></td> </tr>
 
 
<tr> <th class="head" colspan="2"> Okładki LibraryThing </th> </tr>
<tr> <th>Rozszerzenie cURL</th> <td><?php
if(!extension_loaded('curl')) {
    echo SFAIL;
    $curl = FALSE;
} else echo OK; ?></td> </tr>
<tr> <th>LibraryThing API key<br />(/includes/config.php)</th> <td><?php
if($curl === FALSE)
    echo NT;
elseif(!empty(config::$lt_api))
    echo OK;
else
    echo SFAIL;
?></td> </tr>
<tr> <th>Uprawnienia dla katalogu<br />
/covers</th> <td><?php
if($curl === FALSE) echo NT;
elseif(is_readable('./covers') && is_writable('./covers')) echo OK;
else echo FAIL;
?></td> </tr>
<tr> <th>Uprawnienia dla katalogu<br />
/covers_big</th> <td><?php
if($curl === FALSE) echo NT;
elseif(is_readable('./covers_big') && is_writable('./covers_big')) echo OK;
else echo FAIL;
?></td> </tr>
 
 
<tr> <th class="head" colspan="2"> Okładki własne </th> </tr>
<tr> <th>file_uploads = On</th> <td><?php
if(strtolower(ini_get('file_uploads')) == 'on' || ini_get('file_uploads') == 1) {
    echo OK;
}
else
{
    echo FAIL;
    $upload = FALSE;
}
?></td> </tr>
<tr> <th>Rozszerzenie GD2</th> <td><?php
if($upload === FALSE) echo NT;
elseif(!extension_loaded('gd')) {
    echo SFAIL;
    $gd = FALSE;
}
else echo OK;
?></td> </tr>
<tr> <th>Uprawnienia dla katalogu<br />
/covers/own</th> <td><?php
if($gd === FALSE || $upload === FALSE) echo NT;
elseif(is_readable('./covers/own') && is_writable('./covers/own')) echo OK;
else echo FAIL;
?></td> </tr>
<tr> <th>Uprawnienia dla katalogu<br />
/covers_big/own</th> <td><?php
if($gd === FALSE || $upload === FALSE) echo NT;
elseif(is_readable('./covers_big/own') && is_writable('./covers_big/own')) echo OK;
else echo FAIL;
?></td> </tr>
</table>
 
<?
include('./design/bottom.php');
?>