forked from othmar52/ompd-mod
/
update_progress.php
101 lines (90 loc) · 3.28 KB
/
update_progress.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
<?php
// +------------------------------------------------------------------------+
// | O!MPD, Copyright © 2015 Artur Sierzant |
// | http://www.ompd.pl |
// | |
// | |
// | This program is free software: you can redistribute it and/or modify |
// | it under the terms of the GNU General Public License as published by |
// | the Free Software Foundation, either version 3 of the License, or |
// | (at your option) any later version. |
// | |
// | This program is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with this program. If not, see <http://www.gnu.org/licenses/>. |
// +------------------------------------------------------------------------+
// +------------------------------------------------------------------------+
// | update_progress.php |
// +------------------------------------------------------------------------+
//error_reporting(-1);
//ini_set('display_errors', 'On');
//$updateStage = $_GET["updateStage"];
require_once('include/initialize.inc.php');
require_once('include/cache.inc.php');
$cfg['menu'] = 'config';
$cfg['sign'] = $_GET["sign"];
// formattedNavigator
$nav = array();
$nav['name'][] = 'Configuration';
$nav['url'][] = 'config.php';
$nav['name'][] = 'Update';
require_once('include/header.inc.php');
?>
<table width="100%" cellspacing="0" cellpadding="0" class="border">
<tr class="header">
<td class="space"></td>
<td class="update_text">Update</td>
<td>Progress</td>
<td class="space"></td>
</tr>
<tr class="line"><td colspan="4"></td></tr>
<tr class="odd">
<td></td>
<td>Structure & image:</td>
<td><span id="structure"></span></td>
<td></td>
</tr>
<tr class="even">
<td></td>
<td>File info:</td>
<td><span id="fileinfo"></span></td>
<td></td>
</tr>
<tr class="odd">
<td></td>
<td>Cleanup:</td>
<td><span id="cleanup"></span></td>
<td></td>
</tr>
<tr class="even">
<td></td>
<td>Update time:</td>
<td><span id="updateTime"></span></td>
<td></td>
</tr>
</table>
<script>
window.setInterval(function() {
show_update_progress();
}, 1000);
function show_update_progress() {
$.ajax({
type: "POST",
url: "ajax-update-progress.php",
dataType : 'json',
success : function(json) {
$("#structure").html(json['structure_image']);
$("#fileinfo").html(json['file_info']);
$("#cleanup").html(json['cleanup']);
$("#updateTime").html(json['update_time']);
}
});
}
</script>
<?php
require('include/footer.inc.php');
?>