1
|
<?php
|
2
|
/*
|
3
|
gmirror_status.widget.php
|
4
|
Copyright (C) 2009-2010 Jim Pingle
|
5
|
|
6
|
Redistribution and use in source and binary forms, with or without
|
7
|
modification, are permitted provided that the following conditions are met:
|
8
|
|
9
|
1. Redistributions of source code must retain the above copyright notice,
|
10
|
this list of conditions and the following disclaimer.
|
11
|
|
12
|
2. Redistributions in binary form must reproduce the above copyright
|
13
|
notice, this list of conditions and the following disclaimer in the
|
14
|
documentation and/or other materials provided with the distribution.
|
15
|
|
16
|
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
17
|
INClUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
|
18
|
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
19
|
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
|
20
|
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
21
|
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
22
|
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
23
|
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
24
|
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
25
|
POSSIBILITY OF SUCH DAMAGE.
|
26
|
*/
|
27
|
|
28
|
$nocsrf = true;
|
29
|
|
30
|
require_once("guiconfig.inc");
|
31
|
require_once("/usr/local/www/widgets/include/gmirror_status.inc");
|
32
|
|
33
|
if ($_GET['textonly'] == "true") {
|
34
|
header("Cache-Control: no-cache");
|
35
|
echo gmirror_html_status();
|
36
|
exit;
|
37
|
}
|
38
|
?>
|
39
|
<table width="100%" border="0" cellspacing="0" cellpadding="0" summary="gmirror status">
|
40
|
<tbody id="gmirror_status_table">
|
41
|
<?php echo gmirror_html_status(); ?>
|
42
|
</tbody>
|
43
|
</table>
|
44
|
|
45
|
<script type="text/javascript">
|
46
|
//<![CDATA[
|
47
|
var gmirrorupdater = new Ajax.PeriodicalUpdater('gmirror_status_table', '/widgets/widgets/gmirror_status.widget.php?textonly=true',
|
48
|
{ method: 'get', frequency: 5 } );
|
49
|
//]]>
|
50
|
</script>
|