HOME BAPTISMOS ADMIN

” . $row[‘date’] . “ |”;
}

$date_filter = $_GET[“id”];
$con=mysqli_connect(“internal-db.s5467.gridserver.com”,”db5467_peterpan”,”gliderpeterpan”,”db5467_peterpan”);
// Check connection
if (mysqli_connect_errno())
{
echo “Failed to connect to MySQL: ” . mysqli_connect_error();
}
$sql = “select name, phone, voucher_nr, time, event.date, slot_status, video, event.event_status from register join client on register.client_id=client.client_id right join slot on slot.slot_id=register.slot_id join event on slot.event_id=event.event_id where event.event_status=’OPEN'”;

if ($date_filter != “”){
$sql .= ” and event.date='” . $date_filter . “‘”;
}
$sql .= ” order by time”;
$result = mysqli_query($con,$sql);

echo “

“;
echo “

“;
echo “

“;
echo “

“;
echo “

“;
echo “

“;
echo “

“;
$counter=1;
while($row = mysqli_fetch_array($result))
{
echo “

“;
echo “

“;
echo “

“;
echo “

“;
echo “

“;
echo “

“;
if ($row[‘slot_status’]==”BUSY” && $row[‘name’] == “”){
echo “

“;
}
else if ($row[‘video’]==”Sim”){
echo “

“;
}
else{
echo “

“;
}
$counter +=1;
echo “

“;
}
echo “

# Nome Contacto Voucher Nr Horário Notas
” . $counter . “
” . $row[‘name’] . “
” . $row[‘phone’] . “
” . $row[‘voucher_nr’] . “
” . $row[‘time’] . “
RESERVADO VIDEO

“;

mysqli_close($con);
?>