<?php if(!isset($_SESSION)){session_start();} ////// EMPIEZA CODIGO PARA VERIFICAR LOGEO
$MM_authorizedUsers = "";
$MM_donotCheckaccess = "true";
function isAuthorized($strUsers, $strGroups, $UserName, $UserGroup) { 
  // For security, start by assuming the visitor is NOT authorized. 
  $isValid = False;
  // When a visitor has logged into this site, the Session variable MM_Username set equal to their username. 
  // Therefore, we know that a user is NOT logged in if that Session variable is blank. 
  if (!empty($UserName)) { 
    // Besides being logged in, you may restrict access to only certain users based on an ID established when they login. 
    // Parse the strings into arrays. 
    $arrUsers = Explode(",", $strUsers); 
    $arrGroups = Explode(",", $strGroups); 
    if (in_array($UserName, $arrUsers)) { $isValid = true; } 
    // Or, you may restrict access to only certain users based on their username. 
    if (in_array($UserGroup, $arrGroups)) { $isValid = true; } 
    if (($strUsers == "") && true) { $isValid = true;  }  } 
  return $isValid; }
$MM_restrictGoTo = "index.php?banned";
if (!((isset($_SESSION['MM_Username'])) && (isAuthorized("",$MM_authorizedUsers, $_SESSION['MM_Username'], $_SESSION['MM_UserGroup'])))) {   
  $MM_qsChar = "?";
  $MM_referrer = $_SERVER['PHP_SELF'];
  if (strpos($MM_restrictGoTo, "?")) $MM_qsChar = "&";
  if (isset($QUERY_STRING) && strlen($QUERY_STRING) > 0) 
  $MM_referrer .= "?" . $QUERY_STRING;
  $MM_restrictGoTo = $MM_restrictGoTo. $MM_qsChar . "accesscheck=" . urlencode($MM_referrer);
  header("Location: ". $MM_restrictGoTo); 
  exit;} ////// TERMINA CODIGO PARA VERIFICAR LOGEO

require_once('../../Connections/odonto_connection.php');	
	
	$user=$_SESSION['MM_Username'];
	
$query_rs_todos = "SELECT * FROM `ingreso` WHERE `user` like '$user'";
$rs_ingreso = mysqli_query($odonto_connection,$query_rs_todos) or die(mysql_error());
$row_rs_ingreso = mysqli_fetch_assoc($rs_ingreso);
$clinica=$row_rs_ingreso['clinica'];
$doc=$row_rs_ingreso['doc'];
	?>

<!DOCTYPE html>
<html lang="es">
<head>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/baseotros.dwt" codeOutsideHTMLIsLocked="false" -->

<head>
<title>PonderCom</title>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
	
    <!-- Bootstrap CSS File  -->
<link rel="stylesheet" type="text/css" href="./css/bootstrap.css"/>

<script type="text/javascript" language="javascript" src="https://code.jquery.com/jquery-1.12.4.js"></script>

<script src="peticion.js"></script>	
<style>
.arriba_maxi{
	background-color:#103166;
	height:90px;
	color:#f7f8f9;
	text-align:center;
	font-
}
.central_maxi{
	background-color:#fff;
	color:#000;	
}

.table-striped>tbody>tr:nth-child(odd)>td, 
.table-striped>tbody>tr:nth-child(odd)>th {
  background-color: rgba(206,216,246,1); // Choose your own color here }
</style>

</head>
<!--<body style="background-color:rgba(206,216,246,1)"> -->

<body style="background-color:#F2EFFB">
	
<!-- Content Section -->
<div class="container-fluid">
		<div class="row arriba_maxi align-items-center">
			<div class="col-1">
			<a href="#" class="navbar-brand"><img src="../../imagenes/logos/logo1_png.png" style="position:relative;left:0px;top:0px;height:60px;z-index:1"></a>
			</div>
			<div class="col-11 hidden-sm-down">
			<h4><font style="border:1px solid #f7f8f9">&nbsp;<?php echo "Odontograma";?>&nbsp;</font></h4>
			</div>
		</div>
</div>

<?php require_once("menu.php");?>
<?php require_once("menu_pac.php");?>


<div class="container-fluid">
<div class="row">
	<div class="col-md-12 " >
	
<div class="embed-responsive embed-responsive-1by1">
  <iframe  src="../../matriz_crud3.php?id_pac=<?php echo $id_pac;?>" allowfullscreen></iframe>

</div>

</div>
</div>
</div>
		
		

<p>

<!-- /Content Section -->

<script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.4.0/js/tether.min.js" integrity="sha384-DztdAPBWPRXSA/3eYEEUWrWCy7G5KFbe8fFjk5JAIxUYHKkDx6Qin1DkWx51bBrb" crossorigin="anonymous"></script>
<!-- Bootstrap JS file -->
<script type="text/javascript" src="./js/bootstrap.min.js"></script>
<script type='text/javascript'>
function myFunction(){
window.open("https://www.w3schools.com","_parent");
}
</script>
</body>

</html>