0
This is the view named Dashboard.php
<main role="main" class="col-md-10 ml-sm-auto col-lg-10 px-4">
<div style="top:-5px" class="col-md-12 d-flex justify-content-between flex-wrap align-items-center pt-3 pb-2 mb-3 border-bottom">
<h1 class="h2">Dashboard</h1>
</div>
<div class="row">
<div class="col-md-6">
<table class="table table-bordered">
<thead class="thead-light">
<tr style="text-align:center; font-size:12pt">
<th style="background:#585858; color:white" colspan="2">Regs para Remover Hoje:</th>
<th style="background:#585858; color:white"><?php $matricula = date ("d-m-Y");echo"<input style='background:#585858; color:white; border:none; text-align:center' type='text' value='$matricula'";?> </th>
<tr style="text-align:center; font-size:12pt">
<th style="padding:5px">ID</th>
<th style="padding:5px;">Nome</th>
<th style="padding:5px">ID Unico do TS</th>
</tr>
</tr>
</thead>
<?php foreach($cadastros as $cad){?>
<tr style="text-align:center; font-size:12pt">
<td style="padding:5px"><?= $cad->id; ?></td>
<td style="padding:5px; text-align:left"><?= $cad->nick; ?></td>
<td style="padding:5px"><?= $cad->id_unico; ?></td>
</tr>
<?php }?>
</table>
</div>
<div class="col-md-6">
<table class="table table-bordered">
<thead class="thead-light">
<tr style="text-align:center; font-size:12pt">
<th style="background:#585858; color:white" colspan="3">Registros não Removidos</th>
<tr style="text-align:center; font-size:12pt">
<th style="padding:5px">ID</th>
<th style="padding:5px;">Nome</th>
<th style="padding:5px">ID Unico do TS</th>
</tr>
</tr>
</thead>
<?php foreach($cadastros as $cad){?>
<tr style="text-align:center; font-size:12pt">
<td style="padding:5px"><?= $cad->id; ?></td>
<td style="padding:5px; text-align:left"><?= $cad->nick; ?></td>
<td style="padding:5px"><?= $cad->id_unico; ?></td>
</tr>
<?php }?>
</table>
</div>
</div>
And this is the controller named after statistics.php
public function index($indice=null)
{
$this->verificar_sessao();
$this->db->select('*');
$this->db->where('data_vencimento =', date('Y-m-d'));
$dados['cadastros'] = $this->db->get('cadastro')->result();
$this->load->view('includes/html_header');
$this->load->view('includes/menu');
$this->load->view('dashboard',$dados);
$this->load->view('includes/html_footer');
}
Aee gets like this https://i.imgur.com/Spkpiy7.png
I wonder if there is as the first table I list the records equal to the date there above 07/04/2019, as this and in the second table list only records prior to that date 07/04/2019.
I’m new in Codeigniter bro, for now I’m only using the Views and Controllers, I didn’t get to use the Models, but I’ll see how it works and implement your code here. thanks since you.
– Like Mike