<?php

		session_start();

		include('conectar.php'); 

		if($_SESSION['tipo_usu']=='a' or $_SESSION['tipo_usu']=='u' or $_SESSION['tipo_usu']=='c' or $_SESSION['tipo_usu']=='v' or $_SESSION['tipo_usu']=='m'){

		}else{

			header('location:error.php');

		}

		if($_SESSION['tipo_usu']=='a'){
			$titulo='Administrador';
			}
			elseif($_SESSION['tipo_usu']=='u'){
			$titulo='Usuario';
			}
			elseif($_SESSION['tipo_usu']=='c'){
			$titulo='Cajero';
			}
			elseif($_SESSION['tipo_usu']=='v'){
			$titulo='Vendedor';	
		
		}else{
			$titulo='Mecanico';

		}

		$usuario=limpiar($_SESSION['username']);

		$sqll=mysql_query("SELECT * FROM usuarios WHERE usu='$usuario'");

		if($dato=mysql_fetch_array($sqll)){

			$nombre=$dato['nom'];

			$palabra=explode(" ", $nombre);

			$nomb=$palabra[0];

		}

?>

<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="utf-8">

    <title><?php echo $titulo; ?></title>

    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <meta name="description" content="">

    <meta name="author" content="">



    <!-- Le styles -->

    <link href="css/bootstrap.css" rel="stylesheet">

    <link href="css/bootstrap-responsive.css" rel="stylesheet">

    <link href="css/docs.css" rel="stylesheet">

    <link href="js/google-code-prettify/prettify.css" rel="stylesheet">



	<script src="js/jquery.js"></script>

    <script src="js/bootstrap-transition.js"></script>

    <script src="js/bootstrap-alert.js"></script>

    <script src="js/bootstrap-modal.js"></script>

    <script src="js/bootstrap-dropdown.js"></script>

    <script src="js/bootstrap-scrollspy.js"></script>

    <script src="js/bootstrap-tab.js"></script>

    <script src="js/bootstrap-tooltip.js"></script>

    <script src="js/bootstrap-popover.js"></script>

    <script src="js/bootstrap-button.js"></script>

    <script src="js/bootstrap-collapse.js"></script>

    <script src="js/bootstrap-carousel.js"></script>

    <script src="js/bootstrap-typeahead.js"></script>

    <script src="js/bootstrap-affix.js"></script>

    <script src="js/holder/holder.js"></script>

    <script src="js/google-code-prettify/prettify.js"></script>

    <script src="js/application.js"></script>



    <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->

    <!--[if lt IE 9]>

      <script src="assets/js/html5shiv.js"></script>

    <![endif]-->



    <!-- Le fav and touch icons -->

    <link rel="apple-touch-icon-precomposed" sizes="144x144" href="ico/apple-touch-icon-144-precomposed.png">

    <link rel="apple-touch-icon-precomposed" sizes="114x114" href="ico/apple-touch-icon-114-precomposed.png">

    <link rel="apple-touch-icon-precomposed" sizes="72x72" href="ico/apple-touch-icon-72-precomposed.png">

    <link rel="apple-touch-icon-precomposed" href="ico/apple-touch-icon-57-precomposed.png">

    <link rel="shortcut icon" href="ico/favicon.png">



<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<style type="text/css">

body {



}

</style>

