<?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($_REQUEST);

$Producao = new Producao();
$Producao->Processo($statos);
?>
<style>.linha{ background-color:#E5E5E5;}</style>

<?php
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', 
					   5=>'ui-icon-mail-closed', 
					   6=>'ui-icon ui-icon-arrowreturnthick-1-n', 
					   7=>'ui-icon-person');
		while($rowH = mysqli_fetch_object($Producao->qry_ver)){
			
			?>
		<div class="pnLinha" style="margin-left:10px; margin-right:10; padding:2px;">
		<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 />
		</div>
        <div style="clear:both"></div>
		<?php }?>
        
        
	<div align="right" style="margin: 5px;">
		
        <?php if($statos == '4'){?>
        	<div align="center">Aguardando Confirmação de UpLoad do Álbum</div>
		<?php }?>
        <?php if($statos == '2'){?>
        <button class="button small gray" id_prod="<?php echo $row->id_producao?>" id="btnEditar">Editar</button>
        <?php }?>
        
        <?php if($statos == '6'){?>
        <button class="button small gray" id_prod="<?php echo $row->id_producao?>" id="btnContatoCliente">Confirma Contato com Cliente</button>
        <?php }?>
        
	</div>

	</div>


</div>
<?php }?>


<script>
	$('.pnLinha:odd').addClass('linha');

</script>