forked from snaptec/openWB
-
Notifications
You must be signed in to change notification settings - Fork 0
/
values.php
186 lines (181 loc) · 6.94 KB
/
values.php
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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
<?php
$result = '';
$lines = file('/var/www/html/openWB/openwb.conf');
foreach($lines as $line) {
if(strpos($line, "awattaraktiv=") !== false) {
list(, $awattaraktivold) = explode("=", $line);
}
if(strpos($line, "minimalstromstaerke=") !== false) {
list(, $minimalstromstaerkeold) = explode("=", $line);
}
if(strpos($line, "simplemode=") !== false) {
list(, $simplemodeold) = explode("=", $line);
}
if(strpos($line, "maximalstromstaerke=") !== false) {
list(, $maximalstromstaerkeold) = explode("=", $line);
}
if(strpos($line, "sofortll=") !== false) {
list(, $sofortllold) = explode("=", $line);
}
if(strpos($line, "sofortlls1=") !== false) {
list(, $sofortlls1old) = explode("=", $line);
}
if(strpos($line, "sofortlls2=") !== false) {
list(, $sofortlls2old) = explode("=", $line);
}
if(strpos($line, "lastmanagement=") !== false) {
list(, $lastmanagementold) = explode("=", $line);
}
if(strpos($line, "lastmanagements2=") !== false) {
list(, $lastmanagements2old) = explode("=", $line);
}
if(strpos($line, "lademstat=") !== false) {
list(, $lademstatold) = explode("=", $line);
}
if(strpos($line, "lademstats1=") !== false) {
list(, $lademstats1old) = explode("=", $line);
}
if(strpos($line, "lademkwh=") !== false) {
list(, $lademkwhold) = explode("=", $line);
}
if(strpos($line, "lademkwhs1=") !== false) {
list(, $lademkwhs1old) = explode("=", $line);
}
if(strpos($line, "lademstats2=") !== false) {
list(, $lademstats2old) = explode("=", $line);
}
if(strpos($line, "lademkwhs2=") !== false) {
list(, $lademkwhs2old) = explode("=", $line);
}
if(strpos($line, "sofortsoclp1=") !== false) {
list(, $sofortsoclp1old) = explode("=", $line);
}
if(strpos($line, "sofortsoclp2=") !== false) {
list(, $sofortsoclp2old) = explode("=", $line);
}
if(strpos($line, "sofortsoclp3=") !== false) {
list(, $sofortsoclp3old) = explode("=", $line);
}
if(strpos($line, "sofortsocstatlp1=") !== false) {
list(, $sofortsocstatlp1old) = explode("=", $line);
}
if(strpos($line, "sofortsocstatlp2=") !== false) {
list(, $sofortsocstatlp2old) = explode("=", $line);
}
if(strpos($line, "sofortsocstatlp3=") !== false) {
list(, $sofortsocstatlp3old) = explode("=", $line);
}
if(strpos($line, "msmoduslp1=") !== false) {
list(, $msmoduslp1old) = explode("=", $line);
}
if(strpos($line, "msmoduslp2=") !== false) {
list(, $msmoduslp2old) = explode("=", $line);
}
if(strpos($line, "speichermodul=") !== false) {
list(, $speicherstatold) = explode("=", $line);
}
if(strpos($line, "lp1name=") !== false) {
list(, $lp1nameold) = explode("=", $line);
}
if(strpos($line, "lp2name=") !== false) {
list(, $lp2nameold) = explode("=", $line);
}
if(strpos($line, "lp3name=") !== false) {
list(, $lp3nameold) = explode("=", $line);
}
if(strpos($line, "zielladenaktivlp1=") !== false) {
list(, $zielladenaktivlp1old) = explode("=", $line);
}
if(strpos($line, "nachtladen=") !== false) {
list(, $nachtladenstate) = explode("=", $line);
}
if(strpos($line, "nachtladens1=") !== false) {
list(, $nachtladenstates1) = explode("=", $line);
}
if(strpos($line, "nlakt_sofort=") !== false) {
list(, $nlakt_sofortold) = explode("=", $line, 2);
}
if(strpos($line, "nlakt_nurpv=") !== false) {
list(, $nlakt_nurpvold) = explode("=", $line, 2);
}
if(strpos($line, "nlakt_minpv=") !== false) {
list(, $nlakt_minpvold) = explode("=", $line, 2);
}
if(strpos($line, "nlakt_standby=") !== false) {
list(, $nlakt_standbyold) = explode("=", $line, 2);
}
if(strpos($line, "evuglaettungakt=") !== false) {
list(, $evuglaettungaktold) = explode("=", $line, 2);
}
if(strpos($line, "graphliveam=") !== false) {
list(, $graphliveamold) = explode("=", $line, 2);
}
if(strpos($line, "speicherpvui=") !== false) {
list(, $speicherpvuiold) = explode("=", $line, 2);
}
if(strpos($line, "speicherpveinbeziehen=") !== false) {
list(, $speicherpveinbeziehenold) = explode("=", $line, 2);
}
if(strpos($line, "chartlegendmain=") !== false) {
list(, $chartlegendmainold) = explode("=", $line, 2);
}
if(strpos($line, "hausverbrauchstat=") !== false) {
list(, $hausverbrauchstatold) = explode("=", $line, 2);
}
if(strpos($line, "theme=") !== false) {
list(, $themeold) = explode("=", $line, 2);
}
if(strpos($line, "heutegeladen=") !== false) {
list(, $heutegeladenold) = explode("=", $line, 2);
}
if(strpos($line, "displayconfigured=") !== false) {
list(, $displayconfiguredold) = explode("=", $line, 2);
}
if(strpos($line, "displaytheme=") !== false) {
list(, $displaythemeold) = explode("=", $line, 2);
}
if(strpos($line, "displaypinaktiv=") !== false) {
list(, $displaypinaktivold) = explode("=", $line);
}
if(strpos($line, "displaytagesgraph=") !== false) {
list(, $displaytagesgraphold) = explode("=", $line);
}
if(strpos($line, "displaypincode=") !== false) {
list(, $displaypincodeold) = explode("=", $line);
}
if(strpos($line, "settingspw=") !== false) {
list(, $settingspwold) = explode("=", $line);
}
if(strpos($line, "hook1_aktiv=") !== false) {
list(, $hook1_aktivold) = explode("=", $line);
}
if(strpos($line, "hook2_aktiv=") !== false) {
list(, $hook2_aktivold) = explode("=", $line);
}
if(strpos($line, "hook3_aktiv=") !== false) {
list(, $hook3_aktivold) = explode("=", $line);
}
}
$displaypincodeold = str_replace("\n", '', $displaypincodeold);
$themeold = preg_replace('~[\r\n]+~', '', $themeold);
$lastregelungaktiv = file_get_contents('/var/www/html/openWB/ramdisk/lastregelungaktiv');
$lademodusold = file_get_contents('/var/www/html/openWB/ramdisk/lademodus');
$lp1nameold = str_replace( "'", "", $lp1nameold);
$lp2nameold = str_replace( "'", "", $lp2nameold);
$lp3nameold = str_replace( "'", "", $lp3nameold);
$speichervorhanden = file_get_contents('/var/www/html/openWB/ramdisk/speichervorhanden');
$soc1vorhanden = file_get_contents('/var/www/html/openWB/ramdisk/soc1vorhanden');
$verbraucher1vorhanden = file_get_contents('/var/www/html/openWB/ramdisk/verbraucher1vorhanden');
$verbraucher2vorhanden = file_get_contents('/var/www/html/openWB/ramdisk/verbraucher2vorhanden');
$settingspwold = str_replace("\n", '', $settingspwold);
$owbversion = file_get_contents('/var/www/html/openWB/web/version');
if (isset($_GET[theme])) {
$theme = $_GET[theme];
$_SESSION = $theme;
}
else
{
$theme = $themeold;
$_SESSION = $theme;
}
?>