I'm using bootstrap3 trying to create a combobox that displays the filter for the records that occurred in the week. I've already created the option to display by day, by fortnight, by month, but now I'm twisted in the week.
My code looks like this:
<div class="btn-group">
<button type="button" class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown" style="background-color:#FF0000; border-radius: 5px; font-family:Padrao; color: #ffffff; font-size: 12pt;">
Período
<span class="caret"></span>
</button>
<ul class="dropdown-menu pull-right" role="menu">
<li><a href="<?php echo date(); ?>">Dia</a>
</li>
<li><a href="#">Semana</a> // Aqui entra a problemátca
</li>
<li><a href="index.php?fnc=
<?php
if($dia <=15){
$nini = $ano . "-" . $mes . "-01";
$fini = $ano . "-" . $mes . "-15";
} else {
$nini = $ano . "-" . $mes . "-15";
$fini = $hoje;
}
echo $prefix . "&band=" . $band . "&uf=" . $uf . "&rg=" . $rg . "&emp=" . $emp . "&ini=" . $nini . "&fim=" . $hoje . "&tp=idx"; ?>">Quinzena</a>
</li>
<li><a href="index.php?fnc=<?php
$nini = $ano . "-" . $mes . "-01";
$fini = $hoje;
echo $prefix . "&band=" . $band . "&uf=" . $uf . "&rg=" . $rg . "&emp=" . $emp . "&ini=" . $nini . "&fim=" . $hoje . "&tp=idx"; ?>">Mês</a>
</li>
<li><a href="index.php?fnc=<?php
$nini = $ano . "-01-01";
$fini = $hoje;
echo $prefix . "&band=" . $band . "&uf=" . $uf . "&rg=" . $rg . "&emp=" . $emp . "&ini=" . $nini . "&fim=" . $hoje . "&tp=idx"; ?>">Ano</a>
</li>
</ul>
</div><!-- btn-group -->