-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwriteConfigFile.php
More file actions
executable file
·70 lines (65 loc) · 2.39 KB
/
Copy pathwriteConfigFile.php
File metadata and controls
executable file
·70 lines (65 loc) · 2.39 KB
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
<?php
$flag_zeigeSekunden = $_GET["flag_zeigeSekunden"];
$flag_regenbogenChecked = $_GET["flag_regenbogenChecked"];
$selectedColorID = $_GET["selectedColorID"];
$r_value = $_GET["r_value"];
$g_value = $_GET["g_value"];
$b_value = $_GET["b_value"];
$flag_hintergrundChecked = $_GET["flag_hintergrundChecked"];
$hintergrundValue = $_GET["hintergrundValue"];
$flag_tagesabhaengigChecked = $_GET["flag_tagesabhaengigChecked"];
$generalValue = $_GET["generalValue"];
$clock_running = $_GET["clock_running"];
$clock_stop = $_GET["clock_stop"];
$plugin_number = $_GET["plugin_number"];
$myfile = fopen("./config/clockConfig.cfg", "w") or die("Unable to open file!");
$txt = "[binaryclock_general]\n";
fwrite($myfile, $txt);
$txt = "show_seconds = " . $flag_zeigeSekunden . "\n";
fwrite($myfile, $txt);
$txt = " \n";
fwrite($myfile, $txt);
$txt = "[binaryclock_color]\n";
fwrite($myfile, $txt);
$txt = "rainbow_color = " . $flag_regenbogenChecked . "\n";
fwrite($myfile, $txt);
$txt = "id = " . $selectedColorID . "\n";
fwrite($myfile, $txt);
$txt = "r_value = " . $r_value . "\n";
fwrite($myfile, $txt);
$txt = "g_value = " . $g_value . "\n";
fwrite($myfile, $txt);
$txt = "b_value = " . $b_value . "\n";
fwrite($myfile, $txt);
$txt = " \n";
fwrite($myfile, $txt);
$txt = "[binaryclock_background]\n";
fwrite($myfile, $txt);
$txt = "background_color = " . $flag_hintergrundChecked . "\n";
fwrite($myfile, $txt);
$txt = "background_color_value = " . $hintergrundValue . "\n";
fwrite($myfile, $txt);
$txt = " \n";
fwrite($myfile, $txt);
$txt = "[binaryclock_sensitiv]\n";
fwrite($myfile, $txt);
$txt = "brightness_time_sensitiv = " . $flag_tagesabhaengigChecked . "\n";
fwrite($myfile, $txt);
$txt = "brightness_general = " . $generalValue . "\n";
fwrite($myfile, $txt);
$txt = " \n";
fwrite($myfile, $txt);
$txt = "[binaryclock_startstop]\n";
fwrite($myfile, $txt);
$txt = "clock_running = " . $clock_running . "\n";
fwrite($myfile, $txt);
$txt = "clock_stop = " . $clock_stop . "\n";
fwrite($myfile, $txt);
$txt = " \n";
fwrite($myfile, $txt);
$txt = "[binaryclock_plugins]\n";
fwrite($myfile, $txt);
$txt = "plugin_number = " . $plugin_number . "\n";
fwrite($myfile, $txt);
fclose($myfile);
?>