<!DOCTYPE html>

<?php
Include("includes/con_cliente.php");
 
 session_start();

    if(isset($_SESSION['User']))
    {
        $query="select * from tblogin where nome='".$_SESSION['User']."'";
        $result=mysqli_query($con,$query);
        $resultado = mysqli_fetch_assoc($result);
        $r_resultado = $resultado;
    }
    else
    {
        header("location:index.php");
    }



    $result_alunos = "SELECT extract(day FROM `data`)as dia, DAYNAME(`data`) as dnome, monthname(`data`) as mnome, hora, paciente, clientehospital, medico, observacao  FROM agendamentos WHERE vendedor like 'teste'";
    $resultado_alunos = mysqli_query($con, $result_alunos);

    setlocale( LC_ALL, 'pt_BR', 'pt_BR.iso-8859-1', 'pt_BR.utf-8', 'portuguese' ); 
	date_default_timezone_set( 'America/Sao_Paulo' );


    

?>
<html lang="pt-BR">
<head>
	<title></title>

	<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
	<script src="//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
	<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>


	<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">	
</head>

<body>	
		<?php while($rows_alunos = mysqli_fetch_assoc($resultado_alunos)){ ?>
		<div class="container">
			<div class="row row-striped">
				<div class="col-2 text-right">
					<h1 class="display-4"><span class="badge badge-secondary"><?php echo $rows_alunos['dia']; ?></span></h1>
					<h2><?php echo strftime( '%B ', strtotime($rows_alunos['mnome'])); ?></h2>
				</div>
				<div class="col-10">
					<h3 class="text-uppercase"><strong><?php echo $rows_alunos['paciente']; ?></strong></h3>
					<ul class="list-inline">
					    <li class="list-inline-item"><i class="fa fa-calendar-o" aria-hidden="true">&ensp;</i><?php  echo strftime( '%A, ', strtotime($rows_alunos['dnome'])); ?></li>
						<li class="list-inline-item"><i class="fa fa-clock-o" aria-hidden="true">&ensp;</i><?php echo $rows_alunos['hora']; ?></li>
						<li class="list-inline-item"><i class="fa fa-h-square" aria-hidden="true">&ensp;</i><?php echo $rows_alunos['clientehospital']; ?></li>
						<li class="list-inline-item"><i class="fa fa-user-md" aria-hidden="true">&ensp;</i><?php echo $rows_alunos['medico']; ?></li>
					</ul>
					<p><?php echo $rows_alunos['observacao']; ?></p>
				</div>
			</div>
			 
		</div>
		<?php } ?>
	</body>








</body>
</html>