</head>
<body data-spy="scroll" data-target=".bs-docs-sidebar">
<div align="center">
<table width="100%"  height="100%" border="0">
  <tr>
    <td height="20%">
    <div id="navbar-example" class="navbar navbar-static">
      <div class="navbar-inner">
        <div class="container" style="width: auto;">
          <a class="brand" href="Fondo/Fondo.php" target="admin"><?php echo $titulo; ?></a>
          <ul class="nav" role="navigation">
            <li class="dropdown">
			
              <a id="drop1" href="usuarios/index.php" role="button" class="dropdown-toggle" data-toggle="dropdown">Usuarios<b class="caret"></b></a>
              <ul class="dropdown-menu" role="menu" aria-labelledby="drop1">
                <li role="presentation"><a role="menuitem" tabindex="-1" href="usuarios/index.php" target="admin"><i class="icon-user"></i> Todos los Usuarios</a></li>
                <li role="presentation"><a role="menuitem" tabindex="-1" href="usuarios/nuevo_usuario.php" target="admin"><i class="icon-folder-open"></i> Nuevo Usuario</a></li>
                <!--<li role="presentation" class="divider"></li>-->  
              </ul>
            </li>
			
			
			
           
            <li class="dropdown">
              <a href="#" id="drop2" role="button" class="dropdown-toggle" data-toggle="dropdown">Clientes<b class="caret"></b></a>
              <ul class="dropdown-menu" role="menu" aria-labelledby="drop2">
                <li role="presentation"><a role="menuitem" tabindex="-1" href="Clientes/index.php" target="admin"><i class="icon-th-list"></i> 
                Todos los Clientes </a></li>
				  <li role="presentation"><a role="menuitem" tabindex="-1" href="Clientes/nuevo_Cliente.php" target="admin"><i class="icon-folder-open"></i> Nuevo Cliente</a></li>
				  <li role="presentation"><a role="menuitem" tabindex="-1" href="Pagos_Clientes/index.php" target="admin"><i class="icon-folder-open"></i>Recibos de Pago</a></li>
              </ul>
            </li>
			
			   <li class="dropdown">
              <a href="#" id="drop2" role="button" class="dropdown-toggle" data-toggle="dropdown">Facturas<b class="caret"></b></a>
              <ul class="dropdown-menu" role="menu" aria-labelledby="drop2">
                <li role="presentation"><a role="menuitem" tabindex="-1" href="Factura/index.php" target="admin"><i class="icon-th-list"></i> 
                Todos las facturas </a></li>
				  <li role="presentation"><a role="menuitem" tabindex="-1" href="Factura/nueva_proforma.php" target="admin"><i class="icon-folder-open"></i> Nueva Factura </a></li>
                  <li role="presentation"><a role="menuitem" tabindex="-1" href="Notas/index.php" target="admin"><i class="icon-folder-open"></i> Notas de Credito </a></li>
              </ul>
            </li>
			
					   <li class="dropdown">
              <a href="#" id="drop2" role="button" class="dropdown-toggle" data-toggle="dropdown">Inventario<b class="caret"></b></a>
              <ul class="dropdown-menu" role="menu" aria-labelledby="drop2">
                <li role="presentation"><a role="menuitem" tabindex="-1" href="inventario/index.php" target="admin"><i class="icon-th-list"></i>Lista de artículos </a></li>
				  <li role="presentation"><a role="menuitem" tabindex="-1" href="inventario/nuevo_articulo.php" target="admin"><i class="icon-folder-open"></i>Nuevo Artículo  </a></li>
				   <li role="presentation"><a role="menuitem" tabindex="-1" href="inventario/eliminar_articulo.php" target="admin"><i class="icon-folder-open"></i>Borrar Artículos </a></li>
				   
              </ul>
            </li>	
			
			 <li class="dropdown">
              <a href="#" id="drop2" role="button" class="dropdown-toggle" data-toggle="dropdown">Proveedores<b class="caret"></b></a>
              <ul class="dropdown-menu" role="menu" aria-labelledby="drop2">
                <li role="presentation"><a role="menuitem" tabindex="-1" href="Proveedores/index.php" target="admin"><i class="icon-th-list"></i> 
                Todos los Proveedores </a></li>
				  <li role="presentation"><a role="menuitem" tabindex="-1" href="Proveedores/nuevo_proveedor.php" target="admin"><i class="icon-folder-open"></i> Nuevo Proveedor</a></li>
				  <li role="presentation"><a role="menuitem" tabindex="-1" href="Pagos_proveedor/index.php" target="admin"><i class="icon-folder-open"></i>Recibos de Pago</a></li>
				  <li role="presentation"><a role="menuitem" tabindex="-1" href="Factura_compra/index.php" target="admin"><i class="icon-folder-open"></i>Facturas de Compra </a></li>
              </ul>
            </li>
			
			
			   <li class="dropdown">
              <a href="#" id="drop2" role="button" class="dropdown-toggle" data-toggle="dropdown">Caja<b class="caret"></b></a>
              <ul class="dropdown-menu" role="menu" aria-labelledby="drop2">
                <li role="presentation"><a role="menuitem" tabindex="-1" href="tiquetes/nuevo_tiquete.php" target="admin"><i class="icon-th-list"></i>Venta de Tiquetes</a></li>
				  <li role="presentation"><a role="menuitem" tabindex="-1" href="Caja/index.php" target="admin"><i class="icon-folder-open"></i>Caja</a></li>
              </ul>
            </li>
			
			 <li class="dropdown">
              <a href="#" id="drop2" role="button" class="dropdown-toggle" data-toggle="dropdown">Cierres<b class="caret"></b></a>
              <ul class="dropdown-menu" role="menu" aria-labelledby="drop2">
                <li role="presentation"><a role="menuitem" tabindex="-1" href="cierrecaja/index.php" target="admin"><i class="icon-th-list"></i> 
                Cierres de Caja</a></li>
              </ul>
            </li>
			
	
         
		 
		        <li class="dropdown">
              <a href="#" id="drop2" role="button" class="dropdown-toggle" data-toggle="dropdown">Datos<b class="caret"></b></a>
              <ul class="dropdown-menu" role="menu" aria-labelledby="drop2">
                <li role="presentation"><a role="menuitem" tabindex="-1" href="Respaldo/index.php" target="admin">Respaldar Datos</a></li>
                <li role="presentation"><a role="menuitem" tabindex="-1" href="Respaldo/restaurarbak.php" target="admin">Cargar Datos</a></li>
                <li role="presentation" class="divider"></li>
              </ul>
            </li>
		   </ul>
          <ul class="nav pull-right">
            <li id="fat-menu" class="dropdown"> 
               <a href="#" id="drop3" role="button" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-user"></i> <?php echo $hoy ." ".$nomb ?> <b class="caret"></b></a>
	
              <ul class="dropdown-menu" role="menu" aria-labelledby="drop3">
              	<li role="presentation"><a role="menuitem" tabindex="-1" href="bd.php" target="admin"><i class="icon-refresh"></i> Iniciar BD</a></li>
                <li role="presentation"><a role="menuitem" tabindex="-1" href="cambiar_clave.php" target="admin"><i class="icon-refresh"></i> Cambiar Contraseña</a></li>
                <li role="presentation" class="divider"></li>
                <li role="presentation"><a role="menuitem" tabindex="-1" href="php_cerrar.php"><i class="icon-off"></i> Salir</a></li>
              </ul>
            </li>
          </ul>
        </div>
      </div>
    </div>   

    </td>

  </tr>

  <tr>

    <td height="166"><iframe src="Fondo/Fondo.php" frameborder="0"  name="admin" width="100%" ></iframe></td>
    

  </tr>

  <tr>

    <td  height="10%">

    <pre><center><strong><a href="https://www.indesoco.com" target="_blank" style="color:#000"> VERSION 1.0 2014</a></strong></center></pre>

    </td>

  </tr>

</table>

</body>

</html>