<?php
   session_start(); //Iniciamos la session
   if(!isset($_SESSION['user'])) {
     header("location: login.php");
   }
   else{
	  if( ($_SESSION['user'] != 'root') && ($_SESSION['user'] != 'lorenzon')) {
	     header("location: index.php");
	  }
   }
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta name="Description" content="CECONEA - UNNE" />
<title>HPC-CECONEA</title>
<style media="all" type="text/css">
@import url("./css/estiloP.css");
@import url("./css/fuentes.css");
@import url("./css/menu.css");
</style>

<style type="text/css">
#tablaclusters
{
  border-top: 1px;
  border-bottom: 1px;
  border-left: 1px;
  border-right: 1px;
  border: 1px solid #dddddd;
}
</style>

<!-- COMIENZO SCRIPTS PARA ACORDEON EN LOS MENSAJES -->
  <link rel="stylesheet" href="css/jquery-ui.css" />
  <script src="js/jquery-1.9.1.js"></script>
  <script src="js/jquery-ui.js"></script>
  <link rel="stylesheet" href="/resources/demos/style.css" />
  <style>
  #accordion-resizer {
    padding: 10px;
    width: 590px;
    height: 450px;
  }
  </style>
  <script>
  $(function() {
    $( "#accordion" ).accordion({
      heightStyle: "fill"
    });
  });
  </script>

<!-- FIN SCRIPTS PARA ACORDEON EN LOS MENSAJES -->


<script language="JavaScript">
var miArray = new Array()

function HabilitarCombo(){
			var algo = miArray[document.cuent.users.value];
			document.getElementById("nombre").value = algo[0];
			document.getElementById("nombres").value = algo[0];
			document.getElementById("Nombre_editable").value = algo[1];
			document.getElementById("fecha_activo").value = algo[2];
			document.getElementById("habilitado").value = algo[3];
			document.getElementById("ultimologin").value = algo[4];
			document.getElementById("editado").value = 1;
}
function agregar(){
			document.getElementById("nombre").value = "";
			document.getElementById("nombres").value = "";
			document.getElementById("Nombre_editable").value = "";
			document.getElementById("fecha_activo").value = "";
			document.getElementById("habilitado").value = 1;
			document.getElementById("ultimologin").value = "";
			document.getElementById("editado").value = 0;
}
</script>

</head>

<body bgcolor="#5C6350" onload="HabilitarCombo();">
<table id="tabla" align="center" cellspacing="0" cellpadding="0"  >
  <tr>
    <td>
       <?php
	 include "titulo.php";
      ?>     
    </td>
  </tr>
  <tr>
    <td valign="bottom">
      <?php
         if(isset($_SESSION['user'])) {
	   include "menulogueado.php";
	 }
         else{
	   include "menu.php";
         }
      ?>
    </td>
  </tr>
  <tr>
    <td padding="10px" margin="3px" bgcolor="#FFFFFF" valign="top">
		<?php
		   include "admin_cuentas_contenido.php";
		?>
    </td>
  </tr>
  <tr>
    <?php
       include "bottom.php";
	   
		if(isset($r)){
			if ($r != 1){
				echo '<script language="JavaScript">
					alert("'.$mensaje.'");
				</script>';
			}
		}
    ?>
  </tr>
</table>

</body>
</html>
