<commit_before><?php include 'parser.php'; include 'translations.php';?>
<html>
    <head>
        <title>LoL player data</title>
        <link rel="shortcut icon" href="images/lol_guy.ico">
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <meta name="Author" content="<NAME>" />
        
        <link rel="stylesheet" href="custom.css">
        <link rel="stylesheet" href="simplemodal/basic/css/basic.css" type="text/css" media="screen" />
        <link rel="stylesheet" href="simplemodal/basic/css/basic_ie.css" type="text/css" media="screen" />

        <script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
        <script type="text/javascript" src="simplemodal/basic/js/jquery.simplemodal.js"></script>
    </head>

    <body>
        <div id="main">
            <table class="centered">
                <td class="icon">
                    <h1> 
                        <?php 
                        echo $userName . "<br /> Level: " .$summLvl;
                        echo "<br />";
                        switch($regionurl){
                          case("na"):
                              echo "North America";
                              break;
                          case("euw"):
                              echo "Europe West";
                              break;
                          case("eune"):
                              echo "Europe Nordic/East";
                              break;
                          case("br"):
                              echo "Brazil";
                              break;
                          case("kr"):
                              echo "Korea";
                              break;
                          case("lan"):
                              echo "Latin America North";
                              break;
                          case("las"):
                              echo "Latin America South";
                              break;
                          case("oce"):
                              echo "Oceanic";
                              break;
                          case("ru"):
                              echo "Russia";
                              break;
                          case("tr"):
                              echo "Turkey";
                              break;
                          default:
                              echo "Somewhere on earth, maybe.";
                              break;
                        }
                        ?> 
                    </h1>
                </td>
                <td class="icon">
                    <img src="<?php echo $currentSummAvatar; ?>">
                </td>
            </table>
            
            <h2 style="text-align: center">Stat Summary</h2>
            <div class="statbox">
            <?php
            if($jsonNormStats === false){
                $i = 1;
                //echo $AramUnranked5x5Wins . " " . $AramUnranked5x5Stats['totalChampionKills'] . "<br />";
                foreach($modes as $currentMode){
                    echo "<table class='statTables'>";
                    echo "<div class='mode'>" . translateMode($currentMode)  . "</div>";
                    echo "<tr class='stats'>" . 
                         "<td class='stat-name-half'>Wins</td>" .
                         "<td class='stat-value-half'>" . ${$currentMode . 'Wins'} .
                         "</td></tr>";

                    $currentStatArray = ${$currentMode . 'Stats'};
                    foreach($currentStatArray as $currentStat){
                        echo preg_replace('/(?!^)[[:upper:]]+/',' \0', 
                             "<tr class='stats'><td class='stat-name-half'>" . 
                             ucfirst(array_search($currentStat, $currentStatArray)). 
                             "</td> <td class='stat-value-half'>" . $currentStat . 
                             "</td></tr>");
                    }

                    if($i < sizeof($modes)){
                        echo "</table><br /><br />";
                        $i++;
                    }
                    else{
                        echo "</table>";
                    }   
                }
            }
            else{
                echo "<div style='text-align: center;'>No player stats found.</div>";
            }
            ?>
                
            </div>
            
        </div>
        
        <?php include 'footer.php'; ?>
        
    </body>
</html>
<commit_msg>added support for when no stats are found.<commit_after><?php include 'parser.php'; include 'translations.php';?>
<html>
    <head>
        <title>LoL player data</title>
        <link rel="shortcut icon" href="images/lol_guy.ico">
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <meta name="Author" content="<NAME>" />
        
        <link rel="stylesheet" href="custom.css">
        <link rel="stylesheet" href="simplemodal/basic/css/basic.css" type="text/css" media="screen" />
        <link rel="stylesheet" href="simplemodal/basic/css/basic_ie.css" type="text/css" media="screen" />

        <script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
        <script type="text/javascript" src="simplemodal/basic/js/jquery.simplemodal.js"></script>
    </head>

    <body>
        <div id="main">
            <table class="centered">
                <td class="icon">
                    <h1> 
                        <?php 
                        echo $userName . "<br /> Level: " .$summLvl;
                        echo "<br />";
                        switch($regionurl){
                          case("na"):
                              echo "North America";
                              break;
                          case("euw"):
                              echo "Europe West";
                              break;
                          case("eune"):
                              echo "Europe Nordic/East";
                              break;
                          case("br"):
                              echo "Brazil";
                              break;
                          case("kr"):
                              echo "Korea";
                              break;
                          case("lan"):
                              echo "Latin America North";
                              break;
                          case("las"):
                              echo "Latin America South";
                              break;
                          case("oce"):
                              echo "Oceanic";
                              break;
                          case("ru"):
                              echo "Russia";
                              break;
                          case("tr"):
                              echo "Turkey";
                              break;
                          default:
                              echo "Somewhere on earth, maybe.";
                              break;
                        }
                        ?> 
                    </h1>
                </td>
                <td class="icon">
                    <img src="<?php echo $currentSummAvatar; ?>">
                </td>
            </table>
            
            <h2 style="text-align: center">Stat Summary</h2>
            <div class="statbox">
            <?php
            if(isset($php_errormsg) && strcmp($php_errormsg, "Undefined index: playerStatSummaries") == 0){
                echo "<div style='text-align: center;'>No player stats found.</div>"; 
            }
            else{
                $i = 1;
                //echo $AramUnranked5x5Wins . " " . $AramUnranked5x5Stats['totalChampionKills'] . "<br />";
                foreach($modes as $currentMode){
                    echo "<table class='statTables'>";
                    echo "<div class='mode'>" . translateMode($currentMode)  . "</div>";
                    echo "<tr class='stats'>" . 
                         "<td class='stat-name-half'>Wins</td>" .
                         "<td class='stat-value-half'>" . ${$currentMode . 'Wins'} .
                         "</td></tr>";

                    $currentStatArray = ${$currentMode . 'Stats'};
                    foreach($currentStatArray as $currentStat){
                        echo preg_replace('/(?!^)[[:upper:]]+/',' \0', 
                             "<tr class='stats'><td class='stat-name-half'>" . 
                             ucfirst(array_search($currentStat, $currentStatArray)). 
                             "</td> <td class='stat-value-half'>" . $currentStat . 
                             "</td></tr>");
                    }

                    if($i < sizeof($modes)){
                        echo "</table><br /><br />";
                        $i++;
                    }
                    else{
                        echo "</table>";
                    }   
                }
            }
            
            ?>
                
            </div>
            
        </div>
        
        <?php include 'footer.php'; ?>
        
    </body>
</html>

{'fraction_non_alphanumeric': 0.1290970606893635, 'fraction_numerical': 0.0024318037640093043, 'mean_word_length': 0.8334948633456096, 'pattern_counts': {'":': 0, '<': 131, '<?xml version=': 0, '>': 129, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4162557', 'n_tokens_mistral': 2318, 'n_tokens_neox': 2157, 'n_words': 413}