| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
require_once(dirname(__FILE__) . '/include/common.php'); |
|---|
| 7 |
require_once('classes/Network.php'); |
|---|
| 8 |
|
|---|
| 9 |
echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>"; |
|---|
| 10 |
|
|---|
| 11 |
?> |
|---|
| 12 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" |
|---|
| 13 |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
|---|
| 14 |
<html xmlns="http://www.w3.org/1999/xhtml" |
|---|
| 15 |
xmlns:widget="http://www.netvibes.com/ns/" > |
|---|
| 16 |
<head> |
|---|
| 17 |
|
|---|
| 18 |
<meta name="author" content="Thus0" /> |
|---|
| 19 |
<meta name="website" content="http://www.pervasive-network.org/" /> |
|---|
| 20 |
<meta name="description" content="France Wireless exports" /> |
|---|
| 21 |
<meta name="keywords" content="captive portal, hotspot, France Wireless, Thus0, wifi, wifidog, wireless" /> |
|---|
| 22 |
|
|---|
| 23 |
<meta name="apiVersion" content="1.0" /> |
|---|
| 24 |
<meta name="inline" content="true" /> |
|---|
| 25 |
<meta name="debugMode" content="false" /> |
|---|
| 26 |
|
|---|
| 27 |
<link rel="stylesheet" type="text/css" |
|---|
| 28 |
href="http://www.netvibes.com/themes/uwa/style.css" /> |
|---|
| 29 |
<script type="text/javascript" |
|---|
| 30 |
src="http://www.netvibes.com/js/UWA/load.js.php?env=Standalone"></script> |
|---|
| 31 |
|
|---|
| 32 |
<title>France Wireless exports</title> |
|---|
| 33 |
<link rel="icon" type="image/png" |
|---|
| 34 |
href="http://www.netvibes.com/favicon.ico" /> |
|---|
| 35 |
|
|---|
| 36 |
<widget:preferences> |
|---|
| 37 |
<preference name="up_gw_id" label="Gateway ID" type="text" defaultValue="" /> |
|---|
| 38 |
<preference name="up_network_id" label="Network ID" type="list" defaultValue="" onchange="refresh"> |
|---|
| 39 |
<option value="" label="" /> |
|---|
| 40 |
<?php |
|---|
| 41 |
$network_array=Network::getAllNetworks(); |
|---|
| 42 |
foreach ($network_array as $network) { |
|---|
| 43 |
$network_row = array(); |
|---|
| 44 |
echo "<option value=\"" . $network->getId() . "\" label=\"" . $network->getName() . "\"/>\n"; |
|---|
| 45 |
} |
|---|
| 46 |
?> |
|---|
| 47 |
</preference> |
|---|
| 48 |
</widget:preferences> |
|---|
| 49 |
|
|---|
| 50 |
<style type="text/css" media="screen"> |
|---|
| 51 |
|
|---|
| 52 |
#node_status { |
|---|
| 53 |
//border-style: solid; |
|---|
| 54 |
//border-width: 2px 4px 2px 2px; |
|---|
| 55 |
//border-color: grey; |
|---|
| 56 |
//width: 200px; |
|---|
| 57 |
padding: 6px 10px 0px; |
|---|
| 58 |
} |
|---|
| 59 |
|
|---|
| 60 |
#network_status { |
|---|
| 61 |
//border-style: solid; |
|---|
| 62 |
//border-width: 2px 4px 2px 2px; |
|---|
| 63 |
//border-color: grey; |
|---|
| 64 |
//width: 200px; |
|---|
| 65 |
padding: 6px 10px 0px; |
|---|
| 66 |
} |
|---|
| 67 |
|
|---|
| 68 |
#nodes_status { |
|---|
| 69 |
//width: 200px; |
|---|
| 70 |
//border-style: solid; |
|---|
| 71 |
//border-color: grey; |
|---|
| 72 |
//border-width: 2px 4px 4px 2px; |
|---|
| 73 |
//width: 200px; |
|---|
| 74 |
padding: 6px 10px 0px; |
|---|
| 75 |
} |
|---|
| 76 |
|
|---|
| 77 |
#node_status_title, #network_status_title, #nodes_status_title { |
|---|
| 78 |
font-size: 0.90em; |
|---|
| 79 |
font-family: arial; |
|---|
| 80 |
font-weight: bold; |
|---|
| 81 |
text-align: left; |
|---|
| 82 |
color: blue; |
|---|
| 83 |
margin-bottom: 15px; |
|---|
| 84 |
} |
|---|
| 85 |
|
|---|
| 86 |
#network_nodes_deployed, #nodes_deployed { |
|---|
| 87 |
font-style: italic; |
|---|
| 88 |
font-size: 0.80em; |
|---|
| 89 |
text-align: right; |
|---|
| 90 |
} |
|---|
| 91 |
|
|---|
| 92 |
#network_nodes_online, #nodes_online { |
|---|
| 93 |
font-style: italic; |
|---|
| 94 |
font-size: 0.80em; |
|---|
| 95 |
text-align: right; |
|---|
| 96 |
} |
|---|
| 97 |
|
|---|
| 98 |
#node_users_status ul, #network_users_status ul, #users_status ul { |
|---|
| 99 |
//font-size: 0.90em; |
|---|
| 100 |
//font-style: italic; |
|---|
| 101 |
font-family: arial; |
|---|
| 102 |
padding-left: 20px; |
|---|
| 103 |
} |
|---|
| 104 |
|
|---|
| 105 |
#node_users_status, #network_users_status, #users_status { |
|---|
| 106 |
font-size: 0.80em; |
|---|
| 107 |
text-align: left; |
|---|
| 108 |
margin: 0px; |
|---|
| 109 |
padding: 6px 0px 0px; |
|---|
| 110 |
} |
|---|
| 111 |
|
|---|
| 112 |
#node_users_status_title, #network_users_status_title, #users_status_title { |
|---|
| 113 |
font-size: 1em; |
|---|
| 114 |
font-weight: bold; |
|---|
| 115 |
text-align: left; |
|---|
| 116 |
} |
|---|
| 117 |
|
|---|
| 118 |
</style> |
|---|
| 119 |
|
|---|
| 120 |
<script type="text/javascript"> |
|---|
| 121 |
|
|---|
| 122 |
var NodeNVexport = {}; |
|---|
| 123 |
NodeNVexport.data = null; |
|---|
| 124 |
|
|---|
| 125 |
NodeNVexport.dataInit = function() { |
|---|
| 126 |
var url = 'http://auth.wireless-fr.org/node_export.php?format=HTML'; |
|---|
| 127 |
url = url + '&gw_id=' + widget.getValue('up_gw_id'); |
|---|
| 128 |
url = url + '&network_id=' + widget.getValue('up_network_id'); |
|---|
| 129 |
UWA.Data.getText(url,NodeNVexport.dataProcessorText); |
|---|
| 130 |
} |
|---|
| 131 |
|
|---|
| 132 |
NodeNVexport.dataProcessorText = function(text) { |
|---|
| 133 |
widget.setBody(text); |
|---|
| 134 |
//var imageWidth = widget.body.getDimensions().width - 15; |
|---|
| 135 |
//widget.addBody("<a href=\"http://auth.wireless-fr.org/cacti/graph_image.php?local_graph_id=7&rra_id=1\" target=\"_top\"><img width=\"" + imageWidth + "\" class=\"cacti\" border=0 src=\"http://auth.wireless-fr.org/cacti/graph_image.php?local_graph_id=7&rra_id=1\"><br/>"); |
|---|
| 136 |
|
|---|
| 137 |
|
|---|
| 138 |
} |
|---|
| 139 |
|
|---|
| 140 |
widget.onLoad = function() { |
|---|
| 141 |
NodeNVexport.dataInit(); |
|---|
| 142 |
} |
|---|
| 143 |
|
|---|
| 144 |
widget.onResize = function() { |
|---|
| 145 |
var image = widget.body.getElementsByClassName("cacti")[0]; |
|---|
| 146 |
if (image) { |
|---|
| 147 |
image.width = widget.body.getDimensions().width - 15; |
|---|
| 148 |
} |
|---|
| 149 |
} |
|---|
| 150 |
|
|---|
| 151 |
</script> |
|---|
| 152 |
|
|---|
| 153 |
</head> |
|---|
| 154 |
|
|---|
| 155 |
<body> |
|---|
| 156 |
<p>Loading...</p> |
|---|
| 157 |
</body> |
|---|
| 158 |
|
|---|
| 159 |
</html> |
|---|
| 160 |
|
|---|