?> <tr> <td><?php echo $config['name']; ?> </td> <td colspan="8" class="red"> No boxes connected to this bearerbox! </td> </tr> <?php } else { $sep = $inst > 0 ? " class=\"sep\"" : ''; /* loop the boxes */ foreach ($status[$inst]['boxes'] as $box) { list($st, $started, $uptime) = parse_uptime($box['status']); ?> <tr<?php echo $sep; ?> > <td><?php echo $config['name']; ?> </td> <td><?php echo $box['type']; ?> </td> <td><?php echo $box['id'];
} if ($CHDB) { $population = $CHDB->selectCell("SELECT count(*) FROM `characters` WHERE online=1"); } $res_img = 'images/uparrow2.gif'; $uptime = $uptimerow['starttime']; $maxplayers = $uptimerow['maxplayers']; $maxplayers_str = population_view($maxplayers); $population_str = population_view($population); } else { $res_img = 'images/downarrow2.gif'; $uptime = time(now); $maxplayers = 0; $maxplayers_str = 'n/a'; $population = 0; $population_str = 'n/a'; } $uptime = parse_uptime($uptime); $uptime_str = $uptime[0] . " " . $lang['day'] . ", " . $uptime[1] . " " . $lang['hour'] . " " . $uptime[2] . " " . $lang['min'] . " " . $uptime[3] . "" . $lang['sec'] . ""; $cc++; $items[$cc]['img'] = $res_img; $items[$cc]['name'] = $realm_info['name']; $items[$cc]['type'] = $realm_type_def[$realm_info['icon']]; $items[$cc]['pop'][1] = $population_str; $items[$cc]['pop'][2] = $population; $items[$cc]['max'][1] = $maxplayers_str; $items[$cc]['max'][2] = $maxplayers; $items[$cc]['uptime'] = $uptime_str; $items[$cc]['link'] = "index.php?n=server&sub=playersonline&realm=" . $result['id']; } unset($ids, $CHDB);