otherAdmin.php 1.5 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12
<?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>
13
<a href="export_mesh_nodes.php">Download CSV file of the node database.</a>
14 15 16
<br>
<br>
<script>
Eric - kg6wxc's avatar
Eric - kg6wxc committed
17
var arname="";
18 19 20 21 22 23 24
function other_loadThePage(div_id, script) {
        if (script == "fixPolling" ) {
                $.ajax({
                type: "POST",
                url: "fixStuckPolling.php",
                data: "arname="+arname,
                success: function(msg){
Eric - kg6wxc's avatar
Eric - kg6wxc committed
25
			  alert('Polling should now resume.');
26 27 28 29 30 31 32 33 34 35 36
//                        $("#"+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>
Eric - kg6wxc's avatar
Eric - kg6wxc committed
37
<a href="javascript:onclick=other_loadThePage('admin_content','fixPolling');">Fix stuck polling run.</a>
38 39 40 41 42 43 44 45
<br>
(It should reset itself after 3 * node_polling_interval, but you can manually do it here also.)
EOD;

echo $html . "\n";
}

?>