<commit_before><?php
	/*
	* 
	* LOAD THE DATA 
	*/	

	date_default_timezone_set('America/Mexico_City');
	/* UGLY HACK */
	$d = array_diff(scandir("./js/data"), ['..', '.', '.DS_Store']);
	$contracts = [];
	foreach($d as $contract)
	{
		$f = file_get_contents("./js/data/" . $contract);
    	$j = json_decode($f);
		
    	$id = $j->releases[0]->ocid;
    	$contracts[str_replace("/", "-", $id)] = $j;       
  	}
 
  	$elcontrato = $contracts['OCDS-87SD3T-SEFIN-DRM-AD-CC-008-2015'];
  	
  	/*
  	*
	*/
	$body_class 	= "contract";
	$title 			= "Contrato";
	$description 	= "Contrato";
	$og_image		= "img/og/contrato-cdmx.png";
	$canonical		= $url;
	include "templates/header.php";?>

<pre>
	<?php var_dump($elcontrato->releases[0]);?>
</pre>
<div class="breadcrumb">
	<div class="container">
		<a href="#"><strong>&lt;</strong> SEFIN</a>
	</div>
</div>
<article>
	<div class="col-sm-3 sidebar">
		<div class="header">
			<?php if ($elcontrato->releases[0]->tender):?>
			<h3>LICITACIÓN</h3>
			<h2><?php echo $elcontrato->releases[0]->tender->title;?></h2>
			<?php else:?>
			<h3>PLANEACIÓN</h3>
			<h2><?php echo $elcontrato->releases[0]->planning->budget->project;?></h2>
			<?php endif;?>
		</div>
		<nav>
			<ul class="timeline">
				<?php if($elcontrato->releases[0]->contracts):?>
				<li><a href="#"  id="btn-contract-nav" class="nav_stage current" data-title="Contratación">
					<?php echo file_get_contents("img/nav_contratacion.svg"); ?>	</a>
					<ul id="nav_contract">
						<li class="active"><a id="btn-contract-1" href="#" data-title="Hace 5 meses" class="t_right"></a></li>
						<li><a id="btn-contract-2" href="#" data-title="Hace 5 meses" class="t_left"></a></li>
					</ul>
				</li>
				<?php endif;?>
				<?php if($elcontrato->releases[0]->awards):?>
				<li><a href="#" id="btn-award-nav" class="nav_stage" data-title="Adjudicación"><?php echo file_get_contents("img/nav_adjudicacion.svg"); ?></a> 
					<ul id="nav_award">
						<li><a id="btn-award-1" href="#" data-title="Hace 6 meses" class="t_right"></a></li>
						<li><a id="btn-award-2" href="#" data-title="Hace 6 meses" class="t_left"></a></li>
					</ul>
				</li>
				<?php endif;?>
				<?php if($elcontrato->releases[0]->planning):?>
				<li><a href="#" id="btn-tender" class="nav_stage" data-title="Licitación"><?php echo file_get_contents("img/nav_licitacion.svg"); ?></a></li>
				<?php endif;?>
				<?php if($elcontrato->releases[0]->tender):?>
				<li><a href="#" id="btn-planning"class="nav_stage" data-title="Planeación"><?php echo file_get_contents("img/nav_planeacion.svg"); ?></a></li>
				<?php endif;?>
			</ul>
		</nav>
	</div>	
			
	<div class="col-sm-9 info">			
				<!-- tender-->
				<div id="tender">
					<div class="row divider">
						<div class="col-sm-12">
							<p class="title_section">Licitación</p>
							<h1><?php echo $elcontrato->releases[0]->tender->title;?></h1>
							<h2><?php echo $elcontrato->releases[0]->tender->id;?> 
							<span class="label <?php echo $elcontrato->releases[0]->tender->status;?>">
							<?php echo $elcontrato->releases[0]->tender->status == "complete" ? 'COMPLETO' : '';?></span>
							</h2>
							<p class="lead"><?php echo $elcontrato->releases[0]->tender->description;?></p>
						</div><commit_msg>update sidebar w data<commit_after><?php
	/*
	* 
	* LOAD THE DATA 
	*/	

	date_default_timezone_set('America/Mexico_City');
	/* UGLY HACK */
	$d = array_diff(scandir("./js/data"), ['..', '.', '.DS_Store']);
	$contracts = [];
	foreach($d as $contract)
	{
		$f = file_get_contents("./js/data/" . $contract);
    	$j = json_decode($f);
		
    	$id = $j->releases[0]->ocid;
    	$contracts[str_replace("/", "-", $id)] = $j;       
  	}
 
  	$elcontrato = $contracts['OCDS-87SD3T-SEFIN-DRM-AD-CC-008-2015'];
  	
  	/*
  	*
	*/
	$body_class 	= "contract";
	$title 			= "Contrato";
	$description 	= "Contrato";
	$og_image		= "img/og/contrato-cdmx.png";
	$canonical		= $url;
	include "templates/header.php";?>
