<?php
if(isset($_GET["token"]))$__TOKEN = $_GET["token"];
if ( $__TOKEN == 'ILoveAthensFiestaReallyBad' )
{
		$mssql_link = @mssql_connect( $servername . "\\" . $dbname , $dbuser, $dbpass );
        if ( !$mssql_link )
        {
                showMessage( 'info', 'Neue Spieler Liste ist vor&uuml;bergehend offline.' );
        }
        else
        {
                $selectPlayers = mssql_query( "SELECT TOP 5 sID, nCharNo, dCreateDate FROM World00_Character..tCharacter WHERE nLevel <= 1000 AND bDeleted = 0 ORDER by dCreateDate DESC" );
                $i = 1;
                echo '<table width="100%">';
                while ( $player = mssql_fetch_array( $selectPlayers ) )
                {
                        $player["sID"] = str_replace("ä", "&auml;", str_replace("Ä", "&Auml;", str_replace("ö", "&ouml;", str_replace("Ö", "&Ouml;", str_replace("ü", "&uuml;", str_replace("Ü", "&Uuml;", str_replace("ß", "&szlig;", $player["sID"])))))));
						echo '<tr><td>Nr. '.$player['nCharNo'].':</td><td>'.$player['sID'].'</td><td>'.$player['nLevel'].'</td><td>'.$player['sLoginZone'].'</td><td>'.$player['dLastLoginDate'].'</td><td>'.$player['dKQDate'].'</td></tr>';
                        $i++;
                }
                echo '</table>';
        }
}
?>