otherAdmin.php 1.53 KB
Newer Older
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
<?php
session_start();
if (!isset($_SESSION['userLoggedIn'])) {
	echo "You are not logged in!<br>\n";
	echo "This page should be run from within the admin interface!\n";
	exit;
}else {
$html = <<< EOD
<br>
<strong>Other Admin Tasks</strong>
<br>
<br>
<a href="export2csv.php">Download CSV file of the node database.</a>
<br>
<br>
<script>
var arname=''";
function other_loadThePage(div_id, script) {
        if (script == "fixPolling" ) {
                $.ajax({
                type: "POST",
                url: "fixStuckPolling.php",
                data: "arname="+arname,
                success: function(msg){
			  alert('Success!!\nPolling should now resume.');
//                        $("#"+div_id).html(msg);
//                                                $('#nav_link_location').css("background-color", "#dddddd");
//                                                $('#nav_link_non_mesh').css("background-color", "");
//                                                $('#nav_link_removed').css("background-color", "");
//                                                $('#nav_link_report').css("background-color", "");
//                                                $('#nav_link_other').css("background-color", "");
                        }
                });
        }
}
</script>
<a href="javascript:onclick=other_loadThePage('admin_content', 'fixPolling');">Fix stuck polling run.</a>
<br>
(It should reset itself after 3 * node_polling_interval, but you can manually do it here also.)
EOD;

echo $html . "\n";
}
?>
<?php

?>
<?php
?>