<div class="breadcrumb">
	<div class="container">
		<a href="#"><strong>&lt;</strong> SEFIN</a>
	</div>
</div>
<article>
	<div class="col-sm-3 sidebar">
		<div class="header">
			<?php if ($elcontrato->releases[0]->tender):?>
			<h3>LICITACIÓN</h3>
			<h2><?php echo $elcontrato->releases[0]->tender->title;?></h2>
			<?php else:?>
			<h3>PLANEACIÓN</h3>
			<h2><?php echo $elcontrato->releases[0]->planning->budget->project;?></h2>
			<?php endif;?>
		</div>
		<nav>
			<ul class="timeline">
				<?php if($elcontrato->releases[0]->contracts):?>
				<li><a href="#"  id="btn-contract-nav" class="nav_stage current" data-title="Contratación">
					<?php echo file_get_contents("img/nav_contratacion.svg"); ?></a>
					<ul id="nav_contract">
						<?php 
							$count_nav = 0;
							foreach($elcontrato->releases[0]->contracts as $contract):?>
						<?php 
							  $count_nav++;
							  $time_contract = strtotime($contract->dateSigned);
							  $time_contract = date('d/m/Y',$time_contract);?>
						<li class="active"><a id="btn-contract-<?php echo $count_nav;?>" href="#" data-title="<?php echo $time_contract;?>" class="t_right"></a></li>
						<?php endforeach;?>
					</ul>
				</li>
				<?php endif;?>
				<?php if($elcontrato->releases[0]->awards):?>
				<li><a href="#" id="btn-award-nav" class="nav_stage" data-title="Adjudicación"><?php echo file_get_contents("img/nav_adjudicacion.svg"); ?></a> 
					<ul id="nav_award">
						<?php $count_nav = 0;
							foreach($elcontrato->releases[0]->awards as $award):?>
						<?php 
							  $count_nav++;
							  $time_award = strtotime($award->date);
							  $time_award = date('d/m/Y',$time_award);?>
						<li><a id="btn-award-<?php echo $count_nav;?>" href="#" data-title="<?php echo $time_award;?>" class="t_right"></a></li>
						<?php endforeach;?>
					</ul>
				</li>
				<?php endif;?>
				<?php if($elcontrato->releases[0]->planning):?>
				<li><a href="#" id="btn-tender" class="nav_stage" data-title="Licitación"><?php echo file_get_contents("img/nav_licitacion.svg"); ?></a></li>
				<?php endif;?>
				<?php if($elcontrato->releases[0]->tender):?>
				<li><a href="#" id="btn-planning"class="nav_stage" data-title="Planeación"><?php echo file_get_contents("img/nav_planeacion.svg"); ?></a></li>
				<?php endif;?>
			</ul>
		</nav>
	</div>	
			
	<div class="col-sm-9 info">			
				<!-- tender-->
				<div id="tender">
					<div class="row divider">
						<div class="col-sm-12">
							<p class="title_section">Licitación</p>
							<h1><?php echo $elcontrato->releases[0]->tender->title;?></h1>
							<h2><?php echo $elcontrato->releases[0]->tender->id;?> 
							<span class="label <?php echo $elcontrato->releases[0]->tender->status;?>">
							<?php echo $elcontrato->releases[0]->tender->status == "complete" ? 'COMPLETO' : '';?></span>
							</h2>
							<p class="lead"><?php echo $elcontrato->releases[0]->tender->description;?></p>
						</div>
{'fraction_non_alphanumeric': 0.24295672378739472, 'fraction_numerical': 0.013215219285506825, 'mean_word_length': 3.6128600133958475, 'pattern_counts': {'":': 0, '<': 208, '<?xml version=': 0, '>': 283, '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': '2829648', 'n_tokens_mistral': 3220, 'n_tokens_neox': 2705, 'n_words': 418}