<commit_before><?php 
/*
 *	Made by Samerton
 *  http://worldscapemc.co.uk
 *
 *  License: MIT
 */
 
require_once 'inc/pages.php';
require_once 'inc/functions/array_handling.php';


/*
 *  Get the directory the user is trying to access
 */ 
$directory = $_SERVER['REQUEST_URI'];
$directories = split("/", $directory);

/*
 *  Define some variables..
 */
$lim = count($directories);
$n = 0;
$exists = false;

/*
 *  Does the directory the user is trying to access exist as a page?
 */

if($lim == 2){
	if(in_array($directories[1], $pages)){ // Is it an element?
		$exists = true;
	} else {
		if(array_key_exists($directories[1], $pages)){ // Is it the key of a subarray?
			$exists = true;
			$key = true;
		}
	}
} else if($lim > 2){
	if(in_array($directories[1], $pages)){ // Is it an element?
		$exists = true; 
	} else {
		if(array_key_exists($directories[1], $pages)){ // Is it the key of a subarray?
			$exists = true;
			$key = true;
		}
	}
	if($exists === true && !empty($directories[2]) && $directories[1] !== "profile"){ 
		if(in_array($directories[2], $pages[$directories[1]])){ 
			$exists = true;
		} else {
			if(array_key_exists($directories[2], $pages[$directories[1]])){
				$exists = true;
				$key = true;
			} else {
				$exists = false;
			}
		}
	}
} else { // Get parameters, eg ?action=create
	if(!empty($directories[3])){
		$params = $_GET;
	}
}

/*
 *  If the page does not exist, display the 404 error
 */

if($exists !== true){
	require("404.php");
	die();
}

/*
 *  If it does, initialise the page load, and display the page
 */ 

$page = $directories[1];
$path = "";

/*
 *  Include init.php
 */

require_once 'inc/init.php';

/*
 *  Include the page itself
 */<commit_msg>Fix misplaced if statement<commit_after><?php 
/*
 *	Made by Samerton
 *  http://worldscapemc.co.uk
 *
 *  License: MIT
 */
 
require_once 'inc/pages.php';
require_once 'inc/functions/array_handling.php';


/*
 *  Get the directory the user is trying to access
 */ 
$directory = $_SERVER['REQUEST_URI'];
$directories = split("/", $directory);

/*
 *  Define some variables..
 */
$lim = count($directories);
$n = 0;
$exists = false;

/*
 *  Does the directory the user is trying to access exist as a page?
 */

if($lim == 2){
	if(in_array($directories[1], $pages)){ // Is it an element?
		$exists = true;
	} else {
		if(array_key_exists($directories[1], $pages)){ // Is it the key of a subarray?
			$exists = true;
			$key = true;
		}
	}
} else if($lim > 2){
	if(in_array($directories[1], $pages)){ // Is it an element?
		$exists = true; 
	} else {
		if(array_key_exists($directories[1], $pages)){ // Is it the key of a subarray?
			$exists = true;
			$key = true;
		}
	}
	if($exists === true && !empty($directories[2]) && $directories[1] !== "profile"){ 
		if(in_array($directories[2], $pages[$directories[1]])){ 
			$exists = true;
		} else {
			if(array_key_exists($directories[2], $pages[$directories[1]])){
				$exists = true;
				$key = true;
			} else {
				$exists = false;
			}
		}
	}
	if($lim == 3) { // Get parameters, eg ?action=create
		if(!empty($directories[3])){
			$params = $_GET;
		}
	}
}

/*
 *  If the page does not exist, display the 404 error
 */

if($exists !== true){
	require("404.php");
	die();
}

/*
 *  If it does, initialise the page load, and display the page
 */ 

$page = $directories[1];
$path = "";

/*
 *  Include init.php
 */

require_once 'inc/init.php';

/*
 *  Include the page itself
 */
{'fraction_non_alphanumeric': 0.18879486431281003, 'fraction_numerical': 0.012547417566384594, 'mean_word_length': 3.2796504369538075, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '6105473', 'n_tokens_mistral': 1366, 'n_tokens_neox': 1257, 'n_words': 322}