1
Tom with a problem here that I don’t know how to fix. I made An Agenda that returns to me the users and the calls that he would have in the week, this presented in a table equal to a weekly calendar. I’m going to put an image to better understand what it’s like today and what I want to change. I wanted all the schedules of this User in the same line and in the house of the days run
<table class="table table-bordered table-striped table-white">
<thead>
<tr>
<th >Usuario</th>
<th >Segunda</th>
<th >Terça</th>
<th >Quarta</th>
<th >Quinta</th>
<th >Sexta</th>
<th >Sabado</th>
<th >Domingo</th>
</tr>
</thead>
<?
$sql ="SELECT * FROM os where status2 <> 'Fechado' AND start1
BETWEEN '$dataRecebida' AND '$proximaData' ";
$resultado = mysql_query($sql) or die( mysql_error());
while ($linha = mysql_fetch_assoc($resultado)) {
$id1 = $linha["id1"];
$nome = $linha["nome_cliente"];
$nome_tec = $linha["nome_tec"];
$tecnico = $linha["nome_tecnico1"];
$start1 = $linha["start1"];
$d1 = substr($start1, 0, 10 );
$t = ' ';
$d2 = substr($start1, 11, 5 );
$start = $d1.$d2;
$data1 = implode("/",array_reverse(explode("-",$d1)));
$datal = $data1.$t.$d2;
$dia = DateTime::createFromFormat('Y-m-d H:i:s', $start1);
$dia = $dia->format('D');
if($dia === 'Mon'){
$data2 = "<span class='label label-danger'>$id1</span> $datal<br>
</strong>$nome</strong> ";
}else{
$data2 = "";
}
if ($dia === 'Tue'){
$data3 = "<span class='label label-danger'>$id1</span> $datal<br>
<strong>$nome</strong> ";
}else{
$data3 = "";
}
if ($dia === 'Wed'){
$data4 = "<span class='label label-danger'>$id1</span> $datal<br>
<strong>$nome</strong> ";
}else{
$data4 = "";
}
if ($dia === 'Thu'){
$data5 = "<span class='label label-danger'>$id1</span> $datal<br>
<strong>$nome</strong> ";
}else{
$data5 = "";
}
if($dia === 'Fri'){
$data6 = "<span class='label label-danger'>$id1</span> $datal<br>
<strong>$nome</strong> ";
}else{
$data6 = "";
}
if ($dia === 'Sat'){
$data7 = "<span class='label label-danger'>$id1</span> $datal<br>
<strong>$nome</strong> ";
}else{
$data7 = "";
}
if ($dia === 'Sum'){
$data1 = "<span class='label label-danger'>$id1</span> $datal<br>
<strong>$nome</strong> ";
}else{
$data1 = "";
}
?>
<tbody>
<tr>
<td style="background-color: #CEF9FB;" ><?echo $tecnico?></td><td ><?echo $data2?>
</td><td style="background-color: white;"><?echo $data3?></td><td><?echo $data4?>
</td>
<td><?echo $data5?></td><td><?echo $data6?></td><td><?echo $data7?></td><td><?echo
$data1
?></td>
</tr>
</tbody>
<?}?>
</table>
Someone would know how to fix this
Fábio, note that in the image you posted, there are 2 schedules on Saturday, in this case, how should be shown? If you do everything in 1 single row, these records will have to be together in some way. How did you imagine this?
– Thomas Lima
Ola Thomas I imagined each scheduling of these go on the same line one below the other so in the first row on Saturday I would join the Records same. Att Fabio
– Fabio Henrique