dbXapp
2.0
RAD, CMS, Module und Runtime-IDE fuer dbXapp
Toggle main menu visibility
Loading...
Searching...
No Matches
dbxHelp_content.class.php
Go to the documentation of this file.
1
<?php
2
namespace
dbx\dbxHelp;
3
4
5
6
7
class
dbxHelp_content
{
8
9
Public
$oTPL
;
10
11
public
function
__construct
() {
12
$this->oTPL =
dbx
()->get_system_obj(
'dbxTPL'
);
13
}
14
15
function
getServerInfoHTML
() {
16
// Serverinformationen sammeln
17
$info = [
18
'Server Software'
=>
$_SERVER
[
'SERVER_SOFTWARE'
] ??
'N/A'
,
19
'Server Name'
=>
$_SERVER
[
'SERVER_NAME'
] ??
'N/A'
,
20
'PHP Version'
=> PHP_VERSION,
21
'PHP SAPI'
=> php_sapi_name(),
22
'Installed Modules'
=> implode(
', '
, get_loaded_extensions()),
// Alle Module als String
23
'Operating System'
=> PHP_OS,
24
'Document Root'
=>
$_SERVER
[
'DOCUMENT_ROOT'
] ??
'N/A'
,
25
'Server Protocol'
=>
$_SERVER
[
'SERVER_PROTOCOL'
] ??
'N/A'
,
26
'Server Port'
=>
$_SERVER
[
'SERVER_PORT'
] ??
'N/A'
,
27
'Client IP'
=>
$_SERVER
[
'REMOTE_ADDR'
] ??
'N/A'
,
28
];
29
30
$base
=
dbx
()->get_base_url();
31
$praxis =
dbx
()->get_config(
'myOrderLDT'
,
'praxis'
);
32
$path_pat =
dbx
()->get_config(
'myOrderLDT'
,
'import_pat'
);
33
$exe_medi =
dbx
()->get_config(
'myOrderLDT'
,
'medisoft'
);
34
$path_medi=
dbx
()->get_config(
'myOrderLDT'
,
'path_medisoft'
);
35
$version =
dbx
()->get_config(
'dbx'
,
'version'
);
36
37
// HTML-String für Bootstrap-Tabelle erstellen
38
$html =
'<div class="table-responsive">'
;
39
$html .=
'<table class="table table-bordered">'
;
40
$html .=
'<thead class="thead-dark"><tr><th>Eintrag</th><th>Wert</th></tr></thead>'
;
41
$html .=
'<tbody>'
;
42
$html .=
"<tr><td>Version</td><td>{$version}</td></tr>"
;
43
$html .=
"<tr><td>Praxis ID für das Labor</td><td>{$praxis}</td></tr>"
;
44
$html .=
"<tr><td>Praxis Software </td><td>{$exe_medi}</td></tr>"
;
45
46
$html .=
"<tr><td>Datei für Patientendaten</td><td>{$path_pat}</td></tr>"
;
47
$html .=
"<tr><td>Datei für Befunde Import</td><td>{$path_medi}</td></tr>"
;
48
$html .=
"<tr><td>Base URL System</td><td>{$base}</td></tr>"
;
49
50
// Array durchlaufen und als Zeilen in der Tabelle anzeigen
51
foreach
($info as $key => $value) {
52
if
($key ===
'Installed Modules'
) {
53
// Separate die Module in Zeilen mit max. 8 Modulen pro Zeile
54
$modules = explode(
', '
, $value);
55
$formattedModules =
''
;
56
foreach
(array_chunk($modules, 8) as $chunk) {
57
$formattedModules .= implode(
', '
, $chunk) .
'<br>'
;
58
}
59
$value = rtrim($formattedModules,
'<br>'
);
// Letztes <br> entfernen
60
}
61
62
$html .=
"<tr><td>{$key}</td><td>{$value}</td></tr>"
;
63
}
64
65
$html .=
'</tbody>'
;
66
$html .=
'</table>'
;
67
$html .=
'</div>'
;
68
69
// CSS hinzufügen, um die Modulzeilen ohne horizontale Scrollbar zu ermöglichen
70
$html .=
'
71
<style>
72
.table td {
73
white-space: normal; /* Zeilenumbruch innerhalb der Zelle */
74
}
75
</style>'
;
76
77
return
$html;
78
}
79
80
81
82
83
public
function
run
() {
84
$content=
'xxx'
;
85
$cid=
dbx
()->get_modul_var(
'dbx_cid'
,0,
'int'
);
86
if
($cid) $content=
"[modul=dbxContent]cid=$cid&dbx_run1=show[/modul]"
;
87
if
(!$cid) {
88
$content=$this->
getServerInfoHTML
();
89
90
}
91
92
return
$content;
93
}
// run()
94
95
96
}
// class
97
dbx\dbxHelp\dbxHelp_content
Definition
dbxHelp_content.class.php:7
dbx\dbxHelp\dbxHelp_content\__construct
__construct()
Definition
dbxHelp_content.class.php:11
dbx\dbxHelp\dbxHelp_content\getServerInfoHTML
getServerInfoHTML()
Definition
dbxHelp_content.class.php:15
dbx\dbxHelp\dbxHelp_content\$oTPL
Public $oTPL
Definition
dbxHelp_content.class.php:9
dbx\dbxHelp\dbxHelp_content\run
run()
Definition
dbxHelp_content.class.php:83
dbx
DBX schema administration.
$base
$base
Definition
run_context_help_provision.php:2
$_SERVER
$_SERVER['REQUEST_URI']
Definition
run_context_help_provision.php:4
dbx
modules
dbxHelp
include
dbxHelp_content.class.php
Generated by
1.17.0