<!--Cabecalho -->
<?php $this->load->view('commons/cabecalho'); ?>
<!--Header -->
<?php $this->load->view('commons/header'); ?>
<style>
    .card-cert {
        height: 190px !important;
    }
</style>
<!--Opcao -->
<br>
<div class="row">
  
    <h4 style="margin-left: 7%; font-size: 30pt;"><b>Certificados</b></h4>

 
        <div class="row margin-temp">
           
            <?php if($cursos != NULL) { ?>
            <?php foreach ($cursos as $value) { ?>
            
             <?php if ($value->concluido != 2) { ?>
                <div class="col s12 m3 ">
                    <div class="card"  style=" min-height: 250px;">
                        <div class="card-content card-cert">
                            <span class="card-title txt-cert">
                                Curso: <b><?=$value->nome?></b><br>
                                Histórico: <?php echo $value->id_historico ?><br>
                                <?php $status = ($value->concluido == 0) ? "Cursando" : "Concluído"; ?>
                            
                                Carga Horária: 
                                 <?php echo $value->carga_horaria;?> Horas 
                                 <?php if($value->certificado==1){?>
                                 <a href="<?php echo base_url('detalhescertificados/' . $this->criptografia->codifica($value->id_historico)); ?>" class="waves-effect waves-light btn btn-ver" style="width: 100%; margin-top: 10px;">CERTIFICADO</a>
                                 <?php }?>
                                 <?php if($value->certificado==0){?>
                                 <a href="<?php echo base_url('detalhescertificados/' . $this->criptografia->codifica($value->id_historico)); ?>" class="btn btn-primary" style="width: 100%; margin-top: 10px; background-color: #007bff;">GERAR FATURA</a>
                                 <?php }?>
                            </span>
                        </div>
                        <?php $url = $this->url->urlamigavel($value->nome); ?>
                         <br>
                    </div>
                </div>
            <?php } ?>
           <?php } ?>
           <?php } else { ?>
            <nav  style="width: 92%; margin-left: 1%;background-color: #f2f2f2; color: black;">&nbsp;&nbsp;<i class="fa fa-info-circle"></i> Não encotramos nenhum resultado. <a href="<?php echo base_url('cursos'); ?>" style="color: #039be5"><b>Matricule-se agora!</b></a> </nav>

 <?php } ?>
        </div>
  
     
</div>

<?php $this->load->view('commons/rodape'); ?>
