<commit_before><?php
	$object_article = new article();
	$article_list = $object_article->returnAllArticles();

	$line = file_get_contents("modules/article/templates-e/line.html");
	$line_noresult = file_get_contents("modules/article/templates-e/line-noresults.html");
?>
<h1 class="pageTitle"><?= $language["mod_article"]["list_title"]?></h1>
<div class="article-list">
	<div class="button-area">
		<a href="<?= $configuration["path-bo"] ?>/0/article/0/add" class="green"><i class="fa fa-plus"></i></a>
	</div>
	<table class="db-list">
	  <tr>
		<th><?= $language["mod_article"]["table_id"]?></th>
		<th><?= $language["mod_article"]["table_title"]?></th>
		<th><?= $language["mod_article"]["table_category"]?></th>
		<th><?= $language["mod_article"]["table_published"]?></th>
		<th style="width: 120px;"><?= $language["mod_article"]["table_sel"]?></th>
	  </tr>
	  <?php
		if (count($article_list) != 0) {
			foreach ($article_list as $article) {
				$object_category = new category();
				$object_category->setId($article["category_id"]);
				$category = $object_category->returnOneCategory();

				if ($article["published"]) {
					$published = "<i class=\"fa fa-check-circle\"></i>";
				} else {
					$published = "<i class=\"fa fa-circle\"></i>";
				}

				print str_replace(<commit_msg>Adding filter<commit_after><script>
	function otherCategory(variable) {
		goTo('<?= $configuration["path-bo"] ?>/0/article/' + $(variable).val());
	}
</script>
<?php
	if($id == null) {
		$id = 0;
	}

	$object_article = new article();
	$article_list = $object_article->returnArticles(sprintf("WHERE category_id = %s ORDER BY %s ASC", $id, "title_1"));
             	
	$line = file_get_contents("modules/article/templates-e/line.html");
	$line_noresult = file_get_contents("modules/article/templates-e/line-noresults.html");

?>
<h1 class="pageTitle"><?= $language["mod_article"]["list_title"]?></h1>
<div class="article-list">
	<div class="button-area">
		<select id="category" onchange="otherCategory(this);">
			<option><?= $language["form"]["label_category_sel"]?></option>
			<?php
				$object_category = new category();
				$category_list = $object_category->returnCategories(sprintf("WHERE category_type = '%s' ORDER BY %s", $configuration["category_sections"][1], "ordering ASC, id ASC"));

				foreach($category_list as $category){
					printf("<option value=\"%s\" %s>%s</option>", $category["id"], ($category["id"] == $id) ? "active" : null, $category["name_1"]);
				}
			?>

		</select>
		<a href="<?= $configuration["path-bo"] ?>/0/article/0/add" class="green"><i class="fa fa-plus"></i></a>
	</div>
	<table class="db-list">
	  <tr>
		<th><?= $language["mod_article"]["table_id"]?></th>
		<th><?= $language["mod_article"]["table_title"]?></th>
		<th><?= $language["mod_article"]["table_category"]?></th>
		<th><?= $language["mod_article"]["table_published"]?></th>
		<th style="width: 120px;"><?= $language["mod_article"]["table_sel"]?></th>
	  </tr>
	  <?php
		if (count($article_list) != 0) {
			foreach ($article_list as $article) {
				$object_category = new category();
				$object_category->setId($article["category_id"]);
				$category = $object_category->returnOneCategory();

				if ($article["published"]) {
					$published = "<i class=\"fa fa-check-circle\"></i>";
				} else {
					$published = "<i class=\"fa fa-circle\"></i>";
				}

				print str_replace(
{'fraction_non_alphanumeric': 0.23792592592592593, 'fraction_numerical': 0.006222222222222222, 'mean_word_length': 5.228782287822878, 'pattern_counts': {'":': 0, '<': 84, '<?xml version=': 0, '>': 89, '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': '2453375', 'n_tokens_mistral': 1281, 'n_tokens_neox': 1191, 'n_words': 190}