<?php session_set_cookie_params(0);
session_start();
require_once('../../Connections/odonto_connection1.php');
$codigo=$_SESSION['codigo'];
$comentarios=$_GET['comentarios'];
$puntaje=$_GET['puntaje'];


$query_rs_todos = "SELECT negocio FROM `mesas` WHERE codigo LIKE '$codigo' LIMIT 1";
$rs_ingreso0 = mysqli_query($odonto_connection,$query_rs_todos) or die(mysqli_error());
$row_rs_ingreso0 = mysqli_fetch_assoc($rs_ingreso0);
$negocio=$row_rs_ingreso0['negocio'];
?>
  
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>PonderZone</title>

<?php 
require_once($_SERVER['DOCUMENT_ROOT'] .'/warn/bootstrap/bootstrap_js_gral.php');
require_once($_SERVER['DOCUMENT_ROOT'] .'/warn/bootstrap/bootstrap_css_gral.php');
?>

<link rel="stylesheet" href="../../bootstrap4/css/animacion1.css" />
<link href='https://fonts.googleapis.com/css?family=Handlee' rel='stylesheet'>

<style>

.container{
	
	background-image:url(fondos/bares-restaurantes-rosario.jpg);
	background-size: cover;
	background-repeat: no-repeat;
	height: 600px;
}

:root {
  //--main-bg-negocio: url(fondos/<?php echo $negocio;?>/almacen_deluca.jpg);
  --main-bg-negocio: url(fondos/bares-restaurantes-rosario.jpg); //generico
  //--main-bg-opacidad: 0.99;
}

</style>

<script>

function myFunction() {
    setTimeout ("myFunction1();",1000);
}

function myFunction1(){	
	var comentarios = "<?php echo $comentarios;?>";
	var puntaje = "<?php echo $puntaje;?>";
	var codigo = "<?php echo $_SESSION['codigo'];?>";
	var voy = "<?php echo $_SESSION['voy'];?>";
	if(codigo){
		if (voy == 'voy') window.open("./index0.php?comentarios="+comentarios+"&puntaje="+puntaje,"_parent");
		else window.open("./index0.php","_parent");
	}
	else {window.open("./index.php","_parent");}
}
	</script>

</head>
<body onload="myFunction()" style="font-weight:bold;color:white;font-size:2.5rem">

<div class="container">
<br><br>
<div class="row container-fluid text-center" >
	<div class="col"><?php 
	$query_rs_todos = "SELECT nombre FROM datos WHERE negocio LIKE '$negocio' LIMIT 1";
$rs_ingreso0 = mysqli_query($odonto_connection,$query_rs_todos) or die(mysqli_error());
$row_rs_ingreso0 = mysqli_fetch_assoc($rs_ingreso0);
$nombre=$row_rs_ingreso0['nombre'];

	if(isset($_SESSION['codigo'])) {
		if ($_SESSION['voy'] == 'voy') {
			echo $nombre."<br> dice...<br>";
			echo "Gracias ...";
			}
			else echo ".............";
			}
	else echo "Vuelva a loguearse...";?></div>
</div>

</div>


</body>
</html>