Changeset 1258 for trunk/wifidog-auth/wifidog/node_list.php
- Timestamp:
- 07/16/07 23:47:06 (6 years ago)
- Files:
-
- 1 modified
-
trunk/wifidog-auth/wifidog/node_list.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wifidog-auth/wifidog/node_list.php
r1257 r1258 107 107 108 108 if ($nodes_results == null) 109 throw new Exception(_("No nodes could not be found in the database"));109 throw new Exception(_("No nodes could not be found in the database")); 110 110 111 111 $deploymentStatuses = array ( 112 "DEPLOYED" => _("Deployed"112 "DEPLOYED" => _("Deployed" 113 113 ), "IN_PLANNING" => _("In planning"), "IN_TESTING" => _("In testing"), "NON_WIFIDOG_NODE" => _("Non-Wifidog node"), "PERMANENTLY_CLOSED" => _("Permanently closed"), "TEMPORARILY_CLOSED" => _("Temporarily closed")); 114 114 … … 118 118 $node_row['duration'] = $db->GetDurationArrayFromIntervalStr($node_row['since_last_heartbeat']); 119 119 if($node_row['last_heartbeat_wifidog_uptime']) { 120 $node_row['wifidog_uptime'] = $db->GetDurationArrayFromIntervalStr($node_row['last_heartbeat_wifidog_uptime'].' seconds'); 120 $previousRemainder = $node_row['last_heartbeat_wifidog_uptime']; 121 $remainder = $previousRemainder % (3600*24); 122 $node_row['wifidog_uptime']['days'] = ($previousRemainder - $remainder) / (3600*24); 123 $previousRemainder = $remainder; 124 $remainder = $previousRemainder % (3600); 125 $node_row['wifidog_uptime']['hours'] = ($previousRemainder - $remainder) / (3600); 126 $previousRemainder = $remainder; 127 $remainder = $previousRemainder % (60); 128 $node_row['wifidog_uptime']['minutes'] = ($previousRemainder - $remainder) / (60); 121 129 } 122 130 $node_row['num_online_users'] = $node->getNumOnlineUsers();
