<commit_before><?php

$arrImageFiles = array();

foreach (glob("*.*") as $strFileName) {
	if (preg_match("~\.(jpeg|jpg|png|gif)$~", $strFileName) ) {
		$arrImageFiles[] = $strFileName;
	}
}
$nTotal = count($arrImageFiles);


$strJsonFiles = json_encode($arrImageFiles);


if (isset($_GET['image'])) {
	$nCurImage = (integer) $_GET['image'];
} else {
	$nCurImage = 0;
}

$nPrev = max(0, $nCurImage - 1);
$nNext = min($nTotal - 1,  $nCurImage + 1);

?>


<<?php ?>?xml version="1.0" encoding="UTF-8"?<?php ?>>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <title>Viewing Image: <?php echo $arrImageFiles[$nCurImage] ?></title>
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> 
    <script type="text/javascript">
		var arrFiles = <?php echo $strJsonFiles; ?>;
		var nCurImage = <?php echo $nCurImage; ?>;
		
		function redirectToImage(nImage) {
			window.location.href = "view-gallery.php?image=" + nImage
		}
		
		$(document).ready(function () {
			$("#prev").click(function (e) {
				var nImageId = $(this).val();
				redirectToImage(nImageId);
			});
			$("#next").click(function (e) {
				var nImageId = $(this).val();
				redirectToImage(nImageId);
			});
			$("#selectAllImages").change(function (e) {
				var nImageId = $(this).val();
				redirectToImage(nImageId);
			});
			
		});
	</script>
    <commit_msg>Fixed small bug.<commit_after><?php

$arrImageFiles = array();

foreach (glob("*.*") as $strFileName) {
	if (preg_match("~\.(jpeg|jpg|png|gif)$~", $strFileName) ) {
		$arrImageFiles[] = $strFileName;
	}
}
$nTotal = count($arrImageFiles);


$strJsonFiles = json_encode($arrImageFiles);


if (isset($_GET['image'])) {
	$nCurImage = (integer) $_GET['image'];
} else {
	$nCurImage = 0;
}

$nPrev = max(0, $nCurImage - 1);
$nNext = min($nTotal - 1,  $nCurImage + 1);

?>


<<?php ?>?xml version="1.0" encoding="UTF-8"?<?php ?>>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <title>Viewing Image: <?php echo $arrImageFiles[$nCurImage] ?></title>
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> 
    <script type="text/javascript">
		var arrFiles = <?php echo $strJsonFiles; ?>;
		var nCurImage = <?php echo $nCurImage; ?>;
		
		function redirectToImage(nImage) {
			window.location.href = "0_view-gallery.php?image=" + nImage
		}
		
		$(document).ready(function () {
			$("#prev").click(function (e) {
				var nImageId = $(this).val();
				redirectToImage(nImageId);
			});
			$("#next").click(function (e) {
				var nImageId = $(this).val();
				redirectToImage(nImageId);
			});
			$("#selectAllImages").change(function (e) {
				var nImageId = $(this).val();
				redirectToImage(nImageId);
			});
			
		});
	</script>
    
{'fraction_non_alphanumeric': 0.21941354903943378, 'fraction_numerical': 0.014492753623188406, 'mean_word_length': 3.865573770491803, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 2, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 6}, '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': '6135767', 'n_tokens_mistral': 1249, 'n_tokens_neox': 1104, 'n_words': 192}