function welcometext($pop = 0)
{
    global $func;
    global $currentconfig;
    include $currentconfig;
    $link = baselink();
    global $coddb;
    global $separatorline;
    global $t;
    //table names
    global $a_name;
    //award names
    global $a_desc;
    //award descriptions
    global $w;
    global $m;
    global $minkills;
    global $minrounds;
    global $bp_head;
    global $text;
    // test if the status file exists
    $fp = @fopen($b3_status_url, "r");
    if (!@fread($fp, 4096)) {
        return;
    }
    // load data from settings.xml
    loadData();
    $query = "SELECT SUM( kills ) AS kills FROM {$t['players']} WHERE 1";
    $result = $coddb->sql_query($query);
    $row = $coddb->sql_fetchrow($result);
    $kills = $row['kills'];
    $result = null;
    $row = null;
    $query = "SELECT SUM(kills) as kills FROM {$t['playerbody']} WHERE bodypart_id IN {$bp_head}";
    $result = $coddb->sql_query($query);
    $row = $coddb->sql_fetchrow($result);
    $headshots = $row['kills'];
    $result = null;
    $row = null;
    $hpk = 0;
    if ($kills > 0) {
        $hpk = sprintf("%.4f", $headshots / $kills);
    } else {
        $hpk = sprintf("%.4f", 0);
    }
    $query = "SELECT SUM( rounds ) AS rounds FROM {$t['maps']} WHERE 1 ";
    $result = $coddb->sql_query($query);
    $row = $coddb->sql_fetchrow($result);
    $rounds = $row['rounds'];
    $result = null;
    $row = null;
    $query = " SELECT count( client_id ) AS players FROM {$t['players']} WHERE 1";
    $result = $coddb->sql_query($query);
    $row = $coddb->sql_fetchrow($result);
    $players = $row['players'];
    $result = null;
    $row = null;
    //$statusgame = htmlspecialchars( rcon("status"));
    //$currentmap = getCurrentMapName($statusgame);
    global $clientsRed;
    global $clientsBlue;
    global $clientsSpec;
    global $sv_hostname;
    global $sv_privateClients;
    global $gameType;
    global $mapName;
    global $sv_maxclients;
    global $shortversion;
    $result = null;
    $row = null;
    $curnumplayers = count($clientsBlue) + count($clientsRed) + count($clientsSpec);
    $currentmap = $mapName;
    if ($game == 'moh') {
        $currentmap = strtolower($currentmap);
    }
    $maxPlayers = $sv_maxclients - $sv_privateClients;
    // Replace the mapname with a friendly name
    if (isset($m[$currentmap])) {
        $currentmap = $m[$currentmap];
    }
    $today = date('l jS \\of F Y h:i:s A');
    echo "<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\" class=\"outertable\">";
    if ($func != "server") {
        echo "<tr><td align=\"center\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" . $text["welcome"] . "&nbsp;&nbsp;&nbsp;<span class=\"tiny\">({$today})</span></td><td width=\"40px\">" . checklang($pop) . "<a href=\"http://xlrstatshelp.xlr8or.com\" target=\"_blank\"><img src=\"" . pathlink($pop) . "images/ico/help.png\" border=\"0\" align=\"absmiddle\" title=\"Need help on XLRstats?\"></a></td></tr>";
    }
    echo "<tr>\n      <td colspan=\"2\">\n        <table align=\"center\" bgcolor=\"#99aaaa\" border=\"0\" cellpadding=\"2\" cellspacing=\"1\" width=\"100%\">\n      \t<tr bgcolor=\"#cccccc\" valign=\"bottom\">\n      \t\t<td style=\"padding: 4px;\" width=\"37%\">\n            <table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\">\n            <tr><td><font class=\"fontSmall\" size=\"1\"><font color=\"#000000\">&nbsp;" . $text["server"] . "</font></font></td>\n            <td><div align=\"right\">\n    ";
    echo gamelauncher('xfire');
    echo gamelauncher('qtracker');
    echo gamelauncher('gsc');
    echo gamelauncher('hlsw');
    echo "\n      </div></td><tr></table>\n      </td>\n  \t\t<td style=\"padding: 4px;\" width=\"18%\"><font class=\"fontSmall\" size=\"1\"><font color=\"#000000\">&nbsp;" . $text["address"] . "</font></font></td>\n  \t\t<td style=\"padding: 4px;\" align=\"center\" width=\"14%\"><font class=\"fontSmall\" size=\"1\"><font color=\"#000000\">&nbsp;" . $text["map"] . "</font></font></td>\n  \t\t<td style=\"padding: 4px;\" align=\"center\" width=\"10%\"><font class=\"fontSmall\" size=\"1\"><font color=\"#000000\">&nbsp;" . $text["playing"] . "</font></font></td>\n  \t\t<td style=\"padding: 4px;\" align=\"center\" width=\"7%\"><font class=\"fontSmall\" size=\"1\"><font color=\"#000000\">&nbsp;" . $text["rounds"] . "</font></font></td>\n  \t\t<td style=\"padding: 4px;\" align=\"center\" width=\"10%\"><font class=\"fontSmall\" size=\"1\"><font color=\"#000000\">&nbsp;" . $text["players"] . "</font></font></td>\n  \t\t<td style=\"padding: 4px;\" align=\"center\" width=\"6%\"><font class=\"fontSmall\" size=\"1\"><font color=\"#000000\">&nbsp;" . $text["killed"] . "</font></font></td>\n  \t\t<td style=\"padding: 4px;\" align=\"center\" width=\"6%\"><font class=\"fontSmall\" size=\"1\"><font color=\"#000000\">&nbsp;" . $text["headshots"] . "</font></font></td>\n  \t\t<td style=\"padding: 4px;\" align=\"center\" width=\"6%\"><font class=\"fontSmall\" size=\"1\"><font color=\"#000000\">&nbsp;" . $text["hpk"] . "</font></font></td>\n  \t</tr>";
    $flag = NULL;
    if (file_exists($geoip_path . "GeoIP.dat")) {
        $geocountry = $geoip_path . "GeoIP.dat";
        $ip = explode(":", $public_ip);
        $ip = $ip[0];
        $gi = geoip_open($geocountry, GEOIP_STANDARD);
        $countryid = strtolower(geoip_country_code_by_addr($gi, $ip));
        $country = geoip_country_name_by_addr($gi, $ip);
        if (!is_null($countryid) and $countryid != "") {
            $flag = "<img style=\"vertical-align: middle;\" src=\"images/flags/" . $countryid . ".gif\" title=\"" . $country . "\" alt=\"" . $country . "\">";
        }
        geoip_close($gi);
    }
    echo "\n  \t<tr bgcolor=\"#cccccf\" valign=\"middle\">\n  \t\t<td style=\"background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: black;\" align=\"left\"><font class=\"fontNormal\" size=\"2\"><img style=\"vertical-align: middle;\" src=\"images/ico/icon_{$game}.gif\">&nbsp;{$flag}&nbsp;<b><a class=info  href=\"#\">{$sv_hostname}<span>" . $text["serverversion"] . "{$shortversion}</span></a></b></font></td>\n    \t<td style=\"background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: black;\" align=\"left\"><font class=\"fontNormal\" size=\"2\">{$public_ip}</font></td>\n    \t<td style=\"background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: black;\" align=\"center\"><font class=\"fontNormal\" size=\"2\">{$currentmap} ({$gameType})</font></td>\n    \t<td style=\"background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: black;\" align=\"center\"><font class=\"fontNormal\" size=\"2\">{$curnumplayers}/{$maxPlayers} ({$sv_maxclients})</font></td>\n    \t<td style=\"background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: black;\" align=\"center\"><font class=\"fontNormal\" size=\"2\">{$rounds}</font></td>\n    \t<td style=\"background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: black;\" align=\"center\"><font class=\"fontNormal\" size=\"2\">{$players}</font></td>\n    \t<td style=\"background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: black;\" align=\"center\"><font class=\"fontNormal\" size=\"2\">{$kills}</font></td>\n    \t<td style=\"background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: black;\" align=\"center\"><font class=\"fontNormal\" size=\"2\">{$headshots}</font></td>\n    \t<td style=\"background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: black;\" align=\"center\"><font class=\"fontNormal\" size=\"2\">{$hpk}</font></td>\n  \t</tr>\n   </table> \n </td>\n </tr>\n </table>\n      ";
    flush();
}
    <td class="serverstatus" width="150" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
      <tr class="serverstatus">
        <td class="serverstatus" colspan="4" align="center"><img class="map" src="<?php 
echo $img_map;
?>
">
        </td>
      </tr>
      <tr class="serverstatus">
        <td class="serverstatus">
          <table width="100%" border="0" cellpadding="5" cellspacing="0">
            <td class="map" align="center">Con:<?php 
echo gamelauncher('xfire');
echo gamelauncher('qtracker');
echo gamelauncher('gsc');
echo gamelauncher('hlsw');
?>
</td>
          </table>
        </td>
      </tr>
      <tr class="serverstatus">
        <td class="topfive" colspan="4"><?php 
topplayersblock($sortby = $func);
?>
</td>
      </tr></table>
    </td>
    <td class="serverstatus" width="5">&nbsp;</td>
    <td class="serverstatus" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
      <tr class="serverstatus">