<commit_before><!-- TODO: Update the URL to contain the new units id -->
<link rel="stylesheet" href="progress.css">

<!-- Carousel -->
<?php
$id = isset($_GET['id']) ? $_GET['id'] : $random;
$units = array_column($creature_results, 'id');
//$valid = array_search($id, $units);
if ($id == $random) {
	$id = array_rand($units, 1);
}
?>
<script>
	var selectedUnit = <?php echo $id; ?>;
	var siteUrl = "<?php echo $site_url; ?>";
</script>
<script type="text/javascript" src="carousel.js"></script>
<link rel="stylesheet" href="carousel.css">

<div id="carousel"></div>

<div class="div center">
<?php
// Cards
// TODO: Check if the unit id exists, if not, assign random valid id
// TODO: Sort these by set / realm / level instead of id
require_once 'cards.php';
foreach ($creature_results as $r) {
	if ($r['id'] == $id) {
		$page_title = 'Ancient Beast - ' . $r['name'];
		?>
		<!-- Use unit name as page title -->
		<script>document.title = "<?php echo $page_title; ?>";</script>
		<?php
		cards($r);
		echo '<br>';
		progress($r['progress'], $r);
		// TODO: Add left and right arrow hotkeys
		// TODO: Add card flip eyecandy animation
		echo '</div>';
		//TODO: Fix disqus page title
		disqus($page_title);
	}
}

// TODO: Show unit drop along with its modifiers
echo "</div>";
disqus($page_title);
<commit_msg>php error check<commit_after><!-- TODO: Update the URL to contain the new units id -->
<link rel="stylesheet" href="progress.css">

<!-- Carousel -->
<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
$id = isset($_GET['id']) ? $_GET['id'] : $random;
$units = array_column($creature_results, 'id');
//$valid = array_search($id, $units);
if ($id == $random) {
	$id = array_rand($units, 1);
}
?>
<script>
	var selectedUnit = <?php echo $id; ?>;
	var siteUrl = "<?php echo $site_url; ?>";
</script>
<script type="text/javascript" src="carousel.js"></script>
<link rel="stylesheet" href="carousel.css">

<div id="carousel"></div>

<div class="div center">
<?php
// Cards
// TODO: Check if the unit id exists, if not, assign random valid id
// TODO: Sort these by set / realm / level instead of id
require_once 'cards.php';
foreach ($creature_results as $r) {
	if ($r['id'] == $id) {
		$page_title = 'Ancient Beast - ' . $r['name'];
		?>
		<!-- Use unit name as page title -->
		<script>document.title = "<?php echo $page_title; ?>";</script>
		<?php
		cards($r);
		echo '<br>';
		progress($r['progress'], $r);
		// TODO: Add left and right arrow hotkeys
		// TODO: Add card flip eyecandy animation
		echo '</div>';
		//TODO: Fix disqus page title
		disqus($page_title);
	}
}

// TODO: Show unit drop along with its modifiers
echo "</div>";
disqus($page_title);

{'fraction_non_alphanumeric': 0.20291479820627803, 'fraction_numerical': 0.0011210762331838565, 'mean_word_length': 4.108778625954199, 'pattern_counts': {'":': 0, '<': 49, '<?xml version=': 0, '>': 47, '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': '5348911', 'n_tokens_mistral': 959, 'n_tokens_neox': 924, 'n_words': 289}