-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathselfcheck.php
More file actions
47 lines (37 loc) · 875 Bytes
/
selfcheck.php
File metadata and controls
47 lines (37 loc) · 875 Bytes
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
<?php
// Vorprüfungen bei erstmaligem Aufruf
function CheckIntegrity()
{
global $sGuipath;
global $sDatabase;
/* // PHP5
$sVersion = phpversion();
if ((int) $sVersion[0] < 5) {
Error("Fehler: OpenLawyer\'s benötigt PHP5 !");
die;
}
// SQlite2
if (phpversion('sqlite') == '') {
Error("Fehler: PHP-Bibliothek für SQLite fehlt !");
die;
}
// Ohne Oberfläche läuft nichts
if (!file_exists($sGuipath)) {
Error("Fehler: Oberflächendateien (GUI) nicht verfügbar.");
die;
}
*/
// Existiert überhaupt eine Datenbank ?
/* if (!file_exists($sDatabase)) {
Initialize();
}
*/
// Datenbank existiert - geht Zugriff ?
$hTestHandle = OpenDB($sDatabase, $sError);
if ($hTestHandle == false) {
Error("Fehler bei Datenbankzugriff: " . $sError);
die;
}
CloseDB($hTestHandle);
IPSperre();
}