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> |
381239
|
35 |
<tr> <th>Rozszerzenie PDO</th> <td><?php |
JK |
36 |
if(!extension_loaded('pdo')) { |
|
37 |
echo FAIL; |
|
38 |
$mysql = FALSE; |
|
39 |
} |
|
40 |
else echo OK; |
|
41 |
?></td> </tr> |
|
42 |
<tr> <th>Rozszerzenie PDO MySQL</th> <td><?php |
|
43 |
if(!extension_loaded('pdo_mysql')) { |
175a52
|
44 |
echo FAIL; |
JK |
45 |
$mysql = FALSE; |
|
46 |
} |
|
47 |
else echo OK; |
|
48 |
?></td> </tr> |
|
49 |
<tr> <th>Tabela książek</th> <td><?php |
|
50 |
$num = db2::num('ksiazki', '*', NULL); |
|
51 |
if($mysql===FALSE) echo NT; |
|
52 |
elseif($num===FALSE) echo FAIL; |
|
53 |
else echo OK; ?></td> </tr> |
|
54 |
<tr> <th>Tabela wypożyczeń</th> <td><?php |
|
55 |
$num = db2::num('pozycz', '*', NULL); |
|
56 |
if($mysql===FALSE) echo NT; |
|
57 |
elseif($num===FALSE) echo FAIL; |
|
58 |
else echo OK; ?></td> </tr> |
|
59 |
|
|
60 |
|
|
61 |
<tr> <th class="head" colspan="2">Zewnętrzne bazy danych</th> </tr> |
|
62 |
<tr> <th>Rozszerzenie YAZ</th> <td><?php |
|
63 |
if(!extension_loaded('yaz')) { |
|
64 |
echo SFAIL; |
|
65 |
$yaz = FALSE; |
|
66 |
} |
|
67 |
else |
|
68 |
echo OK; |
|
69 |
?></td> </tr> |
|
70 |
<tr> <th>Próba pobrania</th> <td><?php |
|
71 |
if($yaz===FALSE) |
|
72 |
echo NT; |
|
73 |
else { |
|
74 |
$ibd = new ibd_BN; |
|
75 |
if($ibd->szukaj_ISBN('9788301121365')) |
|
76 |
echo OK; |
|
77 |
else |
|
78 |
echo SFAIL; |
|
79 |
} |
|
80 |
?></td> </tr> |
|
81 |
|
|
82 |
|
|
83 |
<tr> <th class="head" colspan="2"> Okładki LibraryThing </th> </tr> |
|
84 |
<tr> <th>Rozszerzenie cURL</th> <td><?php |
|
85 |
if(!extension_loaded('curl')) { |
|
86 |
echo SFAIL; |
|
87 |
$curl = FALSE; |
|
88 |
} else echo OK; ?></td> </tr> |
08d387
|
89 |
<tr> <th>LibraryThing API key<br />(/includes/config.php)</th> <td><?php |
175a52
|
90 |
if($curl === FALSE) |
JK |
91 |
echo NT; |
08d387
|
92 |
elseif(!empty(config::$lt_api)) |
175a52
|
93 |
echo OK; |
JK |
94 |
else |
08d387
|
95 |
echo SFAIL; |
175a52
|
96 |
?></td> </tr> |
JK |
97 |
<tr> <th>Uprawnienia dla katalogu<br /> |
|
98 |
/covers</th> <td><?php |
|
99 |
if($curl === FALSE) echo NT; |
|
100 |
elseif(is_readable('./covers') && is_writable('./covers')) echo OK; |
|
101 |
else echo FAIL; |
|
102 |
?></td> </tr> |
|
103 |
<tr> <th>Uprawnienia dla katalogu<br /> |
|
104 |
/covers_big</th> <td><?php |
|
105 |
if($curl === FALSE) echo NT; |
|
106 |
elseif(is_readable('./covers_big') && is_writable('./covers_big')) echo OK; |
|
107 |
else echo FAIL; |
|
108 |
?></td> </tr> |
|
109 |
|
|
110 |
|
|
111 |
<tr> <th class="head" colspan="2"> Okładki własne </th> </tr> |
|
112 |
<tr> <th>file_uploads = On</th> <td><?php |
|
113 |
if(strtolower(ini_get('file_uploads')) == 'on' || ini_get('file_uploads') == 1) { |
|
114 |
echo OK; |
|
115 |
} |
|
116 |
else |
|
117 |
{ |
|
118 |
echo FAIL; |
|
119 |
$upload = FALSE; |
|
120 |
} |
|
121 |
?></td> </tr> |
|
122 |
<tr> <th>Rozszerzenie GD2</th> <td><?php |
|
123 |
if($upload === FALSE) echo NT; |
|
124 |
elseif(!extension_loaded('gd')) { |
|
125 |
echo SFAIL; |
|
126 |
$gd = FALSE; |
|
127 |
} |
|
128 |
else echo OK; |
|
129 |
?></td> </tr> |
|
130 |
<tr> <th>Uprawnienia dla katalogu<br /> |
|
131 |
/covers/own</th> <td><?php |
|
132 |
if($gd === FALSE || $upload === FALSE) echo NT; |
|
133 |
elseif(is_readable('./covers/own') && is_writable('./covers/own')) echo OK; |
|
134 |
else echo FAIL; |
|
135 |
?></td> </tr> |
|
136 |
<tr> <th>Uprawnienia dla katalogu<br /> |
|
137 |
/covers_big/own</th> <td><?php |
|
138 |
if($gd === FALSE || $upload === FALSE) echo NT; |
|
139 |
elseif(is_readable('./covers_big/own') && is_writable('./covers_big/own')) echo OK; |
|
140 |
else echo FAIL; |
|
141 |
?></td> </tr> |
|
142 |
</table> |
|
143 |
|
|
144 |
<? |
|
145 |
include('./design/bottom.php'); |
|
146 |
?> |