1 | #ifndef INFO_H
|
---|
2 | #define INFO_H
|
---|
3 |
|
---|
4 | void screengetserial()
|
---|
5 | {
|
---|
6 | char* cpu = NULL;
|
---|
7 | char* tmpstr = NULL;
|
---|
8 |
|
---|
9 | cpu = getcpuid();
|
---|
10 | if(cpu == NULL) return;
|
---|
11 |
|
---|
12 | tmpstr = ostrcat("Board-ID SerialNr: ", cpu, 0, 0);
|
---|
13 | writesys("/tmp/atemio.log", tmpstr, 1);
|
---|
14 |
|
---|
15 | char* cmd = NULL;
|
---|
16 | cmd = ostrcat(cmd, "/var/backup/atemio.", 1, 0);
|
---|
17 | cmd = ostrcat(cmd, cpu, 1, 0);
|
---|
18 | cmd = ostrcat(cmd, ".log", 1, 0);
|
---|
19 | writesys(cmd, tmpstr, 1);
|
---|
20 | free(tmpstr); tmpstr = NULL;
|
---|
21 | free(cmd); cmd = NULL;
|
---|
22 |
|
---|
23 | tmpstr = ostrcat(_("For next OnlineUpdate please contact Atemio and send this Serial Number\nand your Atemio Serial Number !!\n\nBoard-ID SerialNr:"), " ", 0, 0);
|
---|
24 | tmpstr = ostrcat(tmpstr, cpu, 1, 0);
|
---|
25 | tmpstr = ostrcat(tmpstr, "\n\n", 1, 0);
|
---|
26 | tmpstr = ostrcat(tmpstr, _("Email info@atemio.de"), 1, 0);
|
---|
27 | textbox(_("Info"), _(tmpstr), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 1100, 400, 0, 1);
|
---|
28 |
|
---|
29 | free(cpu); cpu = NULL;
|
---|
30 | free(tmpstr); tmpstr = NULL;
|
---|
31 | }
|
---|
32 |
|
---|
33 | void screensystem_logs(int mode)
|
---|
34 | {
|
---|
35 | char* tmpstr = NULL;
|
---|
36 | int rcret = 0;
|
---|
37 | struct skin* systeminfo = getscreen("systeminfo");
|
---|
38 | struct skin* info = getscreennode(systeminfo, "info");
|
---|
39 | struct skin* load = getscreen("loading");
|
---|
40 | drawscreen(load, 0, 0);
|
---|
41 |
|
---|
42 | addscreenrc(systeminfo, info);
|
---|
43 |
|
---|
44 | if(mode == 0)
|
---|
45 | changetitle(systeminfo, _("Infos"));
|
---|
46 | else if(mode == 1)
|
---|
47 | changetitle(systeminfo, _("Titan Changelog"));
|
---|
48 | else if(mode == 2)
|
---|
49 | changetitle(systeminfo, _("Git Changelog"));
|
---|
50 |
|
---|
51 | tmpstr = system_logs(mode);
|
---|
52 | changetext(info, tmpstr);
|
---|
53 | free(tmpstr), tmpstr = NULL;
|
---|
54 |
|
---|
55 | clearscreen(load);
|
---|
56 | drawscreen(systeminfo, 0, 0);
|
---|
57 |
|
---|
58 | while(1)
|
---|
59 | {
|
---|
60 | rcret = waitrc(systeminfo, 0, 0);
|
---|
61 |
|
---|
62 | if(rcret == getrcconfigint("rcexit", NULL)) break;
|
---|
63 | if(rcret == getrcconfigint("rcok", NULL)) break;
|
---|
64 | }
|
---|
65 |
|
---|
66 | delownerrc(systeminfo);
|
---|
67 | clearscreen(systeminfo);
|
---|
68 | }
|
---|
69 |
|
---|
70 | #endif
|
---|