<?
session_start();
if(!isset($_SESSION['usuario']))
{
 	echo "<script languaje='JavaScript'>";       
	echo "parent.location.href='login.php'; ";
	echo "</script>";
}
include ("clases/Usuario.class.php"); $obju = new Usuario();
include ("clases/Afiliado.class.php"); $obja = new Afiliado();
include ("clases/Acuerdos.class.php"); $objf = new Acuerdos();

if($obju->BuscarPorUsuario($_SESSION['usuario']))
{
   $idafiliado = $obju->getidafiliado();
   if($obja->BuscarPorCodigo($idafiliado))
   {
     $nombres = $obja->getnombres();
   }
   $usuario = $obju->getusuario();
   $tipouser = $obju->gettipo();
}

$lista = $objf->ListarPublicado();
if(count($lista)>0){
  $src = "votacion.php?ida=$idafiliado";
}else{
	  $src = "contenido.php";
     }
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <!-- This file has been downloaded from Bootsnipp.com. Enjoy! -->
    <title>Admin Panel Quick Shortcuts - Bootsnipp.com</title>
        <meta name="viewport" content="width=device-width, initial-scale=1">
     <link rel="stylesheet" href="media/css/bootstrap.css">
	<link rel="stylesheet" href="media/css/bootstrap.min.css">
	<link rel="stylesheet" href="media/css/bootstrap-theme.css">
	<link rel="stylesheet" href="media/css/bootstrap-theme.min.css">
	<link rel="stylesheet" href="media/css/dataTables.bootstrap.min.css">
	<link rel="stylesheet" href="media/css/fixedHeader.bootstrap.min.css">
	<link rel="stylesheet" href="media/css/responsive.bootstrap.min.css">
	 <script src="media/js/jquery-1.10.2.js"></script>
	<script src="media/js/jquery.dataTables.min.js"></script>
	<script src="media/js/dataTables.bootstrap.min.js"></script>
	<script src="media/js/dataTables.fixedHeader.min.js"></script>
	<script src="media/js/dataTables.responsive.min.js"></script>
	<script src="media/js/responsive.bootstrap.min.js"></script>
	
	<script src="media/js/jquery.min.js"></script>
    <script src="media/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
    <div class="row">
        <div class="col-md-15">
            <div class="panel panel-primary">
                <div class="panel-heading">
                    <h3 class="panel-title">
                        <span class="glyphicon glyphicon-bookmark"></span> GESTION DE INFORMACION DEL SINDICATO DE TRABAJADORES DE SERVICIO: SITSER-MPCP | Bienvenido Sr: <?=$nombres;?> <a href="session_invalida.php" class="btn btn-danger btn-xs">Cerrar Sesion</a> </h3>
                </div>
                <div class="panel-body">
                    <div class="row">
					
					<nav class="navbar navbar-default">
  <div class="container-fluid">
    <!-- Brand and toggle get grouped for better mobile display -->
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand" href="#">MENU: </a>
    </div>

    <!-- Collect the nav links, forms, and other content for toggling -->
    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
      <ul class="nav navbar-nav">
        <li class="active"><a href="perfil.php?ida=<?=$idafiliado;?>" target="main">Mis Datos <span class="sr-only">(current)</span></a></li>
      <!--  <li><a href="miaporte.php?ida=<?=$idafiliado;?>" target="main" >Mis Aportes </a></li> -->
	 <!-- 	<li><a href="midescuento.php?ida=<?=$idafiliado;?>" target="main" >Mis Descuentos </a></li> -->
	 <!-- 	<li><a href="mifalta.php?ida=<?=$idafiliado;?>" target="main" >Mis Faltas </a></li> -->
		<li><a href="misor.php?ida=<?=$idafiliado;?>" target="main" >S-O-R </a></li>
		<li><a href="votacion.php?ida=<?=$idafiliado;?>" target="main" >Acuerdos</a></li>
		<li><a href="pactos.php" target="main" >Pactos Obtenidos</a></li> 
		<li><a href="miusuario.php?ida=<?=$idafiliado;?>" target="main" >Mi Usuario</a></li>        
      </ul>      
     
    </div><!-- /.navbar-collapse -->
  </div><!-- /.container-fluid -->
</nav>										
                        
                    </div>
					<div class="col-xs-15 col-md-15">                         
                          <iframe name="main" frameborder="0" height="650px" width="100%" class="well " src="<?=$src;?>"></iframe>
                     </div>
                    <a href="http://sitsermpcp.org" class="btn btn-success btn-lg " role="button"><span class="glyphicon glyphicon-globe"></span>Web </a>
					<a href="<? if($tipouser=="ADMINISTRADOR"){echo "panel.php";}else{echo "";} ?>" target="<? if($tipouser=="ADMINISTRADOR"){echo "main";}else{echo "";} ?>" class="btn btn-danger btn-lg " role="button"><span class="glyphicon glyphicon-globe"></span>Gestion </a>
					<a href="<? if($tipouser=="ADMINISTRADOR"){echo "marcacion.php";}else{echo "";} ?>" target="<? if($tipouser=="ADMINISTRADOR"){echo "_blank";}else{echo "";} ?>" class="btn btn-info btn-lg " role="button"><span class="glyphicon glyphicon-globe"></span>Marcacion </a>
                </div>
            </div>
        </div>
    </div>
</div>

<script type="text/javascript">

</script>
</body>
</html>
