<?php
ob_start();
session_start();
include_once('producao.class.php');
include_once('../include/utilitarios.php');
include_once('../class/class.mysql.php');
$mysqlCom = new MysqlConnect();
extract($_POST);

$Producao = new Producao();
$Producao->Processo(2);

while($row = mysqli_fetch_object($Producao->qry)){
?>
<div class="pnHistorico" id="pnEmFila<?php echo $row->id_producao?>" style="margin-bottom: 15px;">
	<div class="ui-widget-content ui-corner-all"
		style="margin: 2px; margin-bottom: 6px; font-size: 12px">
		<div class="ui-state-default ui-corner-all" style="margin: 3px;"
			align="center">
			<strong><?php echo $row->tipo_edicao?> - <?php echo $row->nome?></strong> /  <span
				class="ui-state-highlight ui-corner-all" style="padding: 0 .7em;">Tempo
				<span id="pnDias<?php echo $row->id_producao?>">18</span> dias</span> 
                <?php echo $row->tipo_evento?> - <?php echo InverterData($row->data_evento)?>
		</div>
		<script>DiasCorridos('pnDias<?php echo $row->id_producao?>', '<?php echo InverterData($row->data_inicio)?>', '')</script>
		<div id="pb<?php echo $row->id_producao?>"
			style="margin-left: 5px; margin-right: 5px;"></div>
		<script>ProgresseBar('pb<?php echo $row->id_producao?>','<?php echo InverterData($row->data_inicio)?>', '')</script>

		<?php  $Producao->Historico($row->id_producao);
		$icone = array(1=>'ui-icon-pin-s', 2=>'ui-icon-image', 3=>'ui-icon-image', 4=>'ui-icon-image');
		while($rowH = mysqli_fetch_object($Producao->qry_ver)){

			?>

		<span class="ui-icon <?php echo $icone[$rowH->statos] ?>"
			style="float: left; margin-right: .3em;"></span> <span
			style="font-size: 11px; color: #999;"><?php echo InverterData($rowH->data) . ' '. $rowH->hora ?>
		</span>
		<?php echo $rowH->historico ?>
		- <strong> <?php echo $rowH->funcionario?> </strong><br />
		<?php }?>
	<div align="right" style="margin: 5px;">
		<button class="button small gray" id_prod="<?php echo $row->id_producao?>" id="btnEditar">Editar</button>
	</div>

	</div>


</div>
<?php }?>
