<!DOCTYPE html>
<html>

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

    
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
	<?php
		if(!empty($this->session_['tienda'])){
			$tienda = $this->session_['tienda'];
		}else{
			$tienda = "Miracle";
		}
	?>
    <title><?php echo $tienda." | ".$section_title;?></title>

    <link href="<?php echo base_url();?>assets/css/bootstrap.min.css" rel="stylesheet">
    <link href="<?php echo base_url();?>assets/font-awesome/css/font-awesome.css" rel="stylesheet">
	<link rel=icon href="<?php echo base_url();?>assets/img/miralce-ico.ico" sizes="16x16" type="image/icon">

    <link href="<?php echo base_url();?>assets/css/animate.css" rel="stylesheet">
    <link href="<?php echo base_url();?>assets/css/style.css" rel="stylesheet">
    <link href="<?php echo base_url();?>assets/css/miracle.css" rel="stylesheet">
	
    <link href="<?php echo base_url();?>assets/plugins/custombox/css/custombox.min.css" rel="stylesheet">
    <link href="<?php echo base_url();?>assets/plugins/toastr/toastr.min.css" rel="stylesheet">
    <link href="<?php echo base_url();?>assets/plugins/sweetalert/css/sweetalert.css" rel="stylesheet">
	
	<script src="<?php echo base_url();?>assets/js/jquery-2.1.1.js"></script>
	
	<?php /*Plugins loader*/ 
		if(isset($plugins) && count($plugins) > 0):
			foreach($plugins as $plugin):
				$plugin = (object) $plugin;
				if(isset($plugin->css)):
					foreach($plugin->css as $cssplugin):
	?>
	<link href="<?php echo base_url("assets/plugins")."/".$plugin->nombre."/css/".$cssplugin.".css";?>" rel="stylesheet" type="text/css"/>		
	<?php
					endforeach;
				endif;
			endforeach;
		endif;
	?>
	
	<?php 
		if(isset($plugins_header) && count($plugins_header) > 0):
			foreach($plugins_header as $plugin):
				$plugin = (object) $plugin;
				if(isset($plugin->css)):
					foreach($plugin->css as $cssplugin):
	?>
	<link href="<?php echo base_url("assets/plugins")."/".$plugin->nombre."/css/".$cssplugin.".css";?>" rel="stylesheet" type="text/css"/>		
	<?php
					endforeach;
				endif;
				if(isset($plugin->js)):
					foreach($plugin->js as $jsplugin):
	?>
	<script src="<?php echo base_url("assets/plugins")."/".$plugin->nombre."/js/".$jsplugin.".js"; ?>"></script>
	<?php
					endforeach;
				endif;
			endforeach;
		endif;
	?>
	
	<?php /*CSS loader*/ 
		if(isset($cssfiles) && count($cssfiles) > 0):foreach($cssfiles as $cssfile):	
	?>
	<link href="<?php echo base_url("assets/css/")."/".$cssfile.".css";?>" rel="stylesheet" type="text/css"/>		
	<?php
			endforeach;endif;
	?>
	
	<style>
		div.FixedHeader_Cloned th,
		div.FixedHeader_Cloned td {
			background-color: white !important;
			border-bottom: 1px solid #CCC !important;
		}
		
		.myTableActionClass{
			text-align:center;
		}
			.myTableActionClass a{
				
			}
	</style>

</head>

<body <?php if(isset($structure_only)):?>class="gray-bg"<?php endif;?> class="">

