Example #1
0
 function lgsl_server_misc($server)
 {
     global $lgsl_config, $lgsl_url_path;
     $misc['icon_details'] = $lgsl_url_path . "other/icon_details.gif";
     $misc['icon_game'] = lgsl_icon_game($server['b']['type'], $server['s']['game']);
     $misc['icon_status'] = lgsl_icon_status($server['b']['status'], $server['s']['password'], $server['b']['pending']);
     $misc['icon_location'] = lgsl_icon_location($server['o']['location']);
     $misc['image_map'] = lgsl_image_map($server['b']['status'], $server['b']['type'], $server['s']['game'], $server['s']['map'], TRUE, $server['o']['id']);
     $misc['image_map_password'] = lgsl_image_map_password($server['b']['status'], $server['s']['password']);
     $misc['text_status'] = lgsl_text_status($server['b']['status'], $server['s']['password'], $server['b']['pending']);
     $misc['text_type_game'] = lgsl_text_type_game($server['b']['type'], $server['s']['game']);
     $misc['text_location'] = lgsl_text_location($server['o']['location']);
     $misc['name_filtered'] = lgsl_string_html($server['s']['name'], FALSE, 20);
     // LEGACY
     $misc['software_link'] = lgsl_software_link($server['b']['type'], $server['b']['ip'], $server['b']['c_port'], $server['b']['q_port'], $server['b']['s_port']);
     $misc['location_link'] = lgsl_location_link($server['o']['location']);
     return $misc;
 }
Example #2
0
 |                                                                                                            |
 |                      [ LIVE GAME SERVER LIST ] [ © RICHARD PERRY FROM GREYCUBE.COM ]                       |
 |                                                                                                            |
 |    Released under the terms and conditions of the GNU General Public License Version 3 (http://gnu.org)    |
 |                                                                                                            |
 \-----------------------------------------------------------------------------------------------------------*/
//------------------------------------------------------------------------------------------------------------+
require "lgsl_class.php";
$server_list = lgsl_query_group();
$server_list = lgsl_sort_servers($server_list);
//------------------------------------------------------------------------------------------------------------+
$output .= "\r\n  <div style='text-align:center'>\r\n    <table style='margin:auto' cellpadding='4' cellspacing='2'>";
foreach ($server_list as $server) {
    $misc = lgsl_server_misc($server);
    $server = lgsl_server_html($server);
    $output .= "\r\n      <tr style='" . lgsl_bg() . "; table-layout:fixed'>\r\n\r\n        <td style='white-space:nowrap; text-align:center'>\r\n          <img alt='' src='{$misc['icon_status']}' title='{$misc['text_status']}'    style='vertical-align:middle' />\r\n          <img alt='' src='{$misc['icon_game']}'   title='{$misc['text_type_game']}' style='vertical-align:middle' />\r\n        </td>\r\n\r\n        <td title='{$lgsl_config['text']['slk']}' style='text-align:right'>\r\n          <a href='{$misc['software_link']}' style='text-decoration:none'>\r\n            {$server['b']['ip']}:{$server['b']['c_port']}\r\n          </a>\r\n        </td>\r\n\r\n        <td title='{$server['s']['name']}' style='text-align:left'>\r\n          <div style='width:100%; overflow:hidden; height:1.3em; line-height:1.3em'>\r\n            {$misc['name_filtered']}\r\n          </div>\r\n        </td>\r\n\r\n        <td style='white-space:nowrap; text-align:left'>\r\n          {$server['s']['map']}\r\n        </td>\r\n\r\n        <td style='white-space:nowrap; text-align:right'>\r\n          {$server['s']['players']} / {$server['s']['playersmax']}\r\n        </td>\r\n\r\n        <td style='white-space:nowrap; text-align:center'>";
    if ($lgsl_config['locations']) {
        $output .= "\r\n          <a href='" . lgsl_location_link($server['o']['location']) . "' style='text-decoration:none'>\r\n            <img alt='' src='{$misc['icon_location']}' title='{$misc['text_location']}' style='vertical-align:middle; border:none' />\r\n          </a>";
    }
    $output .= "\r\n          <a href='" . lgsl_link($server['o']['id']) . "' style='text-decoration:none'>\r\n            <img alt='' src='{$misc['icon_details']}' title='{$lgsl_config['text']['vsd']}' style='vertical-align:middle; border:none' />\r\n          </a>\r\n        </td>\r\n\r\n      </tr>";
}
$output .= "\r\n    </table>\r\n  </div>";
//------------------------------------------------------------------------------------------------------------+
if ($lgsl_config['list']['totals']) {
    $total = lgsl_group_totals($server_list);
    $output .= "\r\n    <div>\r\n      <br />\r\n    </div>\r\n    <div style='text-align:center'>\r\n      <table style='margin:auto' cellpadding='4' cellspacing='2'>\r\n        <tr style='" . lgsl_bg() . "'>\r\n          <td> {$lgsl_config['text']['tns']} {$total['servers']}    </td>\r\n          <td> {$lgsl_config['text']['tnp']} {$total['players']}    </td>\r\n          <td> {$lgsl_config['text']['tmp']} {$total['playersmax']} </td>\r\n        </tr>\r\n      </table>\r\n    </div>";
}
//--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
//------ PLEASE MAKE A DONATION OR SIGN THE GUESTBOOK AT GREYCUBE.COM IF YOU REMOVE THIS CREDIT ----------------------------------------------------------------------------------------------------+
$output .= "<div style='text-align:center; font-family:tahoma; font-size:9px'><br /><br /><br /><a href='http://www.greycube.com' style='text-decoration:none'>" . lgsl_version() . "</a><br /></div>";
//--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+