commit | author | age
|
175a52
|
1 |
<?php |
JK |
2 |
include('./includes/std.php'); |
|
3 |
|
|
4 |
$title = 'Test systemu'; |
|
5 |
include('./design/top.php'); |
|
6 |
|
|
7 |
define('OK', '<b style="color:green">OK</b>'); |
|
8 |
define('NT', '<b style="color:blue">NIE SPRAWDZANE</b>'); |
|
9 |
define('FAIL', '<b style="color:red">BRAK</b>'); |
|
10 |
define('SFAIL', '<b style="color:lightcoral">BRAK<br />NIE WYMAGANE</b>'); |
|
11 |
?> |
|
12 |
|
|
13 |
<style type="text/css"> |
|
14 |
th, td {border: 1px solid black; padding: 5px;} |
|
15 |
th {text-align: left;} |
|
16 |
th.head {text-align: center; background: lightblue;} |
|
17 |
</style> |
|
18 |
|
|
19 |
<table> |
|
20 |
|
|
21 |
|
|
22 |
<tr> <th class="head" colspan="2">PHP</th> </tr> |
|
23 |
<tr> <th>PHP 5.2 lub nowsze</th> <td><?php |
|
24 |
if(version_compare(phpversion(), '5.2') >= 0) echo OK; |
|
25 |
else echo FAIL; |
|
26 |
?></td> </tr> |
|
27 |
<tr> <th>magic_quotes_gpc = Off</th> <td><?php |
|
28 |
if(get_magic_quotes_gpc()) echo FAIL; |
|
29 |
else echo OK; |
|
30 |
?></td> </tr> |
|
31 |
|
|
32 |
|
|
33 |
<tr> <th class="head" colspan="2">Baza danych</th> </tr> |
08d387
|
34 |
<tr> <th>Ustawienia bazy<br />(/includes/config.php)</th> <td><?php echo NT; ?></td> </tr> |
175a52
|
35 |
<tr> <th>Rozszerzenie MySQL</th> <td><?php |
JK |
36 |
if(!extension_loaded('mysql')) { |
|
37 |
echo FAIL; |
|
38 |
$mysql = FALSE; |
|
39 |
} |
|
40 |
else echo OK; |
|
41 |
?></td> </tr> |
|
42 |
<tr> <th>Tabela książek</th> <td><?php |
|
43 |
$num = db2::num('ksiazki', '*', NULL); |
|
44 |
if($mysql===FALSE) echo NT; |
|
45 |
elseif($num===FALSE) echo FAIL; |
|
46 |
else echo OK; ?></td> </tr> |
|
47 |
<tr> <th>Tabela wypożyczeń</th> <td><?php |
|
48 |
$num = db2::num('pozycz', '*', NULL); |
|
49 |
if($mysql===FALSE) echo NT; |
|
50 |
elseif($num===FALSE) echo FAIL; |
|
51 |
else echo OK; ?></td> </tr> |
|
52 |
|
|
53 |
|
|
54 |
<tr> <th class="head" colspan="2">Zewnętrzne bazy danych</th> </tr> |
|
55 |
<tr> <th>Rozszerzenie YAZ</th> <td><?php |
|
56 |
if(!extension_loaded('yaz')) { |
|
57 |
echo SFAIL; |
|
58 |
$yaz = FALSE; |
|
59 |
} |
|
60 |
else |
|
61 |
echo OK; |
|
62 |
?></td> </tr> |
|
63 |
<tr> <th>Próba pobrania</th> <td><?php |
|
64 |
if($yaz===FALSE) |
|
65 |
echo NT; |
|
66 |
else { |
|
67 |
$ibd = new ibd_BN; |
|
68 |
if($ibd->szukaj_ISBN('9788301121365')) |
|
69 |
echo OK; |
|
70 |
else |
|
71 |
echo SFAIL; |
|
72 |
} |
|
73 |
?></td> </tr> |
|
74 |
|
|
75 |
|
|
76 |
<tr> <th class="head" colspan="2"> Okładki LibraryThing </th> </tr> |
|
77 |
<tr> <th>Rozszerzenie cURL</th> <td><?php |
|
78 |
if(!extension_loaded('curl')) { |
|
79 |
echo SFAIL; |
|
80 |
$curl = FALSE; |
|
81 |
} else echo OK; ?></td> </tr> |
08d387
|
82 |
<tr> <th>LibraryThing API key<br />(/includes/config.php)</th> <td><?php |
175a52
|
83 |
if($curl === FALSE) |
JK |
84 |
echo NT; |
08d387
|
85 |
elseif(!empty(config::$lt_api)) |
175a52
|
86 |
echo OK; |
JK |
87 |
else |
08d387
|
88 |
echo SFAIL; |
175a52
|
89 |
?></td> </tr> |
JK |
90 |
<tr> <th>Uprawnienia dla katalogu<br /> |
|
91 |
/covers</th> <td><?php |
|
92 |
if($curl === FALSE) echo NT; |
|
93 |
elseif(is_readable('./covers') && is_writable('./covers')) echo OK; |
|
94 |
else echo FAIL; |
|
95 |
?></td> </tr> |
|
96 |
<tr> <th>Uprawnienia dla katalogu<br /> |
|
97 |
/covers_big</th> <td><?php |
|
98 |
if($curl === FALSE) echo NT; |
|
99 |
elseif(is_readable('./covers_big') && is_writable('./covers_big')) echo OK; |
|
100 |
else echo FAIL; |
|
101 |
?></td> </tr> |
|
102 |
|
|
103 |
|
|
104 |
<tr> <th class="head" colspan="2"> Okładki własne </th> </tr> |
|
105 |
<tr> <th>file_uploads = On</th> <td><?php |
|
106 |
if(strtolower(ini_get('file_uploads')) == 'on' || ini_get('file_uploads') == 1) { |
|
107 |
echo OK; |
|
108 |
} |
|
109 |
else |
|
110 |
{ |
|
111 |
echo FAIL; |
|
112 |
$upload = FALSE; |
|
113 |
} |
|
114 |
?></td> </tr> |
|
115 |
<tr> <th>Rozszerzenie GD2</th> <td><?php |
|
116 |
if($upload === FALSE) echo NT; |
|
117 |
elseif(!extension_loaded('gd')) { |
|
118 |
echo SFAIL; |
|
119 |
$gd = FALSE; |
|
120 |
} |
|
121 |
else echo OK; |
|
122 |
?></td> </tr> |
|
123 |
<tr> <th>Uprawnienia dla katalogu<br /> |
|
124 |
/covers/own</th> <td><?php |
|
125 |
if($gd === FALSE || $upload === FALSE) echo NT; |
|
126 |
elseif(is_readable('./covers/own') && is_writable('./covers/own')) echo OK; |
|
127 |
else echo FAIL; |
|
128 |
?></td> </tr> |
|
129 |
<tr> <th>Uprawnienia dla katalogu<br /> |
|
130 |
/covers_big/own</th> <td><?php |
|
131 |
if($gd === FALSE || $upload === FALSE) echo NT; |
|
132 |
elseif(is_readable('./covers_big/own') && is_writable('./covers_big/own')) echo OK; |
|
133 |
else echo FAIL; |
|
134 |
?></td> </tr> |
|
135 |
</table> |
|
136 |
|
|
137 |
<? |
|
138 |
include('./design/bottom.php'); |
|
139 |
?> |