<div id="wrapper">
	<?php if(!isset($structure_only)):?>
    <nav class="navbar-default navbar-static-side" role="navigation">
        <div class="sidebar-collapse">
            <ul class="nav" id="side-menu">
                <li class="nav-header">
					<div class="dropdown profile-element"> <span>
						<?php if(isset($user_info) && $user_info->thumbnail !=''):?>
						<img alt="image" class="img-circle" src="<?php echo base_url().$user_info->thumbnail;?>" id="img-user-perfil-thumb" />
						<?php else:?>
						<img alt="image" class="img-circle" src="<?php echo base_url();?>assets/img/thumb_user_default.png" id="img-user-perfil-thumb" />
						<?php endif;?>
						 </span>
						<a data-toggle="dropdown" class="dropdown-toggle" href="#">
						<span class="clear"> <span class="block m-t-xs"> <?php if(isset($user_info)):?><strong class="font-bold"><?php echo $user_info->username;?></strong><?php else:?><strong class="font-bold">Usuario</strong><?php endif;?>
						 </span> <span class="text-muted text-xs block">Administrador<b class="caret"></b></span> </span> </a>
						<ul class="dropdown-menu animated fadeInRight m-t-xs">
							<li><a href="<?php echo base_url('administracion/usuarios');?>">Pefil</a></li>
							<li><a href="javascript:void(0);" id="usuario_ventas_comisiones">Ventas</a></li>
							<li class="divider"></li>
							<li><a href="<?php echo base_url('login/logout')?>">Cerrar sesi&oacute;n</a></li>
						</ul>
					</div>
					<div class="logo-element">
						M+
					</div>
				</li>
                
				<?php 
					$section = strtolower($this->uri->segment(1, 'none'));
					$subsection = strtolower($this->uri->segment(2, 'none'));
				?>
				<li <?php if($section=="productos"):?>class="active"<?php endif;?>><!--productos-->
					<a href="javascript:void(0);"><i class="fa fa-th-large"></i> <span class="nav-label">Productos</span> <span class="fa arrow"></span></a>
					<ul class="nav nav-second-level">
						<li <?php if($section=="productos" && $subsection=="inventario"):?>class="active"<?php endif;?>>
							<a href="<?php echo base_url("productos/inventario");?>">Inventario</a>
						</li>
						<li <?php if($section=="productos" && $subsection=="entradas"):?>class="active"<?php endif;?>>
							<a href="<?php echo base_url("productos/entradas");?>">Entradas</a>
						</li>
						<li <?php if($section=="productos" && $subsection=="salidas"):?>class="active"<?php endif;?>>
							<a href="<?php echo base_url("productos/salidas");?>">Salidas</a>
						</li>
					</ul>
				</li>
				<li <?php if($section=="transacciones"):?>class="active"<?php endif;?>><!--transacciones-->
					<a href="index.html"><i class="fa fa-shopping-cart"></i> <span class="nav-label">Transacciones</span> <span class="fa arrow"></span></a>
					<ul class="nav nav-second-level">
						<li <?php if($section=="transacciones" && $subsection=="facturacion"):?>class="active"<?php endif;?>>
							<a href="<?php echo base_url("transacciones/facturacion");?>">Facturaci&oacute;n</a>
						</li>
						<li <?php if($section=="transacciones" && $subsection=="ventas"):?>class="active"<?php endif;?>>
							<a href="<?php echo base_url("transacciones/ventas");?>">Ventas</a>
						</li>
					</ul>
				</li>
				<li <?php if($section=="clientes"):?>class="active"<?php endif;?>><!--Clientes-->
					<a href="index.html"><i class="fa fa-user"></i> <span class="nav-label">Clientes</span> <span class="fa arrow"></span></a>
					<ul class="nav nav-second-level">
						<li <?php if($section=="clientes" && $subsection=="lista"):?>class="active"<?php endif;?>>
							<a href="<?php echo base_url("clientes/lista");?>">Lista de clientes</a>
						</li>
						<!--<li <?php if($section=="clientes" && $subsection=="creditos"):?>class="active"<?php endif;?>>
							<a href="<?php echo base_url("clientes/creditos");?>">Cuentas por cobrar</a>
						</li>-->
					</ul>
				</li>
				<li <?php if($section=="proveedores"):?>class="active"<?php endif;?>><!--Proveedores-->
					<a href="index.html"><i class="fa fa-truck"></i> <span class="nav-label">Proveedores</span> <span class="fa arrow"></span></a>
					<ul class="nav nav-second-level">
						<li <?php if($section=="proveedores" && $subsection=="lista"):?>class="active"<?php endif;?>>
							<a href="<?php echo base_url("proveedores/lista");?>">Lista de proveedores</a>
						</li>
						<!--<li <?php if($section=="proveedores" && $subsection=="creditos"):?>class="active"<?php endif;?>>
							<a href="<?php echo base_url("proveedores/creditos");?>">Cuentas por pagar</a>
						</li>-->
					</ul>
				</li>
				<!--<li <?php if($section=="reportes" && ($subsection=="reportes_ventas" || $subsection=="reportes_entradas" || $subsection=="reportes_salidas")):?>class="active"<?php endif;?>><!--Reportes--
					<a href="index.html"><i class="fa fa-file-pdf-o"></i> <span class="nav-label">Reportes</span> <span class="fa arrow"></span></a>
					<ul class="nav nav-second-level">
						<li <?php if($section=="reportes" && $subsection=="reportes_ventas"):?>class="active"<?php endif;?>>
							<a href="<?php echo base_url("reportes/reportes_ventas");?>">Reportes de ventas</a>
						</li>
					</ul>
				</li>-->
				<!--<li <?php if($section=="reportes" && ($subsection=="graficos_ventas" || $subsection=="graficos_entradas" || $subsection=="graficos_salidas")):?>class="active"<?php endif;?>>
					<a href="index.html"><i class="fa fa-bar-chart"></i> <span class="nav-label">Estadisticas Graficas</span> <span class="fa arrow"></span></a>
					<ul class="nav nav-second-level">
						<li <?php if($section=="reportes" && $subsection=="graficos_ventas"):?>class="active"<?php endif;?>>
							<a href="<?php echo base_url("reportes/graficos_ventas");?>">Estadisticas de ventas</a>
						</li>
						<li <?php if($section=="reportes" && $subsection=="graficos_entradas"):?>class="active"<?php endif;?>>
							<a href="<?php echo base_url("reportes/graficos_entradas");?>">Estadisticas de entradas</a>
						</li>
						<li <?php if($section=="reportes" && $subsection=="graficos_salidas"):?>class="active"<?php endif;?>>
							<a href="<?php echo base_url("reportes/graficos_salidas");?>">Estadisticas de salidas</a>
						</li>
					</ul>
				</li>-->
				<li <?php if($section=="administracion"):?>class="active"<?php endif;?>><!--Administracion-->
					<a href="index.html"><i class="fa fa-tachometer"></i> <span class="nav-label">Administraci&oacute;n</span> <span class="fa arrow"></span></a>
					<ul class="nav nav-second-level">
						<li <?php if($section=="administracion" && $subsection=="general"):?>class="active"<?php endif;?>>
							<a href="<?php echo base_url("administracion/general");?>">General</a>
						</li>
						<li <?php if($section=="administracion" && $subsection=="facturacion"):?>class="active"<?php endif;?>>
							<a href="<?php echo base_url("administracion/facturacion");?>">Facturaci&oacute;n</a>
						</li>
						<li <?php if($section=="administracion" && $subsection=="usuarios"):?>class="active"<?php endif;?>>
							<a href="<?php echo base_url("administracion/usuarios");?>">Usuarios</a>
						</li>
					</ul>
				</li>
            </ul>

        </div>
    </nav>
    <div id="page-wrapper" class="gray-bg">
        <div class="row border-bottom">
            <nav class="navbar navbar-static-top white-bg" role="navigation" style="margin-bottom: 0">
                <div class="navbar-header">
                    <a class="navbar-minimalize minimalize-styl-2 btn btn-primary " href="#"><i class="fa fa-bars"></i> </a>
                   <form role="search" class="navbar-form-custom">
						<h2> Miracle</h2>
					</form> 
                </div>
                <ul class="nav navbar-top-links navbar-right">
					<li>
						<span class="m-r-sm text-muted welcome-message">Sistema de inventario y facturaci&oacute;n</span>
					</li> 
					<li class="alerts-container-miracle" style=""><!--Notificaciones-->
						<a id="notification-btn" class="count-info" data-toggle="dropdown" href="<?php echo base_url('home/notificaciones');?>">
							<i class="fa fa-bell"></i>  <span class="label label-warning label-alerts-counter">0</span>
						</a>
					</li><!--/Notificaciones-->
					<li><!--Salir-->
						<a href="<?php echo base_url('login/logout')?>">
							<i class="fa fa-sign-out"></i> Salir
						</a>
					</li><!--/Salir-->
				</ul>

            </nav>
        </div>
		<div class="row wrapper border-bottom white-bg page-heading"><!--Seccion-->
			 <div class="col-lg-10">
				<?php
					if(!empty($this->session_['tienda'])){
						$section_title = $this->session_['tienda'];
					}
				?>
				<h2><?php echo $section_title;?></h2>
			</div>
		</div><!--/Seccion-->
        <div class="wrapper wrapper-content">
            <div class="row">
                <div class="col-lg-12">  
<?php endif;?>				